Ornamotions add a bit of dynamics to a Christmas Tree, but the way they get power is dying. They get power by unplugging an incandescent light from a string of Christmas lights, and plugging in the spinner. As lighting shifts towards LEDs, the AC power that these motors need is getting more difficult to find. One can use a hacked together transformer to bring 120V power down to 4.5V to run them, but then that is playing with wall power. Why not use USB instead?
I build this thing to have it so a standard USB-C can power the spinner, and the spinner is capable of reversing direction when the motor slows or stalls.
All that is needed is the following:
- USB-C connector
- 17V 1A H bridge driver
- ATtiny402 microcontroller
- 2x 5.1k 1206 resistors
- 10 ohm 1206 resistor
- 22uF 0603 capacitor
- 2x 0.1uF 0603 capacitor
- GA12-N20 Motor 6V Metal Gear Wheel 15RPM Micro DC Motors
Note, these are digikey links, but shop around, you may find them cheaper on aliexpress, etc, just digikey has more stable datasheets and links. The motor is not through digikey, look on aliexpress or similar, the text above should get you a good search for them. Make sure you select 6V or more, and choose a RPM you like. 15RPM is close to the ornamotions.
You will also need a UDPI programmer such as the Adafruit UDPI Friend
Follow the schematic to solder the pcb, I would recommend soldering the USB socket ad the h bridge driver first, using a heat gun. Then the ATtiny402 then all the passives.
Solder jumpers to the programmer to the labelled pads, and ensure the programmer is in 5V mode. Then flash it from arduino. You may need to add the arduino board set of megaTinyCore, and set the board to 402, the chip to ATtiny402, and the clock to 16MHz.
Test it by soldering a motor to the motor pads. It should spin when powered by USB, and when the hook is grabbed, it reverses direction.
There are pieces to 3d print your own case, but if you do not have a 3d printer, or don't want to print one, the wires are strong enough for most ornaments.
Comments
Log in to add a comment.