Requirements

Hardware

To build your version of this project, you need the following hardware.

Software

To control your pumpkin bowl programmatically, you need the following software prerequisites:

Dissecting the pumpkin

Just like pumpkin carving, don’t be afraid to split your pumpkin (bowl) open and rip out its guts. We want to see what hardware we already have and what we can ultimately upgrade to get it running on an SBC (single-board computer) such as a Raspberry Pi.

After opening the electronic pumpkin bowl, I can identify some pretty standard components: A dc motor, a photoresistor (serving as a motion sensor for its original functionality), a small speaker, a 5V battery pack, LEDs for eyes, and a custom control board which I assume has the programmed functionality driving the motor and sound effects.

Because Viam is compatible with nearly any off-the-shelf hardware you can think of (you can read more about this here), I know I can use this hardware and simply add a Raspberry Pi and a motor driver to fine-tune the hand movements to upgrade this pumpkin. I also know I can rip out these LED eyes and replace them with a camera to enable the bowl to see its surroundings.

Upgrading the hardware

Begin by drilling a larger hole into one of the eye sockets to fit in the webcam lens. If you drill the right size hole, it should fit nicely and snugly so you don’t have to do any additional mounting.

Then, disconnect the DC motor from the board included in the pumpkin leaving the 12V and GND exposed.

After that, I tore out the included board, photoresistor, LEDs, and speaker, and dumped the rest of the hardware in my ever-growing pile of random hardware bits. I recommend you do the same, as you won’t need any of that.

Connect your DC motor to the motor driver and pi according to this wiring diagram. Plug your webcam into one of the USB ports on the pi. Gently close up your pumpkin (without screwing everything shut) and proceed to test your hardware in the Viam app.

Complete expanded view wiring diagram for pumpkin bowl. Note that this standard 12V DC motor is already inside the pumpkin attached to the rack and pinion affixed to the hand inside the bowl, which is not pictured here in this diagram.

Setting up your robot bowl with Viam

Follow the Raspberry Pi Setup Guide to prepare your Pi to connect your robot to the Viam app. Once your Pi is ready, ssh into it from your computer. I named mine spooky@bowl.local as I felt it was fitting for the project.

In your web browser, log in to the Viam app and create a new robot instance. Name your robot whatever you like and head to the Setup tab. I named mine spookybowl. On your Pi, follow the steps there to download the Viam app config and download and install viam-server. Wait a moment until your robot connects to the Viam app.

Configuring the hardware in the Viam App

Configure the board

First, configure your board component:

  1. Navigate to the Config tab of your robot’s page in the Viam app. Click the Components sub tab, then click Create component in the lower-left corner.
  2. Select board for type and pi for model.
  3. Enter local as the name for your board, then click Create.

Configure the motor

Next, add a motor component:

  1. Navigate to the Components sub-tab and click Create component in the lower-left corner.
  2. Select motor for type and gpio for model.
  3. Enter dcmotor as the name for your motor, then click Create.
  4. After creating your motor component, fill in...
Read more »