rhitee05
10 kW
As promised in the "Sacrificial Current Limiter" thread, here's a new thread to discuss the idea further.
It took a little thinking to figure out the best way to accomplish this with nothing but a few op-amps, but I figured it out. The idea here is to make a simple but effective all-analog circuit. So, there will be no fancy features you could do with a uP, but it should be dead-simple and reliable. The original idea was simple to sense and limit current, but it's not much harder to go ahead and implement throttle-based control. And since I'm already doing the throttle and this is intended for an ESC, I figured I might as well include the servo tester function as well. The result will be a box which takes the throttle input, measures phase current, and commands the ESC accordingly.
Here's the basic concept:
This box will act as an add-on to a standard RC ESC. Two Allegro hall-effect current sensors will measure current on two of the motor phase wires (the third is not needed). I will use the bi-directional sensors and not the unidirectional one that RonZ used. By measuring positive and negative current on two of three phases, we know all phase currents in all commutation states. This avoids the zero-speed issues RonZ had.
The tricky part was signal conditioning for the hall-sensors. The bidirectional sensors use Vcc/2 as the zero-current point, so 2.5V here. Voltages lower than 2.5A indicate negative currents, voltages higher indicate positive currents. The sensors are scaled so that 0.5-4.5V is the full range. The circuit I designed basically acts as a full-wave rectifier, except that it has to take the 2.5V offset into account, and then does basically a max() function. The conditioned signal is max(abs(Ia), abs(Ib)). I can avoid worrying about phase C altogether since these controllers only do block commutation - for a sinusoidal controller I'd have to do a little more math to calculate Ic and include it in the max() function.
The output of the signal conditioning is the magnitude of the phase current. Using the throttle input and a difference amplifier it then calculates the error signal. We have to provide adjustments here for throttle offset and max current command. The error signal is used to drive the servo tester which generates a pulse train for the ESC. Two more adjustments here set the min and max pulse widths to get full throttle range. I will also provide a hard current limit adjustment, which will cut in to the control loop and force the throttle down if the control overshoots.
I have a concept together for all this and most of it has been verified in SPICE. I just need to spend a bit of time putting a finished schematic together that I can post later.
A few questions:
- How fast can most ESCs accept the servo pulses? I set up the 555 right now to put out pulses at about 50 Hz which is pretty standard, but I'd like to make it faster to improve the loop response time. How fast can I go? 200 Hz? 250 Hz?
- Any other simple feature requests? My inclination is to keep it basic, but some functionality could be added if people think it'd be useful. Some quick thoughts I had for things that could be done:
- "Turbo" button which increases throttle gain while held
- Could provide 0-5V throttle output for interface to e-bike controllers
- Blinky LED indicators for various things
- ???
Miles said:I'm a bit surprised that no one has yet followed the example set by RonZ and produced a phase current limiter for RC ESCs, using one of the Allegro sensors, to act via the servo tester control.
It took a little thinking to figure out the best way to accomplish this with nothing but a few op-amps, but I figured it out. The idea here is to make a simple but effective all-analog circuit. So, there will be no fancy features you could do with a uP, but it should be dead-simple and reliable. The original idea was simple to sense and limit current, but it's not much harder to go ahead and implement throttle-based control. And since I'm already doing the throttle and this is intended for an ESC, I figured I might as well include the servo tester function as well. The result will be a box which takes the throttle input, measures phase current, and commands the ESC accordingly.
Here's the basic concept:
This box will act as an add-on to a standard RC ESC. Two Allegro hall-effect current sensors will measure current on two of the motor phase wires (the third is not needed). I will use the bi-directional sensors and not the unidirectional one that RonZ used. By measuring positive and negative current on two of three phases, we know all phase currents in all commutation states. This avoids the zero-speed issues RonZ had.
The tricky part was signal conditioning for the hall-sensors. The bidirectional sensors use Vcc/2 as the zero-current point, so 2.5V here. Voltages lower than 2.5A indicate negative currents, voltages higher indicate positive currents. The sensors are scaled so that 0.5-4.5V is the full range. The circuit I designed basically acts as a full-wave rectifier, except that it has to take the 2.5V offset into account, and then does basically a max() function. The conditioned signal is max(abs(Ia), abs(Ib)). I can avoid worrying about phase C altogether since these controllers only do block commutation - for a sinusoidal controller I'd have to do a little more math to calculate Ic and include it in the max() function.
The output of the signal conditioning is the magnitude of the phase current. Using the throttle input and a difference amplifier it then calculates the error signal. We have to provide adjustments here for throttle offset and max current command. The error signal is used to drive the servo tester which generates a pulse train for the ESC. Two more adjustments here set the min and max pulse widths to get full throttle range. I will also provide a hard current limit adjustment, which will cut in to the control loop and force the throttle down if the control overshoots.
I have a concept together for all this and most of it has been verified in SPICE. I just need to spend a bit of time putting a finished schematic together that I can post later.
A few questions:
- How fast can most ESCs accept the servo pulses? I set up the 555 right now to put out pulses at about 50 Hz which is pretty standard, but I'd like to make it faster to improve the loop response time. How fast can I go? 200 Hz? 250 Hz?
- Any other simple feature requests? My inclination is to keep it basic, but some functionality could be added if people think it'd be useful. Some quick thoughts I had for things that could be done:
- "Turbo" button which increases throttle gain while held
- Could provide 0-5V throttle output for interface to e-bike controllers
- Blinky LED indicators for various things
- ???