Yuan Lang controller shunt idea

I dont really understand how you are connecting things here.

Why do you need a pot capable of handling a lot of current?
Where do you get the 3 wires from?

As I understood it you cut the trace to the sensing circuit, and you were connecting a pot to that circuit to raise the resistance?

In that case you would have two wires, one from each end of the trace you cut. And connect one of them to the wiper and one to one of the other connections on the pot. So I guess you are doing something else.

Are you connecting the pot to each side of the shunts, and the wiper to the cut trace?
In that case I can understand what you are trying to calculate.
 
The potentiometer doesnt' go on / at the shunt. It goes on the output side of the electronics that measure the shunt, on the line from those electronics that go to the MCU chip in the controller that runs everything. Exactly where this line is, you would need to locate by tracing out the PCB between the main MCU chip (usually the one with the most pins) and the area where all that circuitry is near the shunts. The potentiometer would be wired so that one of it's outer leads goes to ground. The middle lead goes to the MCU line. The other outer lead goes to teh line coming from the electronics measuring the shunt.

What the potentiometer does is simply let you adjust that signal downward (lower voltage) so the controller thinks there is less current than there really is. Typically you would adjust the potetiometer first so it is outputting the full shunt signal to the MCU, then begin adjusting it downward until the controller either does what you want it to, or smokes. ;)

The potentiometer doesn't handle any current (probably microamps at most) so even a tiny little pot will work fine. Typically the size of your pinky nail, or smaller, usually one of the blue multiturn pots with the tiny brass screw adjust for fine tuning, easy to glue down to a surface on one of it's flat sides. 5kohm to 10kohm would be typical value used.

The posts by Fechter et.al. about that kind of shunt mod have more info on how to trace this out and connect it.


However, if you have modded the shunt itself, the potentiometer is not useful, because the shunt no longer does what it was meant to, and the reading the controller gets will already be lower than it should be (or nonexistent, depending on the results of the shunt mod. The resistance of the shunts is so low even before a modifcation that you can't measure it with a regular multimeter, the meter leads have more resistance than the shunts do, so that's what you'll see. The shunts are probably a thousandth of an ohm (1milliohm), or even less, and will be much less after soldering wire to them (basically just that of the wire and solder, so they aren't actually shunts anymore, just wires, and can't do the job of a shunt). Even removing the mod doesn't put the shunt completely back to where it was, becasue you can't remove all the solder from the surface, so they will still be some uncontrolled lower resistance value than they were originally. :( It is still better than with the mod, but not the same as it was, and the effect is not completely predictable (it is measurable though).

You *can* measure the actual shunt value using a constant known current thru them, and then measure the voltage generated across the shunts. Then use ohm's law to calculate the shunt resistance: Volts / Amps = Ohms.
 
j bjork said:
I dont really understand how you are connecting things here.

Why do you need a pot capable of handling a lot of current?
Where do you get the 3 wires from?

As I understood it you cut the trace to the sensing circuit, and you were connecting a pot to that circuit to raise the resistance?

In that case you would have two wires, one from each end of the trace you cut. And connect one of them to the wiper and one to one of the other connections on the pot. So I guess you are doing something else.

Are you connecting the pot to each side of the shunts, and the wiper to the cut trace?
In that case I can understand what you are trying to calculate.

Hi J Bjork. You are correct in your assumption. I connected one side of the potentiometer to the power side of the shunt the other side to the sense side of the shunt and the middle or wiper end to the sense line.
My potentiometer is 25 ohms. If I used 1k or 10k my resistance values would have been much higher.

Should I only connect one side of the pot to the circuit?
 
Svard75 said:
Hi J Bjork. You are correct in your assumption. I connected one side of the potentiometer to the power side of the shunt the other side to the sense side of the shunt and the middle or wiper end to the sense line.

Should I only connect one side of the pot to the circuit?


YOu don't connect the pot to teh shunts at all. Just to the output of the sense amplifier circuitry that's near the shunts, between that circuitry and the MCU. (you have to find and cut the PCB trace between that circuitry and the MCU to do this)

My potentiometer is 25 ohms. If I used 1k or 10k my resistance values would have been much higher.
If you have the pot across the shunts it doesn't matter what it's value is. The shunt value is so low that it is directly shorting across the pot and the pot makes no effective difference to the shunt value, even if it was a 1ohm pot.

Assuming the controller has the typical 1milliohm or less shunt, the pot would have to be a 1 milliohm (thousandth of an ohm) or less pot, and capable of handling the full current you want out of the controller, to be able to put it across the shunts and use it to adjust the shunt value,because you would be using it *as* the shunt (or rather, more than half of the shunt). The pot might be as large as the controller itself or larger, and probably need to be heatsinked. ;)
 
