Current Meter Circuit Help

Hi all. I need a bit of help with a circuit design for a current and voltage meter that I am trying to make. The meter is to measure battery drain on cars when they are locked. This is only to be used for diagnosis so will never be hooked up with the car driving.

As i am trying to measure battery drains I want to be able to measure the current to 3 decimals (0.001A). I have made the attached circuit and I am using a currrent shunt inline with the battery connection that can handle 100A with a 75mV drop. My main reason for having a large shunt is that i want to be able to operate central locking etc to lock the car/put it to sleep and have seen with locks of door motors etc there can be spikes 30A/40A so this more than covers this.

To get the resolution I need I am using an ADS1115 and have the gain set to 16X +/- 256mV and am measuring the difference between the two channels. This is all working as I want.

My next part is to also measure the 12V battery voltage across A and B. The accuracy isnt as important for this and one or 2 decimals would be good enough. this is where I need some help. I did wire up a voltage divider and connected it to the arduino but I think I blew my ADS1115. I now realise that this was because connecting to its ground caused the voltage on the ADS against its ground caused too high a voltage.

I have a few ideas but unsure what would work or be the best way. could I use an opamp to scale the voltage of the shunt or battery or both? would adding a second ads1115 or arduino help and use an optoisolator for communication? any advice welcome and thanks for reading.

Without a common ground between the battery and the Arduino, I'm not sure how measuring the voltage across the shunt did not also blow your ADS1115?

I did try a voltage divider, but I think connecting the arduino ground to the 12V battery ground and the analog pin to the voltage divider is what caused me to blow my ADS1115. If i understand correctly, me doing this caused the voltages measured by the ads1115 to be above its voltage as its ground is now also the battery ground and measuring at point 2 and 3 of the shunt will be now 12v rather than just the few mv across the shunt. Or maybe I am wrong on this.

would swapping the shunt to the negative lead of the battery help?

on your second post, I originally had it wired in the diagram measuing the difference across the 2 channels and was working well through all my testing. I only ran into the issue when I tried to measure the voltage. I started with the differential example for the ads1115.

Sorry, I deleted my first post when I realised I was suggesting something you already tried. Maybe I wasn't quite awake!

You can't connect the ADS1115 pins to a voltage which is higher than its Vcc pin or lower than its ground pin, otherwise it can be damaged. Using differential mode or different gain settings doesn't get around that restriction.

In your schematic, there is no common ground between the vehicle battery and the Arduino. So their grounds could be a hundred volts apart in either direction.

In reality, is there a common ground? Is the 5V supply powering the Arduino from a separate battery or from the vehicle battery via a 12V-5V adapter of some kind?

The arduino is powered by a seperate power source to only have the battery powering the car. In my original setup as posted in the diagram, as far as I can see, with no common ground between them, the ads1115 will measure the difference between the two points, which should be at most 75mV.

In my head this is like if i connected a multimeter between the two points i would not have a reference to ground and would read the difference between the two probes.

I wired it up and it seemed to work. I had it taking measurements, counting amp hrs used etc and have compared its readings to a meter I bought and they all match, and I tested against a few known loads and seemed to work well.

then I moved on to measure the voltage and thats when i damaged the ads. I have yet to rebuild it as I have been thinking about how I will move forward.

An easy way would be to just use esp8266s and have them talk with wifi but i wouldnt learn anything doing that and feel designing/redesigning the circuit is a better way.

What would your recommendation be to get the precision of 0.001A, capable of large 50/100A spikes and measure 00.00-15.00V

https://www.sparkfun.com/products/retired/14331 I currently use this meter, but I would like to make one with slightly better precision and add some features such as logging etc. and also to learn from it

Hello kevinirl

Welcome back.

Take a view here to get some ideas:

1 Like

For a 1 mA resolution up to 100A you need at least 5 digits: this is 99,999 mA. That's a very high resolution, and impossible to accurately measure without pretty high end equipment to have that last digit still be significant. Getting a 3-digit accuracy is a far more attainable goal.

You have a shunt that as stated in the schematic gives you 75 mV at 100A, correct? With the ADS1115 at highest gain (256 mV) you have just over 1/4 of the full scale, or some 9,000 points. Even if you would be able to get your circuit stable enough (electrical noise becomes a major issue - both picked up by the wire and noise on the power supply rails to your ADC) to have all those points significant and reproducible, that still means you're an order of magnitude in resolution off your goal.

