Propeller Clock Advanced Design


+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Balachandar's Avatar
    Balachandar Guest

    Default Propeller Clock Advanced Design

    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:

    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
    Attached Images Attached Images  

  2. #2
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429

    Default

    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".
    Last edited by Kamikaze47; - 15th September 2009 at 17:54.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  3. #3
    Balachandar's Avatar
    Balachandar Guest

    Default Propeller Clock Advanced Design

    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

  4. #4
    Join Date
    May 2010
    Location
    Chile
    Posts
    25

    Default

    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.

    Name:  POV Display Robot_0001.wmv_000038239.jpg
Views: 7187
Size:  186.0 KB
    "If at first doesn't work, kicking it wont help either"

  5. #5
    Join Date
    Oct 2021
    Posts
    1

    Default Re: Propeller Clock Advanced Design

    please I have the schematic and full file this propeller projects.tankyou very very much

Similar Threads

  1. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 09:42
  2. EM4095 Chip, get Clock and Data signals?
    By mindthomas in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 19th August 2008, 07:27
  3. Shiftout/in
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd August 2007, 12:48
  4. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 21:36
  5. Propeller Clock
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 9th March 2006, 16:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts