This guide is also compatible with the Raspberry Pi using CircuitPython. We're going to build the house's lighting system, wire up the home security circuit, and program it with CircuitPython.

The Pi Zero W has built-in WiFi - which is great for connecting our environmental monitor to Adafruit IO. It's also smaller than a regular Raspberry Pi 3, making it the perfect size to stick it in a small corner of your room. 

Angled shot of Raspberry Pi Zero W computer.
NOTE: Due to stock limitations we may only be able to offer refunds or store credit for Pis that are defective, damaged or lost in transit.If you...
Out of Stock

While we could use a breadboard, we'll build our own pHAT for our IO House.

Angled shot of a Adafruit Perma Proto Bonnet on a Pi zero
Design your own Bonnet or pHAT, attach custom circuitry and otherwise dress your Pi Zero with this jaunty prototyping Bonnet kit!To add to the
In Stock

Home Surveillance

Since we're using a Raspberry Pi, we're going to use the eight-megapixel Raspberry Pi Camera v2 to capture images from outside our home. 

Angled shot of Raspberry Pi Camera Board v2 - 8 Megapixels connected to a flex cable and a Raspberry Pi.
Snap, snap! The Camera v2 is the new official camera board released by the Raspberry Pi Foundation!The Raspberry Pi Camera Board v2 is a high quality 8...
In Stock

Because the Pi Camera Board is designed for the Raspberry Pi and not the Raspberry Pi Zero, we'll use a Raspberry Pi Zero camera cable.

Angled shot of a Raspberry Pi Zero v1.3 Camera Cable.
This camera cable is specifically designed to work with the Raspberry Pi Zero - Version 1.3! Just plug it into your Pi...
In Stock
Make sure the Pi is not connected to power during any of these steps, including the camera connection.

Connect the Raspberry Pi Camera

Remove the CSI cable which comes from the Pi Camera and replace it with the Pi Zero camera cable by lifting the collar of the camera module and removing the cable.

Connect the wider end of the Pi Zero camera cable into to the Pi Camera. 

Open the collar on the Pi Zero W's camera connector. Push the camera cable through the connector, making sure the cable is seated firmly in place and the contacts are facing the back of the Pi Zero.

(Optional) Adding Quick Connects

While going through this project, I found it easiest to add a JST SM receptacle to the bonnet and attach the plug to the end of the cable. It makes it easy to quick connect / disconnect everything in your home from the Pi.


I did this for both the PIR sensor (using a 3-pin JST) and the reed switch (using a 2-pin JST).

Wiring the Pi

*pi camera not shown

NOTE: Since this is a series, we'll be building off what we built in the previous guide, but adding a SGP30 (you can wire it by chaining SCL/SDA pins), the motion detector (PIR sensor), and a PiCam.

Connect the SGP30 to the Pi:

  • SGP30 SCL to Pi SCL
  • SGP30 SDA to Pi SDA
  • SGP30 GND to Pi GND
  • SGP30 Vin to Pi 3V

Connect the PIR Sensor to the Pi:

  • PIR 5V to Pi 5V
  • PIR Signal to Pi GPIO #22
  • PIR GND to Pi GND

Connect the NeoPixel Jewel to the Pi:

  • NeoPixel Jewel GND to Pi GND
  • NeoPixel Jewel PWR to Pi 3V
  • NeoPixel Jewel IN to Pi GPIO #18

Connect one wire of the Reed Switch to Pi GPIO #24, and connect the other wire to GND.

We're ready to power up - connect the plugs for the sensors and the neopixel strip/jewel to the appropriate receptacles and connect your Pi to a power supply.

Next, let's move on to setting up your Pi.

This guide was first published on Sep 05, 2018. It was last updated on Sep 05, 2018.

This page (Python Wiring) was last updated on Aug 27, 2018.

Text editor powered by tinymce.