Questions concerning S12S / S06S controllers (options, current control, etc)

Electric Motors and Controllers
Post Reply
Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 09 2018 2:06pm

Hey guys,
I'm planning to build another E-Bike for several years now, since the last one I built was stolen. The complicated setup of the controllers I knew back when I started the build has always been a bit of a mental demotivation. But today, by chance I read about the S12S and similar controllers which seem to be easy to set up, so I'm motivated now and finally want to finish my bike this year. :D
It is a 20" bike (Giant Revive) and I'm going to install a Puma at the front. The fork and motor are already finished.
Image
Gallery: https://imgur.com/a/tTuFe
I will use 80 A123 cells in a 16s5p configuration, so it is going to be a 48V setup with a maximum charge voltage of ~60V.
I want to keep it street legal (250W) and need a max current of 5A, so here's my first question:
1) Can I modify the S06S to accept 48V?
https://bmsbattery.com/controller/842-3 ... s-app.html
I read somewhere that a resistor in front of some internal voltage regulator is 60ohm for the lower voltage controllers, and 200ohm for the 48V version. But it can't be that simple can it?
I have read through the manual of the S12S controller as well.
https://bmsbattery.com/ebike-kit/552-s1 ... e-kit.html
I also have several questions here:
2) What difference does the magnet number of the PAS make? There are several versions with 5-12 magnets available:
https://bmsbattery.com/parts/49-five-po ... results=69
https://bmsbattery.com/parts/570-eight- ... results=69
https://bmsbattery.com/parts/579-ten-po ... results=69
https://bmsbattery.com/parts/504-pas-pu ... results=69
Also, the C1 settings only allow 5, 8, 10 magnets, not 12.
3) What does happen when I connect a 12 magnet PAS?

4) Do I need to connect a speed control grip, or can I also use the controller without one?
5) How would the controller react if operated without throttle? Full throttle all the time?
6) What would happen if I connected a full throttle signal permanently to the throttle input via a voltage divider or something?

As I wrote above, I would like to limit my power to 250W by limiting the current to 5A. But the C5 parameter only allows the current to be limited to 1/2 the controller rating which would be 25A/2=12.5A here.
7) Can I bring down my max current to 5A by setting C14 (assist strength) to "weak"?

Thank you very much for helping me! :)

User avatar
amberwolf   100 GW

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

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by amberwolf » Mar 09 2018 4:58pm

Julez wrote:
Mar 09 2018 2:06pm
1) Can I modify the S06S to accept 48V?
That depends on why it's a 24/36v controller.

If it is because of an HVC in the controller, then no, unless you can program that.

If it is because of FETs or capacitors or other parts, then you'd have to replace those with parts that can take your maximum voltage (plus some percentage of tolerance).

If it is because of the low-voltage regulator, then maybe. For that, if it's just the resistor, then you can change that to a higher resistance proportional to the existing resistance and expected voltage, so that the resistor "absorbs" more of the voltage across it and less has to be handled by the low-voltage regulator.

If it's a switching regulator rather than linear, it probably doesnt' have the input resistor, and you are probably stuck with the range it's specified for. (putting a resistor in frotn may not work because it may not draw a constant current at a specific voltage the same way, so the resistor wouldn't prevent overvoltage on the input side).


2) What difference does the magnet number of the PAS make?
More magnets generally means a smoother detection of pedalling, and quicker response of the system to changes in pedal speed.
6) What would happen if I connected a full throttle signal permanently to the throttle input via a voltage divider or something?
Except for power-on, then it would always run the motor at a constant speed (if it's a speed control throttle) or constant pwoer (if it's a power control throttle).

But at power on, the controller probably checks for stuck throttle, so if the throttle is not "off" when powered on, it will probably disable the controller until that error doesnt' happen.

As I wrote above, I would like to limit my power to 250W by limiting the current to 5A. But the C5 parameter only allows the current to be limited to 1/2 the controller rating which would be 25A/2=12.5A here.
I don't know about the settings, so someone else will have to chime in on that.


But if there is no other way to do it, then you can modify the shunt inside the controller, if it uses multiple shunt wires. If it only uses one, that's harder but still possible. This is a last-ditch sort of way of doing it, so try other things first. :)

If it has two shunt wires, you can desolder one of them and that cuts the current the controller will provide by half. (because now it thinks that half current is full current). The displays and readouts will all be wrong for A and W because of that, showing twice what it actually is, however.

If it only has one shunt wire, you'd have to either replace that with a higher resistance one, or you'd have to physically shave the shunt down to a narrower diameter somewhere along it's length to increase it's resistance. THat would require using an external wattmeter and known load, so you can watch the meter until it reads whatever you want it to actualy be.

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 11 2018 7:14am

