Thursday, October 22, 2015

20+ Ultrasonic Distance Sensors Compared

Since there are many uses for ultrasonic sensors (Robots, Liquid Level Sensor, Motion Sensor, Vehicle Parking/Backup, on and on....) I compiled a list of 20+ sensors with their min/max ranges along with precision and how it interfaces with your RPi or Arduino. Prices Ranging from ~$2 usd to nearly $175+ usd.  You can connect several to your project with all of these sensors.

SRF106cm6m40 KHz?I2c$33
SRF0215cm6m40 KHz?I2c/UART$14
SRF043cm3m40 KHz?Pulse$22
SRF051cm4m40 KHz?Pulse$22
15cm6.45m42 KHz2.54cmPWM / Serial / Analog / I2c$25-$40
3cm3m42 KHz2.54cmUSB / Serial / Digital Logic $50
SRF010cm6m40 KHz3-4cmUART$28
SRF23510cm1.2m235 KHz3-4cmI2c$109
URM044cm5m40 KHz1cmRS485$26
URM0620cm10m49.5 KHz1cmAnalog$59
30cm10m42 KHz.1cm (1mm)PWM / Serial / Analog / I2c$99-$175
15cm1.84m - 3.66m42 KHz2.54cmPWM / Serial / Analog / I2c$30
1mm7m42 KHz1cmSerial / Analog / I2c$40-$55
US-1002cm4.5m40 KHz0.3cmPulse / UART$4
US-0202cm7m40 KHz0.3cmPulse$5
US-0152cm4m40 KHz3cmPulse$4
HC-SR042cm4m40 KHz3cmPulse$3
HY-SRF05 /
2cm4.5m40 KHz0.2cmPulse$2
DYP-ME007Y30cm3m40 KHz1cmPulse$13
Parallax PING)))2cm3m40 Khz?Pulse$30
URM372cm5m?1cmPWM / UART$14

Sunday, October 11, 2015

Raspberry Pi Temperature Sensors Compared

Before we start lets first name off the different ways to interface things to your raspberry pi. I2c, SPI, UART, digital pins,  usb (which will be one of the previous serial protocols just converted to USB), and ethernet (same as usb serial with some MCU with an ethernet interface). If the raspberry pi had an ADC I would've included some of them.  If you want to use an analog sensor you'd need to find an ADC --> I2c/SPI board/module.

This list I will update as I find more:
Sensor Temperature Low Temperature High Precision Interface Price
DS18B20 -55°C (-67°F) 125°C (257°F) 0.0625°C (0.11°F) Dallas 1-Wire $2
DHT11 0°C (32°F) 50°C (122°F) 1°C (3.3°F) 1-wire $5
DHT22/AM2302 -40°C (-40°F) 80°C (176°F) 0.1°F (0.18°F) 1-wire $5
AM2312 -40°C (-40°F) 80°C (176°F) 0.1°C (0.18°F) I2c $15
MCP9808 -40°C (-40°F) 125°C (257°F) 0.0625°C (0.11°F) I2c $5


East of Setup: Medium

Temperature Range: -55°C to +125°C (-67°F to +257°F)

Interface: Digital 1-Wire

Benefits: Can daisy chain many of them along the same serial bus.

Limitation: Requires a 4.7k resistor.  The communication is slow (about 1 second per sensor) which can slow down how often you're getting updates if you have 10+ on the bus.  For I2c/UART (need interface board for I2c/UART)

Price: $2

Links For Setup: Adafruit Tutorial, ModMiPi Tutorial,
Some Python Libraries: Github

DHT11DHT22 / AM2302

I put these three together because of their similarities.  The AM2302 / DHT 22 have a higher and lower temperature range. Each type requires a 10k resistor per sensor.

Temperature Range: AM2302/DHT22 -40°C to +80°C (-40°F to +176°F)
Temperature Range: DHT11 0°C to +50°C (32°F to +122°F)

Interface: Digital 1-wire (not same as Dallas 1-Wire protocol)

Benefits: Senses humidity.  DHT11 isn't too expensive

Limitations: DHT11 has a limited temperature range.  Not waterproof unless you buy an encapsulated version, which will not sense humidity as well.  

Price: DHT11 ~$5, AM2302 / DHT22 ~$6-$20

Links For Setup: Adafruit

Some Python Libraries: Github Adafruit


Since this sensor uses I2c I separated it from the above AM2302/DHT22.  Requires pull-up resistor 3l-10k.  
Temperature Range: -40°C to 80°C  (-40°F to +176°F)

Interface: I2C

Benefits: Senses humidity. 

Price: $15

Links: Datasheet Python 

Temperature Range: -55°C to +125°C (-67°F to +257°F)

Interface: I2c

Benefits: Can connect up to 8 different modules. High precision .0625°C

Price: $2

Links For SetupAdafruit Tutorial
Some Python LibrariesGithub

Other ones to look into:

BMP180 Barometric Pressure Sensor I2c, which has temperature sensing abilities. $7

MPL115A2 Adafruit's barometric Pressure Sensor I2c includes temperature sensing, $15

LM75 I2c Temperature sensor -25°C~100°C.

Interesting and possibly helpful one for your robot:

US-100 Ultrasonic sensor with UART interface $5.  (UART commands)