Optimal/alternate methods for efficient current measurement (Solar/Battery) - Page 1
Forum section: electronics / projects

author: optoisolated
author_rank: Unknown
timestamp: March 21, 2021, 02:14:31 pm
content: Hi all,I'm designing a module to provide digital monitoring of a solar/battery powered computer solution (Low power) and already have a Solar MPPT in place to manage the charging of the battery. The computer is remotely accessible and has SPI/I2C inputs which I can use to report battery/solar voltage as well as load/solar current.The voltage measurement side is done and dusted, but I am lookign to see if there may be a better/more efficient/simplier way to handle the current measurement. I originally planned on using a dual LM358 to handle the comparison however as I need to measure current in both the positive and negative (solar charging) range, I will need implement it with a differential amplifier. I'm currently looking at the LTC1992 as it looks to be a workhorse for that sort of application, doesn't need a split rail and runs at 5V which the majority of the module already uses.This is my current approach. I'd be keen to see what other suggestions people may have and if there are simpler/more cost effective/more efficient ways of achieving this sort of measurement. Also looking to see if there are any gotchas that you may have come across with this approach that I should be factoring into my design.Cheers

author: ambrozy
author_rank: Contributor
timestamp: March 22, 2021, 09:48:20 pm
content: ACS712https://www.sparkfun.com/datasheets/BreakoutBoards/0712.pdfor similar, isolated and bidirectional measurement, can be connected straight to the uC. In my country it is hard to get this IC alone, but boards like thishttps://www.sparkfun.com/products/13679are available. I used ACS712 for exact same purpose.

author: optoisolated
author_rank: Unknown
timestamp: March 23, 2021, 09:42:04 am
content: Okay, now why didn't I think of thatDamn that's way simplerNice! Respin here we come! haha.. Thanks..For posterity, here's the design with the original Diff Amp.

author: ambrozy
author_rank: Contributor
timestamp: March 23, 2021, 05:31:49 pm
content: 1. Your "measure" input is supposed to shut down the entire measurement circuit? because it doesn't look right to me, I don't know if your 5v suppy is isolated from solar battery system, but even if it is, ADDR is still connected to gnd and when you switch off those bipolar transistors your inputs to adc will rise to full battery/solar voltage and I don't think that "floating" this adc by it's inputs is a good idea. If your 5v supply is not isolated this will most likely fry ADC when you switch bipolars off. If you would like to disconect those dividers from battery I would propose using maybe bipolar optocouplers on the high side.2. ads1115 has low power "shutdown" mode, which consumes less than 1 uA3. Your input dividers looks like are for 0-15v, so I suspect that you have 12v solar system, solar panels for 12v system can have well over 20V when not under load, you will fry your ADC4. 16 bit ADC is absolute overkill for this application, 10bit would be just fine

author: optoisolated
author_rank: Unknown
timestamp: March 26, 2021, 02:47:24 pm
content: Thanks everyone for the contributions. It's helped a lot! I ended up keeping the ADS1115. 16bit is definitely overkill but I managed to get a decent price that was close to most of the 4-channel 10-bit ADCs.I did replace the differential amps with the Hall-effect sensors and some diode protection. I also changed the voltage divider to allow for up to 30V without exceeding the upper limit of the ADCs and also reduced the current load into the microamps range. Also removed the enable circuitry as after working through all of the loading the power saving was negligible.

author: viperidae
author_rank: Frequent Contributor
timestamp: March 26, 2021, 11:28:06 pm
content: I wouldn't use such high value resistors for the voltage divisors unless you want to buffer them first.The ads1115 can have an input common mode impedance of a low as 3M and up to 100M and differential impedance as low as 700k depending on the gain setting.

author: WattsThat
author_rank: Frequent Contributor
timestamp: March 27, 2021, 12:37:14 am
content: I’m not a fan of the ACS712 sensors, especially the 5A as they drift a bit and the resolution isn’t the best. Just an experience thing. If you need isolation, well, okay, it’s cheap and easy.If your original LTC1992 circuit was okay with a shared common for the current sensing, have you looked the INA3221? That’s a one chip solution. Or two INA226’s. Or similar.If you do use the current design, I’d upvote the previous post on the divider resistance values. Way too high. Your battery can’t handle a milliamp to get you down in the 10K range? Even that should be buffered. Also, why the 1N4448 diodes in series with the current sensor outputs? Signals are DC and not bi-polar. I’m not seeing any reason for them to be there.

author: optoisolated
author_rank: Unknown
timestamp: March 27, 2021, 12:45:47 pm
content: That's an interesting package from the looks of the datasheet. Looks like it will do everything I need. Will have to grab a dev board and play around with it and see how it performs. I can definitely handle being in the milliamp range, but wasn't really sure what the downside was of using the higher value divider resistors.I actually completely forget why i put the diodes in there. I assume it was to protect the ACS712's if something went wrong with the voltage dividers and it blew the ADS1115.WRT the buffering of the voltage dividers, is that for isolation reasons, or accuracy of reading?

author: wizard69
author_rank: Super Contributor
timestamp: March 27, 2021, 05:05:47 pm
content: I hope this doesn't pull the thread off track but why would your solar current monitoring need to be bidirectional? I have to admit that my usage of solar is near zero but I have been under the impression that reverse current flow in a solar setup is a bad thing (effectively a waste of energy).As for the INA3221 that is certainly an interesting device (I actually downloaded the datasheet); I'm not sure I would go that way but TI does have a interesting collection of devices there. This makes me wonder what your front end protection will be like and what would result in the more robust device that may need to withstand lightening and other nasties.Quote from: optoisolated on March 26, 2021, 02:47:24 pm

author: optoisolated
author_rank: Unknown
timestamp: March 27, 2021, 11:33:43 pm
content: The solar current doesn't need to be. The battery current does though. My original design used the diff amp and I just elected to use two to keep it simple and my bom count down. The solar side definitely doesn't need to be bidirectional but it does mean the same design can be used for other purposes. The solar MPPT unit my project has already has some protection for anomalous current but i suspect nothing would protect it from lightning. I think it it got struck, i'd have bigger problems

author: WattsThat
author_rank: Frequent Contributor
timestamp: March 28, 2021, 04:33:12 am
content: The only use I can think of for a diode in the ACS712 output would be if the signal was AC and you wanted to do simple peak detection without burning adc cycles. But that would require a capacitor... and there isn’t one.So, beats me. This means that you're the winner of todays stump the chump challenge. But, don’t celebrate just yet as this can be an easy task, given my advancing age and limited skill set.

author: ambrozy
author_rank: Contributor
timestamp: March 28, 2021, 07:29:25 pm
content: It is true that the ACS712 isn't particularly precise, you should clearly define what this circuit is supposed to do and what isreallyneeded, for example you are trying to make it very low power but is it really needed? Whats the point in reducing power consumption on solar side to 1uA? and on the battery side, battery itself may have higher selfdischarge rate and you have other loads there, so whats the point? More important would be low voltage cutoff for battery.

author: optoisolated
author_rank: Unknown
timestamp: March 28, 2021, 10:37:08 pm
content: I have installed a Raspberry Pi in a standalone (unpowered) site which is receiving and then feeding ADSB data for FlightRadar24, which runs on a 9AH SLA battery and a 30W solar panel. I have a Solar MPPT used to trickle-charge the battery from the solar panel, and the load (Pi 3b+ with RTLSDR) is connected to the battery through a battery cutout protection module (drops the Pi when the battery goes below 10.8v).The primary driver behind this project is that I wanted a way to remotely monitor the voltage of the panel and battery, as well as the current draw on each side so I can track the efficiency of the other modules as well as track the state of the battery to ascertain if i can improve the efficiency of the setup and to determine if I need a bigger solar panel and/or battery. The Pi averages at about 250mA draw with the RTL module connected. The I2C output allows me to directly connect the module to the Pi itself allowing me the ability to remotely query those current/voltage values easily without the need for additional interfaces.As I was designing a new module that would ultimately have the potential for other uses, I figured I may as well try to design it to take as little power from the system it's monitoring as possible. Being able to use the data to evaluate if the MPPT and Battery Protector were efficient enough for long-term use is valuable as it may lead me to spin my own more efficient combined MPPT and battery protection module for the Pi and even include Watchdog protection. (Currently the Pi is boot-looping when the voltage reaches cutoff, disconnects the Pi, and the immediate battery voltage recovery when that occurs seems to cause the battery protector to switch back on for a few seconds. It's a bit hard on the SD card all the unnecessary read/write activity.)