amberwolf said:
The potentiometer doesnt' go on / at the shunt. It goes on the output side of the electronics that measure the shunt, on the line from those electronics that go to the MCU chip in the controller that runs everything. Exactly where this line is, you would need to locate by tracing out the PCB between the main MCU chip (usually the one with the most pins) and the area where all that circuitry is near the shunts. The potentiometer would be wired so that one of it's outer leads goes to ground. The middle lead goes to the MCU line. The other outer lead goes to teh line coming from the electronics measuring the shunt.

What the potentiometer does is simply let you adjust that signal downward (lower voltage) so the controller thinks there is less current than there really is. Typically you would adjust the potetiometer first so it is outputting the full shunt signal to the MCU, then begin adjusting it downward until the controller either does what you want it to, or smokes. ;)

The potentiometer doesn't handle any current (probably microamps at most) so even a tiny little pot will work fine. Typically the size of your pinky nail, or smaller, usually one of the blue multiturn pots with the tiny brass screw adjust for fine tuning, easy to glue down to a surface on one of it's flat sides. 5kohm to 10kohm would be typical value used.

The posts by Fechter et.al. about that kind of shunt mod have more info on how to trace this out and connect it.


However, if you have modded the shunt itself, the potentiometer is not useful, because the shunt no longer does what it was meant to, and the reading the controller gets will already be lower than it should be (or nonexistent, depending on the results of the shunt mod. The resistance of the shunts is so low even before a modifcation that you can't measure it with a regular multimeter, the meter leads have more resistance than the shunts do, so that's what you'll see. The shunts are probably a thousandth of an ohm (1milliohm), or even less, and will be much less after soldering wire to them (basically just that of the wire and solder, so they aren't actually shunts anymore, just wires, and can't do the job of a shunt). Even removing the mod doesn't put the shunt completely back to where it was, becasue you can't remove all the solder from the surface, so they will still be some uncontrolled lower resistance value than they were originally. :( It is still better than with the mod, but not the same as it was, and the effect is not completely predictable (it is measurable though).

You *can* measure the actual shunt value using a constant known current thru them, and then measure the voltage generated across the shunts. Then use ohm's law to calculate the shunt resistance: Volts / Amps = Ohms.

Thanks. I will review those posts again. I guess I should remove the shunt mod as much as possible first before doing the pot mod. Thanks this was helpful.
 
amberwolf said:
Svard75 said:
Hi J Bjork. You are correct in your assumption. I connected one side of the potentiometer to the power side of the shunt the other side to the sense side of the shunt and the middle or wiper end to the sense line.

Should I only connect one side of the pot to the circuit?


YOu don't connect the pot to teh shunts at all. Just to the output of the sense amplifier circuitry that's near the shunts, between that circuitry and the MCU. (you have to find and cut the PCB trace between that circuitry and the MCU to do this)

My potentiometer is 25 ohms. If I used 1k or 10k my resistance values would have been much higher.
If you have the pot across the shunts it doesn't matter what it's value is. The shunt value is so low that it is directly shorting across the pot and the pot makes no effective difference to the shunt value, even if it was a 1ohm pot.

Assuming the controller has the typical 1milliohm or less shunt, the pot would have to be a 1 milliohm (thousandth of an ohm) or less pot, and capable of handling the full current you want out of the controller, to be able to put it across the shunts and use it to adjust the shunt value,because you would be using it *as* the shunt (or rather, more than half of the shunt). The pot might be as large as the controller itself or larger, and probably need to be heatsinked. ;)

I guess I missed this entirely. This is why I was so confused how guys are using a tiny trimpot and not smoking it! :lol:
 
You need something to measure the current with, but then I think you should try it.(carefully)
Your shunt mod sure changed things to some extent, but probably not very much. My guess 10-20% or so?

I havent done the the pot mod you did, but if you cut the trace from the shunt before anything is connected it should work I think. What you are effectively doing when you turn the pot is adjust where on the shunt you measure.

So halfway is in the middle of the shunt.
All the way in one direction is the output side, basically standard output.
All the way in the other direction is the input side, the same as no shunt. Unregulated, full output until something brakes.

Amberwolf:s way might be better, but I think this should work too. Or what do you say amberwolf?
 
It depends on how they made the shunt voltage detection circuit. If they are directly reading the voltage across the shunt, then using a high-resistance (10kohm+) multiturn pot might work. A low resistance pot will probably affect the circuit too much but it depends on the circuit itself. Also, the longer the wires are the more noise gets induced in them (controllers are very electriclaly noisy) and the more likely to get spurious results especially during high-motor-load events when this stuff needs to work it's best to prevent controller failures. ;)

To try this, you'd have to cut the trace from the shunt to the detection circuit first.

Then wire the pot with the "top" outside leg to the shunt side of that.

The middle leg of the pot to the detection side of that.

The "bottom" outside leg to ground.

