Controller shunt mods

Get all your technical information about electric bikes here.
User avatar
amberwolf   100 GW

100 GW
Posts: 26906
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Controller shunt mods

Post by amberwolf » Dec 02 2018 10:36pm


newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 05 2018 8:07pm

Yeah I think I found it, but its going to the chip that controls the Motor, maybe that chip has that capabilty built in as well. If it was going to an op amp, that means the amps across the shunt are at the micro level?

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 06 2018 9:10am

On newer designs, the op amp is built into the main MCU chip so all you see is maybe a RC filter between the shunt and the MCU.

The shunt resistors are generally in the neighborhood of 1 milliohm. Making an adjustable divider on the signal is pretty easy but most people just lower the shunt resistance and adjust the current limit in software.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 06 2018 7:19pm

very informative thanks very much :thumb:

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 06 2018 7:31pm

thanks very much, I will hack the solder bridge shunt off a damaged controller and try that, for the voltage divider, I am lost trying to find it. i see a trace coming from the shunt towards a gate driver, but seems to be going under the driver to where, difficult to tell

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 07 2018 11:39pm

My controller has 6 mosfets, so if I increase the amp capacity of the shunt, I think i must add more mosfets. If I added 6 more mosfets, could I add them in parallel, or does this mod require a new board and controller?

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 08 2018 11:51am

newbiehere wrote:
Dec 07 2018 11:39pm
My controller has 6 mosfets, so if I increase the amp capacity of the shunt, I think i must add more mosfets. If I added 6 more mosfets, could I add them in parallel, or does this mod require a new board and controller?
It depends on the FETs and how much current you end up with. Many times you can get away with just cooling the outside of the controller adequately (mounted in the open where there is some air flow).

Can you read the numbers off the existing FETs?

Adding more in parallel makes it hard to cool the added ones. It's usually better to stay with 6 but maybe upgrade them to better ones.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 08 2018 8:22pm

IRF 3205

Yes I have some heat sinks out of old PC, was thinking about putting the 6 mosfets on it, but dont know if the leads to the gates etc will be too long. maybe use the PTC or NTC sensor with the arduino or nano to sense when the temp gets too high and power the fan on the heat sink, its out of an old desktop

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 08 2018 11:20pm

I see the drain current for the IRF 3805 is 98 amps so I think Im good as you said, no need to parallel any more mosfets just heat sink them or open air it

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 09 2018 1:22am

Those are rated for 55V and have an on resistance of 8 milliohms. For sure you can find FETs with much lower resistance. Less resistance will produce less heating. The legs will melt off the FETs around 70A, so the silicon rating is not the limiting factor.

I'd just try the stock FETs and see if it gets too hot. If they do, then replace them. Any kind of additional heat sinking or air flow will greatly reduce heating also.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 23 2018 1:19am

for example, on a display panel,where I have my arduino nano display, could a variable pot be used instead of a solder shunt? I guess the resistor values would have to be very small for this to work

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 23 2018 11:55am

newbiehere wrote:
Dec 23 2018 1:19am
for example, on a display panel,where I have my arduino nano display, could a variable pot be used instead of a solder shunt? I guess the resistor values would have to be very small for this to work
Not really. You won't find a variable resistor that can handle that kind of current. You can place a small variable resistor between the shunt and the line going to the MCU. I've done this on several controllers with good results. You have to find the right trace on the board to cut into. If you post good enough pictures of your board, especially the area around the shunt, I can probably find it.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 23 2018 6:15pm

The picture is not the best, but the shunt is there, hard to see the traces though
Attachments
IMG_6986.JPG
IMG_6986.JPG (103.04 KiB) Viewed 820 times
Last edited by newbiehere on Dec 23 2018 6:23pm, edited 1 time in total.

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 23 2018 6:17pm

:thumb:
Attachments
IMG_6987.JPG
IMG_6987.JPG (119.49 KiB) Viewed 820 times
IMG_6988.JPG
IMG_6988.JPG (102.87 KiB) Viewed 820 times

User avatar
amberwolf   100 GW

100 GW
Posts: 26906
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Controller shunt mods

Post by amberwolf » Dec 23 2018 11:43pm

fechter wrote:
Dec 23 2018 11:55am
Not really. You won't find a variable resistor that can handle that kind of current.
Sure you can. But it will probably be bigger than teh whole controller; possibly bigger than a typical DD hubmotor. ;)

It's not really what you had in mind when you said that, I'm sure, but:

Luxtrol stage light dimmer, effectively a giant wirewound potentiometer. Pic of one next to the stator of an MXUS / 9C typical hubmotor (the motor is lighter and smaller!).
Image
viewtopic.php?f=7&t=61839&p=984742&hili ... ol#p984742

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 24 2018 1:42am

