Jump to content

Two shunts in series


rusty69

Featured Posts

I have a Xantrex battery monitor, with associated shunt in the negative cable to my battery bank. I have just started using Venus OS on a raspberry PI, and would like to add battery monitoring status to it. I don't really have a need for another display, so can I add a victron smart shunt in series with my existing shunt?

 

Are there any implications of doing so, or is it just a silly idea?

 

Thanks

Link to comment
Share on other sites

Another voltage drop with the second series shunt when high currents are going through. No idea about the Xantrex, but Victron ones are typically 75mV at maximum current. Any reason why you couldn't connect the Pi to the Xantrex shunt? Both would be measuring the voltage across the shunt and have a high input impedance. How does the Pi measure the voltage? I'm guessing some voltage amplification circuitry is needed before it goes to one of the Pi's analogue in pins, as the voltages across the shunt are so low compared with the 0 to 5V of the Pi. You'd need a boosted voltage to get good current resolution with the 1024 steps in the A to D converter.

  • Happy 1
Link to comment
Share on other sites

12 minutes ago, rusty69 said:

I have a Xantrex battery monitor, with associated shunt in the negative cable to my battery bank. I have just started using Venus OS on a raspberry PI, and would like to add battery monitoring status to it. I don't really have a need for another display, so can I add a victron smart shunt in series with my existing shunt?

 

Are there any implications of doing so, or is it just a silly idea?

 

Thanks

 

Why can't you use the exisitng shunt?

 

All that happens is <whatever meter your have> measures the voltage across it. 

 

 

Link to comment
Share on other sites

10 minutes ago, Jen-in-Wellies said:

Do modern Victron shunts do some preprocessing of the voltage then? I've got an old one that is just the raw 0 to 75mV.

I dunno. I haven't got a victron shunt.😂

5 minutes ago, nicknorman said:

No reason not to put a second shunt in series. We have 2 shunts in series, one for the Mastershunt and one for the BMV712. At high currents there might be a very slight voltage inaccuracy but so what?

Cheers Nick. I should also say that the Xantrex battery monitor is setup to control the BEP motorised switch to disconnect the Lithium batteries from the LA battery, though I can't imagine that would make any difference?

Link to comment
Share on other sites

2 minutes ago, rusty69 said:

 

Cheers Nick. I should also say that the Xantrex battery monitor is setup to control the BEP motorised switch to disconnect the Lithium batteries from the LA battery, though I can't imagine that would make any difference?

Presuming you are using SoC on the Xantrex to control the switch, then no. If you were using battery voltage then it would make a tiny but insignificant difference.

Link to comment
Share on other sites

4 minutes ago, nicknorman said:

Presuming you are using SoC on the Xantrex to control the switch, then no. If you were using battery voltage then it would make a tiny but insignificant difference.

I am using voltage, though have the ability to change that to SOC.

23 minutes ago, Jen-in-Wellies said:

Another voltage drop with the second series shunt when high currents are going through. No idea about the Xantrex, but Victron ones are typically 75mV at maximum current. Any reason why you couldn't connect the Pi to the Xantrex shunt? Both would be measuring the voltage across the shunt and have a high input impedance. How does the Pi measure the voltage? I'm guessing some voltage amplification circuitry is needed before it goes to one of the Pi's analogue in pins, as the voltages across the shunt are so low compared with the 0 to 5V of the Pi. You'd need a boosted voltage to get good current resolution with the 1024 steps in the A to D converter.

I don't think the shunt i currently have is smart enough to connect to anything, though I will have a look.

 

Currently, the Pi is only connected to the MPPT. I'm still on a steep learning curve, but having now got access to the MPPT via the victron portal, the next logical step seems to be to have a 'smart battery monitor', though I probably don't actually need one.

Edited by rusty69
Link to comment
Share on other sites

Just now, rusty69 said:

I am using voltage, thugh have the ability to change that to SOC.

A shunt will typically drop 50mV or 75mV at its maximum current, which might be a few hundred amps, depending on which model. So if for example you set the thing to disconnect Li at 12.000v, then under conditions of high current drain (few hundred amps) it might disconnect at 12.050v. At normal boat loads it would be more like 12.005v. Neither of which are significant errors.

  • Happy 1
Link to comment
Share on other sites

1 hour ago, rusty69 said:

I don't think the shunt i currently have is smart enough to connect to anything, though I will have a look.

 

