You are on page 1of 13

Keep the arrangement as strong as possible. So that it won't fall out of the high speed rotating platform.

Try to make it stable to suppress the vibrations at high


speed. I attached the 9V battery using a tape to the circuit board of MCU .It means I am using "ON BOARD" power supply.
I arranged the LEDs on a separate PCB and connected them to the pinheads and an eight pin female connector is used to connect the 8 LEDs to connect to
PORT0 of AT89S52.
I used the KIEL software to program the microcontroller. i prefer to work with C rather than assembly. I am using a USB based programmer to burn the AT89S52
MCU.
try to make your code flexible so that you can easily modify to display any word
at first every thing was a bit messy
watch the video

looks nice is isn't it.


I'm trying to make a single stand still display. calculation of proper delay is very important in making this project.because speed of any two
motors is not equal.calculate delay as per your motor.motor speed should not be less than 1000.
for displaying each letter make a standard notation.I'm following 5*7 notation

if your motor is rotating in clock wise direction then the corresponding code will be as follows.
leds are connected to PORT0 of AT89S52 so the logic will be
P0=0x81; delay( );//define this function as per your motor
P0=0x6f; delay( );
P0=0x6f; delay( );
P0=0x6f; delay( );
P0=0x81; delay( );
P0=0xff; delay( );// to make one column gap between letters
if it is anti clock wise then
same code in the reverse order
in this example im using the letter "A" which is symetrical
for other letters you need to follow from down to top of the code algorithm discussed above
P0=0xff;

delay( );// to make one column gap between letters

P0=0x81; delay( );
P0=0x6f; delay( );
P0=0x6f; delay( );
P0=0x6f; delay( );
P0=0x81; delay( );
similarly for active high the following notation must be followed

so the code will be:


led=0x7e;delay();
led=0x90;delay();
led=0x90;delay();
led=0x90;delay();
led=0x7e;delay();
led=0x00;delay();column gap betwwn 2 letters
so that you can display any word on your moving display

but the question is how much delay we need to use after each and every colum
follow theses calculations..

DELAY CALCULATIONS
motor speed===1000 RPM
time for one rotation===60 milli seconds
radious =30cm
peremeter=2*3.414*30=204.84~205
width of led column=0.5cm ( this indicated the duration of led glow in terms of length of display)
total num of columns(leds)=205/0.5=410
410 leds=60 milli seconds
one led(column)time=146 micro seconds//
columns for each letter=6
time for a letter=6*146=876 micro seconds
length for letter=6*0.5=3
total leters=205/3=68
THE CALCULATIONS VARIES ACCORDING TO THE GLOW TIME OF LED AND RADIUS OF THE ROTATING ARM
motor speed===1000 RPM
time for one rotation===60 milli seconds
radius =30cm
peremeter=2*3.414*30=204.84~205
width of led column=1cm( this indicated the duration of led glow in terms of length of display)
total num of columns(leds)=205
205 leds=60 milli seconds
one led(column)time=292 micro seconds
columns for each letter=6
time for a letter=6*292=1752 micro seconds
length for letter=6
total leters=205/6=34
THESE ARE ROUGH CALCULATIONS BECAUSE THE MOTOR SPEED IS NOT ALWAYS CONSTANT
BUT THEY HELP IN APROXIMATING THE DELAY

if you are a bit good at it


TRY WITH "RGB" LEDS
ALL THE BEST
EXAMPLE PROGRAM

circuit diagram using 8051

//THIS PROGRAM IS FOR 8051


// in this code i did not used lookup tables for reducing the complexity
// i just gave code logic for one letter'A' and space ' '
#include<reg51.h>
#define led P0 //port0 will be connected to leds
unsigned int del=50//variable to control delay
void delay(void)
{
unsigned int i,j;
for(i=0;i<del;i++)
for(j=0;j<1275;j++);
}
void display(unsigned char car); // declaration of a function
void main()
{
while(1)
{
display('A'); // this displays a continious rotating"A A A A"
display(' ');
//try to change the del value as per your motor until you get a perfect
//display once you got it then write your code for remaining letters
//once you did this it will be very easy you can do your own fonts
//like "smily" ,"heart" etc
//but the main logic is to achieve perfect "delay".once if you refer to the
//delay calculations you will get it
//direction of rotation is also one important thing(clock wise or anti clock)
// this "A" is simetrical so works on both directions.
}
}
void display(car)
{
switch(car)
case 'A' : // letter A
{
led=0x81; delay( );
led=0x6f; delay( );
led=0x6f; delay( );
led=0x6f; delay( );
led=0x81; delay( );
led=0xff; delay( );// to make one column gap between letters
}
break;
case ' ' : // space
{
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );

led=0xff; delay( );// to make one column gap between letters


} break;
default:
led=0xfe;
}
// END of program
=======================================================================================

//THIS PROGRAM IS FOR AVR

// in this code i did not used lookup tables for reducing the complexity
// i just gave code logic for one letter'A' and sapace ' '
#include<avr/io.h>
#define F_CPU 8000000 // crystal frequency used in the circuit this helps in calibration of delay as per your frequency

#include<util/delay.h> header file for generating delay for


DDRD=0xff; //declaring portD as out put
#define led PORTD // the word "led" will be replaced by PORTD at compile time
unsigned int del=50 //variable to control delay

//the delay function is ther as default in util package of winavr so use: _delay_us( );
void delay(void)
{
_delay_us(del);
_delay_us(del);
_delay_us(del);
_delay_us(del);
}
//remaining logic will be same for all microcontroller units
void display(unsigned char car);
void main()
{
while(1)
{
display('A'); // this displays a continious rotating"A A A A"
display(' ');
//try to change the del value as per your motor until you get a perfect
//display once you got it then write your code for remaining letters
//once you did this it will be very easy you can do your own fonts
//like "smily" ,"heart" etc
//but the main logic is to achieve perfect "delay".once if you refer to the
//delay calculations you will get it
//direction of rotation is also one important thing(clock wise or anti clock)
// this "A" is simetrical so works on both directions.
}
}
void display(car)
{
switch(car)
case 'A' : // letter A
{
led=0x81; delay( );
led=0x6f; delay( );
led=0x6f; delay( );
led=0x6f; delay( );
led=0x81; delay( );
led=0xff; delay( );// to make one column gap between letters
}
break;
case ' ' : // space
{
led=0xff; delay( );
led=0xff; delay( );

led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );
led=0xff; delay( );// to make one column gap between letters
} break;
default:
led=0xfe;
// gives an underline when no letter to display blue line in the code
}
// END of program
=======================================================================================
i m giving the example for understanding the logic of this project.you can extend the code by adding number of "switch cases" i made it for active low logic means
logic zero indicates led glowing and one indicates off.
with this technique you can make your own custom designs like "heart " "smile"
by changing the "del" variable value you can change the width of a letter.because no two motors are alike.
i prefer you to go for 1000 RPMmotor from vegarobokits. Which will be around 145 Rs

This propeller LED display can be made stable using an interrupt source. An IR sensor can be used to make it stable. Better to use a IR slot sensor as shown in
the picture it will be a faster compared to an LM358 based sensor. if your motor is faster than 1500 rpm then this sensor is the best.

You might also like