1.1) Objectives
In this project, we look at how we can implement a "Digital 2.4km Run proclamation System".
1.2) Design Methodology The whole design process can be partitioned into a pyramid as follows.
Specifications and Requirement Capture
Components comprises of Led display, a voice synthesizer, a keypad and an infrared Interceptor.
1) Button on keypad is depressed when the runners are flagged off.
2) The display will show continuously the time lapse at 0.1 second resolution.
3) When the infrared ray over the track of the runner is intercepted, the time at the point of interception will be announced.
4) The time will also be logged on the system.
System Concept
The system is capable of displaying the time on the Led display once the start button is pressed. At the same time, the infrared interceptor is started, and is continuously checking if its infrared ray is intercepted, and if so, trigger the system to announce the time of interception to the runners, and make a log of the time of interception to the system. The runner should also be able to see the time they took on the Led display. If the Stop button is pressed, the timer should stop timing, and log the time of disconnection on the system. When disconnected, the infrared interceptor and Led Display are also to be off.
Working Principles
In order to implement such a system, background knowledge about the workings of each component in the system is required. In this case, we need to know the controlling of the Led display, the voice synthesizer, the infrared interceptor, and the keypad, and finally we will show a flowchart on integrating these devices.
Led Display
As found, Leds run on about 2 volts, hence we need a simple resistor in series to Ant. Eject some of the voltage and limit the current the Led can draw. Assuming an input voltage of 5V and a current of 10 ma, and applying V=Ir, we can find the required resistance as R = V/I = (5 - 2)/.010 = 300 ohms.
To have a brighter Led, I can pick the resistor as 270 ohms allowing more current flow, making the Led brighter. With that, the new current drawn is I=V/R = 3 / 270 = 11ma.
Given a 7 segment Led, the basic configurations looks as follows:
The 7 segment Led tasteless Anode will be adopted because the microchip is now driving up to 8 Leds (segments) at a time off a singular port. Just as each I/O pin has a limit to the number of current it will source or sink, each port also has a limit. To do the least damage, we are sinking the current to ground rather than sourcing it to 5 volts.
To add more displays, the cathodes from a singular segment of each display are all connected together and then connected to a Pic I/O line straight through a series resistor. The tasteless anode is made controllable by a Pic I/O pin. In this way, the segment value for a given display can be configured and straight through turning on the anode for that display, we can see the message. The same policy can be applied to the other Led displays, and when a favorable timing is chosen, we should be able to see the full display of all Leds without flicker. The favorable timing is chosen by finding out the time constant of the Led using a datasheet, and from this value, we can pick the accepted refresh time such that it is less than the time constant, allowing the Led to appear spellbinding all the time.
Also a transistor is placed between the Pic and the tasteless anode to each display. Since the current for the whole display runs straight through this one pin, it could overload a singular I/O line. To overcome this issue, the transistor amplifies the current drive quality of the I/O. To operate, put ground on the I/O pin to turn on the transistor and enable a given display, or put 5 volts on the pin to turn off the transistor and the display.
The form below shows the case for 4 Led displays:
With this way of using Led displays, we can plump the numbers to display based on the configuration as follows:
Take segment 'dp' as the Msb, and segment 'a' as the least necessary bit, and to enable a singular segment to light up, we must apply a low to the corresponding segment, since it is an active low input. The table below shows the segments which we have to operate to display each digit from 0 to 9.
Voice Synthesizer
In order to announce the time of interception to the runners, there is a need to store each digit from 0 to 9 in human voice and depending on the situation, announce the strict time by finding the location of the voice segment corresponding to the strict digit.
As found, the average human voice frequency is estimated at 2 Khz to 4 Khz. Hence, we need to sample at a Nyquist sampling rate of f(sample)>2*f(voice)= 8 Khz. We pick the minimum sampling frequency as 8 Khz. Given this frequency, it implies that the voice should be sampled every 1 / 8 Khz = 125 us.
The voice corresponding to a singular digit can also be broken down into distinct syllabus, and each syllabus should take up equal frequency of sampling. For example, the rate of sampling a singular digit of 3 syllabuses will have each syllabus taking up 8000 / 3 = 2667 Hz To start, we can use the sound recorder in case,granted under Microsoft Windows to store the voice as a wave format. We have to set the settings as 8 kHz, 8 Bit, Mono. Next, we take off the header bytes by using a binary editor such as Hexplorer. After which the voice data corresponding to each digit can be stored in the Eprom, and being referred to as and when needed.
To recover an analogue signal from the digital signal stored in the Eprom, a Digital to Analogue converter is used. The digital signal has to be fed to the analogue converter at a rate of 8 kHz or every 125 us. The yield from the D/A is then fed into a Lpf of 4 kHz to take off any noise. The final yield is then fed straight through a power amplifier such as Lm386, and straight through current amplification, we can accumulate load matching with the 8 ohm speaker, and get max power output.
Infrared Interceptor
The infrared interceptor is made up of the infrared Led, the infrared detector Gp1U5. The infrared detector contains both the Ir detector and a small circuit that detects a 40kHz modulation. This detector is able to reject noisy light signals and hence has better performance. It works by detecting the modulated infrared light from the Ir Led, and straight through amplifier and band pass filter of 40 Khz, get a clean signal.
If there is any runner crossing, the detector will sense a dissimilarity and we can use the signal to feed into the interrupt pin of the microprocessor which will then announce the time and also make a log on the system.
Keypad
The form on the left shows the schematics of the 4*4 keypad. The needed outputs can be fed to the Programmable Peripheral Interface 82C55 of the microcontroller for reading the status, and straight through the 82C55, settle the type of interrupt invite to the microprocessor.
In our system, button 1 is designed to start the run, the Led display and the infrared interceptor. Button 2 is designed to stop the run, turn the Led display and infrared interceptor off. All other buttons should not interfere with the doing of the system.
Realization
We use a flowchart to show how these distinct devices can work together.
With this done, we have already gotten ourselves a very concrete design on paper, and it is now time to implement this into stock straight through the necessary hardware and software implementation.
Hope my little project has inspired you with lots of creativity for you to start your very own Diy projects as well.
engaging Diy Microcontroller Projects! - Digital proclamation law