Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

INA219 protection for motor measurements
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: INA219 protection for motor measurements

by dsxoiniana on Thu Feb 27, 2020 7:59 am

adafruit_support_bill wrote:But you still need a common ground for a signal reference for the shields - ideally direct from the shields to the processor.
So this means the gray cable between the shields needs a break-out to a ground pin of the processor. Right?


adafruit_support_bill wrote:And you need a current return path for the motor power - ideally direct from the shields to the power supply.
Don't get this. Can you point out the path that is affected?

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Thu Feb 27, 2020 8:15 am

So this means the gray cable between the shields needs a break-out to a ground pin of the processor. Right?

That is your motor power. It should have a good low-resistance connection direct to the negative terminal of the power supply.

This will also give you a ground path between the shields and the processor. But it will not be a 'clean' path since it would be shared with the motors. So it will be contaminated with current spikes and brush noise from the motors. Not the ideal signal reference.

So you should also have a ground wire from one of the ground pins on the shields to the ground pin on the processor. There will be negligible current flowing via that path, so it should serve as a good clean ground reference for your i2c control signals.

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Thu Feb 27, 2020 10:54 am

So, is this what I'm looking for?

Image

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Thu Feb 27, 2020 11:55 am

Yes. That looks right.

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Fri May 08, 2020 2:20 am

hi all, hope everyone is doing fine in these weird times. Coming back to the topic, is there an option to modify the schematic above to measure the power consumption of the Node MCU together with the power consumption of the shields?

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Fri May 08, 2020 5:12 am

Yes. Connect VIN on the processor to VIN- on the INA219.

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Fri May 08, 2020 5:50 am

adafruit_support_bill wrote:Yes. Connect VIN on the processor to VIN- on the INA219.

When I do so, the node MCU only powers up when I power up the LEGO battery box. I would expect that it would work as before, that is the nodeMCU powers up when I just plugin its USB cable and the shields power up separately by the battery box.

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Fri May 08, 2020 6:06 am

Your diagram shows only one power connection. Based on that diagram, it would only turn on when your single power connection was turned on. You can't measure 2 different power sources with only one sensor.

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Fri May 08, 2020 6:23 am

adafruit_support_bill wrote:Your diagram shows only one power connection. Based on that diagram, it would only turn on when your single power connection was turned on. You can't measure 2 different power sources with only one sensor.

My bad, I assumed that the power supply of the processor was self-explainable. I guess I'll use a second INA219. By the way, I have 2 INA219 but I can't solder now the address pins to use them both. Any "dirty hack" to change its address in another way? If not I guess I'll use a second MCU..

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Fri May 08, 2020 6:41 am

I assumed that the power supply of the processor was self-explainable.

The diagram shows power to VIN. That would power the processor.

I have 2 INA219 but I can't solder now the address pins to use them both.

Why not? There are jumpers on the front that allow you to configure it for 0x40, 0x41, 0x44 or 0x45

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Fri May 08, 2020 6:50 am

adafruit_support_bill wrote:
I assumed that the power supply of the processor was self-explainable.

The diagram shows power to VIN. That would power the processor.

I have 2 INA219 but I can't solder now the address pins to use them both.

Why not? There are jumpers on the front that allow you to configure it for 0x40, 0x41, 0x44 or 0x45


There is no connection to VIN of the processor, maybe you refer to VU? That's just output voltage (referred as V_USB - 5V). I use it to power up the INA219. Unfortunately, I don't know how to solder, a colleague does this for me :P

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Fri May 08, 2020 7:50 am

Soldering is not difficult. See our tutorial here: https://learn.adafruit.com/adafruit-gui ... -soldering

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Sun May 24, 2020 6:54 am

Reviving a bit the topic as I seem to run into power problems. I'm measuring the power consumption on both motor shields as indicated in previous posts. It works fine when the power supply for the motors is the LEGO battery box (9V). I want to replace the battery with a constant DC power supply to make my experiments more robust. I tried to use an AC/DC converter shown in the link below, but it seems that it messes up the whole system - in fact I think I have probably burnt a couple of INA219 sensors. Is my converter correct for the motor shields and the INA219?

Image

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Re: INA219 protection for motor measurements

by adafruit_support_bill on Sun May 24, 2020 7:08 am

The label on the power supply is not very specific. But I suspect it is not a regulated supply and probably puts out just half or full-wave rectified DC from the secondary winding of the transformer.

https://en.wikipedia.org/wiki/Rectifier ... rectifiers

adafruit_support_bill
 
Posts: 78710
Joined: Sat Feb 07, 2009 10:11 am

Re: INA219 protection for motor measurements

by dsxoiniana on Sun May 24, 2020 7:15 am

adafruit_support_bill wrote:The label on the power supply is not very specific. But I suspect it is not a regulated supply and probably puts out just half or full-wave rectified DC from the secondary winding of the transformer.

https://en.wikipedia.org/wiki/Rectifier ... rectifiers
Thanks Bill. I suspect the SEC part on the label is the output, and there it says 3A. I thought that this might be too high for the shields or the INA but I'm not sure. Can this be the case? What would be a good replacement for the battery box to have constant power to the motors?

dsxoiniana
 
Posts: 51
Joined: Mon Nov 25, 2019 4:41 pm

Please be positive and constructive with your questions and comments.