Questions tagged [sensor]

For questions dealing with devices that measure the physical world around us and translate it into signals for the Raspberry Pi.

Filter by
Sorted by
Tagged with
44
votes
6answers
23k views

How to measure temperature?

What can I connect to the RPi to measure temperature? I think devices connected to the I²C or SPI would make most sense. Here is a question about DHT-22 and other 1-wire devices. But at this stage it ...
24
votes
5answers
7k views

Is soil moisture sensor corrosion normal?

I have a Raspberry Pi project that has three soil moisture sensors. I take a moisture sample every minute. After about a month I started to get bad readings. On further inspection I noticed that my ...
20
votes
4answers
17k views

How can I control Lego motors?

I'd like to find a way to make my Raspberry Pi control some Lego motors, and as a bonus I'd like to make use of one or more optical sensors. Normally, Lego robotics make use of the Mindstorms "brick" ...
19
votes
7answers
48k views

Multiple temperature sensors with a Raspberry Pi

I have seen plenty of examples for using one temperature sensor with the Raspberry Pi, however, how can I multiplex 5-6 temperature sensors to a Raspberry Pi? I want to read the temperature from ...
19
votes
3answers
24k views

Do I have to connect a resistor to my DHT22 humidity sensor?

I've just bought a DHT22 sensor to connect to my RPi but most tutorials mention there should be a resistor connected between the sensor and the GPIO pin. Is this necessary? Will it work without or ...
15
votes
6answers
39k views

DS18b20 temperature sensor not listed

I would really appreciate some advice on this. Being a TOTAL noob I have closely followed a guide on the internet explaining how to use a DS18b20 sensor with my Raspberry Pi. The guide is http://www....
14
votes
2answers
7k views

Can I use a One Wire File System through the GPIO?

I have installed owfs (under debian) just to realise the initial setup (1wire) works only through the USB port. owfs is short for One Wire File System. It's a standard for low end sensors, but I'm ...
13
votes
5answers
15k views

Can I use a DHT22 as a temperature sensor for my Pi?

Is it possible to use a cheap temperature sensor such as the DHT-22 with the Raspberry Pi? I have found Arduino drivers for this and many similar things, and would be comfortable porting the code to ...
12
votes
2answers
17k views

How to use a DS18B20 temperature sensor in my Pi?

I have a few DS18B20 temperature sensors. These are normally used in Arduino projects, but I don't see why not to use them with a Pi. There is a software called DigiTemp that seems to drive the device ...
11
votes
3answers
9k views

Can I use the 3.3v pin instead of the 5v pin?

I am using a HC-SR04 ultrasonic sensors, and I don't have enough 5V pins on a Raspberry Pi, and I don't want to buy an expander. So is it possible to use the 3.3V pins on some of the sensors? What ...
8
votes
1answer
15k views

How to use the water flow sensor with raspberry?

I'm trying to use this water flow sensor with raspberry: https://www.adafruit.com/products/828 I'm using this python code to read the pulses: #!/usr/bin/env python import RPi.GPIO as GPIO import ...
8
votes
2answers
17k views

i2cdetect doesn't catch ANY address. How can I tell if I2C working correctly?

I'm having difficulties interfacing the Raspberry Pi to basically any I2C sensor. I've gone through a lot of tutorials on how to get the I2C driver to work and my connections are correct. Still, ...
7
votes
3answers
12k views

How to read Analog 5V sensor ouput with Digital 3.3V GPIO?

I bought the "Sunfounder Sensor Kit" for Raspberry Pi 2, but the whole content is made for Arduino (5V). I have bought ADC, Level Shifters but I am stuck because I think I certainly miss a simple ...
7
votes
1answer
2k views

How does RPi “know” when it hasn't got enough power

When running X and when it's not content that it can draw enough power from the adapter, my RPi displays an RGB colour square on the screen. (At least, I THINK that's what the RGB colour square ...
6
votes
4answers
25k views

Sensor to detect water/liquid level

I have a swamp cooler that does not turn off automatically when the water level evaporates below the safe level, and if I fail to turn it off even once I could damage it. The sensor simply needs to ...
6
votes
1answer
779 views

Looking for a starter kit for my 10 year old

My daughter would like to get involved with computers. I have heard that a Raspberry Pi is a good place to start. Her mother and I think that she would like to create a motion sensor camera so she ...
6
votes
4answers
4k views

Looking for a pi-compatible thermometer for brewing

