Introduction: Greeting Santa
This project was done as a part of the Christmas decorations.
It is a Santa's doll with lights and an arm that move when it detects you.
Step 1: Materials
We need the following material (can be adapted as desired, needed or availability):
- A controller board: Arduino nano.
- A bunch of leds: I use 8 NeoPixels.
- A Santa's doll: or other character of your choice. When you have it, make sure it's easy to open and has space to house the components, and some kind of internal structure to hold some components, mainly the servo. Or if you're really crafty, you can make the whole doll yourself (in this case it is better to build the doll while the mechanisms).
- A servo motor, that fits in the doll.
- A motion sensor: I used the HC-SR501.
- A capacitor: 2200uF.
- A capacitor: 220uF.
- A capacitor: 100nF.
- A resistor: 390 Ohms.
- Several wires: as needed.
- Hot glue.
- Velcro and thread.
- Some kind of stick: I used a coffee pallet.
- A 5V power source: you can use a mobile charger or a Power bank (if you want to add mobility).
- A USB mini B cable: the same for programming Arduino.
- Soldering iron.
- Hot glue gun.
- Any other you need.
Step 2: Construction
Take the doll for its back, in your other hand the scissors and cut the cloth to access inside. Remove the filling.
Take the Velcro, thread and needle and sew the Velcro in the aperture.
Remove one arm, I have chosen the left one, as the lefty that I am ;) It was hot glued so I needed to apply hot to detach it easily.
Attach the stick to the moving part of the servo. Make a hole in the shoulder of the arm, put the stick inside (servo side outside) and hot glue it. Make a hole in the shoulder of the doll where the arm was.
Take the servo and fasten it to the structure, here I used a mixture of a flange and hot glue. Make sure where you put the shaft side of the servo, it will come out of the last hole we've made.
Make a hole as a belly button (at least 3mm of diameter, or the sensor will not work, The greater the diameter, the greater the angle of detection) and hot glue over it (inside the doll) the cap of the motion sensor. Here I
thought about using some metallic eyelet, or similar, to prevent the fabric from fraying but the glue gave enough strength to avoid it, apparently. As an extra, the drawing of the fabric helps it go unnoticed.
Take the leds and some wires and prepare them as you want them to be and solder them accordingly. I have chosen surrounding the belly button. Solder the 220uF capacitor and the 390 Ohm resistor, as Adafruit recommend for Neopixels. I also solder a set of 3 pins in the first led of the chain for connection with the jumper wires. Hot glue the set to the cloths (inside part), or not if you can get them not to move in another way.
It's time for wiring. I used the typical 150mm Jumper Wires (F/F and F/M as needed) used to connect with the Arduino pins. 2, as they are, for signals to leds and from sensor. The signal for the servo using the servo wire itself. Then I prepared 2 sets of cables for power (one for 5V the other for GND) soldering together the the servo wires itself with 3 other half jumper wires, protect the solders with duct tape or heat-shrinkable macaroni.
Connect wires to the sensor, and leds as appropriate, the servo is already connected since we have used his own wire.
Put the sensor inside, with its cap properly attached. Put about half of the filling, letting the wires go out trough it.
When I finished the construction and start testing, after some movements of the servo, the Arduino started to reset and stay hung. To prevent this, solder a 2200uF capacitor in power lines and a 100nF capacitor between RESET line and GND.
Now connect wires to the Arduino, power to 5V and GND. Neopixels to D2, sensor to D5, the servo to D9 and the USB cable.
Put the Arduino inside the doll, finish filling and close with the velcro, letting the USB cable go out.
Screw the arm to the servo. Here you need to be aware of positions of the arm and the servo. Maybe you need several tests until you find the right angle.
The crafts are finished.
If you use a power bank you can use a shorter USB cable and put the power bank inside the doll (as long as there is room for it).
Using a mobile charger connected to the mains means that the USB cable need to be long enough and that this cable is visible externally.
Step 3: Programming
Download the code
The code is hosted here. you can clone or download as you prefer.
There is no special requirement for programming in this project. So the programming process is like any other Arduino programming. You need the Arduino IDE.
- Connect the Arduino to the computer.
- Launch the Arduino IDE.
- Load the project.
- Press the "upload" button and wait until finished.
- Disconnect the Arduino.
Step 4: Result
Time to see it in action.
As a curiosity, while making the crafts I discover that the structure inside the doll is a mechanism to lengthen the legs, but I think it's cuter with short legs.
Depending on the servo used, it can be a bit noisy, but you can silence it with Christmas carols ;)