0

The project I'm working on is an electrically powered vehicle. I have found this fairly simple circuit to control my motor's speed.

enter image description here

What I understand is that when the transistor is closed the battery is feeding energy into the motor which moves the vehicle. When the transistor is open the motor is freewheeling and the diode is there to protect the transistor from some kind of voltage that builds up when the motor is rapidly being powered on and off such as is the case with PWM speed control. Here raises question #1: as the motor is spinning and the transistor is open the magnetic fields of the permanent magnets are still inducing voltage in its coils and thus current, which is energy. Where does that energy go? This question is more of curiosity.

The real question I would like to ask is how I can implement regenerative braking with this setup, which is perfectly explained in this question but I appear to be retarded in some way and I would be really grateful if a simpler explanation can be given.

My understanding is that I would need something similar to this:

enter image description here

Where I will have to first close the upper transistor effectively shorting the motor then when it starts building up voltage I will have to open that and close the lower transistor allowing that voltage to go into the battery and it goes back and forth. The author mentions though that if I'm using PWM then I probably already have regenerative brаking and from what I understand I would need to implement some serious driver logic which is completely in contrast to what the author is saying. Additionally what happened with the diode, what is protecting the transistors now? I tried adding 2 diodes but I get a short no matter what I tried... Obviously I need some help.

Note: It's a brushed permanent magnet motor.

php_nub_qq
  • 880
  • 8
  • 24

2 Answers2

1
  1. Voltage is not energy. It's only power (over time resulting in energy) if it flows through some resistance.

  2. When the upper switch is closed, current builds up due to the EMF on the motor coils, in some period of time (maybe tens of microseconds) it builds up to some peak current. You then open the upper switch and the current flows backwards through a diode in parallel with the lower switch (could be an external Shottky diode or the internal body diode of the MOSFET). You open the upper switch until the current drops to close to zero, then close it again, repeat until there's not enough to charge the battery, then you can short the motor and/or use mechanical braking.

enter image description here

Not shown, but very important, is the motor inductance which you can imagine as an inductor L in series with an ideal motor (the latter is a device that produces a voltage proportional to the shaft RPM and has some internal resistance, and creates a shaft torque proportional to current).

That's two-quadrant (forward drive and forward braking) control with regenerative braking. If you want it to do the same thing in either direction you need twice as many switches.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
  • Okay but with this setup how will I know when current drops, I will need some current measuring board? Which can get quite expensive for upwards of 15A which is what I expect my motor will generate. This really sounds much more complicated than what I imagined – php_nub_qq Aug 19 '19 at 18:21
  • DC motor 2 quadrant is relatively simple. Maybe you should consider buying a controller. – Spehro Pefhany Aug 19 '19 at 19:24
  • "Okay but with this setup how will I know when current drops, I will need some current measuring board" - you should be monitoring current anyway, to limit motor current when accelerating. – Bruce Abbott Aug 20 '19 at 02:06
  • @SpehroPefhany I searched, I just cOuld not find one to suit my needs. 36v 20A operated with a pwm signal and with variable regenerative braking (depending on how far the pedal is pressed). Even if there are they will probably be really expensive. From what I see it's definitely not so simple. If I could undsrstand how to determine the 2 points of having enough current built up and having no more in order to operate the FETs in practice then it probably will be.. – php_nub_qq Aug 20 '19 at 04:57
  • @BruceAbbott I have a protective resistor and I use pwm I didn't imagine I would need to measure current. And even if I get a 20A measuring board I read that motor stall current is well abive the allowed continuous current and a 100A current measuring board will be insanely expensive let alone i have never seen one. – php_nub_qq Aug 20 '19 at 05:03
  • Current measuring circuit is just a low value 'shunt' resistor and an op amp, or you could a hall effect sensor such as the ACS758LCB-100B (modules sell on Ali-Express for ~US$15). – Bruce Abbott Aug 21 '19 at 00:00
1

This appnote describes, in detail, 2- and 4-quadrant motor control with regenerative braking for each direction.

Link: https://www.roboteq.com/index.php/docman/motor-controllers-documents-and-files/documentation/application-notes/application-notes-1/33-an70614-1/file

The short answer is you need at least 2 FETs to effect regenerative braking in the forward direction. In reality, your vehicle will want to reverse as well, so 4-quadrant control is appropriate.

hacktastical
  • 49,832
  • 2
  • 47
  • 138
  • Unfortunately i can't open it because the internet speed is horrible where I'm at right now. Will need a few days to go back home, thank you. For another reason I have a gearbox with a reverse gear so I will only need 2 quadrant controller. – php_nub_qq Aug 20 '19 at 05:08
  • I managed to open the document after waiting quite a while. I haven't currently finished reading it but I'm at page 12 where it says if the duty cycle is 100% then there will be uninterrupted regeneration. How is that not going to actually drive the motor rather than it continuing to behave as a generator? – php_nub_qq Aug 20 '19 at 13:29
  • No, it says that in that case it's 100% dynamic braking. In the second case (accellerator partially pressed), there is PWM happening so it's alternating between motor shorted (dynamic braking) and regeneration. This is the case Spehro is illustrating in his answer, that is, Quadrant 2. As far as having a gearbox, I would think having 4-quadrant control would be cheaper and more reliable than having a reversing gear. Then you only need gear reduction. Pure electric vehicles work this way. – hacktastical Aug 20 '19 at 19:57
  • I'm sorry but you seem to be incorrect. On page 12 the last 2 paragraphs state exactly that the most regeneration is achieved with the accelerator pedal pressed all the way and thus a 100% duty cycle. As far as the gearbox goes I need to have it because it's going to be a hybrid drive system and utilizing the reverse gear in this case makes more sense to me. I agree it would be cheaper and less complicated but I will have it anyway. – php_nub_qq Aug 21 '19 at 06:54
  • Second bulleted paragraph, pp. 12: “If the operator keeps the pedal pressed half way and the gear Forward, there will be a duty cycle and during the pulse of the duty cycle (ON) the Power Bridge will conduct and the generator will discharge its current into the battery. The regeneration lasts only the time of the pulse in the duty cycle (ON). During the OFF time of the duty cycle the motor is still shorted being both Bottom MOS turned ON so dynamic braking takes place.” – hacktastical Aug 21 '19 at 07:11
  • exactly, and then below that on the last 2 paragraphs it says that the most regeneration is achieved at 100% duty cycle, which I'm having a hard time understanding how it differs from full acceleration. – php_nub_qq Aug 21 '19 at 07:15
  • Spehro’s diagram describes exactly the case in that paragraph. The detail is that the motor/generator, being an inductor, will store rotational energy as flux while it’s shorted, then give it up again when it’s reconnected and the flux collapses. If you don’t short the motor momentarily no flux will develop, and you won’t get regeneration. – hacktastical Aug 21 '19 at 07:26