I want to create a circuit that runs two DC motors at once, but my code can turn one off and not the other. I am kind of trying to base it off of the motorized pinwheel project. I have multiple mosfets, diodes, and resistors. I just don't know how to set that up. Would any of you be able to help me with this?
For informed help, post a wiring diagram (photo of a hand drawn schematic is better than Fritzing) and your code, using code tags.
A starting point is the specifications of the motors. Voltage and stall current being the most important with respect to choosing a motor driver. The next thing to know is if the motors will only run in one direction or if forward and reverse are required. A unidirectional motor can be driven with a MOSFET, bi-directional motor drive well need an h-bridge
The motors are DC 6V, they just need to go one direction. I am trying to build a front wheel drive car.
Hi,
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html
Tom... ![]()
I feel like a massive idiot, but I am asking for help on the circuit as well as the code.
You have two problems, first the hardware and second the software and you clearly know sweet FA about ether so,
Solve the hardware problem by using the standard Arduino motor shield and follow the instructions in the learning zone which include code to get you started.
Maybe I should have said 3 problems
the third being the helpful but over complex for a newbie advice you are getting here!
Mark
holmes4:
you clearly know sweet FA about ether
You don't know that - the poster could be an anaesthetist.
You don't know that - the poster could be an anaesthetist.
Opps ROLF!!!!!
Mark
Is it possible to do without a motor shield?
Dracore:
Is it possible to do without a motor shield?
Of course it is.
If you want to control the motor both forward and backward you need a h-bridge.
If you provide more information about the motors you're using, someone will probably suggest an appropriate h-bridge.
Also let us know about what you plan to use as a power supply.
I don't need them to go backwards, I just want to turn them on and off, I plan on using 2 AA batteries.
Well, 2 AA batteries would only give 3V when connected in series. Do you see how that might be a problem for a 6V motor?
Do you have the car chassis and motors yet? Do you have some web links to the models you are looking at? Front wheel drive is rare. If you think you need to run the motors independently for steering the you absolutely must be able to drive the motors both forward and reverse.
MorganS:
Well, 2 AA batteries would only give 3V when connected in series. Do you see how that might be a problem for a 6V motor?
While I also have doubts about a 3V power supply for the motors, many (most) motors will work fine at lower than the rated voltage.
MorganS:
Do you have the car chassis and motors yet? Do you have some web links to the models you are looking at?
+1
MorganS:
If you think you need to run the motors independently for steering the you absolutely must be able to drive the motors both forward and reverse.
I'm not so sure about the above. If you want the robot to turn in place then yes, you need reverse. On the other hand as long as the robot had room to maneuver, then forward motion would allow the robot to travel around just fine.
I take it you never had a car without reverse when growing up? It's possible to live without reverse but you have to plan ahead.
I'm sorry, it is 4 batteries, not 2. Our design just has one side turning off when we want to turn that way, as you said we just have to have time to maneuver.