Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:31 24 Nov 2024 Privacy Policy
Jump to

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 : Windmills : Improved PicLog

Author Message
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 01:05am 27 Aug 2006
Copy link to clipboard 
Print this post

I've been rattling my brain over the PicLog's way of measuring current. The existing version measures the difference between each side of the shunt resistor with respect to ground. While it works, the resolution is poor, the PicAxe only see's about 50 steps. If the voltage across the shunt is 1 volt ( too high, power is wasted as heat ), this ends up as about .2 volts at the PicAxe input. The PicAxe can measure 0.004 volts steps, so we only have about 50 steps, or range, of measurement. So if you measure in 0.1 amp steps, you max reading could only be +5 to -5 amps, and I was using a 0.6 ohm shunt. Yuk!

So I've put together a simple circuit using a Op-amp and about 5 resistors. The circuit gives a range at the PicAxe of 3 volts, meaning the PicAxe has a resolution of over 600 steps!

The new circuit means you can use a very low ohm shunt ( mine is now 0.01 ohms ) and waste less power. I can now read in 0.1 amp steps up to +/- 30 amps.

There is a small change in the PC software. I'll post the new circuit and new software in the next few days.
If you have already built the old PicLog version, dont worry as the new op-amp circuit can easily be added.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
nzseagull

Newbie

Joined: 07/06/2006
Location: New Zealand
Posts: 17
Posted: 08:27am 05 Sep 2006
Copy link to clipboard 
Print this post

Hi Glenn
Just had to ask you hows the upgrade on the Logger going keen to have a play did you find any company the were able to suppy you with any of the Hall effect 50 amp devices I sent you on email

Thanks Bevin
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 10:46am 05 Sep 2006
Copy link to clipboard 
Print this post

Hi Bevin.

Yeah I played around with a op-amp but couldn't get a linear accurate result. The problem with the existing circuit is lack of resolution for current measurement.
The PicAxe was used as a difference amp, meaning it could measure + and - current. This meant it could log charging current and drain current. The shunt resistor is on the battery +ve connection, and after the divider resistors to bring the 12 volts down to about 3 volts for input into the PicAxe ADC inputs, a shunt voltage of say 0.5 volts ended up at less than 0.2 volts. The PicAxe has a sensitivity of 0.004 volts, so we only had 50 steps of resolution. If you wanted to ready in 0.1 amp steps, you could only read from -2.5 amps to 2.5 amps, not very good.
[ I just realized I've already explained this in the first post. ]
So I researched difference amps, and found out they are a lot more complicated than I first thought. I did get one working with op amps, but it was not very accurate.
So I ended up rethinking the current measurement idea.

The new design uses a shunt resistor on the battery -ve. This means the PicLog can no longer read -ve current, but hey this thing was designed to log the windmill output, not battery load. With a shunt on the battery -ve, a 0.5 volts across the shunt can be feed directly to the PicAxe input, and 0.5 divided by 0.004 gives us a resolution of 125! Big improvement. So if we want to measure in 0.1 amp steps, we can measure up to 12.5 amps. 0.5 amp steps means 62 amps.

There is a small hardware and software change. The circuit needs one resistor replaced with a short. The software needs about 2 lines of code changed. The change to the PicLog means greatly increased accuracy, a true logger. I just need to get of my butt and publish the changes.

GlennEdited by Gizmo 2006-09-07
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
nzseagull

Newbie

Joined: 07/06/2006
Location: New Zealand
Posts: 17
Posted: 09:04am 07 Sep 2006
Copy link to clipboard 
Print this post

How about a shunt for JAYCAR here are some details from there site

Thanks Bevin


Heavy Duty Current Shunt - 6 - 50A


At long last we have found a supplier of quality hand-made accurate current shunts. They are designed to work across a Digital Panel Meter on their 0 - 200mV range, i.e. the most common type. When set on this range the DPM will read the voltage drop across the shunt directly in amps. Strictly speaking, the 50A shunt will read under 5A of course. The problem is, however, that the voltage drop across the shunt may be so low for low current levels that the meter may have difficulty reading this voltage accurately.
Current      6 - 50A
Shunt res.   1.0mΩ
V. drop Max Current 50mV     
Accuracy 0.5%

The shunts are quite ruggedly made, however and will happily withstand up to 20% overload. To set up the DPM simply wire the appropriate decimal point to the meter board and connect the 0 - 200µV straight across the shunt inner screw terminals. At 50mV (for 5A) the meter should read 5.00A. The ‘A’ annunciator must be wired up as well.

 
RossW
Guru

Joined: 25/02/2006
Location: Australia
Posts: 495
Posted: 10:50am 07 Sep 2006
Copy link to clipboard 
Print this post

Not recently, but in a time long past, I used to calibrate the ammeter to read the voltage drop across the interconnect to the battery. While it was 32 sq mm cable, there was about 3 metres or so of it, and a reasonably measureable drop.

This afternoon, just for a giggle, I measured the drop across my "long" battery interconnect while charging.
It's a lump of 32mm x 6.5mm copper, some 280mm long.
700uV at 20 amps. Probably a bit low :)
(Edited: just checked the battery leads, 1m long, and I have 22mV drop across each, which would almost be useful)


