PDA

View Full Version : Propeller Clock Advanced Design



Balachandar
- 12th February 2009, 09:47
I am one of those countless PIC enthusiasts to have been fascinated by the Propeller Clock, first popularized by Bob Blick. I built my first propeller clock in Nov 2004 using PBP for coding. It was a fairly simple design with 7 LEDs for character display, one LED for the outer ring under software control and an IR remote control. Then in Aug 2007, I improved the design to have a 16 LED 2-line display with time, date and alarm features (Photograph attached).

Recently, I came across an amazing design. Link: http://www.youtube.com/watch?v=l4F8UbM-1t4

Characters that are displayed in a system that use spinning LEDs become larger as they go away from the centre. In other words, they flare out. What is unusual in the above design is that the images and characters appear as if they are displayed on a regular monitor. They claim, “Real time Cartesian to Circular Graphics Conversion”. How is it done in software? What is the algorithm used? Do I need to do a crash course in Trigonometry and Linear Algebra?

I would highly appreciate any explanation, pointers, help or guidance so that I can start experimenting.

Thanks & Regards,
Bala

Kamikaze47
- 15th September 2009, 16:51
I expect that there's is some pretty impressive programming behind that clock.

I'm even impressed with him driving 32 RGB leds simultaneously, and that's even before you consider the coordinate system conversion.

Theres lots of information on google for converting Cartesian coordinates to Polar ones, and i'm sure you could implement an algorithm in PBP but i'm not sure if you could do it fast enough.

The video says he is using a ATMEGA644 running at 20MHz but doesn't mention a programming language. He may be using plain old assembly which would make it fast, but quite a pain to program and troubleshoot.

While I was typing this I had an idea - you could do all of the coordinate conversions beforehand and use a look-up table for each "pixel". So instead of doing the maths for each pixel each time, you just use the lookup table for each pixel to determine its location in the sweep. This way you could look up the pixels via the lookup table in real time as the propeller swings instead of having to calculate the whole "frame".

I hope all of that made sense :)

*edit* Out of curiosity, how many "pixels" did you use in each rotation of your clock shown in the picture? I.e. i want to work out how many degrees between each "pixel".

Balachandar
- 14th September 2010, 17:59
Hi Kamikaze47,

Thanks for your useful suggestions. One year after posting I saw a reply today! Since I didn't see any response for many months after posting I almost gave up. Your reply was in fact a pleasant surprise.

In my code, I use polling instead of interrupts. The index pulse is generated by a Hall device. After the index pulse, the display routine starts. The RPM should be around 800 for proper display. If the speed is reduced, the characters shrink in width. If the RPM is too high, the characters widen and before the display routine is completed, the next pulse may arrive. There is also a software routine to control the width of the characters through the IR remote.

I have used PIC18F2620 and most of the components are surface mount type.

I like your suggestion of using a table to convert cartesian coordinates to polar ones. That should definitely lead to faster conversion.

Let me know if you have tried your own version of propeller clock.

- Bala

El_AMPo
- 21st October 2010, 18:56
Since no response for a while maybe i can help a little.

The logic behind ANY stable propeller clock is that you need to generate a burst of "led lines" of a specific delay time each so that they fill a full rotation and that the beginning of the burst to always begin in the same position (sync).

Sound like "I already know that", but now to the analysis part:

-First, the sync pulse: If your motor has a tachometer, like a pc fan there you go!. Another forms of syncing are a small value high watt resistor in series with your motor and make a current to voltage rotation detector (only works in some motors), or what most people use, a strong magnet with a hall efect switch or reed switch.
The important thing is to get a stable switching on every turn (no switching loss, no oscillation in position).

-Second, the rotor: The motor has to be big enough to handle the weight of your circuit and everything else at a frequency of 50-100hz (the faster the better). That make a really nice component centrifuge so be careful with mounting stuff (already blown a full propeller right to my face) balance the weight proportional at each side. For getting power to the circuit in the rotor, there are a lot of techniques, you will have to do some research there. The usual way is to just run it from batteries, another way is to use a brushed contact switch of some kind and good pair of capacitors and regulator to avoid any glitches in the contacts

-Then you need your leds: starting in monochrome and with 8 leds directly to the pic is a good way to learn, if you like color or more than 16 leds, its better to use some kind of led controller or serial to parallel latch (74HC595 is my way to go). Color toning is preformed by PWM BUT in a high frequency (at least: Fpwm=20*RPM) and it uses really huge data bandwidths.


In the programming part, your first priority is to poll the sync pulse, when the sync pulse is detected, run the loop of (N-lines) led busts with a small delay each. How calculate the delay, It should be (Delay for each line = Time between last 2 syncs / Nº Lines) With that formula you keep adjusting time according to the last rotational period, that way even if your motor drifts in speed you get a static image.
How to get the time between the 2 syncs is trickier but the most simple way is to count how many lines you have showed and if a sync comes up and you haven't finished all the lines, compensate subtracting time from the delay. On the other hand if you finished your lines and the sync pulse doesn't appear, keep counting blank lines and compensate adding to the delay

For dynamic text, just make a character lookup table and burst from there loading an array sequentially, for the clock part TMR0 interrupt comes to my mind

Hope it helps, learning a little of darrel interrupts in TMR1 (delay) and on PORTBINT(sync) makes things work a little faster an responsive.

4870

AHMADARAZ
- 15th October 2021, 12:02
please I have the schematic and full file this propeller projects.tankyou very very much

AHMADARAZ
- 21st June 2022, 20:17
Please I Want the full file and schematic the propeller clock advanced design project for I wanted make it.very very tank you

AHMADARAZ
- 21st June 2022, 20:38
Hello Im AHMADARAZ , Please the send for me full file and schematic propeller clock Advanced Design project ,becuse I wanted the make this project and very need to this Files ,please help me and send me the full file and schematic and hex file ....very very tank you