Maker Pro
Maker Pro

Simple Motor Controller Circuit

T

tehtehteh

Jan 1, 1970
0
hello

I am trying to control a small gimbal using two 5v motors and this this switch:

http://uk.rs-online.com/web/p/joystick-switches/0516031/

which is basically 1 pin for each switch and a common pin, if this was a couple of DPDT switches it would be easy for me but it's not so I have come up with the attached circuit

is this a good solution? does anyone know of a better one?

also it will be powered off a small cable shared with a potentially sensitive 5v camera, so any advice on the capacitors would be appreciated too
 

Attachments

  • motor.jpg
    motor.jpg
    196.9 KB · Views: 90
T

tehtehteh

Jan 1, 1970
0
yes, but for size constraints and for the ergonomics of controlling the gimbal the switch I have chosen is more appropriate
 
T

tehtehteh

Jan 1, 1970
0
ok due to incorporating feedback into the circuit I will now be controlling it with a pic rather than directly from the switches, this has caused me some confusion

if I make the circuit in the attached image, either of the top mosfets will be seeing close to 5v at source right? making the difference between gate and source not enough to reliably switch?
 

Attachments

  • motor 2.jpg
    motor 2.jpg
    201.4 KB · Views: 53

Kabelsalat

Jul 5, 2011
182
Joined
Jul 5, 2011
Messages
182
I assume you're aware the risk of shorting by the mosfets in case both switches is closed.
 
T

tehtehteh

Jan 1, 1970
0
yes I'm aware, that's not the problem I'm having
 
T

tehtehteh

Jan 1, 1970
0
if I change the top mosfets to p channel wouldn't the voltage at source still interfere with their operation?
 

Arouse1973

Adam
Dec 18, 2013
5,178
Joined
Dec 18, 2013
Messages
5,178
if I change the top mosfets to p channel wouldn't the voltage at source still interfere with their operation?
You connect the source of the P-channel to the power rail of the supply.
Adam
 
T

tehtehteh

Jan 1, 1970
0
ahhh I see, the symbols I've been seeing have been confusing

as the mosfets have diodes built in can I leave out the flyback diodes? space will be a real issue on this board
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
the diodes are there to protect the MOSFETs from voltage spikes from the motor

google why flyback diodes are used on inductive loads
 
T

tehtehteh

Jan 1, 1970
0
I know what flyback diodes are for, I'm asking if I can ditch them because the mosfets already have them internally in the same configuration
 
T

tehtehteh

Jan 1, 1970
0
these 2 diodes are the same no?
 

Attachments

  • Untitled-1.jpg
    Untitled-1.jpg
    5.7 KB · Views: 74

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
these 2 diodes are the same no?


yes the internal diode will do the same job
your earlier diagrams didn't show FETs with the diodes included .... hence the confusion and why I asked
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
The internal diode does NOT do the same job as a flywheel diode but some mosfets use a zener diode in this position to limit the collector voltage.
The normal internal diode conducts when the polarity is reversed.
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
The internal diode does NOT do the same job as a flywheel diode

I found a site that says that in this case with the MOSFET stated, that it would
hence why I responded as such earlier

edit .... found it again ......
from wiki

Body diode[edit]
It can be seen in figure 1 that the source metallization connects both the N+ and P implantations, although the operating principle of the MOSFET only requires the source to be connected to the N+ zone. However, if it were, this would result in a floating P zone between the N-doped source and drain, which is equivalent to a NPN transistor with a non-connected base. Under certain conditions (under high drain current, when the on-state drain to source voltage is in the order of some volts), this parasitic NPN transistor would be triggered, making the MOSFET uncontrollable. The connection of the P implantation to the source metallization shorts the base of the parasitic transistor to its emitter (the source of the MOSFET) and thus prevents spurious latching.

This solution, however, creates a diode between the drain (cathode) and the source (anode) of the MOSFET, making it able to block current in only one direction.

Body diodes may be utilized as freewheeling diodes for inductive loads in configurations such as H-bridge or half bridge. While these diodes usually have rather high forward voltage drop, they can handle large currents and are sufficient in many applications, reducing part count, and thus, device cost and board space.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Body diodes tend to have very poor reverse recovery and are suitable only at low frequencies.

As long as you're not switching at high speed (i.e. for PWM control) it's not a huge problem.
 
T

tehtehteh

Jan 1, 1970
0
it will not be PWM switched, so I'm quite happy with that

I have about 30mm by 40mm space to work with, and I have to fit a 14 pin microcontroller on that, and some caps, so leaving out the diodes will be handy
 
Top