Introduction: 3D Printed Watch Winder (ATtiny85+Stepper)
A friend of mine recently bought a watch winder to keep his automatic watch charged when he is not wearing it. I wanted one too, but these device are rather expensive!
I then figured out how to make one on a tight budget: the total cost is less than 15$ (pla filament included)
As I had already experimented with ATtiny's I thought I could use it to drive a commonly-available cheap stepper, the 28BYJ-48. It is usually sold with a handy pcb featuring the "driver", a simple ULN2003 darlington array, some connectors and leds for debugging purposes. Most importantly, this motor can spin with just 5 volts, so we can use the same power supply for both the motor and the microcontroller, thus keeping the circuit very simple (read: cheap).
The idea behind these gizmos is rather simple: they slowly spin the watch some minutes per day, keeping it charged. The one I made, specifically, rotates for 10 minutes every hour.
- Why 10 minutes? Because I've looked up some documentation regarding automatic watches and that's plenty of time.
- Why 10 minutes every hour and not 240 once a day? Well, the latter means that once you end spinning you need to wait 18 hours before moving again. To measure time (in order to wait) in a microcontroller without any additional hardware you have to count. Why bother counting BIG numbers in a 8-bit architecture when you can just split the whole process through the day, handling much smaller time values, with no practical difference at all? (KISS principle ftw)
Here's the bill of materials:
- 28BYJ-48 with driver board, you can find these ones on ebay
- 8 pin socket (optional)
- Decoupling capacitors, I've used 10uF and 0.1uF ones
- Spare wire
- Soldering tools
- 5v regulated (switching) power supply - any 5v USB battery charger will do
- Usb cable
- Something to program the ATtiny with (Arduino as ISP, USBtinyISP...)
- 3D printer and some filament
I've written the code running the ATtiny85 in AVR C. Let's start with that.
Step 1: Program the ATtiny85
Head to https://github.com/SimoDax/watch-winder-attiny85/... and copy the code. Make a new AVR C project in Atmel Studio, select ATtiny85 as device, paste in my code, build it and flash the avr following these steps:
If you want to use Arduino as ISP you need to turn a UNO board into a avr programmer following this guide (I assume the Arduino IDE is already installed on your system). Now go back to Atmel Studio, click on Tools > External tools...In the window that shows up click Add and paste these strings in the title, command and arguments fields:
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
-C"C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf" -v -pattiny85 -cstk500v1 -PCOM19 -b19200 -Uflash:w:"$(ProjectDir)Debug\$(TargetName).hex":i
In the last string look for "-PCOM19". This specifies the serial port the Uno is connected to. On my pc it's COM19, you can check yours in the Arduino Ide, under Tools > Port (there may be many ports listed but only one will have "Arduino/Genuino Uno" written beside, use that one). Change 19 in the parameter to match yours. The final result should be like in the second picture.
Now we're ready to compile & upload the source code: click Build > Build solution, connect the Uno (if you have disconnected it) and click on Tools > AVRDUDE85. A console window will pop up. DO NOT DISCONNECT ANYTHING WHILE AVRDUDE IS RUNNING!
Three progress bars made of #s should appear, one after another. Once you see "avrdude.exe done. Thank you." you can close the terminal. The source code has been uploaded to the attiny. Disconnect the Uno and remove the attiny from the breadboard.
Step 2: Make the Circuit
The circuit is fairly simple, as you can see (also you may notice I'm not good at fritzing). I added two decoupling capacitors, 10uF and 0.1uF respectively. Roughly said, the former smooths out the voltage across the whole circuit, while the latter is "shielding" the microcontroller. These caps are needed because the motor can produce a lot of noise across the power line, and since this is shared with the microcontroller we don't want it to reset due to voltage fluctuations.
If you're wondering why there are no diodes against back-emf don't worry: they're inside the uln2003 ic :)
You can copy my circuit layout or make your own, I tried to use as little space as possible by keeping all the components close and making a sort of +5v and GND parallel rails. Note that to be effective the .1 uF cap should be placed as close to the microcontroller as possible.
I've chosen a cheap 5v usb battery charger as power supply (be sure it's regulated!), and I've cut off an extremity of a spare usb cable to solder it to the circuit. I've designed a hole on the back of the base to pass the cable through it. The whole thing draws about 200 mA when the motor is spinning, and virtually zero amps (ok, some microAmperes) when idle, since the code I've written sends the microcontroller to sleep while waiting.
I haven't used a socket but I've soldered the ATtiny directly, however I do not recommend this. Use a socket. Really.
There's no on/off switch, I don't think this thing really needs one and I don't mind sporadically plugging the usb cable from the charger. You can edit the .stl and add a hole on the base to insert one, if you want.
Now that you've soldered everything I suggest to apply some sealing glue on everything that may cause a short circuit when the whole thing will be pushed inside the base (I covered the bottom of both boards and the uninsulated wire parts), so you don't need to worry if the thigs get messy when you'll stuff them inside the winder.
Step 3: Print the Winder
You can find all the stl files here on thingiverse. I printed mine with 0.2 mm resolution, 60 mm/s and 20% infill, supports enabled, no raft.
The lateral wings on the central holder are chamfered because this way the printer doesn't need to make supports to print this piece.
If you want to edit the model to fit your needs don't worry: here you can dowload the Fusion 360 file (or other formats if you don't use Fusion)
I'm currently working on making a similar model without the outer cylinder, since while assembling it I noticed it doesn't look bad at all with just the rotating part, to check the latest file version follow this link
Step 4: Assemble!
Pull out the exceeding part of the usb cable, put the circuitry inside the base, use some cyanoacrylate or resin to glue the stepper in place, insert the rotating cylinder on the motor shaft and glue it through the other side of the hole. Mount the outer cylinder.
Now glue a disc of transparent plastic (or plexiglass, or even real glass) to the cover piece and insert this one on top of the winder. I have yet to find a cheap solution I like for this step, I could skip it but I want a bit of protection from dust. Anyways, the diameter of the transparent disc has to be between 80 and 82 mm: I've added some extra spacing in the design to make up for imperfect cuts.
I've also designed a piece to put the watch on before inserting it in the winder, so even if you have a small watch it should be stiff and not moving around. The lateral wings on this are chamfered because this way the printer doesn't need to make supports to print it.
Step 5: Enjoy!
Now you've made your very own watch winder! Go tell your friends!