Dummy Security Camera with Spark.io

Security Cameras can get very expensive. I took an old bullet camera housing, added a spark.io Core with a Sparkbutton and a PIR (Passive infrared) sensor to make it respond to detected motion. When the PIR alerts, the LED ring on the Sparkbutton starts pulsing red. In standby mode, a slow chasing algorithm loops blue. Lets build it!

Step 1: BOM

Dummy Security Camera with Spark.io

1 Spark Core

1 Spark Button

1 Analog PIR sensor

1 battery pack (or other power source for the USB cable)

1 camera housing and mounting bracket

3 M/F jumper wires

Step 2: Binding the Spark Core

Dummy Security Camera with Spark.io

It's a bit of trick getting your Core up and running. You need to be sure you have a solid wifi connection when you try to bind it to your account. Here's a summary of the steps.

  • Create a free account at http://spark.io
  • Install the app on your android or iphone
  • Bind the Core to your account using the app. You'll need the SSID and passcode for your hotspot.

    Once you have the heartbeat LED signal, you're good to go. A more detailed installation guide and troubleshooting help are at http://docs.spark.io/start/.

    Step 3: Wire up the circuit

    Dummy Security Camera with Spark.io
    Dummy Security Camera with Spark.io

    Connect the power, ground and signal leads to the PIR sensor

  • Red - Vcc to 3V3 filtered
  • Black - Gnd to Ground
  • Blue - Out to pin D7

    The PIR outputs a high (3V) signal until it detects motion. Upon detection, it drives the digital input low triggering the sketch to execute alert mode.

    Step 4: Load the sketch

    Dummy Security Camera with Spark.io

    You can find the latest revision of the code here.

    Created to read either button 2 or a PIR sensor to trigger an alert mode on the SparkButton.Copyright 2015, Bill Shaw. This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.Rev 0.1 01/05/2015 BS Initial release */#include "SparkButton/SparkButton.h" #include "math.h" SparkButton b = SparkButton(); int ledPos = 0; int PIR = D7;void setup() { // Tell b to get everything ready to go b.begin(); pinMode(PIR, INPUT); }void loop(){ if (b.buttonOn(2) || !digitalRead(PIR)) { //alert mode on button press or PIR activation // for(int i=1; iStep 5: Build It!
    Dummy Security Camera with Spark.io
    Dummy Security Camera with Spark.io
    Dummy Security Camera with Spark.io
    Dummy Security Camera with Spark.io

    You'll need to mount the PIR in front of the SparkButton so it is facing through the glass in the front of the camera enclosure. Double sided foam tape works well. Mount this assembly inside of the enclosure and power it up.

    I 3D printed a mount for the PIR sensor and to keep the entire assembly flush on the glass. You can download the STL files your self from https://github.com/funwithbots/Projects/tree/maste...

    It will take the PIR sensor about 10 seconds to stabilize. Once it does, you should get a slow, chasing cyan light around the PIR. When the PIR detects motion, you'll see the ring start flashing all LEDs rapidly in red.

    I powered the entire setup using the 6W Voltaic battery and solar panel.

    Seal the enclosure and mount it somewhere where observers can clearly know they're being watched.


    Tag cloud

    make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel