Software apps and online services
Hand tools and fabrication machines
For the past few years, for Halloween decorations, I have been setting up the Pumpkin Head Bluegrass Band. It has four members:
- Daddy pumpkin on Banjo
- Momma pumpkin on washtub Bass
- Little kid on the Fiddle
- Big kid on the Jug
This year I decided to add a remote controlled robotic hand as a gimmick for handing out candy. I recently attended a Hackster.io Digital Design Workshop by Tom Moxon and Stephen Borsay for an Introduction to Blynk, and I decided to use the Blynk as the controller for the hand.Three Modes
The hand has three modes:
- Open hand
- Come here and take this candy if you dare.
Here's a video of it in action:
It worked pretty well. Some of the little kids were kind of confused as to what to do, but most of them got a kick out of it. One of the fingers started to bind up a bit, so I tried a quick field repair and bent the middle finger back. But this only made matters worse because it made it look like the pumpkin kid was flippin the bird at anyone trying to take the candy. But the problem eventually worked itself out and began operating correctly again.Electronics
The electronics are pretty simple. I used an Sparkfun Blynk board, but a Sparkfun Thing or any Esp8266 board should work. The four batteries supply 6 volts to the servos. The processor board gets it's own power from the USB connector and the ground connections of the two supplies are tied together. Other than that, the only other required connection is between GPIO15 to the servo control line and from GPIO16 to the other servo.Arduino Software
There are three character array which need to be set to:
- Network SSID.
- Network password.
- Blynk Auth Token. This string is created when an new Blynk smartphone app is made.
The C code uses the ESP8266 servo library to control the servos. The loop() function calls the required Blynk.run() function and also wiggles the index finger every 1/2 second if it is in the "come" mode. I also have it blinking the blue LED every three seconds. That is optional, but is an easy way to see if the code is running.
There are three required BLYNK_WRITE() functions. These are virtual pin handlers used to detect if the user clicked any of the buttons on the smart phone Blynk app. The functions set the servos positions. The "V2" virtual pin handler also sets up the conditions for the index finger wiggling to occur at 1/2 second intervals. I also added an additional BLYNK_WRITE function for virtual pin V4. This function responds to slider control movements. The slider can send values from 0 to 180 which sets both servos to the specified angle.Candy Hand Blynk App
I used an iPhone but any current IOS or Android device should work also. Blynk apps are pretty simple. I just add three button controls (and a slider control).
Then configure them to control the virtual pins.
I used the Raptor Reloaded Hand that can be found on Thingiverse. I also made two 3D printed mounts to hold the MG996R RC Servos. I replaced the wrist portion of the hand with a piece of wood and screwed my servo mounts onto the board.
One servo controls the index finger and the other servos controls the other fingers. I used the long, two sided servo arms. Each finger has two strings connected to it for a total of 10 strings. Pulling one string causes a finger to extend and pulling the other will retract it. On the index finger, the two strings go to opposite sides of the servo, so moving the servo to 0 degrees extends the finger and 180 retracts it. For the other fingers, all of the retracting control strings were tied together to one side of the servo and the other strings were connected to the other side of the servo.Wrapping it up
The final step was to hook up the servos to the Blynk board, connect up the batteries, attach the hand to my pumpkin band member, put a snickers bar in the palm and wait for the kids to arrive.
I put a latex glove over the hand to make it look more real, but next year I think I'll just stick with the 3D printed look. I'm also thinking about adding an HC-SR04 distance sensor and making "come here" and "grab" modes fully automated.