Thank you very much for your answers so far!
Concerning the "stuck throttle" problem, I'm planning to to add a switch on the handlebar anyways, with which I can activate full throttle. Is a hall sensor neccessary or can I simply connect 5V to the throttle signal wire for permanent full throttle? As my bike will go to about 32km/h with full throttle according to my calculations, I plan to make a secret switch to limit the maximum speed. For this, I intend to add some diodes between the 5V and the throttle signals to lower the voltage, so that the controller thinks only 70% throttle or so is active. With the secret switch, I can bridge the diodes, so the controller sees full 5V throttle signal and so I can unlock full speed.
Will this plan work?

Concerning the current limiting of the controller, it has a hall sensor based current sensor. So I cannot modify a shunt here. I could lower the hall sensor output voltage with a voltage divider, but I would prefer an approach not needing to modify the hardware.

I did successfully clip the shunts on the meanwell power supply I use to charge my battery. :wink:

Thanks,

Julez

User avatar
amberwolf   100 GW

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

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by amberwolf » Mar 11 2018 2:43pm

Julez wrote:
Mar 11 2018 7:14am
Is a hall sensor neccessary or can I simply connect 5V to the throttle signal wire for permanent full throttle?
You'll need to test what the actual voltage from the throttle is when the wheel reaches full speed.

Then you'll need to test what the actual voltage from the throtte is when the wheel is at zero speed.

Then use a voltage divider (three resistors in series from 5v to ground) to create those two voltages. The total resistance should probably be somewhere around 10kohms. The individual resistances would be a ratio between the two voltages you tested above that gets you resistances that create those voltages at the points between the resistors. There've been threads about pushbutton throttles that have the math for this if you can't figure it out (I'm terrible at that, and usually just experiment with bits I have till it works :oops: ). There's also info about something similar for a different purpose on http://ebikes.ca for the Cycle Analyst's aux-in mode switch. (and posts here on ES about it but theyr'e harder to find).

Then use a momentary pushbutton that can toggle between two contacts (SPDT momentary), with it's common contact on the controller's throttle-in wire. The normally-on contact goes on the point between the bottom and middle resistors, then the pushbutton-on contact goes on the point between the top and middle resistors.
For this, I intend to add some diodes between the 5V and the throttle signals to lower the voltage, so that the controller thinks only 70% throttle or so is active.
The diodes would instead go between the pushbutton's common contact and the controller's throttle-in wire, but they will affect the "off" voltage too, and may cause the controller to fault when powered on, thinking something is wrong with the throttle.


Concerning the current limiting of the controller, it has a hall sensor based current sensor.
That's very unusual--those are not that cheap, while shunt wire is.

You could look around for Jeremy Harris' or Fechter's posts about adding a pot to the MCU side of the shunt reading circuits, so that you can adjust the output of that before it goes into the MCU. Then you'll need to reverse-engineer the shunt-reading circuit of your actual controller to see where the parts need to go and what traces to cut.

Or you could find Casainho's custom firmware thread for that series of controllers, and see if it will let you do what you want.

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 13 2018 11:47am

Ok good, I think I have a plan then. I will just use 3 10k trimmers in parallel, and adjust each of then to a different output voltage. Depending on what throttle% I want the controller to see, I will connect them individually to the throttle sense wire.

Concerning the current reduction, What I had in mind will only work the opposite way, making the controller read less current than there actually is, by reducing the output voltage of a hall sensor.
Well, I guess I should buy all that stuff first and see how far I can limit the current by reducing all relevant parameters as low as possible.

Well, thanks so far, and I will report back when I have my system up and running. :D

User avatar
amberwolf   100 GW

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

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by amberwolf » Mar 13 2018 2:01pm

Julez wrote:
Mar 13 2018 11:47am
Concerning the current reduction, What I had in mind will only work the opposite way, making the controller read less current than there actually is, by reducing the output voltage of a hall sensor.
That's what those circuits would do; the pot on the output of the sense circuit would lower the voltage of the sense output.

The only potential issue with any of the methods to do that is that if the MCU sees there's less voltage, it assumes there's less current, and tries to force more current out to make up for it.

So you have to use a more complicated (op-amp, transistor, etc) circuit (or run the pot's "ground" leg to 5v instead) that lets you *increase* the voltage from the output of the sense circuit, to make the MCU think there's *more* current than there really is, to force it to lower the output.

That's assuming that the sense output is proportional to the sense intput, and not inversely so.

casainho   100 MW

100 MW
Posts: 2661
Joined: Feb 14 2011 2:43pm

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by casainho » Mar 19 2018 11:56pm

You can also look at our Flexible OpenSource firmware for S06S and S12S controllers, were we have a lot of technical notes about it!!
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, you can consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 22 2018 4:38am

Yeah I already read a bit into it, thanks. If I can't reduce my current with the setup options the stock firmware offers, I might give it a try. :)

User avatar
motomech   1 GW

1 GW
Posts: 3168
Joined: Sep 11 2010 12:21am
Location: Tucson Az.

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by motomech » Mar 23 2018 3:58am

Forget the SO6S, you should be using the 48V KT sine wave from PWS Power;
http://www.pswpower.com/peng/iview.asp? ... 33C0.50CGS
Motomech

'03 Rocky Mountain Edge 2WD 260 Q100H frt and Ezee V1 rear 2 Elifebike 20A & 25A 9-FET controllers 12S/20Ah Multistar Lipo rear 5Ah Turnigy frt Luna Cyclops Extra lite Alex 24DM rims, Crazy Bobs run ghetto tubeless. 25 mph. Mean Well HLG-320H-54A
viewtopic.php?f=3&t=83430
'07 GT Idive 4 4.0, Q100C 201 14S LiPoly elifebike 9-FET 20A controller. 23 MPH.
viewtopic.php?f=3&t=49691&p=1378484#p1378484

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 23 2018 10:55am

Well, I'm in Germany, so I ordered this one.
http://www.groetech.de/index.php?main_p ... l6ln4f6jp7
The shop owner told me it should work with a Puma.

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 24 2018 11:43am

Sooo, my components just arrived, and I set up everything extemporary for a test run:

Gallery: https://imgur.com/a/tTuFe

Image

Image

Image

What can I say? Everything works absolutely freaking perfect! :D

As I want my current to be as low as possible, I set all relevant parameters I could find to the minimum level, and the controller (when activated by PAS) maxes out at 9A at level 5, and 5A at level 4. Level 1 is very low current, so I think I will just let it be like it is, and not use level 5, or just when I feel like it :twisted:

As the current maxes out at 9A regardless of the assist level when I use a twist throttle, I think I will not use one.
I have not yet worked my way through all possible combinations of twist throttle and PAS activation parameters, but I will do that in the following days. The free turning speed of the wheel in PAS mode is 35kp/h, so I need to figure out some quickly accessable Cop mode switch. But Rome was not built in a day, and right now I'm quite enthusiastic about how fine everything works. :D

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Mar 25 2018 7:42am

Ok, so there's one wire of which I don't quite understand the function:

Image

The last item on the list: Regardless if connected or disconnected, I don't see any change in behaviour. I set my speed limits for PAS and throttle to 40kph, and the motor electrically maxes out at 33kph. So I get 33kph max when I activate the throttle or move the PAS. When I brake the wheel so that the current of each assist level reaches maximum, there's also no change with the wires connected or not.
So when both the speed and the current are not influenced by the wires, what do they do?

Ernie   100 µW

100 µW
Posts: 9
Joined: May 07 2018 2:28am
Location: Brisbane

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Ernie » Jun 03 2018 6:35am

Julez wrote:
Mar 09 2018 2:06pm


As I wrote above, I would like to limit my power to 250W by limiting the current to 5A. But the C5 parameter only allows the current to be limited to 1/2 the controller rating which would be 25A/2=12.5A here.
7) Can I bring down my max current to 5A by setting C14 (assist strength) to "weak"?

Thank you very much for helping me! :)
I have been mucking around with the simulator at ebikes.ca the past week trying to model up a MAC 12T for my cargo bike.

