Parts
You'll need the following parts for this project:
- Audio FX sound board
- Pick up the Audio FX board with line level output if you have an amplified speaker to play sound, or get an Audio FX board with integrated amplifier if you have just a small speaker driver.
- PIR sensor
- Small portable speaker
- Pick a speaker that can connect to your Audio FX board, either an amplified speaker to connect to the Audio FX board with line level output or a speaker driver to connect to the Audio FX board with built in amplifier.
- Small box to hold all the components
- Let your imagination run wild with what will hold the components and how it will be decorated. Check out local craft stores for pre-made wooden or paper mache boxes that are a great starting point.
- 3xAA battery holder
- Make sure to use exactly 3x AA (or AAA) batteries. If you use 4 or more batteries the voltage will be too high (6+ volts) and could damage the Audio FX board.
- 1x NPN transistor
- This is used to invert the PIR sensor signal into an active low signal that the Audio FX board expects. Alternatively you could use a 74HC04 as mentioned in the remote sound board guide.
- 1x 100 kilo-ohm resistor, 1/4 watt
- 1x 1 kilo-ohm resistor, 1/4 watt
- Half-size breadboard
- Jumper wires
- Soldering tools
Most of the wiring is relatively straightforward, just connect component grounds to battery ground and component VIN/voltage input to battery positive voltage.
For the PIR sensor if you haven't used it yet make sure to read its guide to understand how to hook it up and adjust its sensitivity.
However for the NPN transistor pay special attention to how it's oriented and connected to components. With the flat side of the transistor facing you the emitter is the left-most leg, the base is the middle leg, and the collector is the right-most leg. The emitter should be connected directly to battery ground. The base should be connected to a 100 kilo-ohm resistor which is connected to the PIR sensor output (middle yellow wire). Finally the collector should be connected to both the 1 kilo-ohm resistor up to battery positive, and any of the switch inputs on the Audio FX board (like switch 5 shown above).
If you're curious you can find more details about using an NPN transistor as an inverter/not-gate on this page.
Finally plug in or connect your speakers to the audio output of the Audio FX board. Place all the components into your box and make sure the PIR sensor is facing up at the opening of the box. That's it, your hardware is assembled!
Here's what my hardware setup looks like:
Text editor powered by tinymce.