In this project you will build a powerful wireless motion sensor that is capable of transmitting signals from up to two motion switches over long distances to your Raspberry Pi. This product is based on Texas Instruments CC1110 wireless transceiver which sports a micro-controller unit (MCU), memory, a sub-1GHz transceiver, an encryption engine and a USB controller (for the CC1111 based module). The product is very easy to use and transmits clear text on/off messages that can be received by your Raspberry Pi serial port via a Base Station Receiver unit.
This sensor comes with a motion sensor for detecting motion, but it can also be used with any switch that opens/closes the circuit. It can also be used with a water sensor.
This is our second generation wireless switch sensor which has a number of advantages over generation 1:
It has all the same features as generation 1:
The wireless sensor will transmit movement signals each time the BtnA and BtnB contacts are closed (bridged). Refer the enlarged picture top left to observe the BtnA and BtnB contacts. The signals are received by the base station receiver. The transmitter is optimized for extremely low current consumption and battery life will depend on how many transmissions the device makes. The RF units are very powerful and should easily handle communications distances around a residential home. The transmitters come pre-configured with a unique number identifier that will be used to uniquely identify each sensor. You can find this number inside the sensor case. This enables you to have as many wireless switch sensors as you want.
The Python code required to read the switch messages from the serial communications port of the Raspberry Pi is provided by us. We also provide the code to send the switch values to the PrivateEyePi server to be displayed on your WWW dashboard; however this is not a mandatory part of this project. If you want a wireless switch sensor for other projects then these steps will help you achieve that goal too.
The following explains how to construct the wireless motion sensor.
Construction should take about 20 mins and does not involve complex soldering procedures. Before soldering parts to the sensor make sure you have the correct part placed in the correct position as shown in each of the following images.Solder each part as close to the sensor as possible so you don't have any parts that are protruding, bending and getting damaged.
Solder each part as shown and clip off the remaining wire on the underside of the board with some wire clippers.
Ignore the temperature sensor seen in the images below next to the "Tmp" label on the blue board. We've re-used the same pictures as the build is the same as the wireless temperature sensor.
Step 1: Solder the 10k resistors (two blue parts with colored bands) to the sensor
Step 2: Solder the capacitor to the sensor
Step 4: Solder the antennae to the sensor
Step 5: Solder the battery holder to the sensor
Cover the pad shown below on the left hand side in the red circle with solder. This will ensure good contact is made between the negative surface of the battery and the holder. Then solder the holder to the sensor as shown on the right hand side below. Make sure you heat up the pad with the soldering iron for a few seconds before applying solder. This will help make a solid bond between the sensor pad and the holder. Use a considerable amount of solder that covers the whole pad and each leg of the holder. Pull the holder gently with your fingers to make sure it has good contact. If it pops off then re-solder it and repeat the exercise again until it is strongly attached.
Step 6: Insert the battery
Insert the CR2032 battery taking care to insert it the right way round. +VE terminal (the larger flat surface) facing up.
Step 7: Connect the motion sensor to the transmitter
Connect the motion sensor to the transmitter as shown in the following diagram. You may find the curcuit somewhat confusing so I will explain how it works : The wireless transmitter (top left) will send a signal when the two contacts of the BtnA or BtnB are closed (ie bridged). The three legged transistor in the middle of the breadboard acts as a switch. It will close the circuit between the outer two legs when a signal is sent to the middle leg. The motion sensor will send a signal to the middle leg when motion is detected. Another complication is power. Both devices (transmitter and motion sensor) have two separate supply voltages (3.3V for the wireless switch, which uses a 3.3V coin cell battery and 4.5V-20V for the motion sensor, 4xAA or a 9V battery). Important to remember that both devices need to share a common ground so take note the black wire connecting GND of both devices.
You can construct the same circuit for BtnB and another motion sensor which gives you two independent motion sensors using the same transmitter. This is useful if you want to detect motion is two adjoining rooms that can share a single transmitter.
That's it! Now you are ready to configure your Raspberry Pi to receive the on/off messages. Follow the steps outlined on our wireless sensor page.