Jump to content
43oh

PowerScope


Recommended Posts

  • Replies 43
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

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.    http://code.google.com/p/powe

The situations where I want to measure current are usually below 10uA, and sometimes below 1uA.  I'd like at least one, preferably two, significant digits in the result.   As for the cost, $7 more f

Hi   I just made a little blog entry about this great and useful tool.   http://rubines.blogspot.co.at/2013/07/meet-powerscope.html     Cheers Rubi

Posted Images

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.

Link to post
Share on other sites
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

Link to post
Share on other sites

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

Link to post
Share on other sites

Yes it has a backlight (LED) and if you read through the posts you'll find links to some code the guys have used on 430's, so I'm sure it would be simple for you guys to get something running with it. Also a few suppliers noted there. Note that the Ebay suppliers charge about $3 or $4 for these, but Mats found another supplier that sold him 20 for $1.09 each (listed in one of the latter posts). I got one of these about a year ago, but haven't got to using it yet unfortunately. You can fit a lot of information and / or pictures on them (as shown in some of the posts) and they're a good little unit that is hard to go past for the price.

 

Sleepwalker.. to your credit, I figured I'd make a BoosterPack for the nokia 1202 as a test. Looks like it came out good. i forgot the numbering though on the PCB. If you want PM me your address, I'll send over the Boosterpack and an LCD. Credit to the dangerous prototypes forum thread and toxic239/opossum's code.

 

Also, mechg, if you would like to try these out for your powerscope, let me know.. I'll send over a set.

 

 

nokia_1202_boosterpack.JPG

Link to post
Share on other sites

Thanks Bluehash, looks good, glad I could contribute. Don't want to hijack this thread, but I think these little things look great for those projects where you want something dirt cheap, fairly small, but with a decent level of info on the screen. Hopefully you guys will get some decent use out of them  :)  

I've put a mention up in the thread over on DP, as certainly the credit for the CLS stuff goes to Greeeg, Toxic239, Opossum and Matseng (and probably others I've missed) over on the DP forum, for their various works with this, and of course Ian and the DP team.

 

Would be nice to see one of these on the Powerscope  :)   (nice work Mechg)       Hopefully I can get my hands on a powerscope board at some stage, I actually had a use for it the other week.

 

Cheers

Link to post
Share on other sites

Thanks Bluehash, looks good, glad I could contribute. Don't want to hijack this thread, but I think these little things look great for those projects where you want something dirt cheap, fairly small, but with a decent level of info on the screen. Hopefully you guys will get some decent use out of them  :smile:  

I've put a mention up in the thread over on DP, as certainly the credit for the CLS stuff goes to Greeeg, Toxic239, Opossum and Matseng (and probably others I've missed) over on the DP forum, for their various works with this, and of course Ian and the DP team.

 

Would be nice to see one of these on the Powerscope  :smile:   (nice work Mechg)       Hopefully I can get my hands on a powerscope board at some stage, I actually had a use for it the other week.

 

Cheers

Sure.. the powerscope boards are out to fab after the first batch sold out. I'll send you one when they arrive. Also, PM me your address.

Thanks.

Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

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.

Link to post
Share on other sites
  • 1 month later...
  • 2 weeks later...

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

Link to post
Share on other sites
  • 2 weeks later...

just fighting with this problem as well. Those switches look pretty stable, but I was testing just few of them. Still looks like the best method would be to use 4-wire measurement. That leaves the method of telling MCU what range is selected. For now I'm just using the  second switch :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...