Inexpensive Current Monitor

Showroom for MicroPython related hardware projects.
Target audience: Users wanting to show off their project!
Post Reply
User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Inexpensive Current Monitor

Post by dhylands » Tue Nov 24, 2015 3:10 am

As part of working on https://github.com/micropython/micropython/pull/1625 I needed to do some current measurements.

My brother has been working on an ammeter for measuring current for phones: http://blog.huv.com/2015/01/work-stuff.html and that's what I used while doing that. However, I came across another nifty little ammeter/voltmeter device called the USB Tester.

I uploaded a short little video showing the USB Tester being used to measure current of the pyboard while at the MicroPython prompt and while exeuting:

Code: Select all

>>> while True:
...     pass
... 
Since others seem to be interested in doing current measurements, I thought I would share.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: Inexpensive Current Monitor

Post by mianos » Tue Nov 24, 2015 7:39 pm

I just got one of these in the mail to do the same thing:
https://www.adafruit.com/products/904
I2C high side current meter.
I also have an XYZStudio USB monitor but I want to measure my board without a USB controller.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Inexpensive Current Monitor

Post by dhylands » Tue Nov 24, 2015 9:53 pm

Nice - it's always good to have options - I'll have to pick one up.

The friedcircuits one also has a non-USB base board you can use:
http://friedcircuits.us/tools/36

You just move the OLED backpack over to the different baseboard.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Inexpensive Current Monitor

Post by pythoncoder » Wed Nov 25, 2015 8:22 am

That USB tester is really neat: I could have done with one of those quite a few times. I was struck by this on their website
Warning: If you use this with a quickcharge charger that most cell phones are using these days, please cut the solder jumper located on the bottom side of the OLED Backpack. Failure to do so will risk damaging the backpack due to an over-voltage condition. These quick chargers are able to go over 5V. There is no protection on the USB Tester OLED Backpack.
I wonder what sort of voltage these things kick out? It's surely a violation of the USB standard carrying serious hazards. Do they pose a risk to the Pyboard and WiPy? From a quick look at the Pyboard schematic I'd say the answer was yes - via an overvoltage on pin PA9.

For people using the low power modes a means of monitoring currents in the microamp range is required and I don't think those mentioned have sufficient resolution.
Peter Hinch
Index to my micropython libraries.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: Inexpensive Current Monitor

Post by dhylands » Wed Nov 25, 2015 9:08 am

You may want to look at this: https://eevblog.myshopify.com for measuring down in the micro or nano-amp range.

mianos
Posts: 84
Joined: Sat Aug 22, 2015 6:42 am

Re: Inexpensive Current Monitor

Post by mianos » Wed Nov 25, 2015 9:44 am

pythoncoder wrote:That USB tester is really neat: I could have done with one of those quite a few times. I was struck by this on their website
wonder what sort of voltage these things kick out? It's surely a violation of the USB standard carrying serious hazards. Do they pose a risk to the Pyboard and WiPy? From a quick look at the Pyboard schematic I'd say the answer was yes - via an overvoltage on pin PA9.
The device negotiates the voltage from the charger, up to 20V. You never get more than 5V unless the device goes through the procedure. I suppose if you did some tricky coding it might be possible to force it. But there is next to no risk to a pyboard.
For people using the low power modes a means of monitoring currents in the microamp range is required and I don't think those mentioned have sufficient resolution.
The chip has a 16 bit D to A and you can change the shunt resistor with the LTC6101, as well as adjust the gain with a high resistance divider. I'm planning on doing just that and comparing it do another reference once I get it running with the stock shunt. There will be some non linearity but I can deal with that in software.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Inexpensive Current Monitor

Post by pythoncoder » Wed Nov 25, 2015 11:34 am

The device negotiates the voltage from the charger, up to 20V. You never get more than 5V unless the device goes through the procedure.
That's reassuring. I guess the warning on the USB tester website is because the device under test might go through that procedure.
Peter Hinch
Index to my micropython libraries.

Post Reply