Measuring mA ranges is not a problem as such. Measuring mA resolution when you want to be able to measure up to 100A however is a problem. I don't see an easy way of having say two shunts in the circuit, for different ranges, like you may be able to do when measuring voltages.

It is difficult to get a device that can measure a few mA in a system that might take say 100A . That’s why multimeters have different ranges .
If this is to check drain when the car is parked just use a multimeter between the battery and it’s connecting cable . Once you’ve took the measurement that’s it . Not worth making a system out of it .

1 Like

All multimeters have range settings (of course, some are auto-ranging) and that means you lose resolution at higher ranges but it also means you don't need as much resolution. For different, wide, current ranges you'd probably need multiple shunts.

When you are trying to read low-millivolts, noise tends to become a problem. An op-amp (or any amplification circuit) will add SOME noise. By using a higher-value shunt for lower currents you can overcome that with higher voltage.

Meters also have over-voltage protection in case you have a high input voltage on a low-voltage range.

Current protection is usually a fuse, but it can also be done by using a shunt with a high-enough wattage rating.

Firstly thanks to all for your replies.

Paulpaulson I have read your post and need to do some more research, I had originally looked at some of these modules but couldnt find one that would work in my situation but perhaps I need to read some more. I will go over it again as soon as I have time.

wvmarle

I get that I am trying for a high resolution and perhaps I will need to scale back on resolution or max current. I thought I had done the maths to get my required resolution with my shunt and the ads1115. maybe I wasnt factoring in the plus or minus 256 in which case my numbers would be wrong. I need to recheck. with life being busy its a while since i originally planned this.

hammy, I understand my requirements may be difficult but am exploring options. if i use a multimeter set to 10a and connect inline with the battery lead, when I operate the central locking to "put the car to sleep" it will blow the fuse in the meter. also I find modern cars dont like to fully power up with just the meter in series so they are not as they would be in normal operation.

To get around this, I currently use a meter that I linked above. It lists 0-50A continuous and 100A for a short time. This allows me to have it connected in series, turn ign on and off, lock the car and then montior it. it can measure to 2 decimals for current and voltage. This does satisfy my need quite well but as part of building one I would like to see if I can improve on its resolution if possible.

I am not very concerened with having resolution on the upper end of the scale, i only care about decimal places in the lower end below 500mA or 1A. Maybe there is a way to do this with 2 shunts in parallel to give high resolution but not be damaged by a spike of 30/40 amps when all the central locking motors run at once?

another reason for making a tool out of it is to use it for logging to graph for leaving attached for longer periods to check for intermittent issues or to confirm after repair that there is no drain. also I will be using an lcd that will be wireless to the arduino to allow it to be monitored from the other end of the vehicle such as when the battery is located away from fuse box etc. so its useful and educational to try build it.

I understand noise may or will be an issue in all of this, but im willing to try and to learn, and any improvement i can make on the meter i have is a bonus.

thanks for all the input so far. hopefully this gives you a bit more detail on why and what I am trying this. I will do some numbers again and read some more datasheets and see what I can and any more input is very welcome.

Thanks

A shunt is just a special kind of resistor - I'm sure you know what happens when you put two resistors in parallel. Same applies for shunts. You would need to be able to select which one is in circuit (definitely possible) while being able to handle sudden huge current spikes (I don't know how to go about that, or if it is even reliably possible).

Voltage meters could be automatically ranged much easier, in part because the presence of a volt meter doesn't affect the circuit, while a current meter with a too high value shunt will cause a major voltage drop and cause problems that way.

Wrong tool for the job.
What you need is an INA239, or if you can't get that one, an INA226.
They both are designed for high-side shunt measurements, and also do battery voltage.

Can't do that. All shunt sensor chips need a common ground with the Arduino.
Different power source is fine though.

Bad idea. You should under-rate your shunt for a higher resolution in the lower current range.
Shunts are just big-size resistors. A 10A shunt should handle 40A for a second just fine.
Then a 10A slow-blow (car) fuse should of course be included.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.