Connecting hardware to your Raspberry Pi is one of the biggest benefits of the $35 mini Linux computer chip. There are a lot of third party companies that make raspberry pi sensors and other external devices that can be paired with the Raspberry Pi to complete your next project.
To connect sensors to your Raspberry Pi you will need to utilize the GPIO (general purpose inpout/output) on the board. These are the upward facing pins next to the video socket on the Raspberry Pi Model B. These pins allow other devices to connect with the Pi physically and allows software to control, manipulate, and report information to your Pi.
When you connect sensors to your Raspberry Pi you will need to know which pins are the ground, 3.3v and 5v outputs.
Raspberry Pi’s official documentation has more information about GPIOs and how to connect sensors to your Raspberry Pi.
You can program the pins to interact in amazing ways with the real world. Inputs don’t have to come from a physical switch; it could be input from a sensor or a signal from another computer or device, for example. The output can also do anything, from turning on an LED to sending a signal or data to another device. If the Raspberry Pi is on a network, you can control devices that are attached to it from anywhere** and those devices can send data back. Connectivity and control of physical devices over the internet is a powerful and exciting thing, and the Raspberry Pi is ideal for this.
7 Raspberry Pi Sensors
1) Infrared Sensors
Infrared Sensors – these sensors are great to control your TV or if you wanted to make a mini-controller. Infrared light is invisible to the human eye but everything releases IR. IR sensors are often used in nigh time surveillance equipment. IR sensors use a photocell & chip tuned to receive a specific wavelength of light. IR sensors are small and don’t take up a lot of space on your Raspberry Pi GPIO pins.
Check out this video to learn how to make an Infrared Sensor For A Raspberry Pi
2) Raspberry Pi Motion Sensor
The Raspberry Pi works great for home automation and detection, a popular Raspberry Pi project is embedding the small computer chip in a camera for some home surveillance. A great add on sensor is a motion detection sensor like this one from adafruit.
For only $10 this sensor is a great add on to a lot of projects. It works from about 20 feet away and can even be set with a delay and adjustable sensitivity.
You will need to do some soldering if you want to run it off of 3V as opposed to 5V.
3) Temperature Sensor
A temperature sensor can be used to grab readings of the environment around your Pi. Creating a Raspberry Pi powered weather station is a popular project for this type of sensor. There are also other cool projects where reading the temperature could be a fun add on to the Pi board.
There are a couple ways to attach a sensor to the board but that will depend on if the temperature is going to be taken inside or outside and if the Pi needs to be shielded from wet conditions. Check out some options here.
4) Raspberry Pi Touch Sensor
Of course having the Raspberry Pi set up to interact with human touch is an ideal project to try out. There are literally hundreds of cool ideas out there using a simple button to start and stop a process with the Raspberry Pi. For a touch sensitive resistor you can quickly add it to your Pi board. They are relatively cheap and small enough to embed in existing hardware. Check out this one from Adafruit.
5) Flexible Sensor
This sensor can detect movement like bending or reaching in one direction. They are found in the Nintendo PowerGlove.
These sensors are easy to use, they are basically resistors that change value based on how much their flexed. If they’re unflexed, the resistance is about ~10KΩ. When flexed all the way the resistance rises to ~20KΩ. They’re pretty similar to FSRs so following this tutorial will get you started. You can use an analog input on a microcontroller (with a pullup resistor) or a digital input with the use of a 0.1uF capacitor for RC timing.
The bottom part of the sensor (where the pins are crimped on) is very delicate so make sure to have strain relief – such as clamping or gluing that part so as not to rip out the contacts! -via Adafruit.com
6) Keypad Sensor
This flexible keypad is a great addon to any project where your Pi is controlling secret information. Or may not so secret. This would be a great addition to any project that requires a user to sign in before using the Pi. The sensor simply uses a touch interface to allow a user to key in their secret pass code.
Hooking this up to the Pi is straight forward and there are a few code examples on the web to help you get started.
7) GPS Sensor
If you want to give your Pi a little more range then consider adding a GPS sensor on top of the board. This chip will allow your Raspberry Pi to communicate with GPS and log data for your Pi. Read more about this all in one GPS unit at adafruit.
How about a GPS dog collar?