# Two shunts?



## bblocher (Jul 30, 2008)

Anybody using double shunts? I was thinking it would be nice to have one at the battery and one at the motor. This would show, if I'm not mistaken, the inefficiencies of the components. Additionally if you noticed it got worse later it might indicate a loose terminal or other problems.


----------



## DIYguy (Sep 18, 2008)

I plan on using two meter/shunt set ups. The main reason for this is that my pack voltage will be higher than the limit on my motor voltage. I want to be able to see the difference. Battery pack will be 192 volts, motor will be limited somewhat lower, perhaps 170 or so.

I don't think you will see much relative to inefficiencies..... IMHO. If you do see a difference, swap them and see what you get...... 

G


----------



## Greenflight (Sep 13, 2007)

Using two shunts won't show you anything special... An EV's high voltage system is a series circuit, so the current in all different parts of the system is constant. If you want to see the inefficiencies of the components, the best way to do it would probably be to connect a voltmeter across the terminals of that particular component. This will show you the voltage drop across that component.


----------



## DIYguy (Sep 18, 2008)

I expect to see a difference in values infront of and after the controller.


----------



## Greenflight (Sep 13, 2007)

Nope, there shouldn't be any current difference. The controller, despite all appearances, is basically in series with the motor. Whatever current is flowing through the motor is also flowing through the controller and the batteries.


----------



## Qer (May 7, 2008)

Greenflight said:


> Nope, there shouldn't be any current difference. The controller, despite all appearances, is basically in series with the motor. Whatever current is flowing through the motor is also flowing through the controller and the batteries.


You'd be right if the motor was a resistor, but since the electrical model of a motor is a resistor, an inductor and back-EMF in series, you're incorrect. The major parts in the model are the induction and the back-EMF (which is the Voltage generated by the motor depending on the RPM), the resistor is only the model for the electric and mechanical losses. When you apply power to an inductor the current will rise by this formula:

I = U * t / L

So at time zero the current will be zero and then it will rise linear until you blow a fuse. In an EV that doesn't happen since it cuts the power before that happens, but then you have built up a big magnetic field and that'll want to go somewhere! Therefore that magnetic field turns into current no matter if you want it to or not and if you don't have any means to handle that current it will create enough Voltage to discharge. The inductance in a motor in an ordinary EV is big enough to be able to spike away well over a thousands of Volt in it's attempts to discharge so it will, one way or another.