I would like to use my Raspberry Pi to monitor my fermentation temperature. I would like a thermometer I can attach to the side of the carboy and wire up to the Raspberry from a few feet away. For ...
6
votes
1answer
8k views

Is there a way to attach multiple serial port devices to a single raspberry pi?

I have three separate devices that all need access to a data serial port on the pi. My devices are an accelerometer, a GPS unit, and a GMS cell service chip. I've found tutorials on how to attach ...
6
votes
2answers
4k views

Why does the Sense Hat / Astro Pi show the wrong temperature and humidity?

I recently bought the sense-hat, previously called astro-pi. Unfortunately the temperature shows 28 to 31 degrees Celsius from both temperature sensors on the board. They often show around 30 degrees ...
5
votes
5answers
982 views

Sensor Bus for USB

I want to build a plug & play greenhouse system similar to http://www.raspiviv.com/ I thought of a bus system, but I have no experiences with bus systems currently. I stumbled so far over the I2C ...
5
votes
2answers
1k views

How to approximate room temperature in a better way

I've just bought an Enviro pHAT. The temperature sensor on my pHAT reads around 31 degrees Celsius for my room This sensor is close to the Pi, so it also gets a heatwave from the CPU Is there a ...
5
votes
2answers
174 views

Sensor Question

I am following this tutorial: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/. The problem is I don't have that specific temperature sensor on me. Since I don't have that specific ...
5
votes
4answers
8k views

How to use JSN-SR04T on a Raspberry Pi?

I want to try out JSN-SR04T, which is an ultrasonic distance measuring module, that is also supposedly water proof. The main reason that i want to try this module over the HC-SR04, is because the JSN-...
5
votes
2answers
7k views

Using 5 volts on an mcp3008

I have a couple different types of hall effect sensors I would like to test out using an MCP3008 ADC to interface with my Pi. The sensors run on 4.5 V minimum. Before I configure the ADC for 5 volts I ...
5
votes
4answers
4k views

Read data from Si7021 via I2C

I have an Si7012 temperature / humidity sensor attached to the i2c pins on my Raspberry Pi. Specifically, I have the Adafruit "break-out" with this sensor attached https://www.adafruit.com/product/...
5
votes
1answer
4k views

Do I need a current limiting resistor in series with a magnetic door sensor?

I'm building an alarm system and I'm using a magnetic door sensor, conected to ground and a pin of the gpio set up with an internal pull-up resistor. As far as I know, this means that the pin will be ...
5
votes
1answer
586 views

GPIO Temperature Sensor not Recognized

