Wednesday, 8 February 2012

Digital POV clock working! mostly

Well, without too much pain, its just about working!


Here is how I went about it, which might help you if you want to make one yourself...

When you pick a drive to use, make sure it has four conductors going to the motor ("Y configuration") rather than three ("Delta configuration") if you want to use the TDA5140A/TDA5144 to drive it. The conductors are likely to be on a tiny flexible ribbon going into the motor on the back of the board.

Get yourself a proper Torx driver to take out the screws holding the drive together (you can work around it with other things but you will drive yourself crazy). Remove the PCB from the back, being careful not to damage the ribbon going to the motor. Remove the metal front cover, remembering that there are usually a few screws hidden behind labels. Less brute force, more patience :o)

Remove the head and magnets by taking out screws. Take out the central screw of from the hub and take off the platter. You might be unlucky and have a platter which sits very low to the backplane. You might need to improvise to jack it up a bit to leave space behind from the leds, or you could combine parts from a couple of drives (as I did) to get the best combination. Another thought is to cut windows for the LEDs in the aluminium backplane, but that seems like a lot of effort!

My replacement platter  was cut out of FR4 single sided copper clad board using a 70mm holesaw. A smaller holesaw (19mm I think) was used to cut out the centre, which was then filed to snugly fit the hub of the 2.5" laptop drive. The digits were actually laid out in EAGLE (PCB designer) since it was the only package I had to hand which let you type in rotation angles for characters. This worked OK, but a decent vector drawing package will have more interesting font options. The platter was etched just like a PCB.

It was challenge to fit LEDs and section dividers in the few mm of room behind the platter. My solution was to use SMD components and mount them on flexible kapton copper clad board (awesome stuff) which I picked up on eBay. Just press and peel and etch it as a normal PCB. The finished result, with components on, is only a mm or two in height and can be shaped with scissors and a knife, then glued down in the space under the platter. I made the light dividers from a bit of card cut with a knife and glued to the flexible board.

To index the rotation I used a reflective surface sensor (Osram SFH9202) which detects the passing of  a piece of white paper stuck to the back of the platter. I used a strip of matt black insulation tape to give decent contrast on the rim of the platter (FR4 is a bit shiny).
I was a bit worried that the sensor seemed to be getting hot. I am still not convinced this is right, but looking at the data sheet they do dissipate 80mW, and I tried 3 of them and they all did it, so maybe this is right (it hasn't blown up yet!)

The sensor output is quite "analog" and doesn't, by itself, give a nice sharp switching signal. I should have shopped more carefully since Osram do the same sensor with a built in Schmitt trigger output. Still, I had some CD40106  Schmitt trigger inverter chips so I used one of those to give me a clean logic output and it seems to work fine now.

The main board was designed in EAGLE and etched on SRBP using some cheap toner transfer film from a chinese ebay shop. This film is great! it works better than the much more expensive press'n'peel blue and seems less fussy about your ironing technique (i have none). Another first was to etch this with Hydrochloric Acid and Hydrogen Peroxide mixture rather than Ferric Chloride. It is very fast and resulted in less erosion of tracks under the toner, but it also resulted in a nasty lingering chlorine smell pervading the house.

I really enjoy working with SMDs these days, but I used to be terrified of them. Those tiny surface mount components have many advantages: They tend to be cheaper, your boards can be much smaller and need less drilling, and the result is actually really satisfying. I'd say the most important things are magnification (I use a 10x  loupe) a decent iron with a small tip (e.g. 0.4 or 0.8mm needle tip), fine solder (e.g. 0.015"), tweezers and a flux pen. Most important of all is practice and expecting it to all go wrong at least a couple of times before you get on a roll with it. Then you'll never look back :)

I'll admit I used solder paste for a couple of the components (the LEDs and their resistors, the two tiny resistor networks, the 16MHz resonator for the Atmega328). I used a hot air tool to reflow the paste. Everything else was done with an iron. The LEDs, resistors and small caps are 0805 size.

I have a small stock of M41T100 realtime clock chips in SOIC8 packages (from an ebay bargain) and I used one of these on this project, with a backup battery.

