Jump to content
43oh

mechg

Members
  • Content Count

    18
  • Joined

  • Last visited

Posts posted by mechg

  1. Heads up to anyone trying the lower shunt resistors - I was just helping someone diagnose a problem where current readings in the mA range were almost twice what they should be, and we discovered that his range switches had more contact resistance than the ones I purchased.   Identical  brand and model of switch, but his have a resistance of almost the same value as the shunt resistor for the mA range (.1 ohm).   This effectively doubled the voltage seen by the op-amp.

     

    On the PowerScope that I have been using in my daily work, I had to set the calibration constant all the way down to 811 to calibrate the milliAmp range.   Dividing .1 ohm by 811/1000 gives .123, which shows the switch resistance is about .023 ohms.   The C&K switch spec states a contact resistance of .070 ohms max, so I guess I lucked out with .023 ohms.

     

    If you get a switch with a high contact resistance, you can:

     

    1) Use the calibration feature to set the calibration constant really low. A value of 500 would compensate

         for a contact resistance of .1 ohms.

    2) Use the original, higher shunt resistors and live with the higher burden voltages.

    3) Order more switches and hope they have lower contact resistance.

    4) Change the value of the shunt resistor in the source code from .1 to whatever value 

         gives you correct mA readings.  If you have a milli-ohm meter you can measure the

         switch resistance and add .1 ohm to it.

    5)  Bypass the switch and hardwire the PowerScope to one of the two ranges.

     

    If you do # 4,  remember that in the uA range there is a connection from the switch to 

    the MPU that goes to ground when in the uA range to tell the software what range

    to use.   See Eagle screen shot below.

     

    http://www.flickr.com/photos/28541023@N05/9099381635/

     

    If you decide to set the calibration constant low to compensate, you can hold the button down and it will decrement automatically.

     

    When using the switch, it will probably be necessary to calibrate the PowerScope periodically in case the switch contact 

    resistance changes over time due to oxidation.  And since it is a movable contact, it can vary slightly each time you cycle the switch.

     

    Using the lower shunt resistors kind of pushes the PowerScope up to the limits of what it was designed to do.  Maybe in a future iteration I will redesign it so the switch is not included in the measurement.

     

        Greg

  2. It was pointed out to me that the 4-pin male header on my parts list,  3M9323-ND, is actually 2mm pitch, not .1" as is needed for the PowerScope. This one has the correct pitch:  3M9449-ND

     

    I have updated the parts list on the project site with this change.

     

    Anyone who purchased the 2mm header can certainly use it if they can break the pins apart and solder them individually.

  3. There is a new C source zip file v1.1 on the download tab here: https://code.google.com/p/powerscope/

    that fixes the bug where calibration constants are not stored in flash rom.

     

    Also, yesterday I was able to test the PowerScope with lower shunt resistors of .1ohm for mA range and 100 ohm for uA range. It is working well, although it does waver by 10-20 nanoAmps when touching the metal buttons or putting your hand near the meter, due to body capacitive effects. This does not surprise me since the smaller shunts mean that the voltage being measured is very tiny and is easily disturbed by environmental stuff. This is the difference between an inexpensive hobby-grade meter and the $500+ professional meters that are heavily shielded against such disturbances.

     

    The advantage of the lower shunts is that it drops the maximum burden voltage from 300mV to 30mV.

     

    If you want to use the lower value shunt resistances, there is a line you can un-comment in v1.1 of the code:

     

    // #define __LOW_SHUNTS__

     

    Then:

     

    Replace the 1.0 ohm shunt with .1 ohm (Digikey P100LPCT-ND)

    Replace the 1000.0 ohm shunt with 100.0 ohm (DigiKey P100FCT-ND)

    Replace the 54.9K gain resistor with 4.99k (DigiKey P4.99KCCT-ND)

     

     

    Greg

  4. Ok,  I found the issue.   When I originally tested the storage/retrieval of the calibration constants,  I must have been working at a lower clock speed.

     

    It appears that the "information" flash segment, where I store the calibration constants, does not like being written-to at 16MHz.   By dropping down to 1MHz, just while data is being saved, all of the constants are being stored and retrieved correctly.

     

    I had to add this code around the call to storeCalibrationData() in main() :

     

    ---------------------------------------------------------------------------------------------

    BCSCTL1 = CALBC1_1MHZ;          // Set DCO to 1MHz during flash write

    DCOCTL  = CALDCO_1MHZ;         //  as 16MHz is too fast

     

    storeCalibrationData();

     

    BCSCTL1 = CALBC1_16MHZ;         // Set DCO back to 16mHz

    DCOCTL  = CALDCO_16MHZ;

    --------------------------------------------------------------------------------------------

     

    When they said the chip could run at 16MHz,  I assumed they meant everything would work at that speed.  

     

    Bad assumption !

     

         Greg

  5. For anyone who has built or is building a PowerScope,  I've discovered a bug that is keeping some of the calibration constants from being saved between power cycles.   I will post an update here, and update the source on the google code site when I have a fix.  

     

    For now, the workaround is to calibrate the PowerScope using your trusted DVM, then write down the calibration constants you see on the PowerScope display, and copy them into the default values in Calibrate.c on this line

     

         int   calibrationConstant[NUMBER_OF_CONSTANTS] = {993,1007,996,1000,998,973};

     

    They are in this order:  mA Zero,   uA calibrate,  mA calibrate, Voltage Zero, uA Zero, Voltage Calibrate.

     

    Save Calibrate.c and re-flash the code into the PowerScope.  Now your calibration constants are the defaults.

  6. I think the cost expectation is set by the fact that decent multimeters can be had for $25 these days.   Most of them cannot measure in the sub-microAmp range, though.

     

     

    ......  I happily paid $60 for the uCurrent, and would pay at least that much for your board if it came calibrated and ready-to-use.  ...

  7. The uCurrent, which I have and like, makes a big deal that it gets its accuracy because it has a tiny burden voltage, much smaller than the 0.3V you list.  As I understand it that's relevant to the uCurrent because of the external meter.  Does your solution make it irrelevant because you're measuring inside your own system?

    ......

     

    Burden voltage is always relevant if the drop impacts how your circuit draws current.   When I was developing the PowerScope, I tried using smaller shunt resistors of .1ohm and 100 ohms to reduce the burden voltage to .03v max.  Unfortunately, the tiny voltages were swamped by the contact resistance of my solderless breadboard connections.   So I stuck with the 1 ohm and 1000 ohm shunts for the moment and lived with the .3v max burden.

     

    Now that I have it all on PCB,  I intend to try lowering the shunt values again to see if it can handle it.  The tiny voltages across the shunts might still be affected by capacitive effects since the PowerScope is not shielded like multimeter enclosure usually are.

     

    Keep in mind that you will only see the maximum burden voltage at maximum rated current, which is 300mA in the high range and 300uA in the low range.   Actual burden voltage is 1mV/uA (one milliVolt per microAmp) in the low range and 1mV/mA (one milliVolt per milliAmp) in the high range.

     

    A project I am working on right now draws about 3mA, so the total burden voltage is 3mv on the high range of the PowerScope.

  8. very nice. alittle expensive to build though. why not combine something like this and those breadboard power supplies that sit at the end of the board. 

     

    I had considered that, but I like to keep things modular.  

     

    Maybe we can lower the cost a bit if I can convince 43oH to sell the PCBs individually.

  9. How are you monitoring low currents?  Usually this requires an isolated amplifier or similar setup, in order to be accurate at low currents.

     

    The instrumentation amp is pretty good at measuring small voltage differences across a shunt resistor.   Here's another device that does something similar, although it outputs to a separate voltmeter:

     

          http://www.adafruit.com/products/882

     

    The Analog Front-End chip would suffice without the instrumentation amp, but it has fairly low maximum voltage input ratings, so for this application I thought it best to add the instrumentation amp to protect the AFE.  

  10. You must mean from dorkbotpcb XD . Neat project! Thanks for the share.

     

    Oh, yeah... I had the link to OSHPark wrong.  It's fixed now.  It was formerly known as dorkbotpcb.

  11. If all I/O pins are unused and unconnected, the following would insure no pins cause unwanted power draw in LPM on a MSP430G2402.

     

    P1DIR = 0xFF;                    // All P1 pins set to output

    P1OUT = 0x00;                   // All P1 pins low

    P2SEL = 0x00;                    // P2 pins gen-purpose I/O

    P2DIR = 0xFF;                    // P2 pins all output, unused

    P2OUT = 0x00;                   // P2 pins all low
  12. Once you use one, you will wonder how you got along without it.

     

    When I first used it to monitor another MSP430 chip in LPM4,  the chip under test drew between 60 and 100uA, and that varied when I put my hand near it ! :-o  

     

    I had just quickly thrown together some test code, and it turned out that I had left most of the I/O pins undefined, which causes relatively high power consumption even in low power mode, as well as capacitive sensitivity.  

     

    Once I defined them all as output and set them low, the current draw went to the spec value of .1uA.

  13. 43oh Store link
     
    I found myself wanting a dedicated power monitor to use while developing battery-powered application circuits, so I built one using the MSP430G2402. 
     
     
    This device has already helped me identify and eliminate about 40% of the power usage of a project in-progress.
     
    Right now, I just have the code as a zip file on the download tab, but if anyone wants to develop additional features, I can check the code into Subversion and create some branches. 
     
    The board can be ordered for about $12 (for 3 boards) by uploading the Eagle .brd file to http://www.oshpark.com I don't make any money from oshpark.
     

    Greg Glenn

    http://gravitastech.weebly.com/

×
×
  • Create New...