I recently tried to connect a temperature sensor (http://www.adafruit.com/product/381) to my RasPi via the GPIO, with a 4.7k (2Watt) resistor connecting the power and data (Source: http://www.cl.cam....
5
votes
1answer
5k views

How to Decode TPMS Sensor data through RPi3 Bluetooth

I'm working with a Bluetooth TPMS Sensor (TP630). Here I have some important information about the sensor: Description: ➤ Bluetooth Transmit Power: 0dbm MAX ➤ Processor: 8-bit MCU / S08 core, ARM ...
5
votes
5answers
14k views

How to hook up an AM2302 temperature & humidity sensor several feet away from the Raspberry pi?

I have a raspberry pi running pipgio and am using the provided code under the python section to get the temperature and humidity reading from the AM2302 (http://www.adafruit.com/products/393). If I ...
5
votes
3answers
2k views

HC-SR04 randomly stops taking readings

I have implemented 3 HC-SR04 ultrasonic-distance sensors into my hobby-project, and they are working randomly, meaning they sometimes give me anywhere between 1-12 readings from the sensors and then ...
5
votes
2answers
1k views

A good sensor for a Bed Occupied detector?

I'm trying to build a presence sensor for my bed, to help trigger assorted home automation functions. My first thought was to use a FSR and place it between the frame and boxsprings. I know how to ...
5
votes
1answer
1k views

How can I use the RPi GPIO to make a headphone sensing audio jack?

I am working on a project that involves a raspberry pi acting as an internet radio client which the public can access by plugging their own headphones into a 3.5mm (1/8”) jack. They will have access ...
4
votes
2answers
8k views

How to Connect 6 ultrasonic sensors to a raspberry pi?

I need to connect 6 ultrasonic sensors to one raspberry pi and all six sensors should take the distance measurement same time. I have written the code and made the thread also but only two sensors ...
4
votes
3answers
875 views

I want to use a common power supply to pi and sensors BME280 and BMA180 (sensor modules). Is it possible?

How can I accommodate between the difference in voltage and current levels with a single power source?
4
votes
2answers
709 views

Building a Raspberry Pi network monitor. My code is not working

Long story short. I moved, put my home server is a closet and started worrying about temp and humidity, saw a guide online to make a network temperature and humidity monitor from a Raspberry Pi and an ...
4
votes
6answers
3k views

Connecting multiple ds18b20 digital temperature sensors to different GPIO ports

There are loads of examples of using the ds18b20 temp probe, or even multiples all to GPIO pin 4, and then running: modprobe w1-gpio modprobe w1-therm cat /sys/bus/w1/devices/28-*/w1_slave The ...
4
votes
2answers
15k views

How to trigger GPIO event using an active infrared sensor

Trying to get an active infrared sensor to trigger an event on a GPIO pin. I'm using python and the RPi.GPIO library on an RPi model B. Some background info, not sure how relevant it is, but I'm a ...
4
votes
2answers
3k views

How to connect a 12V fan sensor wire to the Pi

I have a 3-wire 12v DC fan (Sanyo Denki 9S1212M4011). It's actually getting 15V because my "12V" wall wart isn't accurate. When the fan is not running my multimeter tells me there is 14V on the ...
4
votes
1answer
5k views

nutrient sensors for hydrophonics with raspberry

I am the happy owner of a mancave and I've decided to invest in raspberries, sensors and some small hydroponics vaxer from ikea. I've gotten a camera and some temperature sensors which can log ...
4
votes
1answer
720 views

Windows IoT on Raspberry Pi: how to eliminate huge variations in reading pins values? (C#)

I have been porting the library for HX711 (Weighting sensor module amplifier) for Arduino to C# for Raspberry Pi Windows 10 Core. Source here on GitHub Arduino library It does work, I am even using ...
4
votes
2answers
221 views

Raspberry Pi sensor error with high CPU

I have a passive infrared sensor attached to a Raspberry Pi. Namely this model which has digital output in addition to the analog one so it can be attached directly to Raspberry Pi. The data pin is ...
4
votes
4answers
10k views

munin-node plugins : VCHI initialization failed

I'm creating a munin plugin to fetch temp values from my Pi's. When running the script, as root, everything is fine: pi /etc/munin/plugins # ./temp temp.value 47.1 But when running it directly ...
4
votes
2answers
731 views

433 Mhz transmitter on RPI always sending 00000000

I've bought a Realtek RTL2832 DBV for my RPI to read 433 mhz data and a transmitter HM-T433. I can successfully receive messages from two 433mhz remotes with the rtl_433 utility, but when I try to ...
4
votes
2answers
559 views

Occasionally get “Register read error: 0xee06” when script is run with Adafruit BNO055

I'm running scripts on a Raspberry Pi 3 hooked up to an Adafruit BNO055 sensor, and occasionally when I run the test script I get this error: Traceback (most recent call last): File "...
4
votes
1answer
753 views

Vibration sensor / accelorometer capable of measuring vibrations caused by trains passing by

We live pretty close to the rail tracks, and for a long time I wanted to create a system that is capable of measuring the vibrations of the trains passing by. I tried to do it using the Sudden Motion ...
4
votes
2answers
268 views

Finding /dev Mount Point for Sensor

I am trying to connect to an Airmar 200WX and not having much luck finding the /dev mount point of the sensor. I have the sensor plugged in on boot and dmesg displays the following: [ 1.150836] ...
4
votes
2answers
288 views

MMA845X accelerometer mapped at 1C

I have a MMA845X accelerometer mapped at 1C: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -...
3
votes
5answers
2k views

How do I retrieve data from another Pi on the same network?

I would like to combine two tutorials (here and here) that I have found on sensing temperature with Raspberry Pis. I am already able to retrieve the temperature from the DS18B20 on multiple pis. ...
3
votes
2answers
119 views

Scaling of digital reading of pressure sensor

I have purchased one of these and I've connected it to a pressure sensor. I now need to convert the digital values to pressure. However, my maths is all forgotten. Can anyone help me out? The ...
3
votes
2answers
176 views

How the fluctuation in MPC3008 ADC unused channels is explained?

I am using mpc3008 in order to convert the analogue signal of two sensors, for a rpi3. The sensors are, the SEN0189 turbidity sensor and the SEN0244 TDS sensor. The code I am using is the ...