Skip to content

Instantly share code, notes, and snippets.

@rpedde
Created April 7, 2016 17:58
Show Gist options
  • Save rpedde/2d0f3529c6e090d66014fd521a005e2d to your computer and use it in GitHub Desktop.
Save rpedde/2d0f3529c6e090d66014fd521a005e2d to your computer and use it in GitHub Desktop.

#Hardware#

nRF24

Generic 2.4GHz radio. Not 802.11, no real framing or protocol. Useful strictly for nRF->nRF communication, although you can read semi-reliably with a decent SDR.

Note these are as cheap as a buck a pop in quanity:

ESP-01

802.11 b/g/n interface for TTL-level serial

Looks kind of awesome. Haven't messed with it yet, although I have four of them staring at me from the workbench.

Temp/Humidity Sensors

TMP36 - Simple temp sensor (-40 to 125C) +/- 2C http://www.amazon.com/ANALOG-DEVICES-TMP36-Temperature-Sensor/dp/B00JYQAIBM

DS18B20 - Simple temp sensor (-55 to 125C) +/- 0.5C http://www.amazon.com/Easy-More-DS18B20-Digital-Temperature/dp/B00FR1BUUG

DHT11 - Temp/Humidity http://www.amazon.com/Digital-Humidity-Temperature-Sensor-Arudino/dp/B007YE0SB6

DHT22 - Temp/Humidity http://www.amazon.com/Vktech-Appliance-Temperature-Humidity-Measurement/dp/B00O8RIYYU

RH for the DHT11 is so-so, and loses calibration (or so says the internet). The 22 is more stable and accurate, particularly for relative humidity. Again according to the internet.

Infra

Openhab: http://www.openhab.org MQTT Broker: http://mosquitto.org/

My crappy glue code

libnrf for rpi1/2 https://github.com/rpedde/libnrf24

avr code for nrf24 + sensors https://github.com/rpedde/nrf24-sensors

mqtt gateway for events received by sensors https://github.com/rpedde/nrf24-mqtt

so avrs with the nrf24-sensors code send messages which get received by nrf24-mqtt, which reads the packet and stuffs it into a mqtt message. Openhab picks those up and can update internal values, run scripts, etc.

I can get the temp sensors and stuff going this weekend if you are interested in that. PRs would be welcome.

Other

Got a couple of these, too:

http://www.amazon.com/RioRand-Crazyradio-Crazyflie-Quadcopter-Helicopter/dp/B00IPD2YF8

These are the nrf24 with an avr for usb interface and noise reduction and a decent antenna and whatnot. Apparently it has much better range than one of those nrf boards. No surpirise, the nrf board has a pcb antenna. I'm thinking of trading the bitbanged spi to nrf24 on the raspberry pi for this as a receiver of nrf. Then I don't have to have multiple recievers.

Although I haven't really tested range in my house.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment