This is the LED display i made, it works on the principle of Persistence of Vision (PoV).
The Led's are turned on and off at precise intervals on different points while they are in motion such that they display the required text or time .
1. Objective:
To realize a text displayer and a clock from a single vector LEDs . These LEDs are rotating fast enough that the human eye has the impression of watching:
- an matrix of leds in the case of a text displayer
- a circle of leds in the case of clock
2. how does this system work ?
3. Design
Power supply unit:
With a continuous movement it is necessary to use two different power supplies,
So we put a 9V battery that will provide energy to the rotating part (PIC + LED) through a 5V regulator.
The motor will be powered by an external adjustable power that will allows me to choose the speed of rotation.
Block of leds Management:
According to the datasheet bicolor LEDs TLUV5300, i must provide 30mA per LED,
In the worst case up to 60mA per bicolor LED.
There will be 7 LEDs connected on a port , that is meen i must provide 420mA in the worst case .
But the PIC datasheet indicate that it supports 25mA per pin and 100mA per port, so i must use a circuit for current amplification . (in my case i used ULN2003)
Schematic diagram of the control of LEDs:
System integration:
The programmed part of the system will be entrusted to a PIC16F877
microcontroller using 20MHz clock which will be more than enough at the frequency of mechanical system (~ 10Hz).
4. Realization
In order to prepare my printed circuit board , i use isis 7 and here is some screen shot of my work :
5. Software development
here is exemple of solution to show time (case of clock ):
while (1) { for (j=1;j<=periode;j++) { for (s1=60;s1>0;s1--) { if (s1!=second) /* second desactivated */ { if (s1!=minute ) /* minute desactivated */ { if ( s1 != hour) { if (s1%5) { output_b(0b00000000); delay_us(speed_time); output_b(0b00000000); delay_us(speed_time); output_b(0b00000000); delay_us(speed_time); output_b(0b00000000); } else { output_b(0b00000000); delay_us(speed_time); output_b(0b01000000); delay_us(speed_time); output_b(0b00000000); delay_us(speed_time); output_b(0b00000000); }; } else { output_b(0b00000100); delay_us(speed_time); output_b(0b01001111); delay_us(speed_time); output_b(0b00000100); delay_us(speed_time); output_b(0b00000000); } } else /* minute activated */ { if ( s1 != hour) { if (s1%5) { output_b(0b00001000); delay_us(speed_time); output_b(0b00011111); delay_us(speed_time); output_b(0b00001000); delay_us(speed_time); output_b(0b00000000); } else { output_b(0b00001000); delay_us(speed_time); output_b(0b01011111); delay_us(speed_time); output_b(0b00001000); delay_us(speed_time); output_b(0b00000000); }; } else { output_b(0b00001100); delay_us(speed_time); output_b(0b01011111); delay_us(speed_time); output_b(0b00001100); delay_us(speed_time); output_b(0b00000000); } }; } else /* second activated */ { if (s1!=minute) /* minute desactivated */ { if ( s1 != hour) { output_b(0b00100000); delay_us(speed_time); output_b(0b11111111); delay_us(speed_time); output_b(0b00100000); delay_us(speed_time); output_b(0b00000000); } else { output_b(0b00100100); delay_us(speed_time); output_b(0b01111111); delay_us(speed_time); output_b(0b00100100); delay_us(speed_time); output_b(0b00000000); } } else /* minute activated */ { if ( s1 != hour) { output_b(0b00101000); delay_us(speed_time); output_b(0b01111111); delay_us(speed_time); output_b(0b00101000); delay_us(speed_time); output_b(0b00000000); } else { output_b(0b00101100); delay_us(speed_time); output_b(0b01111111); delay_us(speed_time); output_b(0b00101100); delay_us(speed_time); output_b(0b00000000); } }; } }; }; second++; if(second==60) { minute++; second=0; }; if(minute ==60) { hour+=5; minute =0; }; if(hour==60) { hour=0; }; }; }
0 commentaires:
Enregistrer un commentaire