Using a 1000W DD hub motor as a generator?

Buk___

10 kW
Joined
Jul 28, 2017
Messages
750
My idea is to use a small RC gas motor and the energy concentration of petrol(gas), to provide a range extender to an e-bike.

Rather than anything complicated like a hybrid drive mechanism, the thought is to save the weight of a dedicated generator attached to a gas motor by using a DD hub motor as both motive force when riding, and generator when charging.

Park up and jack the driving wheel off the ground on a sturdy stand, and use the gas motor to (friction) drive the hub motor to recharge the batteries.
With ~9Wh of energy in a litre of fuel and petrol stations ubiquitous, you get essentially unlimited range. 2l of gas plus container comes in around 2kg.

If you start with a nominal 1kW DD hubdrive wound for 200rpm max. at 36V/25A, and the drove it to generate power; what could you get out of it?

What would be the best speed to drive it at?
How much power would you need to put in?
How much would you get out?

Random thoughts during a boring wet day.
 
How efficient is the motor at a particular speed/voltage? (see the manufacturer for the curve chart, or experiment with it on the http://ebikes.ca/simulator if yours is listed there)

That will tell you that if you run it at a particular speed, then you'll get about that voltage out at about that efficiency, depending on the load you put on it (because in general a motor will work as a generator with about the same efficiency).

This efficiency is only part of the equation--you also have the low efficiency of the ICE to start with (though it'll be better than otherwise since it'll be running mostly at one speed, so you can just set it up to run at the speed it's best at, and gear it down or up to drive the motor/generator).

Then you have the converter you use to rectify the 3phase motor output to a pair of DC output wires, and regulate that charge to your battery.

You could use the existing ebike controller if it has a regen function, but then you will need to run the motor at a speed that generates the right charging voltage to start with (the controller doesn't regulate this). That might change the efficiency you're after.

It also doesn't limit current like a charger does, so if the current flow is higher than your battery can take, you'd want a circuit (even if that's you) that monitors the current and controls the generator speed to keep current within battery limits. Might as well have it monitor voltage too, so it can control speed by that to prevent overvoltage.


YOu could just use a set of diodes as a 3phase rectifier, then take that rough DC and put capacitors on it and run it right to the battery, but again you'll probably want something to monitor current/voltage and control motor speed. You'd need something to disconnect the phase wires from the controller and connect them to the rectifier.

Alternately you can use the motor to generate 115VAC using two phase wires, and use that to run your regular battery charger, as long as it will handle whatever waveform the motor puts out at the frequency it spins at (which will probably be a lot higher than the charger's input was designed for). Keep in mind the motor may spin roughly with a load on only two of the three phases (you'd have to test that). This would also need something to disconnect phase wires from controller and connnect to the charger.


There's probably other ways to do it, too, but that's what comes to mind in a couple minutes.




Some other thoughts:

unlike a dedicated generator you could run even while riding (depending on local laws), you'd have to stop and charge.

You could use a little RC outrunner instead of the existing DD hub as the generator. Might complicate the voltage/current output conversion, as to get the same power output it'd have to spin a lot faster, so either a lot higher voltage or needs a kV that gets you the same voltage.
 
Thanks for the response.

amberwolf said:
How efficient is the motor at a particular speed/voltage? (see the manufacturer for the curve chart, or experiment with it on the http://ebikes.ca/simulator if yours is listed there)

That will tell you that if you run it at a particular speed, then you'll get about that voltage out at about that efficiency, depending on the load you put on it (because in general a motor will work as a generator with about the same efficiency).


amberwolf said:
This efficiency is only part of the equation--you also have the low efficiency of the ICE to start with (though it'll be better than otherwise since it'll be running mostly at one speed, so you can just set it up to run at the speed it's best at, and gear it down or up to drive the motor/generator).

I can't change the efficiency of the gas motor; only seek (through gearing appropriately) to run it at its most efficient rpm.

amberwolf said:
Then you have the converter you use to rectify the 3phase motor output to a pair of DC output wires, and regulate that charge to your battery.

You could use the existing ebike controller if it has a regen function, but then you will need to run the motor at a speed that generates the right charging voltage to start with (the controller doesn't regulate this). That might change the efficiency you're after.

It also doesn't limit current like a charger does, so if the current flow is higher than your battery can take, you'd want a circuit (even if that's you) that monitors the current and controls the generator speed to keep current within battery limits. Might as well have it monitor voltage too, so it can control speed by that to prevent overvoltage.


YOu could just use a set of diodes as a 3phase rectifier, then take that rough DC and put capacitors on it and run it right to the battery, but again you'll probably want something to monitor current/voltage and control motor speed. You'd need something to disconnect the phase wires from the controller and connect them to the rectifier.

Alternately you can use the motor to generate 115VAC using two phase wires, and use that to run your regular battery charger, as long as it will handle whatever waveform the motor puts out at the frequency it spins at (which will probably be a lot higher than the charger's input was designed for). Keep in mind the motor may spin roughly with a load on only two of the three phases (you'd have to test that). This would also need something to disconnect phase wires from controller and connnect to the charger.

I must admit I thought that a suitable, regen capable controller would take care of rectification and current limiting; and a BMS would prevent overvolting. If that is not the case, it makes me wonder what is to stop regen from wrecking your batteries on a long descent?


amberwolf said:
Some other thoughts:

unlike a dedicated generator you could run even while riding (depending on local laws), you'd have to stop and charge.


I've no interest in having an RC motor howling whilst I'm riding :) This was purely a idea for extending range. Find a shop and buy some sarnies, ride somewhere away from people where the noise won't upset anyone, stick the bike on its stand and set the recharge going whilst I eat.

amberwolf said:
You could use a little RC outrunner instead of the existing DD hub as the generator. Might complicate the voltage/current output conversion, as to get the same power output it'd have to spin a lot faster, so either a lot higher voltage or needs a kV that gets you the same voltage.

I thought about that also; but I really liked the idea of using a 300g RC gas motor (+2kg of gas) to drive the existing hub motor for recharging.
 
Buk___ said:
I must admit I thought that a suitable, regen capable controller would take care of rectification and current limiting; and a BMS would prevent overvolting. If that is not the case, it makes me wonder what is to stop regen from wrecking your batteries on a long descent?
It depends on the equipment you have and how it's setup.



Remember that most of these things were designed with a specific intent and use-case in mind, and some of us fall outside their dotted lines. ;)

Most common ebike controllers were designed with the idea that regen would jsut be used a second or two here and there to slow down or stop, intermittently---not continuously for a long period.

Most common BMS's were designed with the idea that the charger is going to limit the current, and will be pre-set to output only the maximum voltage the battery would be charged to.

Using these in the way your system would (or a long descent under constant regen) is outside both of those design ideas, so what happens when used that way depends on how the design actually functions when put in this situation.





All a typical ebike controller does is limit current *input* to whatever it's maximum current is. If it's a 40A controller, then regen would probably not be limited until then either (assuming it limits it at all). If the battery wasn't meant to be charged at 40A, but the output voltage from the controller in regen mode is high enough relative to battery voltage to cause that high a current.... :/

Some of these are also going to limit the voltage they output (disabling regen when battery voltage is detected above that), but that's really only to protect the FETs/etc not the battery (protecting the battery might be a side benefit if the limit happens to be where you want it).

If it's not a typical contorller, and has more advanced settings / programming available, it may have separate regen current limits, maybe even programmable voltage limits. How it behaves when the limts are exceeded might be simple, or complex, and might also be programmable. It might just shut off regen once a limit is exceeded, either until power is cycled or until the brake is let off and reengaged, or until the motor comes to a complete stop and then after that work normally. Or it might limit current by PWMing the FETs to change the output voltage, etc. (same way it limits current to the motor).

You'd have to look into how your particular controller does it's thing.


As for the BMS--as long as it is a single-input type (same connector for charge and discharge) it should be able to cutoff regen current exactly as if it were a charger, once the HVC of a cell group is reached.

The problem is that if that happens, the load on the controller is completely removed (the battery is disconnected electrically), and regen voltage will effectively instantly shoot way up, possibly over the voltage the FETs (and other parts) in the controller were designed for, and that could damage or destroy them. Might not happen, but if the unloaded motor speed is high enough, it could.

Another problem with that is that there's suddenly no braking effect, either, so your long descent just got faster. :/



I've no interest in having an RC motor howling whilst I'm riding :) This was purely a idea for extending range. Find a shop and buy some sarnies, ride somewhere away from people where the noise won't upset anyone, stick the bike on its stand and set the recharge going whilst I eat.
Oh, I totally understand, just tossing out the idea. :)

Personally, if I wanted to hear a gas engine running, I'd never have gone electric in the first place. :p (gas engines are cheaper and so especially is the power source, and I am super-duper-low-budget)

For myself, if I was going to be somewhere I could buy something, they'd probably have an open outlet I could ask to borrow a few cents' worth of elecricity, and just carry an extension cord for my built in charger (this is how my SB Cruiser trike is setup, though I havent' had to use the feature yet).

But in my own case, if I were on a trip that needed extra range and I would not be able to use an outlet to get it, I'd just carry a regular generator, simply so I *could* keep going without stopping if I had to, and because I've got the cargo space/etc for it. Doesn't apply to most people. ;)
 
amberwolf said:
Buk___ said:
I must admit I thought that a suitable, regen capable controller would take care of rectification and current limiting; and a BMS would prevent overvolting. If that is not the case, it makes me wonder what is to stop regen from wrecking your batteries on a long descent?
It depends on the equipment you have and how it's setup.
...

Basically, my controller has a configuration for regen. A single number 1-5 where 1 is high energy recovery/weak breaking; and 5 is low energy recover/high breaking, so my assumption is that if I drive the wheel at an appropriate speed and apply the "EABS brake", the controller will take care of everything else. At least to the point where battery is fully charged, when I just stop.

The purpose of the OP was to try and find out what would likely constitute "an appropriate speed" to drive the motor for best generation.

I guess I'll have to start a new thread and choose my wording more carefully in order to get an answer to that :(
 
Buk___ said:
Basically, my controller has a configuration for regen. A single number 1-5 where 1 is high energy recovery/weak breaking; and 5 is low energy recover/high breaking, so my assumption is that if I drive the wheel at an appropriate speed and apply the "EABS brake", the controller will take care of everything else. At least to the point where battery is fully charged, when I just stop.
If you have "EABS" it is usually a different braking mode than regen.

Regen itself has at least two ways it works:

--simple way is the faster the motor spins the higher the voltage, but unless the motor is spinning fast enough to get a voltage higher than the battery's present voltage, no current flows and no braking happens.

--complex and more common way is the controller repeatedly "shorts" the motor windings to create pulses of much higher voltage to be able to cause current flow even at motor speeds which would not otherwise be able to do it, so it can brake down to much lower speeds. Some are better at this than others, and some are more efficient at it (the less efficient ones make the motor and controller hotter from the waste heat than the more efficient ones).


EABS is usually not regen, it actually takes power *from* the battery to actively attempt to stop the wheel by applying reverse rotation pulses to it. It's much more powerful braking, and can be done down to zero speed, but it doesnt' get any power back from the wheel (it actually uses it up).

I have EABS on the left wheel of the trike, and regen on the right, and when both are engaged at teh same time for braking, I see a net zero current on the CA with teh controllers I have now. I used to have a regen controller that was very weak regen, and I saw a net negative current, becuase the regen current into the battery was a lot less than the EABS current out of the battery.


So if your controller has modes to choose between regen or EABS, or a braking mode where it uses a combination of the techniques (which sounds more likely) in different amounts or in different parts of the speed curve, you'd have to test to see which one works best for your plan. Based on the info so far, I expect the lowest number mode would be the closest to plain regen, and get you the most back, and the highest number mode would get you the least back (or more likely actively use up power).


If you have a bidirectional wattmeter or current meter on the bike (like a Cycle Analyst) you can see whether it's that kind of EABS, or regen, and how much current your system will create at a certain speed and battery voltage. (if you have any kind of motor, even a second bike (ebike or not), you can use it to drive the motor wheel offground at a specific speed to test things with. A second bike you could put on a trainer stand so you can sit on that bike and pedal it if it's not an ebike, and setup your ebike so the motor wheel is friction-driven by the second bike.



The purpose of the OP was to try and find out what would likely constitute "an appropriate speed" to drive the motor for best generation.

I guess I'll have to start a new thread and choose my wording more carefully in order to get an answer to that :(
The answer to that depends on the specific motor--it's most efficient speed as a *motor* is the same as it's most efficient speed as a generator, for the same voltage and battery current (assuming the same phase current, which it might not be, even with the same controller).

I think I already posted it, but if your motor is listed in the http://ebikes.ca/simulator then you can setup a controller and battery similar to yours, and use the simulator to get motor curves, then those same ones would apply as a generator. (given the same conditions)
 
amberwolf said:
Buk___ said:
Basically, my controller has a configuration for regen. A single number 1-5 where 1 is high energy recovery/weak breaking; and 5 is low energy recover/high breaking, so my assumption is that if I drive the wheel at an appropriate speed and apply the "EABS brake", the controller will take care of everything else. At least to the point where battery is fully charged, when I just stop.
If you have "EABS" it is usually a different braking mode than regen.

Regen itself has at least two ways it works:

--simple way is the faster the motor spins the higher the voltage, but unless the motor is spinning fast enough to get a voltage higher than the battery's present voltage, no current flows and no braking happens.

--complex and more common way is the controller repeatedly "shorts" the motor windings to create pulses of much higher voltage to be able to cause current flow even at motor speeds which would not otherwise be able to do it, so it can brake down to much lower speeds. Some are better at this than others, and some are more efficient at it (the less efficient ones make the motor and controller hotter from the waste heat than the more efficient ones).


EABS is usually not regen, it actually takes power *from* the battery to actively attempt to stop the wheel by applying reverse rotation pulses to it. It's much more powerful braking, and can be done down to zero speed, but it doesnt' get any power back from the wheel (it actually uses it up).

I have EABS on the left wheel of the trike, and regen on the right, and when both are engaged at teh same time for braking, I see a net zero current on the CA with teh controllers I have now. I used to have a regen controller that was very weak regen, and I saw a net negative current, becuase the regen current into the battery was a lot less than the EABS current out of the battery.
Thanks. That is extremely informative. It clarifies much of the fuzziness in my understanding of regen. (I've also taken the liberty of passing it on to here where I think it may also help.


amberwolf said:
So if your controller has modes to choose between regen or EABS, or a braking mode where it uses a combination of the techniques (which sounds more likely) in different amounts or in different parts of the speed curve, you'd have to test to see which one works best for your plan. Based on the info so far, I expect the lowest number mode would be the closest to plain regen, and get you the most back, and the highest number mode would get you the least back (or more likely actively use up power).

If you have a bidirectional wattmeter or current meter on the bike (like a Cycle Analyst) you can see whether it's that kind of EABS, or regen, and how much current your system will create at a certain speed and battery voltage. (if you have any kind of motor, even a second bike (ebike or not), you can use it to drive the motor wheel offground at a specific speed to test things with. A second bike you could put on a trainer stand so you can sit on that bike and pedal it if it's not an ebike, and setup your ebike so the motor wheel is friction-driven by the second bike.

I will have to buy a wattmeter -- I was intending to anyway -- but now I will look for a "bidirectional" one also.
(Does this look okay?)
And I may buy 2 if I can work out how to insert one into the phase wires. Do you just monitor any pair of the 3 and assume the other two phases to be the same?

amberwolf said:
Buk___ said:
The purpose of the OP was to try and find out what would likely constitute "an appropriate speed" to drive the motor for best generation.

I guess I'll have to start a new thread and choose my wording more carefully in order to get an answer to that :(
The answer to that depends on the specific motor--it's most efficient speed as a *motor* is the same as it's most efficient speed as a generator, for the same voltage and battery current (assuming the same phase current, which it might not be, even with the same controller).

Okay. This is where I get confused about regen.

When you drive (control) the motor, you essentially supply a voltage, which implies a required speed, and the motor draws as much current as it can until it succeeds in matching that speed (BEMF==inputV), and then the current drops off to just that required to prevent the speed from falling.

When running as a generator (without active interference from a controller), it will produce whatever voltage is commensurate with its current speed, and if that voltage (rectified) is connected to the battery, and if the battery voltage is lower, then a current will flow.

But what current? And what (if anything) limits it?

Looking at it another way, if I drive the motor (wheel) at a given speed, and measure the OCV from the rectified output, it should be commensurate with the motor's kV; but as the circuit is open with no load, the effort required to spin the wheel will be negligible. Basically, just enough to overcome friction and cogging forces.

But once I put a load across it and current starts to flow, the force required to maintain the same rpm will increase commensurate with that load.

And (I think answering my own question; but please tell me if I'm wrong :) ), unless the controller does something to limit the current -- or I do something -- then the battery will draw as much current as the generator is capable of outputting so long as the gas motor can maintain the speed (voltage) above where the battery currently [sic] is.

amberwolf said:
I think I already posted it, but if your motor is listed in the http://ebikes.ca/simulator then you can setup a controller and battery similar to yours, and use the simulator to get motor curves, then those same ones would apply as a generator. (given the same conditions)

I don't want to say too much because I suspect that my previous comments in this area caused me to suffer a 1 week ban over christmas. Suffice it to say, I don't get on with that simulator.
 
Buk___ said:
(Does this look okay?)

According to it's specs, that one will require a separate power supply to run the meter itself (it doesnt' run off the power it's measuring). All the cheap ones I've seen don't measure bidirectionally, and/or they don't have their own built in power supply to run off the measured power. There might be some that do both, and they might've been posted around the forum, if you look around for "watt meter" or "wattmeter" posts. (sorry I don't know exactly what else to look for)

But you can use two non-bidirectional ones, in "inverse parallel", so one measures current delivered from battery to controller, and the other measures current delivered from controller to battery. I did that with a pair of Turnigy Watt Meters (which are unidirectional but run off the measured power) several years ago on DayGlo Avenger, before I got a Cycle Analyst (which is bidirectional and runs off the measured power).

And I may buy 2 if I can work out how to insert one into the phase wires. Do you just monitor any pair of the 3 and assume the other two phases to be the same?
The phase wire power is "AC" not DC so a wattmeter won't measure it like you want to. You can measure instantaneous current with a regular ammeter on AC but it also wont' be completley accurate (it's expecting a sinewave, which it won't get, and the current is not constant becuase the phases switch during rotation).

The wattmeters are generally only designed to measure DC. A bidirectional one could sort of measure an AC current, but it can't respond fast enough to do it for this purpose.

THat said, if you did have a way of measuring, then you can measure any two and the third should be the same as one of those two--two wires are used at a time to flow current thru the motor.

Generally these meters only measure battery current. (most controllers also only measure battery current--some of the more expensive ones measure phase current. There are DIY controllers here on ES like Lebowski's that also measure phase current).




Okay. This is where I get confused about regen.

When you drive (control) the motor, you essentially supply a voltage, which implies a required speed, and the motor draws as much current as it can until it succeeds in matching that speed (BEMF==inputV), and then the current drops off to just that required to prevent the speed from falling.

When running as a generator (without active interference from a controller), it will produce whatever voltage is commensurate with its current speed, and if that voltage (rectified) is connected to the battery, and if the battery voltage is lower, then a current will flow.

But what current? And what (if anything) limits it?
Without any controller/charger to limit it, then aside from wire and connection resistance, only the resistance of the cells (Ri) limits it, and that changes with SoC (state of charge). The higher the supplied (open-circuit) voltage vs teh pack voltage, then the higher the current will be, based on that resistance.

The actual current will depend on the difference in voltage and the resistance of the circuit, all of which changes the whole time, just to make it complicated. ;)

Looking at it another way, if I drive the motor (wheel) at a given speed, and measure the OCV from the rectified output, it should be commensurate with the motor's kV; but as the circuit is open with no load, the effort required to spin the wheel will be negligible. Basically, just enough to overcome friction and cogging forces.

But once I put a load across it and current starts to flow, the force required to maintain the same rpm will increase commensurate with that load.

And (I think answering my own question; but please tell me if I'm wrong :) ), unless the controller does something to limit the current -- or I do something -- then the battery will draw as much current as the generator is capable of outputting so long as the gas motor can maintain the speed (voltage) above where the battery currently [sic] is.
Yes, depending on the cell resistance.

That's why unless you have a really good pack that is designed for high charging rates, you need to limit the charging current.

It won't realy matter for short bursts, like brakign regen usually gives, but it'll make a huge difference if the pack is charged continuously at higher than spec'd currents, especially if they're a lot higher.



I don't want to say too much because I suspect that my previous comments in this area caused me to suffer a 1 week ban over christmas. Suffice it to say, I don't get on with that simulator.
OK, well, it's the only tool I know of that would show you what you're after. You could try contacting Grin support and see if they can help you out with it, if you're having problems with it. (or just trouble understanding it). I'm terrible at explaining it, so I can't really help with that part.

But it sounds like you already understand enough of motors/generators to get the idea without the simulator. :)


As for a ban, you should ask a moderator
https://endless-sphere.com/forums/memberlist.php?mode=team
why--if they don't tell you then you can't avoid whatever it was that caused it, especially if it was an unintentional offense. ;)
 
amberwolf said:

Thanks AW; much food for thought there.

I have a 30A full bridge rectifier somewhere in my "maybe useful someday" box of bits. If I wired that in front of the cheap wattmeter I could strap an led across the input to tell me which direction. And a cheap buck converter could supply power.

Of course what I really want is a unit that will not only measure, but also log and accumulate. Pretty much what the CA does I suppose; and I might be tempted if I didn't have to shell out again to purchase the logging ability.

At this point I'm more tempted by the idea of connecting a precision shunt to a 16bit ADC and Raspberry PI. That'd give me all the logging I would ever need and the ability to attach different sensors to the ADC for measuring other stuff also.

The idea of instrumenting the phase wires was to allow me to try and work out exactly what the mysterious C13 setting on my controller is actually doing. Is it just as casainho thinks, just a limit to the number of amps the controller will feed back to the battery; or as I guess -- based on your description above -- also a way of telling the controller to feed some reverse current to the motor to increase the braking affect.

If I could measure both sides of the controller at the same time whilst varying the C13 setting, it would probably allow me to put that question to bed; but it would definitely need high frequency sampling and logging -- and possible synching with the hall signals -- to make that determination, and I'm not really that fired up about it to go through the required learning curve to do so.

My original (probably woolly) thinking was "work out what speed and power is needed to spin the wheel to generate a 1C charging current" and then find a small RC gas motor, attach a suitably sized mandrel, and fix it to a rotating rack stand with a big spring. Set in motion and eat lunch. Simple :)

I hadn't considered the complication of the black box that is the controller.

The alternative is that I get a 3-phase rectifier chip, some caps (and maybe a coil?) and some kind of current limiting circuit and bypass the controller; probably feeding the power back to the battery via the charging connection.

But since I know just enough about electronics to be dangerous; have no idea what that "current limiting circuit" would entail; and have never worked with high current DC; I'll save my rainy day notions for another rainy day :)

I definitely want a more accurate way of measuring the SoC of my battery. The 5 step battery level on my LCD-3 display reaches empty when the battery pack is still at 36 or 37V, which is just plain annoying.

I really like the idea of monitoring and tracking the Wh put in and taken out over the long term; and I have a couple of rpis lying around from old (non-ebike) projects that I could repurpose, and I've seen some (less) cheap wattmeters that have a remote BT connected shunt that I could probably reverse engineer the BT protocol easily enough. Since I'm more comfortable with programming than I am circuit design, that is something I could take on without needing to be hand-held through each step.

Thanks for your feedback.
 
Buk___ said:
I have a 30A full bridge rectifier somewhere in my "maybe useful someday" box of bits. If I wired that in front of the cheap wattmeter I could strap an led across the input to tell me which direction. And a cheap buck converter could supply power.

You can test this to verify, but since the current has to pass thru the meter shunt unchanged to get to the motor and do it's work (or back from the motor to the controller to charge the battery), you can't use the rectifier because it diverts the current and alters it; it doesn't let it do the work it needs to in the form it started as.




Of course what I really want is a unit that will not only measure, but also log and accumulate. Pretty much what the CA does I suppose; and I might be tempted if I didn't have to shell out again to purchase the logging ability.

Well, the CA does total up the Ah, Wh, A, min volts, etc. and remember these things even when power is lost. It also has a serial output to send the moment-by-moment readings to anything that reads and logs serial data (laptop, arduino, PIC, etc), then you can do whatever you want with that data later.

I don't know of any of the cheap meters that do any of those things. Some of the cheap ones that are powered separately won't lose the data when you turn the bike off as long as the power to the meter is left on, but I haven't seen one that remembers it's data with no power at all (like the CA does).


At this point I'm more tempted by the idea of connecting a precision shunt to a 16bit ADC and Raspberry PI. That'd give me all the logging I would ever need and the ability to attach different sensors to the ADC for measuring other stuff also.

It would; might be a bit of work to get it all working glitch-free. :)


The idea of instrumenting the phase wires was to allow me to try and work out exactly what the mysterious C13 setting on my controller is actually doing. Is it just as casainho thinks, just a limit to the number of amps the controller will feed back to the battery; or as I guess -- based on your description above -- also a way of telling the controller to feed some reverse current to the motor to increase the braking affect.
An oscilloscope could show you the phase waveforms (a 3+ channel would be best so you can monitor all three at once, but a 2-channel lets you monitor two phases which is the same as what most of the phase-current-sensing controllers would do anyway), which would probably be more useful than current measurements, just because you can instantly visually see what's happening. (though I cant' at the moment remember how you'd set it up to always trigger the display sync so you could easily see which way current was flowing, based on the positive / negative voltages shown).

However, one way to distinguish the two kinds of braking is that the regen can't, by it's nature, go down to zero speed, and it's braking force will diminish as speed drops.

The "EABS" active braking *can* go down to zero speed, and actually hold the wheel against rotation at a stop, and it's braking force does not (or at least should not) diminish as speed drops--it could in fact become greater (because it does not have the mtoor's BEMF to fight against).

A simple test with the wheel off ground (bike upside down, for instance) can distinguish between the two modes. Hold the ebrake lever engaged, then attempt to hand-spin the wheel. If it feels like it is cogging/resisting even when very slowly spinning it, you have active braking. If you have to spin it fairly fast to feel resistance, you probably only have regen braking (or a crippled version of EABS).

The same test on-road may not give noticeable results, because the controller's low-speed or zero-speed braking might be intentionally limited to prevent battery wastage at a stop, if you were holding the ebrake lever even though you have your feet on the ground there'd be no need for the motor to hold the bike still. So the weight of you and the bike against the rolling resistance it does have might still easily roll the wheel, whereas just your hand on the wheel off-ground is a lot less force and might not roll it at all.


There are tricks (FETs shorting the windings momentarily during a cycle, to get the flyback effect, for instance) a controller can use with just regen to make it happen at lower speeds, but there's just not enough current flow or voltage at really low speeds to make those tricks work with just regen. And at zero speed it doesn't work at all, so the zero-speed offground test should easily distinguish between the modes.

The shorting the windings trick *can* be used to get some resistance at zero speed, but it means the energy is wasted, so there won't be any current back to the battery.

The same is true of the EABS modes; if you get charging current from controller battery connection back to the battery, then it's using regen, and not EABS, at the moment that current shows up.

But you need an ammeter or wattmeter to see that; your existing system doesn't read current flow from controller to battery (only the other way round) with no way to reverse it (short of hacking into the controller guts).

The offground handspin-wheel test needs no instrumentation. ;)

My original (probably woolly) thinking was "work out what speed and power is needed to spin the wheel to generate a 1C charging current" and then find a small RC gas motor, attach a suitably sized mandrel, and fix it to a rotating rack stand with a big spring. Set in motion and eat lunch. Simple :)