What saves the day is that when this happens the inductance will want to run the current in the same way as when it was charged, so the Voltage will be negative and that's why you have that diode(s) on the output; to handle the discharge. At this time there flows a current through the motor despite the fact that there's no current flowing from the battery pack and therefore the current before and after the controller will differ! It is not impossible to draw, say, 200 Ampere from the battery pack while the motor current is 400 Ampere, but at the same time if the battery pack is 100 Volt the motor will have approximately half of it, 50 Volt (in theory exactly 50 Volt, but there's always losses) over it.

So what the controller does is not merely regulating current, it's actually converting power. 20 kW in (as in the example above) will be 20 kW out (or more probably 19-19.5 kW out and 0.5-1 kW lost in heat).

So no, the controller isn't just connected in series even if it appears so.


----------



## Twilly (Jan 22, 2008)

The voltage between the motor and controller is not pure DC like between the batteries and the controller.... I think a shunt between the motor and controller will not work and may even cause you problems as this is a hi frequency pulsed DC


----------



## major (Apr 4, 2008)

bblocher said:


> Anybody using double shunts? I was thinking it would be nice to have one at the battery and one at the motor. This would show, if I'm not mistaken, the inefficiencies of the components.


Hi Brian,

Nice job on your EV. Looks great.

Two shunts, one for motor current (Im) and one for battery current (Ib) will be very useful for you. Ib tells you how you are treating your batteries. Im tells you how you're using the motor. Depending on the driving condition, there will be a considerable difference between Ib and Im. Im will always be greater than Ib until the controller goes to full duty cycle, then the currents will be equal.

Since you have a multispeed transmission, you will have the ability to cruise at a given speed, say 25 mph, in different gears. For instance, in 2nd, the motor will turn at higher RPM and draw less current (Im) than if in 3rd. Which is the better way for you to drive? With the 2 current displays, you can easily decide. Which condition draws less battery amps? This will give you an indication of the relative efficiency of 25 mph in 2nd vs 3rd. But you also have the ability to monitor the motor current for each case. The slower RPM and higher Im in third is likely to increase motor heat. The more information you have, the better decisions you can make.

I'd suggest you use analog meters. I know, they don't look hi-tech. But they don't require a separate power supply. And analog meters are self averaging. So even with the pulsed current, they will display an accurate RMS value. And with digital meters for current where you're looking for millivolt changes off the shunt, the numbers will jump around all over the place. Yeah, maybe you can filter the thing. Your choice, but I like analog.

Two current meters----yes---go for it.

major


----------



## Qer (May 7, 2008)

Good post, but:



major said:


> And analog meters are self averaging. So even with the pulsed current, they will display an accurate RMS value.


Sadly, no. It will be average, yes, but that's not the same as RMS. The reason is that the RMS-vaule for voltage and current reflect the real amount of power generated and if the voltage drops with 10% the current will also (at least over a resistor) drop 10% which means that the power drops 19%. Therefore, depending on the wave form the average current might be 100% accurate (more or less only the case at full throttle and no PWM), rather accurate or totally bonkers.

My personal guess is that average measurement is accurate enough to be useful enough for this purpose, but treat the value with a healthy dose of scepticism.


----------



## major (Apr 4, 2008)

Qer said:


> Sadly, no. It will be average, yes, but that's not the same as RMS. The reason is that the RMS-vaule for voltage and current reflect the real amount of power generated


Hi Qer,

Has always worked very well for me. We're talking about a simple, always positive, voltage waveform across the shunt (resistor). I don't see where any power enters into the mix. But I think this digresses. Shunts and meters work fine for PWM currents. And the current in the motor loop is a lot, lot smoother than on the battery side, where most folks put the shunt.

Regards,

major


----------



## Qer (May 7, 2008)

major said:


> Has always worked very well for me. We're talking about a simple, always positive, voltage waveform across the shunt (resistor). I don't see where any power enters into the mix. But I think this digresses.


Yep, I know I was nitpicking a bit there. Sorry. 

(although it is two different things, I promise)


----------



## Greenflight (Sep 13, 2007)

Qer said:


> You'd be right if the motor was a resistor, but since the electrical model of a motor is a resistor, an inductor and back-EMF in series, you're incorrect. The major parts in the model are the induction and the back-EMF (which is the Voltage generated by the motor depending on the RPM), the resistor is only the model for the electric and mechanical losses. When you apply power to an inductor the current will rise by this formula:
> 
> I = U * t / L
> 
> ...


Not to be dredging up an old post, but... 

A controller works by modulating current to the motor with a PWM signal (not that you don't already know this but it helps with the explanation...). The actual portion of the controller that does the switching (IGBT, MOSFET etc.) is connected in series with one side of the motor. The only reason both battery cables are attached to the controller is so that filter caps can be attached. Internally, one of the battery connections is routed directly to the motor.

So current wise, the controller is effectively in series with the motor. Although the voltage coming out of the controller is effectively lower at lower throttle settings, instantaneous current readings will be the same on both sides.

But I digress...

The point is that a controller's design makes an external shunt placed on both sides all but useless, if for no other reason than that the readings just don't make sense.

The best way to measure the efficiency of a controller would probably be to measure the voltage drop across it at full throttle. Anything other than this and you won't get anything useful.


----------



## Tesseract (Sep 27, 2008)

Greenflight said:


> ...A controller works by modulating current to the motor with a PWM signal (not that you don't already know this but it helps with the explanation...). The actual portion of the controller that does the switching (IGBT, MOSFET etc.) is connected in series with one side of the motor. The only reason both battery cables are attached to the controller is so that filter caps can be attached. Internally, one of the battery connections is routed directly to the motor.


So far so good...




Greenflight said:


> So current wise, the controller is effectively in series with the motor. Although the voltage coming out of the controller is effectively lower at lower throttle settings, instantaneous current readings will be the same on both sides.


D'oh. Nope, sorry. A series motor controller is essentially a buck topology power converter with the motor as both inductor and load. _Power_ is the same on the input and output terminals of a converter (neglecting conversion losses, of course), not amperage. Thus, if 120V and 100A flows into a buck converter (motor controller) operating at 50% duty cycle then the load (motor) will see an average of 200A current at 60V.

Vo = Vin * D
Io = Iin / D

(Once again, neglecting diode/switch voltage drops, etc.).

The *only* times motor current is the same as battery current is when the switch is either fully off (0% duty) or fully on (100% duty ).


----------



## bblocher (Jul 30, 2008)

Tesseract said:


> So far so good...
> 
> 
> 
> ...


So if this is the case, and I don't know which is why I'm asking, how do you know which controller to match to your motor? My current (single) shunt is on the battery side and shows as high as 500 amps which is what my controller is rated for so that made sense to me.

It's then possible the motor is seeing much higher than 500 amps?


----------



## Greenflight (Sep 13, 2007)

Tesseract- OK, I can go with that. I fudged a little bit. Controller power is the same on both sides. I was looking at things on the microscopic PWM level, at which point current is the same. For all useful purposes, your answer makes more sense. 

Basically what I'm trying to say is that measuring current on both sides of a controller doesn't tell you anything useful, but measuring voltage drop across a controller at full throttle will.


----------



## major (Apr 4, 2008)

Greenflight said:


> The only reason both battery cables are attached to the controller is so that filter caps can be attached. Internally, one of the battery connections is routed directly to the motor.


Hi Andrew,

There is another reason for this connection. It puts the freewheeling diode across the motor. So that connection not only goes to the motor, but also to the diode and the caps. This diode allows motor current during the off portion of the duty cycle and is responsible for larger motor current than battery current.



> The point is that a controller's design makes an external shunt placed on both sides all but useless, if for no other reason than that the readings just don't make sense.


Try it. You'll see. The readings will make perfect sense.










Well, the above schematic uses a mosfet in place of the freewheeling diode. But shows what I was talking about. A would be the battery current, B the freewheeling current and motor current is the sum of A and B.

Regards,

major


----------



## Greenflight (Sep 13, 2007)

Well yeah, you'll see that there is a correlation between the two readings, but for the purposes of measuring efficiency it won't help unless you also know the voltage on both sides and are able to calculate the power, or you know the PWM duty cycle. So at the minimum you'd need four gauges. IMO, if you want to see how efficient components are, the best way to do it is to directly measure the voltage drop across a component under load.


----------



## Tesseract (Sep 27, 2008)

bblocher said:


> So if this is the case, and I don't know which is why I'm asking, how do you know which controller to match to your motor? My current (single) shunt is on the battery side and shows as high as 500 amps which is what my controller is rated for so that made sense to me.
> 
> It's then possible the motor is seeing much higher than 500 amps?


Motor current is always higher than battery current _except at 100% duty cycle_ (at which point it is simply equal to battery current). When your battery current reads 500A it is very likely your controller is "fully on", or the controller has a generous overload rating...

Now, because motor current is greater, it is that which determines the controller's current rating. Or, to put it another way, it is the controller's maximum current rating that determines how quickly the motor will be able to accelerate a load (ie - your EV).


----------



## major (Apr 4, 2008)

bblocher said:


> My current (single) shunt is on the battery side and shows as high as 500 amps which is what my controller is rated for so that made sense to me.
> 
> It's then possible the motor is seeing much higher than 500 amps?


Hi Brian,

It is unlikely your motor sees over 500 amps. Most controllers use motor current as the current limit, or maximum current for the controller. This motor current is what the main switch (mosfet) sees during the on pulse. When your battery current reads 500, I'll bet it is when you have reached 99% duty cycle. When you stomp on it from a dead stop and accelerate, the battery current ramps up to 500 as the motor speeds up. Then when it reaches 99% or "full on duty cycle" the motor voltage and battery voltage are the same and both currents are the same. As you continue to accelerate, the current will decline. I say 99% on because I don't think they turn on 100%, but close enough.

Anytime you are at less than full on with the controller, motor voltage is less than battery voltage and motor current is higher than battery current. And say your motor has a 200 amp rating, it is nice to know the motor current. That is why 2 shunts would be nice. Just watching battery current doesn't tell the whole story. It would be possible to overheat a 200 amp motor at just 100 amps battery current if you were running in too high a gear.

Regards,

major


----------



## bblocher (Jul 30, 2008)

Cool thanks all.


----------

