Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Propellor clock timing problem

Status
Not open for further replies.

jerryd

New Member
Electro Tech,

I posted a similar question some time ago but got side-tracked
on another project.

I'm doing the math and breadboarding for a propellor clock
and have gotten very confused.

If the motor is spinning the led board at 600 RPM then one
revolution takes 100ms. At that speed a horizontal spacing
of .2 inches between each column of leds, within a digit,
takes only 979us. Using a 16f88 microcontroller with an
internal oscillator frequency of 8MHZ I can operate the
leds at that speed but they don't have enough time to get
completely truned off. On my breadboard they just appear
to be on all the time.

The leds are 5mm 3000mcd driven directly off port pins
with 100 ohm current limiting resistors. A high level
on the pin turns on the led.

Anyone who has built one of these clocks must have solved
this problem. What am I doing wrong?

Thanks for any replies,
jerryd
 
If there is no movement, the LEDs on the breadboard will appear to be on all the time if they are flashing faster than 50 Hz. Although you should be using 10 Hz, which should be slow enough to see, 600 rpm sounds a bit slow to me.

It might be a good idea to force the port outputs low to make sure the LEDs turn off quickly.
 
Driver300,

Thanks for the reply.

I motor speed is voltage controlled so I can change that.

I don't understand your suggestion about 50/10 HZ.
I have to flash the diodes at a speed to allow the
right seperation between columns.

Also how do I force the port pins low?

jerryd
 
I understand that you need the correct speed to get the lights to appear in the right places.

You said that the project is on breadboard so I guess that it's not mounted on the propellor at the moment. When there is no movement, it is very difficult so see if the LEDs are on all the time or not. You should be able to see the LEDs flashing on and off if the frequency is below about 50 Hz, and certainly at 10 Hz, if they are on for half the time and off for half the time.

You force the outputs low by just leaving them as outputs all the time and outputting a 0 to the port to make the led turn off. You might well be doing that already, but I wanted to make sure that you were not turning the output off (making it go high impedance) to turn off the LED. Stray capacitance could then make the LEDs not turn off quickly.
 
Driver300,

I keep the port pins as output and just toggle them
between 1 and 0.

I do have a board that spins on the motor shaft but I
wanted to breadboard the circuit before I completely
wired it up.

You said you think "600 rpm seems a bit slow". If I make
it faster there will be even less time between led columns.

Could my math be wrong.

After 1:30 AM here in Florida so I'll be back tomorrow.

Thanks for the help.

jerryd
 
I think what Diver300 is saying, 600rpm is 10hz which is pretty slow.. However it depends on how many "virtual pixels" you are trying to display. If there is too many and your LED speed is too fast, you need a FET in parallel to dim the LED quicker. You can buy fast LED's or you can just compromise

Realistically you need over 15 fps 15hz for a smooth visual and 1 pixel per degree (360 * 10 = 3600 hz) 0.277mS this what your aiming for.
Even if you only display in the top quarter (as most people do ) the speed is still the same. The compromise is less pixels, if you can buy LED's that run really fast
you can always run them slower.

Read this..**broken link removed**

Cheers Ian
 
Last edited:
Ian,
Thanks for the reply,

I selected 600 RPM based on the following math.

600 rpm/60 = 10 revolutions/second or 100ms/revolution.

If the led is 3.25 inches from the motor shaft then
the circumference is 6.5in * pi = 20.428in/100ms.

Multiply that by 10 and the distance traveled is
204.28 inches/second divided by 12 = 17.023 feet/second.
This is close to your suggestion of 15 fps.

If I have 1 degree between led columns the time between
columns would be 100ms/360 degrees = 277us/degree.

Is my math wrong?

Maybe you don't turn all the leds off and on during a
single revolution.

Still confused.
jerryd
 
No, not feet per second! frames per second. A complete rotation. TV's here are on 50 and over by you its 60, but visually the eyes can be fooled by a minimum of 15.

If you are using 1 LED to show the minimum resolution on a clock face, then you only have 60 positions so.. 100ms / 60 = 1.6ms

Ian
 
Electro Tech,

I wired up enough of the spinning board to light up 1 led.

No problem turning it on and off at micro second speeds.

Having it on for 40us and off for 300us gives me the
exact spacing I was looking for.

Thanks for the replies,
jerryd
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top