Dead Candy Shop
By eating all his candy instead of selling it, this vendor had a bad time on Halloween.
All joking aside, the principle of this animatronic is to distribute candy using as much material as possible found in my garage or second-hand.
Supplies
1 voltaire armchair
1 pedestal table
1 ESP32 VROOM
1 a human-sized plastic skeleton
1 toe tail costume (or other type of costume)
2 top hat (to create a really top one !)
Some electrical wires
1 a wide PVC pipe (to put on the plastic skull head)
some spray paint
expanding foam bomb (for the vomit)
fake candies (for the vomit....also)
real candies (for the children....this time)
burlap (for the candies bag)
screws, glue, tape, tools....patience and failed tests before succeeding
Create the Candy Dispenser
Find an automatic cat food dispenser (with or without Wi-Fi, the cheapest one possible doesn't matter).
Don't keep the circuit board; it will be replaced by the ESP32.
Disassemble, cut, in short, do whatever is necessary so that the dispenser mechanism can fit inside the PVC pipe used for rainwater (or toilet waste...).
It's important to keep the power supply (usually 5V...very useful for our ESP32).
You'll also need to keep (or resolder) the power wires to the motor and the wires to the stepper motor sensor (which determines how many revolutions the mechanism should make to dispense the desired amount of candy (see ESP32/Arduino code below).
Install, screw, or glue the kibble dispensing mechanism into the PVC pipe. The assembly will fit inside the skeleton's skull, which has been pre-cut slightly above the eyes.
Note: the mechanism must be removable from the skull head for adjustments and cleaning if needed.
Plan for a "banana-type connector" at the mechanism's output, as the mechanism's wires (motor power supply and stepper sensor) must pass from inside the skull and exit through a hole made at the back of the skull.
Install the Candy Evacuation Through the Mouth
This part is simple, just find a flexible pipe (mine came from an old inflatable small pool filtration system). Make a hole under the skull to pass the pipe through. I added a small funnel in the skull to ensure a good connection between the distribution mechanism and the pipe
Format the Skeleton
This is a very important part: finding the right position of the skeleton. Do some tests with you, take photos of yourself, change places on the chair. Don't put your arms and feet too straight, otherwise it won't be "lively" enough (yes, weird for a dead person...).
Once the break has been found, all the joints must be solidified (see the screws in the joints).
To prevent your skeleton from falling from the chair, install it on a wooden board which will be screwed into the chair via long threaded screws which pass through the seat. This will make everything easy to dismantle.
Electrical wires run up the spine on the outside (but stuck with hot glue) starting at the top (and connecting to the mechanism via the "banana" plugs). These wires come out near the butt and will be connected to the ESP32 afterwards.
Plug and Play!
It's time to do some coding using the ESP32, LD2410C sensor and MP3 module.
So there are several things I did:
Use an LD2410C detector to start distribution (see the internet for the technique of use, there are plenty of tutorials).
Create a candy dispensing cycle then pause (using the wires connected to the motor stepper detector to control the start and stop of the dispensing motor)
Launch an MP3 sound via the MP3 module at my disposal (as it was an old module on which I could not control the launch of a sound directly, I simply launched music continuously and used a relay connected to the power supply of the speakers which cut and restarted the outgoing sound when the detector detected someone.).
install all electrics wires, MP3 module, ESP32 and sound system on a plastic box and install everything in the skeleton's belly. Just leave a long wires for the LD2410c sensor to put it where you want (mine comes out towards the skeleton's shirt collar).
The code is available on the next step.
The Code
if (attenteFinCourse) {
bool capteurFinCourseActif = digitalRead(capteurFinCoursePin) == LOW;
if (capteurFinCourseActif && (tempsActuel - dernierTempsDetectionFinCourse >= delaiAntiRebond)) {
dernierTempsDetectionFinCourse = tempsActuel;
digitalWrite(moteurPin, HIGH);
digitalWrite(relaisPin2, HIGH);
digitalWrite(relaisPin3, LOW);
moteurActif = false;
attenteFinCourse = false;
relais2Demarre = false;
tempsArret = tempsActuel;
MONITOR_SERIAL.println("Fin de course détectée. Moteur et relais 2 arrêtés. Pause de 30 secondes...");
}
}
}
Create Candy Vomit
The fun part: creating fake vomit!
Use expanding foam (protect your skeleton well because it sticks quickly! For my part, I used aluminum foil but there are surely better).
To prevent the foam from falling down the pipe, I surrounded it with chicken wire, raising the stems to block the foam. This can be seen in the photos. The same goes for the pedestal table.
Once the foam is completely dry, paint it with aerosol spray. Be careful, foam doesn't like certain paints so go slowly. The foam may tend to "melt" a little, but it gives a nice effect. I added phosphorescent bomb but the result is not great.
Cut out and glue the fake candies with hot glue once the paint is dry. Don't overload with candy to keep it realistic.
Create Burlap Bag
Use burlap to create bag.
Add foam expansive on it, glue fake candies and paint a text on the bag....really simple and give a real nice effect !
And Finally...it Works !
Add everything....and ...it works !!
ENJOY.