H-Bridge motor driver back EMF question

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
Zener current goes right from +6V through bridge diodes. :(
Sense nothing:
View attachment 207293

I am trying to solve this problem.
Darn! ... thanks for enlightening me ... I'll keep thinking about this too. Many thanks!

EDIT: But wait ... why would any current flow through the upper left pFet when it's actually turned off? Also ... I've just noticed that the circuit doesn't work when it's powered by the upper right and lower left Fets :(
 
Last edited:

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
This circuit works both ways, but the comparator's power is constantly on. I'd like to come up with something that consumes zero power until the motor is switched on:

1589610672489.png
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
This is your first circuit, in a format that's easier for me to read:


1589611870429.png

It works perfectly both ways. It's only drawback is the power being consumed through R2, D1, D3 and L2 even when it's switched off.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
Darn! ... thanks for enlightening me ... I'll keep thinking about this too. Many thanks!

EDIT: But wait ... why would any current flow through the upper left pFet when it's actually turned off? Also ... I've just noticed that the circuit doesn't work when it's powered by the upper right and lower left Fets :(
I think I understand now what you meant by "sense nothing" ... it means that the zener current interferes with the circuit's sensing purpose. Right?
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
There you go, I believe I have solved it.

1589666365210.png

The following diagram is exactly what I have already built, with the added components for motor rotation (or rather brush commutation) sensing. I managed to import the spice model for the exact nFets and pFets that my circuit uses, so I'm pretty confident it should work in real life. Also, the circuit should consume zero power when the motor is not energized. This because it only rotates when either the CW or the CCW outputs from the MCU are high. And there is no current flow anywhere in the circuit when they're low.

Any comments?
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
Nope ... the previous circuit does not really work. The nFet remains high even when the transients source is removed. It's much easier to use a bipolar transistor instead of an nFet, because the former must be driven by current instead of voltage.

1589724654030.png

Anyway, I also solved the power drain problem when the circuit's turned off, simply eliminating the 3.3V source and using the H-bridge driving signals instead. I have thorough tested it and it works fine. The way to test it is by simply removing both S1 and V3, which are the sources of the transients produced by the motor's brushes' commutations in the simulation. And when that is done, the "to_MCU" output remains low when the sim is ran.
 

Attachments

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
There you go, I've adapted your new idea to the old circuit, and it works.

1589742564819.png

But I think I'll maybe stick with the previous one. Why? Well, maybe I failed to mention this, but the device runs on batteries. So what happens when the batteries go low and the motor stalls without ever drawing over current? ... wouldn't the noise detecting circuit be better for this purpose?
 

Attachments

Danko

Joined Nov 22, 2017
2,169
But I think I'll maybe stick with the previous one. Why? Well, maybe I failed to mention this, but the device runs on batteries. So what happens when the batteries go low and the motor stalls without ever drawing over current? ... wouldn't the noise detecting circuit be better for this purpose?
You are right, but we do not know so far, are these REAL PULSES
powerful enough to open transistor Q1 in THIS CIRCUIT or not.
So, this part of circuit needs to be prototyped:
1589776829862.png
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
A brief note: I just ran the simulation using a 4.5V source instead of 6V. That is, I simulated it being powered by three batteries instead of four.... it ran with perfect results. :)
 

MrSalts

Joined Apr 2, 2020
2,767
How did this become so complicated?

The H-bridge is already a full bridge rectifier of sorts and the 200mA motor can handle a smallish current sense resistor (0.5ohm to 1 ohm) without losing much drive voltage. If you really want to protect your circuit from reverse current, add two forward biased diodes in series next to the current sense resistor (as shown) to protect from overvoltage into the op amp and one reverse biased resistor in parallel with the current sense resistor to protect from reverse voltage (Below negative power rail). Then amplify so your microcontroller can see a High level input. Power the op amp with microcontroller level voltage to level shift From the 6volt motor.

4DB3E63B-11E1-4FC7-8604-897318E07E70.jpeg
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
How did this become so complicated?

The H-bridge is already a full bridge rectifier of sorts and the 200mA motor can handle a smallish current sense resistor (0.5ohm to 1 ohm) without losing much drive voltage. If you really want to protect your circuit from reverse current, add two forward biased diodes in series next to the current sense resistor (as shown) to protect from overvoltage into the op amp and one reverse biased resistor in parallel with the current sense resistor to protect from reverse voltage (Below negative power rail). Then amplify so your microcontroller can see a High level input. Power the op amp with microcontroller level voltage to level shift From the 6volt motor.

View attachment 207878
Interesting, I'll give some consideration to your suggestion. Although this sort of circuit is good for detecting an over current condition, and not to check if the motor is rotating or not. Of course, over current implies motor stall, but not always. Also, there's the fact that the motor's coils resistivity changes when they heat up, and so the "calibrated" maximum allowed current changes too.
 

Thread Starter

cmartinez

Joined Jan 17, 2007
8,768
You are right, but we do not know so far, are these REAL PULSES
powerful enough to open transistor Q1 in THIS CIRCUIT or not.
So, this part of circuit needs to be prototyped:
View attachment 207464
I built it ... and tested it ... and it DID NOT WORK... :(

And then I found an error in my code ... so I corrected it, and tested it again ... and it STILL DID NOT WORK! ... :(

And then I changed R2 to 330k (because I don't have 300k resistors with me) ... and sure enough, this time IT WORKED!!!! :D:D:D

Thank you oh so very much, my friend. Thanks to you, and every one else who's helped me in this little project, I'm well on my way to a finished prototype.
 
Top