Hi all - I’m having a strange situation that I just cannot figure out, so figured I’d float it here to see what people think.
I’m using a Boron to control a Cytron 40A motor controller. Conveniently, it provides a 5v output which I am using on VUSB to power the Boron. The system is powered by a 12v marine battery.
I want to measure the current via a shunt resistor in the 12v supply and use PWM to step down the motor controller when the shunt-current says I’m above 40A in an effort to prevent a motor stall.
So I’ve connected an INA219 to this setup, and a 100A/75mv shunt resistor, and connected this via 3.3v out (from boron) and SCA/SCL for i2c. (the on-board R100 shunt has been desoldered and removed)
The bad news is, this works for only a very short period of time. A thermal camera shows the INA gets really hot doing this, reaching about 180deg F which just doesn’t seem right.
Have you tried measuring the voltage on the 100A current shunt with a multimeter? Just to be sure that what you are seeing on the current monitor is correct.
Try running your Boron and INA219 off of separate battery, like a USB phone charger battery. You don’t know how the motor controller is referencing the 5V output and it might not be what you expect. Another way to test this would be to measure voltages from the +5 supply points to the high power inputs.
There are folks how make isolated INA219 boards for this type of problem–if you search I’m sure you will find them.
Yes. With nothing attached but the shunt and a resistive load of 10A, I get 7.5mV across the shunt - which seems dead on. Have also done same with the INA attached as a stand alone test (no motor controller just resistive load) and also reads same using an argon - but the power situation in this case is different as you point out.
In my Argon setup, I can measure 35A and not see heating of the INA - but in this case there is no motor controller and I'm sourcing 5v for the Argon from an electrically isolated source (ie. usb-port or 5v wall-wart). Will try checking the voltage as you suggest, and at least temporarily powering the INA from a different source while reading it from the Boron that's driving the motor controller.
In this case, if I understand correctly, the INA may not report bus-voltage as it's referencing vbus to ground to measure (otherwise it just sees shunt voltage) - and if the grounds are separated, then I'm guessing no Vbus. It's not a high priority requirement, but nice to be able to monitor the battery voltage along with using current to limit motor stall.
Hi,
If you would like to make this circuits opto isolated you can check this guy
He is using a different IC’s but you can easily adapt INA219 here.
Regarding to your heating if I understand correctly you can easily measure 35A when is purely resistive load on it ( no motor no controller no PWM ) if that’s correct I believe that the harmonic noises “playing the symphony here” the fact that is 12V 40A and all is controlled by PWM and I guess there is some load on the motor shaft. So the circuit is no more just “pure resistance” there’s some xC and xL inpedance there. As well and a frequency of your PWM make me believe that this is your source of a heat. Will be perfect if you can connect some harmonic analyser or even a scope and check the amplitude of all harmonic present in the circuit.
Aso try to lower your PWM freq. as much as you can and try to consider some LRC or even just LR filters.
Is what me and my colleague are starting to think as well.
Resistive load is easy to do on the table (halogen lightbulb) and doesn't try to run away. Inductive is more complicated, but not impossible.
Probably best to observe the situation as it happens, which is do-able. Do have a scope and will look to see how bad the noise is - suspect it's bad. And indeed some filters may be needed.
Would a hall-effect current sensor have this same issue do you think?
I guess that will work perfect as long as you just measuring magnetic field around just a conductor (no shunt no even minimal resistance element at all)
But the noise are still there, they just don’t have “simple place” to be, let’s say visible and they can make a lot of different trouble!
Thinking about this a bit more and looking at your board, I think you should measure the actual motor current with a true RMS type of current monitor instead of measuring the motor controller current. They are related but the PWM with the inductive load means that it is hard to infer the motor current from the supply current.
The discussion you are having with @dreamER is also spot on. Motors are horribly noisy electrically.
My dealings with Harmonics has always been w/ AC systems, not DC.
I assume you could easily have a multi-Phase ESC operating your motor though.
I have a couple of thoughts that I’d like to float out here.
In the UAV world, I’ve used a PixHawk/APM Current Sensor (True Hall Effect Sensor) at much higher current than 40 amps. You can easily monitor both current and voltage with a PixHawk Current Sensor. These operate fine in an extremely demanding/noisy electrical environment. It may be worth looking into for your application ?
I cant wrap my head around ripples causing the heating issues with the INA219. It’s still only measuring a 0-75mV DC signal. Would moving the shunt to the battery side instead of the Load side change anything or offer any insight ?
Looking at the picture of the pins on the INA module, is it dirt or is the pin charred?
Could it be that current is returning through the INA module? Can you show a schematic or block diagram?
Glad I've piqued interest! I could use the help as I can't figure it out either. Without the motor running, the INA is pretty happy, reading 12v on the battery and about 1w current draw of powering the electronics. When the motor starts, the INA starts heating relatively quickly and steadily and will go from about 50deg F ambient to 180deg F over a span of about 15-20 seconds. So I don't think it's an inrush current situation because it doesn't fail immediately, it heats up for a bit and then fails.
Will check PixHawk.
The shunt is already on the battery side of the controller, not the load side.
Regarding to @bko advise and article the shunt shouldn't be at input (battery side) should be measured directly on motor wire with TrueRMS option
could you try to move your shunt to the output side ?
It is something we can try, yes. Not sure what's wrong with having it on the supply side tho. I would think that if the cytron was chopping current on the load side, it would have filter caps that would stop any ringing going back up into the power supply. Not 100% sold that harmonics is in play.
Can you show where the module gets ground from? Depending on how you connected ground, it looks
like it is returning through the module (charred pins).
As others have mentioned, this is a “high side” sensor. Connecting it on the low side should not cause the overheating, but it’s worth trying, after you have a good picture of the grounds.
Following them to the solderboard for the Boron...that lights up +/- rail at 5v, with a jumper to the boron from 5v to VUSB. At the very bottom there's a black that ties the left and right (-) rails together.
On the other side of the solder board, we tie Boron gnd and 3.3v to the left hand rail (- is jumpered from the other side of the board, black wire at bottom)...
The 12v is a marine battery as this is on a floating platform. There is 110v pulled to the platform and it goes out regularly, so there's a 110v->12v battery charger sitting on the battery to keep it topped up...and the battery should be buffering things. There is no "earthed" ground because - floating platform.
I'm going to take a guess here in that using the Cytron ground (at 5v) for the INA is not going to work if Vin/high-side to the ina sense line is 12v to a 12v gnd?/ - as that's a 7v differential?
If I remember correctly, the INA gets bus voltage by referencing Vin to gnd - thus your high-side path to voltage differential....?
I have a 12v->3.3v buck converter, so seems like I should make my own 3.3v from the same 12v+/gnd that the INA is trying to read, and leave the cytron 5v/boron 3.3v out of it...?
I think I followed the explanation, but hard to tell without eyes on it.
I am not familiar with the controller board. I would check if VB- and GND of the 5V are related. The 5V output might be isolated from the 12V, so the voltage on the INA pins is not well determined.
BTW: the battery in your diagram is flipped.
Yes, the battery is flipped (you are second to remind me) - I am using lucidchart and it is not the best tool for this, but it is what I know. Fixed it, finally.