Naughty Duck

I know it doesn’t look like much, but you’ll be surprised when you here it talk! This was my latest creation for a Secret Santa gift exchange for the comedy site I found this little talking toy duck at a local goodwill. When you pressed little button on it’s foot, it would sing a silly song with it’s mouth moving in sync with the words,  and flap its wings. I wanted it to say something different, something funny.  I used the following core components.

  • SOMO-14D audio player
  • PIC16F628

I picked the SOMO14D audio player because I’ve used them before and know how to code them. You can pick them up from Sparkfun for about $25. I picked the 16F628 because I happened to had a few laying around. This would turn out to be a mistake, as you will see later.

The stock duck works as follows: There are two DC motors and a bunch of gears. One motor for the mouth, and one that flaps the wings. The mouth motor has a spring that keeps it closed. Both motors go to a little pcb with a BBIC (Black Blob Integrated Circuit). The switch on the foot also goes to the pcb, and starts/stops the ducks routine.

One thing I learned from hacking these type of toys in the past is that it’s best to use the stock PCB to drive the motors. And I did just that. It was a trivial task finding the signals for the mouth and wings on the stock PCB. I would tap into these and feed my own signals to the mouth and wings driver transistors. I would use the SOMO-14D to feed my own audio to the speaker. And wala! A hacked duck!


Known Issues

So, the project was not without its problems, and I hope some of you might be able to shed some light on them.

  • One of my biggest issues was current draw when the power switch was on, but the duck was not doing anything. It draws about 11omA! And that’s with the PIC in sleep mode. The result is you have to remove power from the board or the batteries will die in a couple of days. I don’t know why it’s drawing so much current. Please leave ideas and suggestions in the comments to reduce it.
  • The SOMO-14D needs 3.3v and the PIC needs 5v. Naturally, I used a 6v battery supply and a 3.3 regulator for the SOMO-14D. A protection diode on the PIC keeps it’s voltage around 5.5v. I have a serial and a clock line running from the PIC to the SOMO-14D (see schematic below). I used in line resistors like the datasheet suggests. I also put in a couple protection diodes. But somehow the voltage on the VCC pin of the SOMO-14D would jump up to around 4.3 volts when the PIC sends the PLAY command to the SOMO. This is WAY above the maximum allowed voltage specified by the data sheet. Now, it seemed to work just fine. But I still don’t understand why it does this. And if you build this circuit, be aware of it. Maybe somebody can find my mistake and post in the comments.

Technical Details

Layout of board and schematic were done in Eagle.

PIC was programmed in C in MPLAB using CCS compiler & a ICD2 programmer.

Board was ordered through the Dorkbot service.

Board from Dorkbot PCB
Surface mount done in toaster oven
Click for full size

If any of the links below are dead, send an email to gigavolt <at> I will send you the files or fix the links.

Get the Source code here.

Get the Eagle schematic here.

Get the Eagle board file here.

Get the SOMO-14D Eagle layout here.




Thanks to everyone who commented! I needed at least 6 volts to power the actual duck, but I never thought about using the 3.3 regulator to power both the PIC and the SOMO board. Looks like current draw issue was coming from the regulator itself. Thanks to “dmo” for pointing this out. And it would have been best if I used a voltage divider between the PIC and SOMO. Thanks to all of you who pointed this out!

Also, thanks to Hackaday and Buildlounge for posting my project.

10 Responses

  1. gigavolt Says:
    December 13th, 2011 4:26 am

    I forgot to mention the issue with the PIC16F626. I almost ran out of memory. As the code sits now, it’s about 95% full. I was trying different coding in order to reduce the standby current draw, but I kept getting errors because of memory issues.

  2. hpux735 Says:
    December 14th, 2011 1:10 am

    I know nothing about that audio player module, but the likely reason for the VCC jump when the play command is given is an ESD protection diode on the input pin. When the 5 volts from the pic pin comes into the module it exceeds the VCC and the extra voltage is dumped into the modules VCC. The 4.3 isn’t a coincidence, either. 5 volts out of the pic minus .7 volt drop in the diode, and bob’s your uncle.

  3. andres Says:
    December 14th, 2011 1:33 am

    perhaps you could replace the diode/resistor on the clock and data lines with a resistive divider instead.

  4. Sean Murphy Says:
    December 14th, 2011 2:21 am

    What is the current draw when the motor controllers are disconnected and not being powered? My guess is that your power problem is there.

  5. Lee Says:
    December 14th, 2011 3:17 am

    The Vcc on the somo chip may be due to protection diodes. If the chip uses less power than it can draw (through the resistor), then it might be powered by digital input through the protection diodes on the clock and data inputs. Those diodes would be forward bias when the inputs are above 4V. Since the SOMO-14D uses a tiny 10 uA when idle, it is trivial to get that through the protection diodes. As soon as the play starts, the current draw goes way up, and starts getting power via VCC again. The diode drop is only 0.5V b/c the current is so low (so 5.5V – 0.5V (d3/d4) – 0.5V (protection diode) ~ 4.3V). I guess the last note is that the LM340 does not *sink* current, so +5V on its output pin does not cause it to sink current to ground.

  6. Verda Thomison Says:
    December 15th, 2011 6:38 pm

    Hey there would you mind stating which blog platform you’re working with? I’m looking to start my own blog soon but I’m having a hard time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique. P.S My apologies for getting off-topic but I had to ask!

  7. dmo Says:
    December 17th, 2011 7:13 pm

    Wouldn’t you be dropping quite a bit of power through the regulator? Could try a switcher.

  8. Brett_cgb Says:
    December 18th, 2011 8:24 am

    The PIC needs 3V, not 5V. Its happy on anything from 3.0V to 5.5V.

  9. Ernesto Reffner Says:
    December 23rd, 2011 6:29 am

    Do you mind if I quote a few of your posts as long as I provide credit and sources back to your webpage? My website is in the very same area of interest as yours and my visitors would certainly benefit from some of the information you present here. Please let me know if this alright with you. Thank you!

  10. gigavolt Says:
    December 23rd, 2011 3:26 pm

    No problem, good luck with your projects.