Full sized imageEdited by RossW 2006-09-10
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 11:34pm 07 Sep 2006
Copy link to clipboard 
Print this post

Dont forget for the PicAxe we have a input sensitivity of 0.004 volts ( 4mV ).

I would like to look into a super sensitive input amp, so it could use these low R shunts. Or a hall sensor that has a linear output.

I have a email from Bevin Lealand who told me about these neat little sensors at http://www.allegromicro.com/sf/0750/
, another option.

Never thought measuring current would be such a confusing area. Lots of solutions, just need to find the best one.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
RossW
Guru

Joined: 25/02/2006
Location: Australia
Posts: 495
Posted: 11:50pm 07 Sep 2006
Copy link to clipboard 
Print this post

  Gizmo said   Dont forget for the PicAxe we have a input sensitivity of 0.004 volts ( 4mV ).


Is that 4mV FSD? or 4mV per bit for the ACD?

  Quote  
I would like to look into a super sensitive input amp, so it could use these low R shunts. Or a hall sensor that has a linear output.


I nearly mentioned before, but then got distracted...
Many years ago in a previous life, I used to do work with infra-red absorbtion spectroscopy, which had quite small voltages to play with (nanovolts, at times), and there were a couple of techniques which we employed so we could use "affordable" electronics. Some may or may not be applicable to this issue.

1. For measuring really low DC voltages, drift and offset become major issues, especially in the early stages because the error is multiplied by the subsequent stage gains. In the IR benches, we used a mechanical chopper disc (small stepper motor running a metal disk with cutouts to interrupt the beam), and then used AC coupled amplifiers. This allowed us to have lots of gain and eliminate drift and DC offsets. Chopping the small signal from the shunt may or may not be practical.

2. (And this addresses your other "problem" - measuring charge and discharge currents). Deliberately adding a known DC offset to a signal. If you bias the opamp so its output is exactly 1/2 FSD for the A/D with 0V input, you can measure + and - current. If you wanted, you could be even more cunning and have an offset-zero. You may find for instance, that you can only charge at say 20A but would like to be able to measure discharge to 80A. By setting the "zero" point appropriately, you could achieve an asymmetric ammeter range/scale.

  Quote  
I have a email from Bevin Lealand who told me about these neat little sensors at http://www.allegromicro.com/sf/0750/
, another option.


That looks perfect. Interesting to read in the specs:
"A precise, proportional voltage is provided by the low-offset, chopper-stabilized BiCMOS Hall IC"!!

(edited to add:)
They've stolen all my ideas :(
Checking the electrical specs:
"Zero Current Output Voltage:   Vcc/2" so they're doing
the same "DC offset" thing I was talking about above.
(end edit)

  Quote  
Never thought measuring current would be such a confusing area. Lots of solutions, just need to find the best one.


Like *so many* things in life!Edited by RossW 2006-09-09
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 09:04am 08 Sep 2006
Copy link to clipboard 
Print this post

Hiya Glenn,
            Eh mate I've got some samples here of a chip that will measure upto 200 amps and outputs in milliamps. I'd have to go up to the shed to get the part number but anyway very shortly I'll be playing around with the pic chip's again so I'll throw 1 of these shunt chips in with the other chips.

cheers Bryan
 
nzseagull

Newbie

Joined: 07/06/2006
Location: New Zealand
Posts: 17
Posted: 09:32am 08 Sep 2006
Copy link to clipboard 
Print this post

Hi Guys
Hey the 0-200 amp chips are they like the ones here
http://www.allegromicro.com/sf/0750/

???

Ta Bevin
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 11:35pm 08 Sep 2006
Copy link to clipboard 
Print this post

  nzseagull said   Hi Guys
Hey the 0-200 amp chips are they like the ones here
http://www.allegromicro.com/sf/0750/

???

Ta Bevin


Thanks Bevin that link is the chip I was talking about. I first found out via a post on fieldlines and I am setup to get samples from Allegro so as soon as read the datasheet I had 5 of those chips samples and on the way.

Cheers Bryan
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024