Physical Computing with Raspberry PI

In this workshop we will use the Raspberry Pi computer to get data from the real world using digital sensors. Raspberry Pi is a small factor personal computer that is great for experimentation and schools. It runs on linux operating system and the most interesting feature that it has is the 40 pins that allows us to connect it with sensors, leds, buzzers, motors and other modules.

Pinout diagram of the Raspberry Pi

In our example we want to connect a sensor that detects fire to the Raspberry Pi and program the computer to give off allarms whenever there is a dangerous fire inside our spaceship.

The sensor we are going to use has 4 pins that we can utilize to connect to the computer. The VCC pin is connected to a power source (5 volts), and the GND pin is connected to ground, creating an electronic circuit that power ups the sensor. There are two more pins. One is labeled DOUT and sends a high signal whenever fire is detected and a low signal if there is no fire. The AOUT pin can send analog data (how intense or how close is the fire). We can adjust the sensitivity of the sensor with a screwdriver using the screw terminal.

Our experiment

First we are going to place the sensor on the breadboard and bring it close to our Raspberry Pi.
We are then going to connect 3 wires to the Raspberry Pi. One from the first pin on the right going to VCC, one from the third pin on the right going to GND, and one from the fourth pin on the right going to DOUT. That last pin is labeld GPIO pin 14.

Then we are going to create a program using Scratch Desktop that warns our space crew if there is a fire on the spaceship.

We can also add a buzzer

Leave a Reply

Your email address will not be published. Required fields are marked *