I hadn't considered the complication of the black box that is the controller.
It's really annoying when stuff like that gets in the way of something that ought to be really simple. ;)



The alternative is that I get a 3-phase rectifier chip, some caps (and maybe a coil?) and some kind of current limiting circuit and bypass the controller; probably feeding the power back to the battery via the charging connection.

But since I know just enough about electronics to be dangerous; have no idea what that "current limiting circuit" would entail; and have never worked with high current DC; I'll save my rainy day notions for another rainy day :)
Basically what current limiting does is sense the current via a shunt, and then it begins lowering the voltage as current gets too high, so that the voltage difference between the charger output and the battery are low enough at the resistance the battery is at at that moment, that the current drops to the level the limiter is set at. It increases voltage if the current drops too low, up to whatever the max voltage the system is limited to (so you don't overcharge either).

Chargers do this via PWMing FETs just like motor control, etc., by chopping the voltage into pulses that *average* the voltage you want to get the current you want (and then smooth that with capacitors/inductors), but you could do it with a throttle control on the RC ICE driving the motor, since the faster the motor spins the higher the voltage, and vice-versa. Have the current sensor drive an RC servomotor based on the current limit.

To do it via PWM you'd have to build a FET circuit, etc., and that's more complicated (if things go wrong FETs blow up and if they just short then there's no current limiting at all).

Alternately, you can simply run the battery down to it's empty state, setup the RC charging system so it's max throttle spins the motor/generator just fast enough to be the highest voltage the pack can take, then manually monitor battery charge current and manually lower the throttle on the RC ICE so that current is at a safe level for that battery--then leave it that way. The current will drop continuously as the battery becomes charged, so it will take significantly longer for it to charge, but at least it is simple and it will limit the current to a safe level for the pack. Then you just lock the throttle to that setting, and always use that. Leave the current monitoring (wattmeter/etc) in the circuit so you can always manually check and be sure it's not overdoing it. ;)
 
Rberger just posted this
https://endless-sphere.com/forums/viewtopic.php?f=2&t=92367
for raspberry pi logging software for the CA (and the phaserunner but that doesn't apply to your project).
 
amberwolf said:
Rberger just posted this
https://endless-sphere.com/forums/viewtopic.php?f=2&t=92367
for raspberry pi logging software for the CA (and the phaserunner but that doesn't apply to your project).

I think I may have found my meter.

If I'm interpreting the (extensive but rather repetitive) description correctly, it is bi-directional, has power-off memory, uses bluetooth between the shunt module and the display head, and has a USB port for downloading data. All for <$22

The display also supports multiple shunt modules which could be useful for multiple batteries if you can buy the shunts separately.

(I'm still digesting your previous post.)
 
The only issue I see with that one is that it still appears to require a separate 12v external power supply to run the base unit itself, independent from the power it's measuring.

The good news is it's easy to get 12vdc output DC-DC units, with various ranges of input (which would hook up to your battery just like the controller does), to provide that power.

The display unit needs a power supply as well; it says 10-30VDC, so it can probably run off the same 12Vdc as the above. It also seems to say that it will instead run off 5VDC via the USB port, but AFAICT it is saying that's only if you're not using the USB for data (plugging into USB power adapter, like a USB charger).



Note that it does say it's sample rate is only 5 times per second, which is way too low to correctly measure motor/generator phase currents, but it'll measure battery current just fine.
 
amberwolf said:
The only issue I see with that one is that it still appears to require a separate 12v external power supply to run the base unit itself, independent from the power it's measuring.

The good news is it's easy to get 12vdc output DC-DC units, with various ranges of input (which would hook up to your battery just like the controller does), to provide that power.

Indeed. I've found a 5v-50v input - 1.2-36V output buck converter for £2.38. There's probably cheaper, but I'm going to build a 48V pack and I'd like to attach a second base unit for that; and over 30V input are rarer.

amberwolf said:
The display unit needs a power supply as well; it says 10-30VDC, so it can probably run off the same 12Vdc as the above. It also seems to say that it will instead run off 5VDC via the USB port, but AFAICT it is saying that's only if you're not using the USB for data (plugging into USB power adapter, like a USB charger).

Indeed. I intend to attach the display unit to the same bracket as my current display, so I can take a supply from that.

amberwolf said:
Note that it does say it's sample rate is only 5 times per second, which is way too low to correctly measure motor/generator phase currents, but it'll measure battery current just fine.

Given your insight to detecting EABS manually above, I'm no longer thinking about measuring the phase wires. That combined with being able to measure and accumulate regen current at the battery means I should be able to work out what's going on with the C13 setting without looking at the phase wires.

The only complication I see at this point is that my pack uses different set of wires for charging than discharging, which means I will need to break out a plug at both ends of the pack and swap the meter end to end each cycle. I know many BMSs have separate charge/discharge connections, and I think I read somewhere that they offer different forms of protection, but I can't remember where or what they were?

I know it's a pain. My pack is in a hardcase and I'd have to take off both ends each time to switch the shunt unit around :(

I guess I can extend the cable from the charge end take it to the discharge end and back and if I get creative with the XT60 connectors and panel mounts, I'd need to have a patch board with 6 connectors and swap two patch leads twice each charge/discharge cycle; which isn't easy and would likely wear them out pretty fast. Hm. Better dig out my thinking head.
 
Buk___ said:
The only complication I see at this point is that my pack uses different set of wires for charging than discharging, which means I will need to break out a plug at both ends of the pack and swap the meter end to end each cycle. I know many BMSs have separate charge/discharge connections, and I think I read somewhere that they offer different forms of protection, but I can't remember where or what they were?

Basically, when there are separate connectors, the LVC only shuts off the discharge. HVC only shuts off the charge.

When there's only one connector, either one shuts off the whole thing, depending on the design; usually it's back to back FETs, so when it shuts off the body diodes oppose current from both directions. Probably that the LVC still only shuts off discharge, leaving the charge FETs on, and HVC only shuts off the charge FETs, but I'm not sure (I don't have one of that type to test).

There are some BMSs that have the option to be wired either way, like the one here:
https://endless-sphere.com/forums/viewtopic.php?f=14&t=91452&start=25#p1350358

If you're lucky, yours might also have independent D- and C- pads (though they might not be labelled, that, they probably are).





My pack is in a hardcase and I'd have to take off both ends each time to switch the shunt unit around :(

WIth separate C/D connectors, then the regen/charging and running the bike/discharging would only be thru a pack-protected input if you swapped the controller's battery connection between those two each time you wanted to do each one. :(


I'm not sure why you'd need to open up the pack though. Doesn't it already have a charger port? You could make an adapter from that port to your shunt cable.

You *would* need to put a pair of connectors into the cable between the battery and the controller though, so you can disconnect them and then plug the shunt in between them (for discharge monitoring).

Then unplug the battery end of that and plug it into the adapter taht goes to the charge port.

But if there's room in the pack case, you could put a switch mounted on/in it (DPDT, or DP3T-center-off) that's rated for at least the maximum DC currents the system will see. Wire one pair of contacts to the charge port, and one to the discharge port, inside the battery. Wire the common contacts to one end of the shunt. Wire the other end of the shunt to the controller.

Then you only have to flip a switch to go from charge to discharge.

If you use the "center-off" type of switch, then you have a complete disconnect mode, where the battery is not connected to anything at all, if you happen to need that.

If you want to still charge from the regular charger plugged into the wall, you can--it just won't be monitored by the meter. You can fix that by putting a new charge port on teh controller end of the shunt.
 
amberwolf said:
If you're lucky, yours might also have independent D- and C- pads (though they might not be labelled, that, they probably are).

It has B- C- and P- only. (If you scroll down this page, it has some hi res images and a connection diagram for my exact model of bms.)

amberwolf said:
I'm not sure why you'd need to open up the pack though. Doesn't it already have a charger port? You could make an adapter from that port to your shunt cable.
Okay. There are XT60s on both end of the battery (internally) but a round center pin & shield plug for charging (and a rear light and LED meter) at one end; and a 4-blade slide connector (to be replaced by an XT60) and lock/switch at the other end.

It is/was my intention to wire the shunt unit and buck converter (semi) permanently inside the hardcase, with just an external mounted switch in the +ve line from the pack to the buck converter so I could power it and the BT sender off completely when the battery is standing idle to save drain. (The BMS seems to drain fast enough on its own.)

But I want to do it with plugs rather then soldering, and in such a way as to allow the shunt to be unplugged and removed and leaving the battery usable. Then I realised the two pairs of wires problem. They are both XT60s on the pack, but only accessible from opposite ends of the hardcase -- which is an aluminium tube -- by removing the respective end caps.

The charging end:P1100153-(800x533).JPG

The controller end:P1100154(800x533).JPG

As you can see, there is ample space in which to fit the buck converter and BT shunt module, but I need to devise a way of switching between the two sets of 4 wires, so as to insert it into both places: BatConnectors.jpg

I haven't found a source of the shunt module without the display, so using two isn't an option at the moment without doubling the cost.

As the +ve is common to both ends, I could save switching one wire, but only by sacrificing easy, unplug and go, removal of the shunt/buck module.

I think I would need a quadpole-double or triple throw, 30A capable switch, and I'm guessing without having looked that they are as rare a rocking horse do-do and probably twice the price of a CA3 :)

(BTW: You got mail!)
 
Buk___ said:
As the +ve is common to both ends, I could save switching one wire, but only by sacrificing easy, unplug and go, removal of the shunt/buck module.

I think I would need a quadpole-double or triple throw, 30A capable switch, and I'm guessing without having looked that they are as rare a rocking horse do-do and probably twice the price of a CA3 :)
That kind of switch probably isn't rare or expensive, but it will be getting on the large side. I have a 3P3T (used as 3PDT-center-off) 30A on SB Cruiser's headlight, and it's something more than 1.5 cubic inches, not including the toggle that sticks out. A 4P would probably be the same in two dimensions, and maybe 2" (or a bit more) in the width.

Alternately you can use two DP3T switches, if you can securely gang their toggles together so they switch at the same time. I wouldn't use a DPDT for this (unless it has a center-off) because if the ganging failed to switch at the same time you could get a short depending on the wiring. With a center-off (or 3rd throw in the center you don't use) there's no short from a small timing difference.

If you really want to switch all of the shunt wires, then yes, you'd need a 4P switch, but except for completely disconnecting the shunt (which I am unsure of the need for), there's no need to do that, since the meter is bidirectional.

For measurement purposes, you only need to switch whether the "input" end (your choice of which one that is) of the shunt is connected to the battery's charge port or it's discharge port (the "output" end would remain connected to the controller's battery connector).

If the switch has a "center off" position then that's sufficient to leave it disconnected from the battery, to prevent any drainage.


Alternately, you could mount the internal battery connectors to a hole in the side of the case so they are exposed to the outside, and build two "blocks" of connectors with jumper wires between different pins, and use one block for charging, the other for discharging. Leave the blocks off entirely for complete disconnection (also makes a decent security key, since without the discharge block in place, the battery is not connected to anything and can't run the bike). I don't know how easy it would be with the connectors you have now, but there are various panel-mount connectors that would make that easy (including some of the Andersons); they may make panel-mount versions of your connectors if you look around.



I have no idea what's going on in the other thread; you'd have to ask the people replying.
 
amberwolf said:
Buk___ said:
As the +ve is common to both ends, I could save switching one wire, but only by sacrificing easy, unplug and go, removal of the shunt/buck module.

I think I would need a quadpole-double or triple throw, 30A capable switch, and I'm guessing without having looked that they are as rare a rocking horse do-do and probably twice the price of a CA3 :)
That kind of switch probably isn't rare or expensive

I did find some 4pole double throw on-off-on switches on amazon US, but they don't ship over here and I found nothing similar on amazon UK. I try AliEx and Ebay Uk next.

The other problem is whilst they were 30A rated, it was at 12VDC (or 120/240VAC) which means I'd be pushing my luck with 36VDC; much less 48VDC

amberwolf said:
Alternately, you could mount the internal battery connectors to a hole in the side of the case so they are exposed to the outside, and build two "blocks" of connectors with jumper wires between different pins, and use one block for charging, the other for discharging. Leave the blocks off entirely for complete disconnection (also makes a decent security key, since without the discharge block in place, the battery is not connected to anything and can't run the bike). I don't know how easy it would be with the connectors you have now, but there are various panel-mount connectors that would make that easy (including some of the Andersons); they may make panel-mount versions of your connectors if you look around.

That's kind what I was trying to describe a few posts ago. And whilst I have 10 XT60 sets, and I found some alu clamp block to convert them to panel mount; they are bitches to pull apart and I wonder how long they would last constantly being undone/redone.

Andersons are great, but damn they are big. And I'd need 8 sets and I've being trying for discrete :)

All in all, I think I'm coming around to your earlier suggestion for simply swapping the shunt end to end. It'd mean cutting the plug off the charger and replacing it with an XT60 (NP) and breaking out the XT60 on the charging end of the hardcase bypassing the pin&sheild connector, which is a bit more work.

I think I'll defer further thought, until the bits arrive via slow boat, and then decide.

Thanks a bunch for all your help!
 
amberwolf said:

I found a 4-pole on-off-on switch in the UK at a very low price.

Its rated 12VDC @ 20A which definitely wouldn't be enough if it was switched with the current flowing, but if it was only switched after disconnecting from the controller, and before connecting to the charger, and vice versa, would you risk it for 36VDC @25A?
 
Buk___ said:
The other problem is whilst they were 30A rated, it was at 12VDC (or 120/240VAC) which means I'd be pushing my luck with 36VDC; much less 48VDC
Since you're not switching under load, it wouldn't matter. The DC rating is basically a gap size to ensure that any arc occurring during switching under load gets extinguished. As long as no (significant) current is flowing when you switch, there's no arc.

If you wanted to use it for a few hundred volts, that'd be a whole other story. ;)

The only potential issue is the charging of the capacitors in the controller when switching to "on" for either battery connection--but if it turned out to be a problem, this is easily solved with a precharge resistor and a momentary switch that you'd press for a few seconds prior to flipping the switch on.

FWIW, I'm using a 12v battery cutoff switch for my 14s "52v" pack on my trike, and it has to feed the caps on two controllers when switched on--it's still doing fine after something like a year or two of use as a main power switch, turning it on and off at least twice a day 5-7 days a week. I don't recall what it's rated for current-wise, but I'm also pulling over 100A thru it at peak every time I accelerate from a stop. (but it is never switched under load).



That's kind what I was trying to describe a few posts ago. And whilst I have 10 XT60 sets, and I found some alu clamp block to convert them to panel mount; they are bitches to pull apart and I wonder how long they would last constantly being undone/redone.

Andersons are great, but damn they are big. And I'd need 8 sets and I've being trying for discrete :)

Yeah, they are big for their current capacity, because all their contact area is on the flat surface, where the XTs it's the whole tubular surface.

But that's also why the XTs are hard to pull apart, vs the andersons. (anderson PPs also have two different contact types; one has lower retention force tahn the other, so is easier to pull apart--I prefer the ones with higher force so things can't accidentally come unplugged.)

Andersons have one sometimes big disadvantage: the wire and contact must "float" inside the shell. If they don't (like with really thick wire gauges, or stiff wires bent tightly), the contacts can't self-align correctly, and end up with high contact resistance, which heats them and melts the shells. :(





All in all, I think I'm coming around to your earlier suggestion for simply swapping the shunt end to end. It'd mean cutting the plug off the charger and replacing it with an XT60 (NP) and breaking out the XT60 on the charging end of the hardcase bypassing the pin&sheild connector, which is a bit more work.
You mean basically just doing the job of the switch manually? Yeah, it's simplest to wire, though a bit more complex to do each time.



Thanks a bunch for all your help!

You're welcome. :)

I like helping, though Im' not always able to.

BTW, I noticed your post in the other thread about being in the airline industry. I used to do final test/troubleshooting on some of the avionics/displays for Honeywell CFSG back in the late 80s/early 90s, till their layoffs. Once, we had the "funeral procession" as we called it, come thru with a cart full of stuff out of a crashed plane to be analyzed where it was built, in an area near where I worked in the plant. What I learned (second hand) about it got me interested in failure analysis, which I learned more about while still there. SInce then I've followed the various shows about crashes and analysis of what might have caused them, and learned even more. (though I am probably not even a layman in my level of knowledge so far).
 
Buk___ said:
I found a 4-pole on-off-on switch in the UK at a very low price.
That's a double-pole, so you'd have to gang two of them to siwtch at the same time to get 4 poles, if you really need to switch all teh shunt's wires for your purposes.

But just one will work to switch the shunt input side from the charge to the discharge side of teh battery (you only need to switch two wires between two positions).

FWIW it looks pretty much like the 3P3T I'm using on teh trike for the headlight. :) (highbeam, off, lowbeam; only needs 2P but the 3P is what I had so I used it)


Its rated 12VDC @ 20A which definitely wouldn't be enough if it was switched with the current flowing, but if it was only switched after disconnecting from the controller, and before connecting to the charger, and vice versa, would you risk it for 36VDC @25A?
It'd probalby work fine for the voltage.

It'll get warmer than normal when the higher current is flowing, but would probably work fine since you won't be using that much current all the time, just at max load on the motor (which will probably only happen during acceleration from a stop).
 
amberwolf said:
Buk___ said:
I found a 4-pole on-off-on switch in the UK at a very low price.
That's a double-pole,

Damn! Musta misread it, or posted the wrong link. This one should work if only switched when no flow.


amberwolf said:
Its rated 12VDC @ 20A which definitely wouldn't be enough if it was switched with the current flowing, but if it was only switched after disconnecting from the controller, and before connecting to the charger, and vice versa, would you risk it for 36VDC @25A?
It'd probalby work fine for the voltage.

It'll get warmer than normal when the higher current is flowing, but would probably work fine since you won't be using that much current all the time, just at max load on the motor (which will probably only happen during acceleration from a stop).

Cool. I thought that was the case.
 
amberwolf said:
Buk___ said:
The other problem is whilst they were 30A rated, it was at 12VDC (or 120/240VAC) which means I'd be pushing my luck with 36VDC; much less 48VDC
Since you're not switching under load, it wouldn't matter. ...

Great. Means I can get away with something smaller (&cheaper).

amberwolf said:
But that's also why the XTs are hard to pull apart, vs the andersons.

The xt60s in my pack have a sort of clip-on extension on the back. They look pretty flimsy, but actually do make them much easier to pull apart. I found some on AliEx

I'll probably buy some.

amberwolf said:
Andersons have one sometimes big disadvantage: the wire and contact must "float" inside the shell. If they don't (like with really thick wire gauges, or stiff wires bent tightly), the contacts can't self-align correctly, and end up with high contact resistance, which heats them and melts the shells. :(

I didn't realise that. Useful to know if I ever need something that robust.

amberwolf said:
You mean basically just doing the job of the switch manually? Yeah, it's simplest to wire, though a bit more complex to do each time.

Yes, manual; but I haven't given up on an external switch with everything else hidden yet :)

amberwolf said:
BTW, I noticed your post in the other thread about being in the airline industry. I used to do final test/troubleshooting on some of the avionics/displays for Honeywell CFSG back in the late 80s/early 90s, till their layoffs. Once, we had the "funeral procession" as we called it, come thru with a cart full of stuff out of a crashed plane to be analyzed where it was built, in an area near where I worked in the plant. What I learned (second hand) about it got me interested in failure analysis, which I learned more about while still there. SInce then I've followed the various shows about crashes and analysis of what might have caused them, and learned even more. (though I am probably not even a layman in my level of knowledge so far).

I was only contracting at KLM for just over a year; I was working as a software engineer specializing in CNC Database software by then. We were setting up a database of CNC designs for small, non-critical parts (seat mounts and similar) that a warehouseman could select and direct to a bank of 4 small 5-axis CNC routers. KLM were trialling it to reduce the amount of stock parts they need to warehouse for their fleet. The in-the-green visit was reward for working a very long weekend -- 60+ hours -- straight through to dig them out of the crap. And very interesting to me as a, by then, ex-mecheng.

But I started my working life as a MechEng apprentice in a car factory. During that we got to spend time in lots of different depts. One of the most interesting was the plant design office. I was there during the mid to late 70's when the British car industry was going through continuous militant left-wing led strike action. Between designing new track for new vehicles, they were charged with redesigning anything that failed on the existing ones.

That's were I first learnt the lesson about Al. They had these huge spotweld guns -- 200kg some of them -- that needed to not only be manipulated into awkward positions by a single (human) operator, but also be able to move steadily along the track as the bodies crept by. That entails having huge circular spring counter-balances hanging from a overhead track.

Some of the bigger guns had parts (handles, balance arms and such) made from Al to get the weight of the total assembly within the limits of the biggest counter balances, but the operators discovered that if they waited until the very last second before pulling the trigger on the last weld for that gun on a body, the weld jaws would grip, the body would lurch forward, and the balance cable would be full extended, with the inevitable consequence that the Al balance arm would bend or often snap. Then the track would stop and all the workers would get a paid afternoon off while it was repaired.

We tried doubling the thickness of the balance beams, which worked for a while, but didn't stop them trying; and after enough -- a couple of months of 2 shifts, 5 days a week at 45 cars an hour, the Al beam would eventually snap. We eventually fixed it by using a standard, overspecified and heavy steel balance beam and clawing the weight back down by drill lightening holes in the huge cast bronze spot-weld jaws.

So then the operators had to go back to spitting on the bodies and spot welding through it to get the tips to arc and wear. Dressing or exchanging the tips only took a maint-man a minute or two, but it would sometimes take 15 for him to arrive. 15 minutes of taking it easy. It is amazing how devious and inventive guys can get when they have 47s seconds of work every 1min20 for 527 mins a shift. :)

The Al lesson has been reinforced over and over through my career.

I find failure analysis fascinating even now ,a long time after I stopped doing it for a living. Give me a good documentary or incident report on a plane, train or automobile crash or recall, (or bridge or washing machine or spacecraft) over the celebrity gossip or reality TV any day :)
 
Back
Top