Qball's Weblog

Long range with NRF24L01+ and ina228 power monitor

Tags atmega328pb  nrf24  Sensors  Low Power  Measurement Equipment 


In my previous post I remarked that the nrf24l01+ modules with LNA did not work well. I’ve decided to get another version of this, namely the EByte E01C-ML01DP5. It’s a module advertised with a range up to 2.5km. After swapping the old module with this one it instantly worked, confirming the old module was just broken. I managed to get around ~250m range, this was not line of sight, but receiver in my living room and me walking down the street with trees on both sides. Overall not unhappy with this result, and now my sensor in the attic could be changed away from WiFi. The EByte modules I got use an external antenna, I wonder how far I can push the range by adding a directional antenna. A future experiment.

INA228 monitor

Several months ago I got a ina228 Power/Energy/Charge monitor. (See here for pdf). I’ve used this to track battery charging using a solar panel. Its high precision (20bit) did make me wonder if I could make an energy monitor that could actually track the energy consumed by my lower sensor nodes.

So ideally I would like the following specifications:

A quick check with datasheet, it should be able to do this.

Given the testkit I got was pretty expensive and big I decided to build my own little pcb:


(spot the odd number on the calculated value on the display.)

I got 3 different shunts for testing, 200mOhm, 300mOhm, 400mOhm.

These are ideal numbers, the actual precision will be worse and a trade-off with sampling frequency/averaging.

In the end I build it up using an esp32s3, a small 1.54” tft display and some buttons. The display and getting it to redraw quick and nice enough is a blog for another time.


Some first results:

Voltage was pretty accurate. In my tests comparing it to two DMMs it was within 1mV. This is good enough for my needs. Current was a different story and had some different oddities:

Checking if the charge/energy was accurate is going to be a bit more difficult. For shorter periods (around 2 hours) I could use my Nordic Power Profiler 2 (In advanced settings you can change the maximum buffer length, to allow for longer recordings). On the slowest conversion level it clearly missed some of the spikes and my measured total charge was off. Reducing the conversion time, at a loss of effective resolution, fixed this. In the end I manage to find a ‘sweetspot’ for my sensor. The total energy seems to be acting odly. If the flow of current is reversed the total energy keeps going up, while charge nicely goes down. For battery usage it would have been nice if this was not the case. At lower power levels the joule counter seems to be low, this needs further investigation.

Future steps

The biggest first step I want to do is implement a SCPI interface to the board. This way I can write a script and automate the verification of this module. Have it automatically sweep through its voltage and current ranges while logging the actual values. Using this I hope to be able to get more insight in some of the behaviour I’ve seen. So far it already was useful for some experiments.

comments powered by Disqus