In order to drive the alarm from the Feather, you'll use a transistor to switch the 5V USB power on an off. This works great because the siren can run on anywhere from 3V - 12V DC power. It requires more current than a 3.3V GPIO pin can provide, which is why we'll tap into the 5V line.
Driver Circuit
The diagram for the driver circuit is shown below. The red LED is a stand-in for the alarm.
We are using pin A1 of the Feather through a resistor to the left leg of the transistor (base) in order to toggle when the transistor opens or closes the middle leg (collector), which allows the alarm circuit to go to ground via the right leg (emitter).
Build the Proto FeatherWing Circuit
Replicate the circuit shown above on the Proto FeatherWing.
Also add some full sized Feather socket headers as shown so that we can connect the TFT Feather on top of it later, allowing the screen to be read.
Solder header pins to the Feather as shown.
Stand
You can make a nice neat assembly for your RPi Stock Alarm using a simple 3D printed stand and some M2.5 fasteners.
If you don't have access to a 3D printer you can make a pretty good stand out of cardboard, such as the box the alarm came in.
Attach Feather to Stand
You'll make a sandwich of the stand between the Feather and FeatherWing Proto.
First, place the Feather on top of the stand and screw in four long M2.5 screws, being careful not to crush the TFT screen.
Flip the stand over and screw on the short standoffs.
Attach FeatherWing
Place the FeatherWing under the Feather and press its headers into place, joining them.
Then, use short screws to attach.
Alarm Mount
Feed the alarm wire through the same large stand hole and press the three M4 bolts through their respective holes.
Use the included nuts to secure.
Alarm Wiring
Screw the alarm wires into the respective positions on the screw terminal block.
To avoid confusion, I used white paint marker to indicate the ground position for the black wire.
Use the Alarm
Your RPi Stock Alert Alarm is ready for use! Plug the USB cable into power and it will begin checking rpilocator.com tweets. If there is no new stock, it will report this. As soon as stock comes in, the alarm will flash and make a terrible noise! (You can set the volume of the buzzer with the knob.)
Press the Boot button on the Feather to stop the alarm, then go get yourself that coveted Rapsberry Pi!
Page last edited March 08, 2024
Text editor powered by tinymce.