The MCU is an Atmega328 set up with Arduino bootloader. The code is all Arduino stuff. The Arduino drives the LEDs through a ULN2803 transistor array, since these LEDs are powered in groups of 3 and draw something like 30mA each, which would be too much to drive directly from the Arduino digital output pins.

Last but certainly not least, the hard drive motor is driven by a TDA5144. A word of warning - Don't think you can put power to a hard disk motor and it will spin. These are brushless motors and need electronics to make them work. If you want to try any HDD motor project I recommend you invest in a special IC for it. The Philips TDA5140A and TDA5144 have been perfect for the job in my experience (The TDA5140 - without the A - seems more finicky to get working). You can certainly make your own brushless DC motor controller, but that is a project by itself and I prefer to jump in with the fun stuff :)

Something I was glad I did was to add isolation jumpers to the board so I could power up the Arduino stuff without the motor starting, and vice-versa.

Code and EAGLE files can be found here
https://github.com/hotchk155/DigiPovClock


43 comments:

  1. Nice, now do this with one of those "watch sized" CF card hard disks.
    I have one here where the platter is virtually see through, due to a nasty head crash.

    Maybe I can use this method to make a wristwatch POV clock?

    ReplyDelete
    Replies
    1. oooh - let me know if you have any luck. Sounds like I might need to check out those myself :) are they the "microdrives" ?

      Delete
  2. Since the LEDs have to rapidly turn on and off... how would that affect their life span? I'm curious if you had that running all and day and all night, how long would it be before the LEDs would begin to die and need replacing?

    ReplyDelete
    Replies
    1. I don't think they care.. LED applications like digital clocks and matrix displays are multiplexing LEDs or driving them at less than 100% duty cycle on khz rates, so I don't reckon the switching affects their life at all, and they probably actually last proportionately longer as a result of being on less than the whole time. But I am just guessing :)

      Delete
  3. Could you publish the schematic in a more usable format? PDF would be great.

    ReplyDelete
  4. ok, will see what i can do, but EAGLE is definitely worth a try

    ReplyDelete
    Replies
    1. I use kicad and I'm quite happy with it.

      Delete
  5. You should try making a platter with "pixel" instead of number. You'd kind have the X axis on the led and the Y axis on the platter

    Here's a crud drawing I did on paint :
    https://picasaweb.google.com/lh/photo/l5E1jjzFeFBPtZg3_9Rg6Dmi7wnG3t1uqqrHahqiMnY?feat=directlink

    It shouldn't be to hard to etch on a PCB.

    Changing to code to access those "pixel" instead of numbers, you'd get a 8xN display.

    You could also add more led on the bottom of the platter to get more "x" pixels.

    ReplyDelete
    Replies
    1. Nice idea Andre! It's got me thinking... if I get anywhere with this will post about it

      Delete
    2. @andreq is this the kind of think you mean
      https://plus.google.com/u/0/105009608886388132613/posts/f3ogd42DNnH

      Delete
  6. This is brilliant!!! - Nicely done.

    ReplyDelete
  7. How did you go about determining capacitor values for your hard drive? I'm right now trying to debug my TDA5144. It rotates one phase, then oscillates. I'm assuming it's my startup capacitor which you specify as 200pF. I did use 200pF though.

    ReplyDelete
    Replies
    1. I copied the values from the application circuit on the TDA5140A data sheet. The value is actually 220nF if its the same cap I am thinking of (c2 on the github wiki page, right?)

      Delete
  8. Why do you use a sensor... do you set the rotation speed with it?

    ReplyDelete
    Replies
    1. Other way round - it measures the rotation speed. Sensor lets the Arduino chip know when each spin of the disk starts so it can time how long it takes and then divide that time up to know the angle of the disk at any moment. That info is used that to flash the LEDs at the right times

      Delete
  9. I'm planning on building this myself, and I've run into a few issues.

    [*] What's the voltage on the power supply?
    [*] What type of battery are you using for the clock-chip?

    Thanks.

    ReplyDelete
    Replies
    1. Missed the questions :\
      1.I run this at about 8v for the motor, which is regulated to 5v for the micro
      2.cr1220

      Delete
  10. What LEDs do you use because because there is needed much current, isn't it?

    ReplyDelete
    Replies
    1. They are from ebay (hitechledworld). Here is the spec info
      Material: InGaN
      Size: SMD 0805 SMT
      Emitting Colour: Green
      Lens Type: Water clear
      SIZE:2.0 x 1.25 x 0.8mm 0805 SMD LED
      Reverse Voltage: 5.0 V
      DC Forward Voltage: Typ: 3.4V Max: 3.6V
      Luminous Intensity: Typ: 900mcd
      DC Forward Current: 20mA
      Viewing Angle: 120-140degree

      Delete
    2. I used them with 100 ohm series resistance and drive 3 in parallel behind each digit of the POV. I use a ULN2803 NPN transistor array for drive.

      Delete
    3. thanks!.. a friend of mine and I are also working on a hdd clock as a school-project and your documentation and answers are really helpfull

      Delete
  11. I have issue with sensor board.How are parts placed and what is pins value?

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. So sensors pin one goes trough resistor to Sens_Vcc ,pins 3 and 6 are Sens_GND and pin 4 is Sens_Q ? I got it right?

      Delete
  12. Deleted my previous comment as sensor should be SFH9202. I added an image which should help you (https://github.com/hotchk155/DigiPovClock/blob/master/sensorboard.gif). Also check out photos at https://plus.google.com/photos/105009608886388132613/albums/5836187581823103281/5836187608373769682
    Hope that helps!

    ReplyDelete
    Replies
    1. That is exactly what I'm looking for.
      Thank you.

      Delete
  13. Nicely done especially the disk part I was wondering if it can be done alphanumeric

    ReplyDelete
  14. I'm starting eagle files I do not see any value capacitors nor resistors.

    ReplyDelete
    Replies
    1. Hey, https://github.com/hotchk155/DigiPovClock/wiki/R-C-Component-values

      Delete
    2. Hi.
      thank you.I get stuck with it even if I write.

      Delete
  15. Hi, we need a HDD drive with Y configuration of the motor,
    O - motor coils common centre terminal is easy to find, is there any rule how to connect A, B, C - motor coil terminals to TDA5144?

    ReplyDelete
    Replies
    1. Hi - As long as you have Y-configuration and connect 0 to the common point, you can connect A/B/C in any order. If the disk spins in reverse simply change 2 of the connections over

      Delete
  16. hi, On the pcb usb next "so8" what the type?

    thanks

    ReplyDelete
  17. That will be the real time clock chip (M41T100).

    ReplyDelete
  18. Hi, one more question. I'm ready with soldering the boards. Now I'm trying just to spin the hard drive. I'm using 12V input power supply, but the motor doesn't spin. My Atmega is still blank, but I think the TDA driver should run the motor without any control from the MCU?

    ReplyDelete
    Replies
    1. There are some jumpers to isolate the motor circuit from the power when programming the MCU, so you'll need to put those jumpers in place to spin the motor. Could that be the problem? Cheers/Jason

      Delete
    2. Hi, The jumpers are set like on this photo:
      http://1.bp.blogspot.com/-LmT2nx-RFoY/TzGxVc4LIFI/AAAAAAAACUk/s5kdUVWUiCU/s1600/DSC00018+%25282%2529.JPG
      The MCU isn't programmed yet, and I didn\t even try to program it. I want just to spin the motor first, after that I will burn the bootloader and so on.

      Delete
  19. Good day, i think atmega 328 next resonator 16mHz and M41T00M6E rtc clock ic above 32kHz crystal, or?atmega above six pins connector programmed? Thank you for your answer, Alexander.

    ReplyDelete
    Replies
    1. Hi - I made this graphic which I hope will help
      https://raw2.github.com/hotchk155/DigiPovClock/master/board_layout_guide.png

      Delete
  20. Hi,

    I was planning on letting some of my students do this as a Science project. They've seen it and they love it. How much do you think this will all cost?

    ReplyDelete
    Replies
    1. Hi - its hard to say exactly as I used parts which I already had lying about. I think you'd certainly be under $50 but by shopping around and buying in bulk you can probably get lower. Good luck!

      Delete
  21. hi, i can't can atmega program write on the ic. What the program rs232 through. write, verify, ..... I create rs232 connector bc546 two zener and resistor.

    ReplyDelete