I have been reading the forums to try and figure out how to use a mosfet or transistor to run a motor, but there is just so much that confuses me. N-gate, p-gate, connect to this, connect to that, turn this one around, no rather use that one and so on and so on. I think I know less now than when I started the research
I am working on building laser tag weapons. The plan is that the weapon will shake when ever the player gets hit. The player can get hit every 500ms on hard mode. The battery I will be using is a 6.6V 1.8A 30C battery (http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=22589)
task:
I have been reading the forums to try and figure out how to use a mosfet or transistor to run a motor, but there is just so much that confuses me. N-gate, p-gate, connect to this, connect to that, turn this one around, no rather use that one and so on and so on. I think I know less now than when I started the research
I am working on building laser tag weapons. The plan is that the weapon will shake when ever the player gets hit. The player can get hit every 500ms on hard mode. The battery I will be using is a 6.6V 1.8A 30C battery (http://www.hobbyking.com/hobbyking/store/uh_viewItem.asp?idProduct=22589)
That's a pretty low current motor that will run off the arduino 5V voltage pin. So wire an output pin to a 1K ohm resistor, and the other end of the resistor wires to the base of a 2N2222 transistor. Wire the emitter of the transistor to a arduino ground pin, wire the collector lead to the motor and the other motor lead to the arduino 5V pin. Finally install a diode across the motor's two terminals with cathode end to the 5V side of the motor.
Here is a drawing to show the connections you need to make, but instead of the voltage coming from and external voltage source, it just wires to the arduino 5V pin. Make sense?
"Yes you will need to use a MOSFET, the Typical Operating Current of the 324-102 is 56 mA and the Maximum Start Current is 170 mA. The motor is likely to draw too much current and damage the controller, the MOSFET will also help protect the controller from EMI issues."
So that is why I was worried
I will read up on a 2N2222 transistor. I see there are youtube videos
"Yes you will need to use a MOSFET, the Typical Operating Current of the 324-102 is 56 mA and the Maximum Start Current is 170 mA. The motor is likely to draw too much current and damage the controller, the MOSFET will also help protect the controller from EMI issues."
So that is why I was worried
I will read up on a 2N2222 transistor. I see there are youtube videos
The actual transistor used, mosfet for npn, is not all that important as it's just being used as a simple on/off switch controlled by an arduino output pin. So any transistor that can handle 5vdc or higher and 60ma or higher could work, which is just about any common transistor. I suggested the 2N2222 because it's commonly available and cheap as anything else.
What I have been reading is that mosfets seem to be good for applications above 2A and BJT's are used for applications below 2A. It seems the 2N2222 is a BJT.
Different websites seem to give differing info about noise. Mosfets seem to produce more noise according to some websites and less according to other. I will use the RadioBlock (RF module) to transmit when a player is hit. Not sure if I should worry about the noise level, because the transmission will happen before the motor starts turning. Also not sure how much noise a brushed motor makes compared to a brushless and then again maybe I don't need to worry about it, because I am planning on transmitting before the motor starts spinning.
holmes4:
Some mosfet's include a diode which is used to deal with back EMF.
Mark
Those are to protect the mosfet device itself. It doesn't however protect anything else that might wire to the motor voltage or ground return. A diode across the motor terminals is always recommended for a single rotation direction DC brushed motor, as that is the source of the counter EMF.
Please help. I started building the circuit. I can't really read the diagrams so I just tried to build it as I see the diagram
I had a 6.6V battery connected to the motor through the circuit and I drained it down to 3V in about 20 seconds. The wires became so hot I couldn't touch it anymore so I am doing something wrong. I know the diagram shows the motor connected directly to the Arduino, but the manufacturer recommended not doing that, because the starting Amps will be too high for the Arduino to handle it so I connected the motor to the battery
Hopefully it is possible to see from the photos what I did, but I will try to explain
Red wires are positive
Black wires are negative
V+ goes to V+ of motor. V+ from motor goes to + of 1N4001. + from 1N4001 goes to 100nF capacitor
V- goes to V- of motor. V- from motor goes to - of 1N4001. - from 1N4001 goes to 100nF capacitor
Cancel that Just did some more tutorials on diodes. Seems I wired it incorrectly. Why should the negative of the diode go to the positive of the battery? That seems to make it work perfectly
I have my multimeter on the negative where the battery goes into the circuit and then on the positive side of the diode or positive side of the capacitor and I measure 6.5V. The battery voltage out side of the circuit measures as 6.6V
The idea is that the diode is wired in parallel with the motor and oriented so that it does not conduct when power is applied to the motor.
When you have current flowing through a motor or coil and switch the supply off, inductance makes the current keep flowing through the motor. Without that path the current would find somewhere else to go - maybe arcing your switch contacts or burning through your drive transistor in the process.
I don't see any reason for your voltage drop but perhaps you have a poor joint somewhere.
Thank you for the info. I will make a note to always use this type of circuit for a motor
I actually need a voltage drop, because the motor has a max voltage of 6V. Currently I have 6.6V normally or 7V directly after a charge. I might try adding 1 or 2 diodes in series from V+ to the motor to reduce the voltage. Is that a good idea?