The shunt itself is in no way smart, it just creates a volt drop across itself that is proportional to current flow. It seems some manufacturers attach a box of electronics to one end of the shunt, but that is nothing to do with the basic shunt. So, connect a voltmeter to the big terminals at either end of the shunt and as you vary the current flowing you will see the voltage varying between zero and the values others, like Nick, have given.

 

You may need an amplifier to boost that small voltage, but basically if you pass that into an analogue to digital converter the pi should be able to read the D to A output and by software you convert the A to D output into a "current through the shunt" value. I am sure that I have read that you can get a Pi Hat or expansion board to do the A to D part.

Link to comment
Share on other sites

5 minutes ago, Tony Brooks said:

 

The shunt itself is in no way smart, it just creates a volt drop across itself that is proportional to current flow. It seems some manufacturers attach a box of electronics to one end of the shunt, but that is nothing to do with the basic shunt. So, connect a voltmeter to the big terminals at either end of the shunt and as you vary the current flowing you will see the voltage varying between zero and the values others, like Nick, have given.

 

You may need an amplifier to boost that small voltage, but basically if you pass that into an analogue to digital converter the pi should be able to read the D to A output and by software you convert the A to D output into a "current through the shunt" value. I am sure that I have read that you can get a Pi Hat or expansion board to do the A to D part.

Ah, OK,thanks for the explanation, I guess that is what Jen was talking about earlier. I will look into it, though suspect that might be beyond my capabilities so whilst the shunt is not smart, I doubt I'll be smart enough to implement it either. 

 

Yes, I believe you can get 'hats' that fit the Pi. I might even have one that could do it. 

Link to comment
Share on other sites

39 minutes ago, Tony Brooks said:

 

The shunt itself is in no way smart, it just creates a volt drop across itself that is proportional to current flow. It seems some manufacturers attach a box of electronics to one end of the shunt, but that is nothing to do with the basic shunt. So, connect a voltmeter to the big terminals at either end of the shunt and as you vary the current flowing you will see the voltage varying between zero and the values others, like Nick, have given.

 

You may need an amplifier to boost that small voltage, but basically if you pass that into an analogue to digital converter the pi should be able to read the D to A output and by software you convert the A to D output into a "current through the shunt" value. I am sure that I have read that you can get a Pi Hat or expansion board to do the A to D part.


Sorry but you misunderstand. The Victron Smartshunt is smart. It is a shunt but with added smarts! The smart bit is the built in AtoD converter and VE.direct interface (which is TTL level rs232) so the connection between the smartshunt and the Pi will be digital only, and straightforward. It is a full blown Ah counting SoC meter, but without a display.

 

The Mastershunt I have is a similar concept, except that its output is CANBUS.

 

Edited by nicknorman
Link to comment
Share on other sites

3 minutes ago, nicknorman said:


Sorry but you misunderstand. The Victron Smartshunt is smart. It is a shunt but with added smarts! The smart bit is the built in AtoD converter and VE.direct interface (which is TTL level rs232) so the connection between the smartshunt and the Pi will be digital only, and straightforward. It is a full blown Ah counting SoC meter, but without a display.

 

The Mastershunt I have is a similar concept, except that its output is CANBUS.

But can you access the ends of the shunt part only, avoiding the added smarts, so that the Pi or some other device could read the voltage drop across the shunt directly?

Link to comment
Share on other sites

Just had a thought, you might need to be careful with the ground connections. If the Victron shunt is nearer the battery, its ground won’t be at quite the same potential as the system ground, due to voltage dropped in the other shunt when current flows. If the VE.direct cable carries a ground from the shunt via the Pi to the ground beyond the other shunt, you create a bypass to the shunt which could result in large currents flowing through these thin wires and causing magic smoke to appear. Maybe the Smartshunt uses optoisolators as I did in my BMS project to interface my BMV712 to my BMS, but in case it doesn’t I put the Victron shunt nearer the system ground, and have the Xantrex shunt nearer the battery negative. Either that or break one end of the VE.direct cable ground.

11 minutes ago, David Mack said:

But can you access the ends of the shunt part only, avoiding the added smarts, so that the Pi or some other device could read the voltage drop across the shunt directly?

Why would you want to do that? The smart shunt does all the precise integration of current into Ah, applies peukert and CEF etc etc. and transmits the data in the form that the Venus OS understands, directly into one of the Pi’s UART pins.

 

Or if you did want to do that because you were a masochist, get a normal shunt for much less money!

Edited by nicknorman
  • Greenie 1
Link to comment
Share on other sites

