Saturday, January 15, 2011

walmart dancing Santa details?

Dancing Santa From Walmart

Dancing Santa Repairs

For those not familiar with the BASIC Stamp, it is a computer chip that you can program in a simple language that can monitor and control things. It is nowhere near as complex as a full-blown computer, but it requires just a minimum of wiring and electronics to run. It just takes some good programming and some very basic electronics.

the first thing I did was try to get a peek at the wiring which controls the speaker and the motors. I removed the staples that connected the clothing to Santa's boots. I discovered that all of the electrical wiring goes from Santa's left boot, up his leg, and into the body. Looked easy enough to trace... and all the smarts appeared to be in Santa's left shoe. Exactly the same place where all the external user controls are located.

I noticed a curious thing, though, when I was undoing the staples on his left shoe. Hanging out the side of the shoe were two green wires connected to a variable resistor (covered with a black rubber protective cover). What was its purpose? What did it do? It didn't appear to be something that they wanted consumers to touch. I fiddled around with it, but I didn't notice any changes in its behavior. I'd have to figure that small mystery out later.

The shoe is held onto the base with four small screws. With Santa placed on his back, it was a simple matter of undoing the screws and lifting up the shoe to look at the PCB hidden below it. Each set of wires going up into Santa connected to the PCB via a mated connector. It wasn't hard to determine the purpose of the different wires.

GREEN/BLUE pair: This was used to activate Santa's side-to-side 'dancing' motion. The green connection was ground. The blue connection had 7.5 volts DC. But when I measured it again at a different time, the blue connection had 12 volts. This led me to the discovery of what the mystery potentiometer does.
GREEN/GREEN pair to potentiometer: It seems that this variable resistor controls the speed of Santa's side-to-side "dancing". Turn it low, and you'll get a performance worthy of a nursing home. Turn it high, and it'll be jerky and could topple Santa over given the right conditions. Seems to me that the default is good enough unless you're looking for something special. Effective voltage range to the motor (which controls the speed) seems to go from 5 to 12 volts.

ORANGE/YELLOW pair: This is a three pin connector, but the middle pin is unused. The orange wire will open and hold open Santa's mouth when 12vdc is applied. When voltage is removed, Santa's mouth automatically closes by itself (the default state for the mouth). The yellow wire is used for ground.

WHITE/BLACK pair: This is the audio connection that goes straight to the speaker inside of Santa's chest. The audio signal is on the white wire, and the black wire is ground.

RED/PURPLE pair: This controls the left/right movement of Santa's head. Unlike the other connections, the red wire will carry + or - 5 volts, depending on direction. With 0 volts, the head stays in its current position. The purple wire is used for ground.

This information is enough for someone to create their own hack for the Singing Santa. You can bypass or remove the internal PCB and drive the motors and speakers directly. Basically, you've got an analog electronic puppet you can play with. If you want digital controls, or to use the built-in volume control, motion sensor, or start/stop button, you'd have to do a little more work.

So, the motors and speakers are analog devices that are connected to the main PCB. But how does it know which motors to operate at what time, and where does the music come from? The answer is that the main PCB actually acts as a digital to analog converter, and the real smarts of the Santa are in a tiny little computer chip.

Santa's personality chip.
Soldered onto the main board and sticking up from it at a 90 degree angle is a small 15 pin PCB with a single custom IC. This contains the 'personality' of the Santa. All the sounds are recorded on the board, and all the actions are digitally recorded. This allows them to easily create a Spanish and an English version, with the differences contained on the small daughter board.
Remove the small board, and you have direct access to Santa's digital controls. This makes it very easy to operate from a microcontroller or even a home PC. Going through the digital controls, you take advantage of the built-in motor control electronics, volume control, motion sensor (and motion sensor enable/disable switch), and start/stop button.

Alternatively, you could use this information to remove Santa's personality PCB, and place it into a completely different device. That could be really funny.

1 +5 Provided by IC when a routine is active (not used by PCB or required)
2 +5 Provided by IC to move Santa's body back-and-forth aka "dance"
3 --UNUSED--
4 +5 Provided by IC to open Santa's mouth (automatically closes on its own)
5 +5 Provided by IC to move Santa's head to Santa's right
6 +5 Provided by IC to move Santa's head to Santa's left
7 --UNUSED--
8 +5 Supply from board to IC
9 --UNUSED--
10 Red START/STOP button sends +5 to IC while held down
11 Motion sensor, if switched on, sends +5 to IC while motion detected
12 Clock input for IC - not used for this project (ignored/unused)
13 +5 Supply from board to IC
14 AUDIO line output from IC (before amplification/volume control)
15 GROUND connection between IC and Santa