This article is written by flashG
Visit flashG Blogs
Visit flashG Videos
Visit flashG - Build Own PC Computer Guide
----------------------------------------------------------------------------------------------
1.1) Objectives
In this project, we look at how we can implement a "Digital 2.4km Run Announcement System".
1.2) Design MethodologySpecifications 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 across 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 absorb 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.
Given a 7 segment LED, the basic configurations looks as follows:
The 7 segment LED Common Anode will be adopted because the microchip is now driving up to 8 LEDs (segments) at a time off a single port. Just as each I/O pin has a limit to the amount 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 particular segment of each display are all connected together and then connected to a PIC I/O line through a series resistor. The common anode is made controllable by a PIC I/O pin. In this way, the segment value for a given display can be configured and through turning on the anode for that display, we can see the message. The same procedure can be applied to the other LED displays, and when a suitable timing is chosen, we should be able to see the full display of all LEDs without flicker. The suitable timing is chosen by finding out the time constant of the LED using a datasheet, and from this value, we can choose the appropriate refresh time such that it is less than the time constant, allowing the LED to appear bright all the time.
Also a transistor is placed between the PIC and the common anode to each display. Since the current for the entire display runs through this one pin, it could overload a single I/O line. To overcome this issue, the transistor amplifies the current drive capability 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 figure below shows the case for 4 LED displays:
With this way of using LED displays, we can select the numbers to display based on the configuration as follows:
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 correct time by finding the location of the voice segment corresponding to the correct digit.
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 output from the D/A is then fed into a LPF of 4 kHz to remove any noise. The final output is then fed through a power amplifier such as LM386, and through current amplification, we can obtain load matching with the 8
Infrared Interceptor
A possible method of getting a 40kHz signal from the infrared LED is as follows:
If there is any runner crossing, the detector will sense a difference 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
Realization
We use a flowchart to show how these different 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 product 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.