Create a cheap and low-power Arduino sensor device (currently for measuring the temperature but could be easily adapted to other Arduino sensors) using an NRF24L01+ 2.4Ghz transceiver to send temperature measurements every X minutes.
The idea is to have reliable RF communications, using small packet sizes, low transmission rates, whilst maximising communication range and battery life, by using the Arduino's and the transceiver's "Power-Down" modes.
- Two Arduino Nanos
- Two NRF24L01+ transceivers
- A DS18B20 One-Wire digital thermometer
- A 4.7KΩ resistor
- Jumper cables
- USB cables
- The Arduino IDE
- Maniacbug's RF24 Library Une autre library a été utilisé : https://github.com/nRF24/RF24
- Paul Stoffregen's One-Wire library
- Miles Burton's DallasTemperature library
- Basic C knowledge
- VCC -> 3v3
- GND -> GND
- CSN -> D10
- CE -> D9
- MOSI -> D11
- SCK -> D13
- IRQ is not required for our use case, it's an interrupt pin that goes LOW whenever a packet arrives, a packet is sent or the maximum retry count for sending a packet is reached. You can find out more about that here
- MISO -> D12
- GND -> GND
- D -> D2
- VDD -> 3v3
Place a 4.7KΩ resistor between D and VCC.
- VCC -> 3v3
- GND -> GND
- CSN -> D10
- CE -> D9
- MOSI -> D11
- SCK -> D13
- IRQ is not used
- MISO -> D12
With the Arduino IDE compile and upload sensor.ino
to the sensor node, and master.ino
to the master node. Leave the master node connected to the computer via USB, and open up the the Arduino IDE Serial console (CTRL+SHIFT+M).
Power up the sensor node a few meters away for testing purposes via USB power or with a direct 5V input on the 5V pin.
Every 8 seconds you should see the temperature (in °C) displayed on the serial monitor of the master node.
- Reduce power usage
- Add GPRS module to the Master node to post temperature to a data logging API
- Test out other sensors (PIR Sensor, humidity, air pressure, smoke detector...)
- Add more sensors all communicating with a single master node which bundles up the data and posts it to the API
- Test battery life using 2 AA batteries and a 5V Step-up module
- Test maximum range in open area, within a building...
Any contribution is welcome, whether it's new ways to keep power usage to a minimum, how to send radio packets in a more reliable manner, how to communicate at an even lower bitrate, how to increase the RF range... Feel free to open up an issue if you have a problem, question, bug or idea.