Monday, May 1, 2017

Head Move Donkey V02 in-process


Adafruit Feather M0, with MusicMaker and PWM/Servo FeatherWing stacked, running the Head Move Donkey code: plays
"Donkey Serenade" while moving the servo about 60 deg right and left to move the head.
As described in detail in this post, I recreated a wind-up toy that I bought for my daughter (an infant in 1978) with a Pro Trinket 3V and other components.  In the 2.5 years since, I've gotten a little smarter and the available technology has gotten a lot better, so I thought I'd try a version 2.  The biggest difference is that I needed fewer components. 
Donkey V01 
In the original, I needed an SD card reader, an amplifier, and a PWM/Servo Board. I still need those things, but the Adafruit Feather System makes it a lot simpler, eliminating most of the wiring and some of the code.  Also the Feather uses a ATSAMD21G18 @ 48MHz with 3.3V logic/power and 256KB of FLASH + 32KB of RAM while the Trinket uses the ATmega328P  at 12MHz with 28K of flash, and 2K of RAM...so, the M0 is much more powerful.

Power management is slightly different. I was able to power the Trinket from a 4xAA battery pack, using the 3V output to power the SD card and the 6V to power the Amp and servo driver.  Logic levels were not a problem.  I power the M0 from a 3.7V LiPo and the Servo Wing from the 4xAA--again, the Servo is forgiving with respect to logic levels.  I probably should have had separate power sources in V01. One twist is that I'll need a DPST switch to turn on both power sources together.

video

Donkey V02 Circuit Working


Next steps are to construct and enclose the completed circuit and re-stuff the donkey.  Since the enclosure will be smaller, I'm going to try to get the batteries inside the donkey this time.
Fritzing Diagram of Circuit