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
46 votes
6 answers
24k 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 ...
John La Rooy's user avatar
  • 11.9k
26 votes
3 answers
41k 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 ...
Abbie's user avatar
  • 373
25 votes
7 answers
11k 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 ...
Arthur Putnam's user avatar
25 votes
4 answers
20k 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" ...
Salim Fadhley's user avatar
21 votes
7 answers
57k 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 ...
jc303's user avatar
  • 313
17 votes
6 answers
46k 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....
Raspnoob's user avatar
  • 171
15 votes
2 answers
8k 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 ...
Christian's user avatar
  • 1,230
14 votes
5 answers
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 ...
chrisrhoden's user avatar
13 votes
2 answers
18k 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 ...
Tomas's user avatar
  • 273
11 votes
3 answers
10k 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 ...
Stephanie's user avatar
  • 113
9 votes
4 answers
35k 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 ...
Matthew Moisen's user avatar
9 votes
2 answers
24k 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, ...
Ahmed Farid's user avatar
9 votes
2 answers
8k 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 ...
ElectroDxvid's user avatar
8 votes
1 answer
19k 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 ...
Thiago Scodeler's user avatar
7 votes
3 answers
15k 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 ...
Elo's user avatar
  • 171
7 votes
1 answer
9k 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 ...
cantdutchthis's user avatar
7 votes
1 answer
15k 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 ...
jake9115's user avatar
  • 299
7 votes
1 answer
12k 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 ...
fabocode's user avatar
  • 113
7 votes
1 answer
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 ...
KDM's user avatar
  • 708
6 votes
3 answers
20k 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-...
Viktor Raspberry's user avatar
6 votes
1 answer
800 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 ...
njterps's user avatar
  • 61
6 votes
4 answers
5k 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 ...
slashingweapon's user avatar
6 votes
4 answers
14k 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 ...
Tuinslak's user avatar
  • 285
6 votes
4 answers
3k views

Detect 240v using GPIO

I want to detect 240Vac mains using the GPIO. Here is my plan (with questions below)... Convert the 240Vac down to 5Vdc via a USB charger. This should give me Mains Power safely to both me and my ...
Rob McFeely's user avatar
6 votes
2 answers
395 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 -- -- -...
Cosmin Mihai's user avatar
5 votes
2 answers
4k views

ESP 8266 and Raspberry Pi communication without an Internet connection

I am currently working on a project which uses an ESP8266, accelerometer sensor and Raspberry Pi 4. The ESP module has to send the accelerometer data to the Raspberry Pi and the data has to be stored ...
EspPiProject's user avatar
5 votes
2 answers
11k 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 ...
brakesoft's user avatar
5 votes
5 answers
1k 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 ...
Andi Giga's user avatar
  • 543
5 votes
2 answers
12k 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 ...
Edyoucaterself's user avatar
5 votes
2 answers
2k 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 ...
R Harrington's user avatar
5 votes
2 answers
190 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 ...
Clers's user avatar
  • 51
5 votes
4 answers
6k 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/...
Brick's user avatar
  • 1,377
5 votes
2 answers
737 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 ...
RetsamEvalsEht's user avatar
5 votes
2 answers
4k 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 ...
TrevorJ's user avatar
  • 183
5 votes
2 answers
3k views

How to get accurate compass?

I'm building a project based on raspberry pi that relies on fairly accurate compass to be viable. Essentially, if I could know where's North with about 10° of error, I'd be quite happy. I've bought ...
Kasami's user avatar
  • 91
5 votes
1 answer
5k 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 ...
jotadepicas's user avatar
5 votes
1 answer
695 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....
Kachamenus's user avatar
5 votes
4 answers
8k views

Speed detector for amateur sports such as athletics or tennis

I'd like to build a speed detector that can measure speed of a running athlete, or the speed of serve in tennis or any other similar amateur sport. Devices like these are used during Olympics, ...
Maria Zverina's user avatar
5 votes
5 answers
18k 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 ...
sonfollower's user avatar
5 votes
4 answers
5k 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 ...
Ctpelnar1988's user avatar
5 votes
2 answers
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 ...
DonGar's user avatar
  • 273
5 votes
1 answer
2k 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 ...
MichaelBaker's user avatar
5 votes
1 answer
1k views

Reading Frequencies with Python

hello ladies and gents. your knowledge helped me a lot until now but now i have a question. i want to read out the frequency of a 3.3V squarewave. (The unit i want to readout is a capacitive ...
Hansom DIY's user avatar
4 votes
3 answers
3k views

Powering a sensor using an external power supply board

In my Raspberry Pi project, I need to measure a distance. To do that, I have an ultrasound sensor called "AJ-SR04M" (it is basically a waterproof HC-SR04 I believe). Characteristics of the AJ-SR04M: ...
GuiTeK's user avatar
  • 153
4 votes
3 answers
1k 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?
Vishnu's user avatar
  • 61
4 votes
6 answers
5k 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 ...
brad.v's user avatar
  • 141
4 votes
2 answers
2k views

Adafruit 9-DOF or other accelerometer/magnetometer/gyroscope sensor for Raspberry PI 2/3 with Windows IoT

I'm really new to both Raspberry and the whole electronics world: I'm experimenting with the board, using Windows IoT (since I'm quite familiar with C# as a development platform). I'm not, however, ...
ccalboni's user avatar
  • 143
4 votes
2 answers
17k 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 ...
si618's user avatar
  • 191
4 votes
3 answers
2k views

Accurate water level

I am creating a self watering indoor garden with a Raspberry Pi 3 B+, but for the way I'm building it, I need an accurate level detection. The water will be fed into this container, and then this pump ...
Filcp's user avatar
  • 43
4 votes
1 answer
4k views

Preventing corrosion on YL-69

I am using the YL-69 with a MCP3008 and a Raspberry Pi 3: I am using the sensor for soil moisture measurement (plant monitoring). This is the code which gets analogue sensor values: os.system('...
チーズパン's user avatar

1
2 3 4 5
14