bluehash 1,581 Posted April 12, 2013 Share Posted April 12, 2013 PCBs are sold out already. Wow. Aaand... sold out. Yes.. two days back. Will order a new batch over the weekend. Quote Link to post Share on other sites
mechg 17 Posted April 15, 2013 Author Share Posted April 15, 2013 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. Quote Link to post Share on other sites
mechg 17 Posted April 15, 2013 Author Share Posted April 15, 2013 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 bluehash 1 Quote Link to post Share on other sites
mechg 17 Posted April 15, 2013 Author Share Posted April 15, 2013 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 Quote Link to post Share on other sites
bluehash 1,581 Posted April 16, 2013 Share Posted April 16, 2013 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. Sleepwalker3 1 Quote Link to post Share on other sites
Sleepwalker3 1 Posted April 16, 2013 Share Posted April 16, 2013 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 Quote Link to post Share on other sites
bluehash 1,581 Posted April 16, 2013 Share Posted April 16, 2013 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 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. Quote Link to post Share on other sites
Sleepwalker3 1 Posted April 16, 2013 Share Posted April 16, 2013 Thanks Bluehash, hopefully this will give an alternative for the powerscope and other projects, as it certainly reduces the LCD cost below what people were hoping for and probably gives more room to boot. Quote Link to post Share on other sites
mechg 17 Posted April 30, 2013 Author Share Posted April 30, 2013 Here is a good article on various approaches to current measurement. Of the approaches discussed, the PowerScope falls into the category of low-side current sensing using an instrumentation amp. http://www.eetimes.com/design/industrial-control/4236380/A-Current-Sensing-Tutorial-Part-II--Devices bluehash 1 Quote Link to post Share on other sites
mechg 17 Posted May 9, 2013 Author Share Posted May 9, 2013 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. bluehash 1 Quote Link to post Share on other sites
bluehash 1,581 Posted June 12, 2013 Share Posted June 12, 2013 Powerscope back in stock. Quote Link to post Share on other sites
mechg 17 Posted June 21, 2013 Author Share Posted June 21, 2013 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 bluehash 1 Quote Link to post Share on other sites
kodi 16 Posted July 5, 2013 Share Posted July 5, 2013 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 Quote Link to post Share on other sites
Rubi 11 Posted July 11, 2013 Share Posted July 11, 2013 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 bluehash and GeekDoc 2 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.