The other day, I want to build my own personal data collecting system and use this data automatically control my devices.
Started with testing wireless modules. At first I tried WiFi module ESP8266, for it’s cheap and low power consumption than other wifi chips, but this chip is already an micro controller and still needs average 80mA operating current. Then Andy recommended RFM69HW chip. Even thought “H” here means high power, it’s standby power and running current is much lower than wifi.
This radio chips runs at 3.3V, so if you use 5V Arduino to control it, you will need a logic level converter or build your own voltage divider: (MISO is SPI data output pin, so you don’t need any resistor here)
Next is to build more to test multi-devices connecting to each other.
Looks like it works really nice and stable. This 433mHz radio signal could easily go through the walls. Next step is to try to make it work on Atmega329pu to make sure my circuit is correct. Good news it doesn’t matter what kind of voltage I used to program it, if the supply power is 3.3v, the whole board would runs at 3.3v, which means I don’t need any voltage divider.
By checking Atmega328p datasheet, it’s not a good thing to running it at 3.3v with a 16mHz crystal.
So in my PCB design, I decide to use 3.3v with 8mHz external crystal. On account of the RFM69HW would occupied all SPI pins, I designed to use SPI pin to burn boot loader before soldering RFM69 on it and then FTDI pin to programing my board.
Using Othermill to make it: (Here I’m using 30 degree engraving bit and 1/32″ end mill bit)
After Arduino boot loader burned, solder RFM69
Then add DHT22 humidity sensor to this board:
Add a button and battery to it:
This gateway board would receive all the data and transmit them to a raspberry Pi through serial communication. And the RaspPi would run a node server, save all the date in a Json file. So I can access these data remotely.
I’m using 433mHz radio signal, which means it’s wave length is around 69cm. A 1/4 length of wave length antenna would work, but 17cm is still very long. So I made my own coil antenna follow Ben’s pdf
make more pcbs with sensors or relay switches, so I can turn on my humidifier automatically or turn off my power strip remotely.
This PCB is keep working and sending data to my raspberry pi server, you can view the data here: