The circuit for the Screaming Cauldron consists of these major components:
- IR distance sensor to detect candy grabbing hand proximity
- AudioFX Sound Board to play terrifying sound samples through a powered speaker
- NeoPixel strip for interactive colored lighting
- Trinket M0 to act as the brain, telling the NeoPixels to change color and the AudioFX board to play sounds
You'll assemble the circuit as shown in the diagram, either on a breadboard, or soldered to a perma proto board. The breadboard is recommended for making sure everything works properly at first. Then, you can transfer to a perma proto board for a more permanent connection.
You can start by snipping the JST connector off of the battery pack so you can attach it directly to the board.
Solder the header pins on both the Trinket M0 and Audio FX Sound Board as shown here and here, then connect them to the board. Run these connections:
- Trinket M0 GND to ground rail
- Trinket M0 BAT to power rail
- Audio FX GND to ground rail (do not use the Audio FX GND at the top right of the board, this is an audio line out ground)
- Audio FX Vin to power rail
Attach power to the board's power rails, and run jumpers to connect the positive rails and ground rails to their partners across the board.
Then, connect the IR sensor's power and ground wires to their respective rails, and the white signal wire to pin D1 on the Trinket M0.
We haven't yet written the code or uploaded audio samples to the FX board, but you can turn on the battery power now to test things out and make sure they're getting powered on, lighting their green LEDs.
Now you'll prepare the NeoPixel strip for connection to the circuit.
First, cut and strip some ~8" lengths of red, black, and green wire. Tin the ends, and then solder these connections:
- Black to GND
- Green to Din
- Red to 5V
You can use some heat shrink tubing to strengthen the connection point, but this is an optional step.
Connect the NeoPixel strip to the board, with these connections:
- Red to power rail
- Black to ground rail,
- Green data input to Trinket M0 pin D0 (ideally through a 470 Ohm resistor)
You will also connect a 1000uF capacitor to the ground and power rails as per this guide, in order to prevent any power issues on the NeoPixel strip.
As shown here and in the circuit diagram, connect the Trinket M0 D2 pin to the AudioFX Sound Board's pin 0. This is how the Trinket M0 will be able to trigger the sounds.
You can now connect the speaker input to the AudioFX Sound Board and get ready to program things!