RF24Network Updates &; More
I’ve made my Pro Micro/Mini ISP breakout board and Raspberry Pi nRF24L01+ breakout board as per my previous post and decided to get on with trying out RF24Mesh. The problem there was that with the newer commits to RF24 and RF24Network, I was getting no response from the Arduino’s to the RPi.
After some debugging with the author of the libraries on GitHub, we managed to find the culprit – not really the clone issue or the differing module issue, but actually a bit of an oddity in how dynamic payloads and dynamic ACKs work together. So with the Development branch re-opened, we now have the modules talking again. It may need some more work to get mesh working though. So for now I’m sticking to RF24Network, not RF24Mesh.
I’ve migrated all of my various sensor modules to a more streamlined setup – essentially there’s a daemon listening on the Pi which directly populates the database now, rather than the previous separate cronjob. It also handles taking measurements from the DS18B20 sensor on the Pi breakout. The daemon also accepts TCP connections should I want to use an ESP8266 sensor, its also handy for debugging using netcat. Each module sends each sensor reading separately, so each RF24 transmission is under 16 bytes long, rather than pushing the 32 byte limit.
One of my new modules is a 3.3v 8MHz Pro Mini 328, from which I have removed the LED’s and regulator to drop the current use. I’ve also configured its fuses and boards.txt to run at 1MHz from the internal oscillator and set all unused digital pins to INPUT_PULLUP. Now its using under 4uA at sleep. The boards.txt entry looks like:
|
|
I then added the BH1750FVI light sensor to the circuit and found that the sleep current was the same as when it was awake taking readings, about 110-145uA, instead of 5uA the manufacturers claim. So I switched to using the BH1750FVI library as it had better sleep support. Alas that didn’t fix things and I decided the module simply wasn’t sleeping. After some reading of the datasheet and playing with code I finally figured out that after calling power_on and reset to wake the device from a power_down, you have to set the resolution mode again. I also found that disabling the pullup resistors on the I2C pins helps, as the module already has internal pullups. I’ve tested it down to 1.5v, which is quite far below any of the components ratings, but it works….
|
|
I finally got my hands on a Particle Photon. However I found a bug in the way it reports its error status to dfu-util, it flashes ok but says it hasn’t. The fix is in 0.4.5 but requires a bootloader ID upgrade, so it won’t be 100% fixed until 0.4.6, unless I get a JTAG programmer to set it in the meantime. Otherwise it seems to be more mature than the Spark Core – well they fixed most of the issues there before working on the HAL for the Photon I guess.
I’ve also started playing with an MRFC522 RFID reader/writer and some cards/keyrings – worrying how easy it is to clone those things! I’ve also got some HC-05 Bluetooth modules to play with next.
We’ve also made a few commits to arduino-mk this month.