How to calibrate your custom shunt?

steveo

100 kW
Joined
Oct 6, 2007
Messages
1,786
Location
Woodbridge, Ontario
Hey Everyone,

I'm looking to learn how to calibrate my controller shunt with my cycle analyst

I don't have paint at work to draw a diagram but i will explain best i can to understand.. and if anyone out there could explain it in some easy steps it would be great

Things needed.

-PSU ( i have a 3.3v 20amp psu )
-Shunt wire ( i will use a burnt out controllers shunt just to test )
-multimeter ( i have a cheap multimeter .. but from what i understand i should be using a quality multimeter to get more accurate voltage measurements.)

Step 1

power up power supply

step 2

place positive and negative leads to both sides of shunt

step 3

measure the voltage across the shunt through the cycle analyst connector (not by puting the multimeter leads directly on the shunt)

Step 4

measure the voltage accross the power supply while the shunt is loaded by the psu

step 5

there is some voltage calculation to determine the omhs reading of the shunt .. ( i don't know this part)

guys correct me if i'm doing something totally wrong here lol..

-steveo
 
Disconnect your motor.
Connect the POSITIVE from your PSU through a suitable resistor (to limit the current) to your controller NEGATIVE battery wire.
Connect the NEGATIVE from your psu through a meter that can measure the current to one of the phase wires.
Compare the two readings and adjust the CA shunt setting so they match.
 
Mike1 said:
Disconnect your motor.
Connect the POSITIVE from your PSU through a suitable resistor (to limit the current) to your controller NEGATIVE battery wire.
Connect the NEGATIVE from your psu through a meter that can measure the current to one of the phase wires.
Compare the two readings and adjust the CA shunt setting so they match.

wow .. this is totally different the what i was looking for .. I can do the same thing using a watts up meter..

I'm looking to learn how to calculate the exact shunt current though with math formula ...i don't want to be guessing or go through trial & error when calibrating a bunch of controllers at a time.

...


calling on doctorbass :lol: ... he tried to explain this to me on phone ..

-steveo
 
Steveo ...

DO NOT "place positive and negative leads (of power supply) to both sides of shunt".

This will short circuit your power supply ... very bad. :roll:

I made a post about calibrating shunts. I'll look for it.

OK Look near bottom of this post ... http://endless-sphere.com/forums/viewtopic.php?f=16&t=7361&#p110932
 
just so i understand.

you would like to accuratetly measure the value of the shunt inside of your controller. you want to do this so that your DIRECT PLUG IN CYCLE ANALYST will show the correct current once you enter the value of the shunt into the CA.

if that is what you want to do then the process is very simple. pass a known current through the shunt resistor and measure the voltage at the CA connector. then knowing the current and voltage, using OHM'S LAW you calculate the resistance. OHM'S LAW is simple Volts=Amps times Ohms. expressed otherwise as E=I * R. since the resistances are very small you will need a sufficiently high current so you can actually measure the voltage.

for example a typical shunt value will be 1mR which is 0.001 OHMs or 1/1000th of an OHM. if we pass a current of 10Amps through it the vollts would be E=I * R or 10 * 0.001 = 0.010Volts. this is still a very low voltage measurement, but it is high enoug to read using a good voltmeter. so now we know what to expect during our measurement. with a 10A constant current power supply we will read between 0.000 and 0.050 volts on the meter. note this power supply is one where you set the amps and not the voltage.

the proceedure to determine the shunt resistance would be to disconnect the controller from everything. then connect the (+) of the 10A Constant Current Power Supply to the Battery (-) input of the controller. connect an accurate Voltmeter to pins 3 & 4 of the CA connector. put the (-) of the meter on pin 3 and the (+) of the voltmeter on pin 4. connect any of the phase wires to the (-) of the CONSTANT CURRENT power supply. turn on the supply and adjust so that you get a 10A reading on the power supply. read the shunt voltage on your accurate meter. lets say you get a reading of 0.013V. now you can calculate the resistance by pugging these values into OHM's LAW. E=I * R = 0.013 = 10 * R or R = 0.013/10 = 0.0013OHM.

in this example a CONSTANT CURRENT POWER SUPPLY was used. this type of supply can be shorted safely because it will never exceed the current that you set it for. do not try this with a more common VOLTAGE REGULATED power supply where you set the voltage you want. you could seriousy damage the common VOLTAGE REGULATED type supply.

so now the next thing is that you only have a VOLTAGE REGULATED power supply and not one of those fancy schmantzy CONSTANT CURRENT power supplies. are you out of luck? No! you can still do it but you need to safely limit the current somehow. the simplest method to do this is with a large power resistor of a known value. you can then adjust the voltage to supply the correct current for measurement.

let us say that we find a 0.250 OHM 20W 1% tolerance power resistor and we want to use that to limit the current. using ohms law again we calculate that for 10A the voltage across the resistor would need to be E= I * R or 10A * 0.250R = 2.5V. set the power supply to "0" connect the 0.250R resistor from the (+) output directly to the (-) output. turn on the power supply and adjust the voltage for 2.5V. turn off the supply. do this quickly. the resistor will heat up and as it heats up it's value will change. let it cool off for a minute or two. turn on the power supply again and verify that it is still 2.5V across the resistor. turn off the supply. disconnect the resistor from the (-) output of the supply. leave it connected to the (+) of the supply. connect the free end or the 0.250R resistor to the Battery (-) connector of the controller. the rest of the connections will be the same as that in the first example. the proceedure will be the same. the calculation will be the same. be quick. you do not want the temperature drift of that power resistor to affect your readings.

the same process can be used to measure motor winding resistance.

rick
 
steveo said:
step 3

measure the voltage across the shunt through the cycle analyst connector (not by puting the multimeter leads directly on the shunt)

Step 4

measure the voltage accross the power supply while the shunt is loaded by the psu

CA measures the voltage over the shunt with a high impedance input. Hence voltage on the CS input leads from the shunt will be indistinguishable from the voltage directly over the shunt.

So CA measures just like your voltmeter, then calculates current I using I=U/R. For this to be accurate R of the shunt is needed.
If you could trust that your supply outputs exactly 20A, then you could measure voltage drop and compute R = U/I. However trusting the PSU is not a good idea. Your multimeter will measure current more accurately. Many of the cheap $5-10 multimeters measure 10A accurately. I calibrate CA by using a current close to 10A, then measuring with multimeter and adjusting CA until it reads the same as multimeter.

B.t.w. clamp ammeters capable of measuting high currents (up to several 100A) seem to be coming down in price. I bought one for $9 at Princess, but that one only does AC. A couple of weeks ago I went to a sale on some nicer Mastercraft clamp AC/DC ammeter and DMM combo instruments. I stocked up on 4 for $20 each. Hope that my wife and sisters will like their coming birthday presents. (at least better than the hammers and socket sets.)
 
Depending on how close you solder your CA wires your CA calibration will vary for the same physical shunt. Therefore reading the voltage across the shunt with a multimeter is not the most accurate method. The procedure I posted near the beginning of this thread is how Justin does it.

When I did mine I used a single 12V SLA with a 1.1ohm power resistor in series to push around 9 amps in through the battery negative wire and out through one of the phase wires. I connected a multimeter on 10 amp range in series to measure the actual current.

You then divide the CA reading by the multimeter reading, you then multiply the existing CA shunt setting by this number.
Repeat this process a couple of times to get it more accurate.
 
Just curious: I've been thinking about another way to do this, since I have an iCharger which measures exactly how many Ah are used to recharge the pack...

Can I calibrate the CA Rshunt so that the CA Ah used after a ride matches the Ah charged, assuming the original charge state was the same?

For example:
Start with freshly charged 83.2V 10Ah pack (20s lipo 4.16V/cell, well balanced)
Guestimate, or start w/ old Rshunt value = 3.222
Ride bike, check CA reading = 3.107 Ah
Recharge pack w/ iCharger. When charge complete, notice total Ah reading = 15.781Ah (for 4 packs in parallel, so 15.781Ah / 4 = 3945.25 Ah per pack)

Difference between CA reading and Ah consumed = 3.107Ah / 3.94525Ah = 0.7875
So can I adjust the rShunt accordingly?: 3.222 x 0.7875 = 2.537 (assuming there's an inverse relationship)

Will this work? Since this is the first time I've done the math, I'm going to try it...

Hopefully, I'll be able to calibrate it so that what's used matches what's recharged...

But will the Amps displayed on the CA be reliable, or are there other factors... (not considering the degradation of the pack over one cycle - i don't need this ABSOLUTELY accurate)
 
i guess it should work if the battery was a perfect storage device and recharged completetly without any losses. ie. if you could abosolutetly count on the Ahr's going into the battery exactly match the Ahr's out of the battery.

i think you'll find that there are some discrepancies there. they will not match exactly. b ut it should be interesting to see how much difference there will be.

rick
 
I think it depends on battery chemistry. I'm pretty sure that for every AH you take out of SLAs you have to put 1.3AH back in.
 
steveo said:
I'm looking to learn how to calculate the exact shunt current though with math formula ...i don't want to be guessing or go through trial & error when calibrating a bunch of controllers at a time.

steveo, how's it going? you calibrate your shunt(s) yet? i'm curious which method you used...

Meanwhile, in case anyone is curious, I charged my pack up to the top, reset my CA rshunt to new value: 2.537 and rode home.

CA read:

- FWD Ah: 5.3690
- REGEN Ah: .3460
- Total Ah: 5.023

I immediately recharged the pack, and put in: 20.465 Ah /4 = 5.11625 Ah

So I'm getting closer. (And wow, I've got 50+Amp peaks... No wonder I can do wheelies... :twisted: )

I'll re-adjust the rshunt to 2.583, according to my formula...

But while I may get the Ah "out" closer to the Ah "in", I see that this is not necessarily going to be an accurate measurement of Ah used...
 
Well, mike1 said that for every Ah taken out of SLA 1.3Ah has to go back in. But thanks to the puekert effect being so extreme in SLA, if you take 1Ah out at the 20 hour rate they're "designed" for (or slower), then that's the only time it will only take that 1.3Ah (depending) to put 1Ah back in. If you take that 1Ah out at a 30 minute or worse a 5 minute rate, for instance, it should take significantly more power to put that 1Ah back in, if I understand how it works correctly.

This is less of a noticeable problem with other chemistries, partly because they are not rated so unfairly, in most cases, unlike SLA which is rated for a 20-hour discharge curve on it's capacity.

It's possible my brain has curved in upon itself again, whcih happens from time to time, and I am confusing something (it sort of feels like that right now, but I am also coming down with another cold, so it could just be that).
 
I made a custom resister like in the other thread, glued them together with silicone. Same stuff they make shuttle heatsheild outa...
DSC_2799.jpg

DSC_2800.jpg


Made an 80w 2 ohm resister,
8 1 ohm 10 watt resisters, 2p4s. Checked it out, 2 ohms accurate.

Battery measured 12.7 volts.

Resister on battery passed 5.75 amps

Resister to controller shunt on battery passed 5.65 amps

So heres the question.

On my CA, what would the calibration number be?

I didnt think to check the volts during the test, I thought the volts would remain constant. Do I need to retest and get the voltage stats?

Also, I didnt run the voltage backwards! Need to do it again huh.


SS
 
Hey Guys,

I've decided to go a different route instead of using a resistor..

I bought about 10 55w 12v automotive heat pads for about 5$ each at a electronics warehouse..

I used 2 thermal pads on a 12v 20amp psu discharging at about 7amps....

I found this was much cheaper & easier soloution to use as a load while testing!!

This is also an excellent way to load test the battey!! ... i used 5p 2s of heat pads to discharge a 24v battery at 17amps continous load!!!!! not bad for a 50$ discharger .. i used a wats up meter to to check the ah consumed when testing a batter & also to calibrate the shunt.. i'll take some photos when i test my next controller!

-steveo
 
This is the model I used

Resistor_Bank.jpg


Got it from a post by knuckles on how to calibrate the shunt.

Im not a real electrician, Thats why I come here so much, looking to the masters for to real low down. Guess this time I was not accurate. Thought I did the exact same circuit, even though it looks diferent, I have resistors that have both leads out the same end, and I glued them all together so I could keep it for future use as my shunt calib. resistor. So, its only 20watts huh? Dang, now I gotta go do all that work over again!


Mike1 said:
SilverSurfer said:
Made an 80w 2 ohm resister,
8 1 ohm 10 watt resisters, 2p4s. Checked it out, 2 ohms accurate.

That looks like a 20W resistor to me, not 80W.
 
Only 20 because you have 10W resistors in parallel pairs. 10x2=20 ;)

Another issue is you have them all close together, so there are not as many surfaces to dissipate heat from. Leaving them as they are in the pic in your most recent post is much healthier for dissipation. Clamping or bolting them to an aluminum plate or heatsink would be even better, with some space between them, keeping in mind that ones more toward the center of the plate (if arranged in a plane rather than a line) will stay hotter than the others once the plate reaches thermal saturation.
 
SilverSurfer:
Your load resistor is 80 watts (eight 10-watt resistors, all at equal current and equal voltage drops = 80 watts total).

You need to measure the battery voltage WHILE the load is connected. A battery's voltage decreases when loaded. If your load is an acurate 2 ohms, then the loaded voltage at 5.75 amps was 11.5 volts (current times load resistance).

Define the loaded battery voltage with 2-ohm load plus controller shunt as V2 and define the current as I2. The total resistance loading the battery is (Rload + Rshunt). The measured current equals V2 divided by (Rload + Rshunt), from which you can calculate the shunt: Rshunt = (V2 / I2) - Rload.

Note that extreme accuracy is needed in the measurements to get an accurate calculation for Rshunt. Say you want the Rshunt calculation to be accurate to 10%. A practical estimate of the shunt resistance is on the order of 1 to 2 milliohms. This requires your load resistor, voltage measurement, and current measurement each to be accurate to 10 percent of Rshunt divided by Rload, divided by three. In percent, this works out to 0.1 * (.001 / 2 / 3) * 100 = 0.00167%, which is not too likely!

I think you'd be better off just measuring the current through the load and shunt and tweaking the C.A. calibration factor until the C.A. current readout and the measured current are equal. This will give you an accuracy dependent only upon the current meter accuracy rather than trying to calculate a value from the voltage, current and load resistor.
 
OlderThanDirt said:
Your load resistor is 80 watts (eight 10-watt resistors, all at equal current and equal voltage drops = 80 watts total).
Hmm...I know I don't get along well with math, but I was sure I had figured the wattage out right. :( I think I'm going to go soak my brain in bike-frame-grinding-fumes and see if it gets better. :lol:
 
He's correct. Obviously hadn't got my thinking head on yesterday.
To dissipate 80W in the whole thing each resistor would be running at 10W. The spacing is still a problem though, you need a gap between them.
 
silversurfer,

worst problem i can see with using these kinds of resistors as a shunt for measuring is that they are normally 20% tolerance. the value of this resistor could be anywhere from 1.6 to 2.4 ohms. calling it a 2ohm resistor is a wild assuption at best.

you need to measure voltages across a known resistance to calculate current. the idea is that there are 3 related parts to electricity. they are called Volts, Amps and Ohms. electricity is sort of like a tripod. you need all 3 legs (Volts, Amps and Ohms) for it to work. if you know what any 2 of them are you can calculate the third. if you know the resistance of the component and you can measure the voltage of that component, you can calculate the current. or if you know the resistance and the current you can calculate the voltage. you don't have a known value of any kind here. your resistor is kinda, sorta 2 ohms give or take 0.4 ohms. so how can you measure anything? short answer is you can't. you need to know at least one value with some certainty.

since this 2.0 ohm current limiter is only used for a short period of time. just long enough for a quick measurement. heat dissipation is a minor issue. the big issue is HOW MANY OHMS IS IT REALLY? what you need to do is establish a known resistance value somehow. you have to calibrate that 2ohms to a couple of decimal places at least. you have to know it's value within 1% or better. you can do that. you need 2 reasonably accurate meters so you could simultaneously read the voltage and current across that resistor. then you could calculate it's resistance with some accuracy. why do you need to do this at the same time? the reason is that the resistance of the shunt INSIDE the AMP METER will change your Volts reading. using the measured readings plug them into the equation Volts = Amps times Ohms you get a good idea of what your actual ohms of that resistor are.

once you accuratetly know how many ohms your resistor is you can connect it in the circuit. then you can measure the volts across the known value of the current limiting resistor you can calculate the actual current in the circuit. knowing the current in the circuit and measuring the voltage across the SHUNT INSIDE THE CONTROLLER you can calculate the resistance of the shunt.

notice that in each case we are determining the value of 2 of the different parts of electricity to get the third part. the goal is always to complete that tripod.

rick
 
After I built it, i put it on the multimeter, it came solid at 2 ohms. So I thought that would be strait. I glued them together because it only takes a few seconds for the multi meter to settle into a solid reading, so theres not much time to build up any serious heat. Its built only for running the one test. Thats its whole life. Still, Having read all, Im going to invest in a watts up meter. Seams like thats the easiest way to go about several tasks. CA= good. CA + Watts up meter = better! Funny thing is, just yesterday I was thinking about getting some instructional matterial on use of a oscilliscope, see about teaching myself some electrical engineering. LOL Love ebiking toooo much! Is 50 too old to start learning?
 
Back
Top