The pictures are not so good. Where the main black battery wire attaches to the board, it goes to one side of the shunt. The other side of the shunt goes to a bunch of the FET legs. The side that goes to the FET legs will have a skinny trace coming off it somewhere that heads to one of the IC chips. It could be on either side of the board. Other than the FET legs, this sensing trace should be about the only thing connected to the FET rail. Ignore any capacitors. Look closely at the board, and if you see something like that, try to get a picture of it. It helps to have lots of light. With some cameras, it might work better to back off a little and zoom in to keep more stuff in focus.

I like the stage light dimmer. That's more like a variable transformer, but the size isn't too far off.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 24 2018 2:31am

using a cont. tester, I traced on the opposite side of the board and the trace from the shunt opposite of the black wire, goes under a 2101 gate driver onto a pin of a LM 339, will post a pic later

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 24 2018 5:23am

I have outlined the trace in black, it seems to be on the opposite side of the board, this is coming from the underside of the shunt, opposite of the black wire side; seems to be going under the gate driver, or to a pin on it, then onwards to the comparator? then to the MCU
IMG_6991.JPG
IMG_6991.JPG (156.38 KiB) Viewed 802 times

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 25 2018 5:31pm

so i dremel tool off some of the trace, then put a pot in between? if its a 3 terminal pot, how do I connect the terminals?

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 26 2018 3:45am

so I put the trim pot across the shunt then the wiper is connected past the trace cut? as shown here?
currentSenseTrimpot2.jpg
currentSenseTrimpot2.jpg (57.05 KiB) Viewed 779 times

-JFK-   1 mW

1 mW
Posts: 11
Joined: Dec 24 2018 10:59am

Re: Controller shunt mods

Post by -JFK- » Dec 26 2018 9:18am

Hello,

I'd like to increase a controller from 25A to ~34A.
I'll use the shunt modification, but like to be a bit precise.
The controller, currently use 2x 5 mohm shunts.

So, please tel me if I'm right :

2x5mohms= 2.5 mohms

2.5 mohms -> 25A
??? mohms -> 34A

From 25A to 34A, it's +36%
So, 2.5 mohms - 36% = 1.6 mohms

3x 5 mohms =~1.67 mohms

I finally just need to add a 3rd 5 milliohms shunt on my controller to reach my goal ?
Thank's, happy new year.

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 26 2018 11:43am

newbiehere wrote:
Dec 25 2018 5:31pm
so i dremel tool off some of the trace, then put a pot in between? if its a 3 terminal pot, how do I connect the terminals?
Sorry for the delay, holidays are interfering with the advancement of technology again.

The way you did it will work but you if you turn the pot too far, you can totally defeat the current limiting and possibly blow something up. I've used that method before and it will be OK if you just dial it in carefully and leave it alone after that.

There are many other ways to do this. Below is just one. By using a pot and a fixed resistor, you can limit the maximum increase. In the circuit below, the pot will adjust the current limit from stock level (100%) to 2x (200%). The pot and the fixed resistor are the same value, which gives the 2:1 range. With a different fixed resistor, you could make the range whatever you want.
2x variable shunt divider.jpg
2x variable shunt divider.jpg (29.79 KiB) Viewed 766 times
I'd like to increase a controller from 25A to ~34A.
I'll use the shunt modification, but like to be a bit precise.
The controller, currently use 2x 5 mohm shunts.

So, please tel me if I'm right :

2x5mohms= 2.5 mohms

2.5 mohms -> 25A
??? mohms -> 34A

From 25A to 34A, it's +36%
So, 2.5 mohms - 36% = 1.6 mohms

3x 5 mohms =~1.67 mohms

I finally just need to add a 3rd 5 milliohms shunt on my controller to reach my goal ?
To get 34A, the shunt would be about 1.84 milliohm. (2.5 x 25/34)

If you add one 5 milliohm to the existing, your limit would be about 37.5A (that's probably close enough)
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 26 2018 9:05pm

yes i figured it was the holidays :D

the shunt resistor goes right across the board solder shunt? then the pot in parallel to the shunt resistor?

so the stock shunt is basically providing a reference for a comparator to limit current? How does that circuit work, if I may ask?

User avatar
fechter   100 GW

100 GW
Posts: 13839
Joined: Dec 31 2006 3:23pm
Location: California Bay Area, USA

Re: Controller shunt mods

Post by fechter » Dec 27 2018 12:53am

The "shunt resistor" in my diagram is the one soldered into your board. You are just dividing that voltage before it goes to the MCU.

As current passes through the shunt resistor on the board, a voltage is developed across it. Typical shunt resistors are around 1 milliohm, so you would get 1 mv for every amp. This gets amplified and sent to an A/D converter inside the MCU and software takes it from there.
"One test is worth a thousand opinions"

newbiehere   100 mW

100 mW
Posts: 46
Joined: Oct 08 2018 2:25am

Re: Controller shunt mods

Post by newbiehere » Dec 27 2018 12:59am

oh ok cool got it about the shunt resistor, but I still need to break the trace for the wiper connect, correct?

Ive seen complicated work arounds for measuring current with an arduino, seems this type of shunt could do the same thing?

Post Reply