7 minutes ago, David Mack said:

But can you access the ends of the shunt part only, avoiding the added smarts, so that the Pi or some other device could read the voltage drop across the shunt directly?

You'd still need to amplify that voltage between the shunt and the Pi. With 5V divided in to 1024 bits by the built in A2D converter on the Pi input pin, the difference between 0V and 75mV measured directly on a Pi analogue pin is only 15 steps. Far too crude. You'd need to step up the voltage 66 times or so to get the optimum current resolution. If the Victron shunt already does the preprocessing in a way that the Pi, running Venus OS understands, then it makes sense to use it.

  • Greenie 1
Link to comment
Share on other sites

8 minutes ago, nicknorman said:

Or if you did want to do that because you were a masochist, get a normal shunt for much less money!

I think that is what people are suggesting I do with my exisiting shunt, but it sounds like hard work to me.

Link to comment
Share on other sites

17 minutes ago, David Mack said:

But can you access the ends of the shunt part only, avoiding the added smarts, so that the Pi or some other device could read the voltage drop across the shunt directly?

 

I think that you must be able to, it is where the battery cables are connected.

Link to comment
Share on other sites

24 minutes ago, nicknorman said:


Sorry but you misunderstand. The Victron Smartshunt is smart. It is a shunt but with added smarts! The smart bit is the built in AtoD converter and VE.direct interface (which is TTL level rs232) so the connection between the smartshunt and the Pi will be digital only, and straightforward. It is a full blown Ah counting SoC meter, but without a display.

 

The Mastershunt I have is a similar concept, except that its output is CANBUS.

 

 

No, I don't think I do misunderstand, unless you are claiming that you can not access the two large (battery) connections on a Smartshunt. If Rusty 69 knows which pin provides the Smartshunt digital output and knows what is needed to decode it on the Pi then I fully agree that that would be the easiest and probably more accurate way, but if he does not then, as he says, things get more difficult for those not fully conversant with electronic and digital practices.

Link to comment
Share on other sites

27 minutes ago, David Mack said:

But can you access the ends of the shunt part only, avoiding the added smarts.

 

Yes, just use the main terminals. A shunt is just a big ass resistor, all you need to do is measure voltage across the resistor and apply ohms law, amps = volts(your measurement)/ohms(resistance of your shunt).

Edited by Quattrodave
Link to comment
Share on other sites

7 minutes ago, nicknorman said:

Just had a thought, you might need to be careful with the ground connections. If the Victron shunt is nearer the battery, its ground won’t be at quite the same potential as the system ground, due to voltage dropped in the other shunt when current flows. If the VE.direct cable carries a ground from the shunt via the Pi to the ground beyond the other shunt, you create a bypass to the shunt which could result in large currents flowing through these thin wires and causing magic smoke to appear. Maybe the Smartshunt uses optoisolators as I did in my BMS project to interface my BMV712 to my BMS, but in case it doesn’t I put the Victron shunt nearer the system ground, and have the Xantrex shunt nearer the battery negative. Either that or break one end of the VE.direct cable ground.

Why would you want to do that? The smart shunt does all the precise integration of current into Ah, applies peukert and CEF etc etc. and transmits the data in the form that the Venus OS understands.

 

Or if you did want to do that because you were a masochist, get a normal shunt for much less money!

 

Yes, I also would be concerned about possible differences in "ground" potential with two shunts.

I did look at making my own battery monitor using a shunt (before other projects took over) and amplifying the shunt voltage with good accuracy is non-trivial. There are a few good dedicated chips available and most of these have integral ADC and some sort of digital output so this would be the neater way of interfacing to the Pi.  I like your idea of optical isolation.

A lot of these problems are solved if the shunt goes in the positive cable (which I think is where it belongs) but then that makes the elctronis harder.

 

Lots of systems now use shunts, including things like the Wakespeed alternator controller, so the multiple shunt issue will become more common. I have to conclude that your approach of a single shunt with a canbus output is the way to go.😀 

 

I don't think the Victron smart shunt has optical isolation? but it does do Bluetooth which is a very complicated means of getting isolation.

Link to comment
Share on other sites

Just now, Quattrodave said:

 

Yes, just use the main terminals. A shunt is just a big ass resistor, all you need to do is measure voltage across the resistor and apply ohms law, amps = volts/ohms.

 

But if Nick is right, he usually is, and it is simple to tap and decode the Smartshunt output on the Pi then his way is best. I have some reservations about the decoding simplicty though.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.