Then set the pot so it outputs maximum shunt voltage first, and adjust downward from there till it does what you want or smokes something.


But if the shunt detection is using some other method like a voltage divider, etc., then putting the pot there changes the circuit in ways you'd have to know what the circuit was to predict.

Also, the shunt voltage itself is likely to be VERY low. Let's say you have 100A thru a 1millohm shunt, that's 100 * 0.001 = 0.1v. At lower currents it's even lower voltage. with a lower resistance shunt (likely with a high current controller) it will be even lower.
 
I would have preferred to trace the circuit but the issue is they’ve printed heavy while lines, boxes and component identifiers so much that I cannot follow the small lines. What I’ll do is remove the pot completely, re-attach the sense line using my wire and leave the shunt mod. If the controller smokes I’ll get a new one. There’s a guy out of Kitchener Ontario who sells a kit for our bikes. New ASI controller, a second 72v 24ah battery for 50ah total and fills the hub motor with fluid to keep it cooler. Does filling the hub motor with fluid sound right to you guys? My assumption is the fluid is non conductive.
 
THere are some threads about uisng oil, atf, and other things to cool hubmotors, including one by justin_le called something like Definitive testing of the heating and cooling of hubmotors. has info on various kinds of fluids, actual testing and results under controlled conditions, etc.

there is also info in there about statorade, which is a kind of ferrofluid, and which can be used in conjunction with a product called hubsinks created by another member here on the forum, there's a sale thread in the items for sale new section for those i think..
 
I put the controller into the frame and gave it a ride. Yes there is a difference. I would speculate about 20% more torque. What I noticed as well was a sag from 82v all the way down to 64v for a brief time while I was accelerating hard. I think the controller will handle this new setting but not sure my batteries will support a 7% grade hill for about 400-500m. I need to test this. Obviously the current wasn’t something I tested but perhaps I will get a guage and hook it up. Where should I connect it? Battery positive?
 
Svard75 said:
Obviously the current wasn’t something I tested but perhaps I will get a guage and hook it up. Where should I connect it? Battery positive?
Depends on the current meter. (ammeter). Some have a shunt that goes in series with battery negative. Some have a clamp-on ring that goes over either battery wire. Some need both positive and negative.
 
amberwolf said:
Svard75 said:
Obviously the current wasn’t something I tested but perhaps I will get a guage and hook it up. Where should I connect it? Battery positive?
Depends on the current meter. (ammeter). Some have a shunt that goes in series with battery negative. Some have a clamp-on ring that goes over either battery wire. Some need both positive and negative.

Any brand preferences? Looking for a waterproof unit and also a temperature meter. One for controller and one for motor.
 
How waterproof do you need it to be? The Cycle Analyst v3 from ebikes.ca is water resistant with the new style of plugs, and it has monitoring for both of those plus a lot more. You can use it to just monitor, or you can use it to modify the bike's behavior if you like.

If you use the CAv3 then I'd also get the External Shunt from Grin appropriate to your expected controller current (the small one is good for 45A, I think? there are bigger ones for higher currents). If you can measure the controller's actual shunt resistance you can add wires to that and run them to the CA, but it's a lot easier to use an external shunt. You just connect it between the battery and the controller, for both positive and negative wires, for the small shunt. The bigger ones go in the negative side, and you run a separate positive wire from your keyswitch's output side to the CA to power it.

If your motor already has a temperature sensor in it, you just need to know which one it is so you can set the CA to correctly read it.

There are cheaper solutions if you just want separate temperature and current monitors, but I don't know which ones would be waterproof or their functions.

A long time ago before I used the CA, I used a Fluke multimeter ziptied to the handlebars (because it was water resistant and I already had it) to monitor current and voltage (had to swap wires to check each time), and an outdoor BBQ thermometer fork with the prongs detached and cut to fit against the motor, and the display end ziptied next to the fluke for temperature. They worked, but were a PITA. ;) The CA is much easier because it's all in one.
 
I checked ebike.ca. I think CA is overkill. I just want to see instant amps and temps. I’ll get a $20 100v/100a with remote shunt from Amazon.
I ordered statorade off ebike.ca. Happy to get that installed.

I’m moving away from my controller at this point so I’ll stop updating this thread. Just one more test and I’m happy.
 
Update on this. the bike is back together and amp meter with 350a shunt installed. From stop to go i’m reading 76amps. I wish i had a baseline to compare but based on feeling it definitely pulls stronger since the shunt mod.

batter sag was quite significant. my packs only 24ah but they’re lifepo4 cells. i think they’ll be ok for a while.

the sag i witnessed was 83v down to 74v during the 76amp draw. I rode around for 15 minutes and the battery settled at around the 67-76v range and didn’t sag beyond that. when charging it up it only took 30 minutes to fully charge with a 3 amp charger. 🤷🏻‍♂️
 
Back
Top