One thing I noticed quite early is that to get 250W motor power out, you need to draw about 350W from the battery, that's because the motors are not 100% efficient, and the controllers are only about 85% efficient so you loose heaps. I would set your current limit to pull at total from the battery of about 350W if you want to be at the 250W motor legal limit. Even then, it's only going to hit 250W motor output at about 50% of the unloaded RPM. Below that not enough revs to get max power output, above 50% not enough load to need max output.

Julez   1 W

1 W
Posts: 64
Joined: Aug 14 2008 11:58am
Location: Germany
Contact:

Re: Questions concerning S12S / S06S controllers (options, current control, etc)

Post by Julez » Jun 05 2018 9:56am

Meanwhile, I solved practically all problems.

I soldered 4110 100V Fets in the controller. I desoldered the linear regulator and bolted it to the inside of the case, to make it run cooler. I also exchanged the Caps against 100V Low ESR 5000h types, just to be on the safe side.

I cleaned some excess solder from the shunt, and set current limit to the lowest level. I'm down to ~6A now which should give me ~250W of output power. This works nice in my application.

I connected positive to throttle sense via a button and an 8k resistor. This gives me maximum power with a press of that button regadless of which assistance level is set at the display. I installed a tiny jumper with a pull rope which can disable this feature in seconds should cops arrive. The speed limit here is set to 40kph which I only reach downhills.

Pedal assist can be set to 5 levels, speed limit here is 25kph, perfectly legal. I have a rocker switch I can conveniently reach with my thumb to switch the pedal sensor signal wire. This way, I can quickly switch pedal assist on or off without having to change the levels on the display.

The magnet disk with 12 magnets works just fine and needs about half a revolution to activate the motor.

As I exchanged my Puma against a Heinzmann yesterday, what still needs to be done is installing brake contacts that will enable regen.

So far, so good. :D

Post Reply