Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Electronics : PicLog Current Measurement
Author | Message | ||||
FrankG Newbie Joined: 07/12/2006 Location: CanadaPosts: 6 |
Hello all, I've just built the PicLog Data Logger V1.2 per Glen's site... Config'd as Logger Only. I've got the PC to see the PicAxe and it has accepted the program... The PicAxe is transmitting the Data Packet back to the PC (verified via PicAxe Program terminal window)... The unit is able to measure the Battery Voltage (12.8V) and does track it's rise as it is being charged... as well as the gradual drop as it is loaded or discharged. But the PicAxe is not measuring any current flow. Have sourced 1 Amp & 2 Amp (measured prior to the shunt resistor)... The shunt resistor is 0.1ohm +/- 5% and must be working as Voltage is being read. Unfortunately I could not scavenge any 4.7V Zeners, but did use 5.6V zeners in their place. I assumed that the 4.7V was selected as a "Safety margin" as 6V is the limit of the PicAxe IC's... Obviously it is working for the V Sample portion of the circuit, but is the 4.7V clamping voltage a critical factor for the Current measurement circuit? Thanks for any consideration you can offer to the above. FrankG www.theworkshop.ca FrankG www.theworkshop.ca frank@theworkshop.ca |
||||
FrankG Newbie Joined: 07/12/2006 Location: CanadaPosts: 6 |
Some additional info to the above... After some basic checking of connections etc, I opted to capture a small sample of the data packets from the PicAxe into Hyper Terminal... And it appears that some values are being read via ADC1, see below; [<V>820</V><A>0</A><R>0</R><S></S>] [<V>820</V><A>0</A><R>0</R><S></S>] [<V>831</V><A>10</A><R>32</R><S></S>] [<V>896</V><A>19</A><R>36</R><S></S>] [<V>950</V><A>19</A><R>40</R><S></S>] Given the samples above are the values being read for "A" too small? After finding that data was moving for "A" I tried a very broad range of division constants (0.0001 thru to 1000) with no readings being displayed within the PicLog App... An unrelated question is the constant for RPM, My generator is a 16 pole, 3-phase unit so I would think the constant should be "8", my guess is that with 8 North faced poles and 8 South faced poles, it requires both an N & an S pole to generate a complete Sine wave. But the input circuit is only measuring positive going waves ie; half the pole count??? FrankG www.theworkshop.ca FrankG www.theworkshop.ca frank@theworkshop.ca |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Hi FrankG This was my stuff up. If you download the latest version of the code and update the PicAxe chip with the new source, it should fix the problem. About half way through the PicLogs developement I changed the data stream to use <I> instead of <A> to pass the amps ADC reading to the PC. Big mistake, and I didn't document it very well. So it looks like your PicAxe is sending <A> but the PC software is looking for a <I>. The source should be .... Start: SYMBOL WSpeed = W3 SYMBOL RPM = W2 SYMBOL Amp = W1 SYMBOL Volt = W0 Main: readadc10 4,Volt readadc10 1, Amp Count 3,1000,RPM Count 5, 1000, WSpeed sertxd("[<V>", #volt, "</V><I>", #Amp, "</I><R>", #RPM, "</R><S>", WSpeed, "</S>]") goto main Very sorry about that, I need to learn how to trach software updates better. I've updated the web page to match. Yes the 4.7v zenner is there to protect the PicAxe input. You could even leave them out, but I like to play safe. And Yes your right about the pole count. The PicLog only counts one side of the sine wave, so if you have 8 N poles and 8 south poles, then a phase will see 8 pulses per revolution. Hope that gets you in the right direction, sorry again about the stuff up. Please let me know if there are any problems. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
FrankG Newbie Joined: 07/12/2006 Location: CanadaPosts: 6 |
Glenn, A happy 2007 to you down under!!! Thanks for the prompt reply as well. I'll revise the Picaxe software in the A.M. & test. I have to say just how impressed I'm with the work that you've done on this project. The PicAxe side is so simplistic and robust that I was able to scavange every single part except the actual 08M controller. I've browsed through the VB Code, but very quickly realized that my dated VB4 experience and at least 6 years of inactivity has it looking quite foriegn. I was most intersted to see how you acomplished the plotting function, as that is a clever piece of code when coupled to the versatility of the PicAxe. All the best in the New Year!!! FrankG www.theworkshop.ca FrankG www.theworkshop.ca frank@theworkshop.ca |
||||
FrankG Newbie Joined: 07/12/2006 Location: CanadaPosts: 6 |
Glen, The update worked like a charm. Though I had an aweful time trying to calibrate the "Current" division constant, as I was using the actual generator under pedal power at first (I don't think it can be done)... So I drained a battery down to below 11.5V, and calibrated against that from a fully charged battery. I was able to get V & I within 100mV & 100mA respectively once I found that the constant doesn't have to be an integer value. Quite slick, especially as I moved the .cfg files to a laptop and the accuracy moved with it. It's very neat to just watch the V, I & Wattage values of a battery charging against meters in place over time. As well with such tight calibration the PicLog appears to be quite linear (ie; very little deviation from the meters in-line and across the battery). FrankG www.theworkshop.ca FrankG www.theworkshop.ca frank@theworkshop.ca |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Hi Frank. Good to see it worked. Yeah calibrating the amps can be a pain, you need to watch the meter and computer screen pretty close. But once done, its done. I found the same with the PicAxe, the ADC input is very good, bugger all drift. My PicAxe charger controller was calibrated over a year ago and its still spot on. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
FrankG Newbie Joined: 07/12/2006 Location: CanadaPosts: 6 |
Glenn, Just a quick note, I posted my "Build" of the PicLog at the link below... http://www.theworkshop.ca/energy/bengen/3/bengen3.htm FrankG FrankG www.theworkshop.ca frank@theworkshop.ca |
||||
Gizmo Admin Group Joined: 05/06/2004 Location: AustraliaPosts: 5078 |
Very good Frank. And thanks for the plug. You have a good site there, I've visited it in the past, lots of interresting projects. Glenn The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
domwild Guru Joined: 16/12/2005 Location: AustraliaPosts: 873 |
Friends, Yes, thanks must go to Glenn for that Piclogger project, great stuff! My 28X counts the 60Hz square wave output from a $5 digital multimeter correctly and stores it in a 24LC256 or 64kb memory. Not bad for a software man who does not have a black belt in electrickery. Taxation as a means of achieving prosperity is like a man standing inside a bucket trying to lift himself up. Winston Churchill |
||||
Print this page |