So I'm in the middle of a robotics project involving the use of an Arduino UNO, 2 DC motors, and a water pump. I'm torn between using the Adafruit motor shield and the Arduino motor shield, both of which have their pros and cons in terms of my project.
The Adafruit shield provides up to 1.2A per motor channel, while my motors already have a free running current of 1.8A (the robot's shaping up to be pretty heavy so the meatiness of the motors is necessary). And the Arduino shield only supports up to 2 DC motors. I'm pretty sure I can connect the pump through the 5V pin with a relay, but that would need an external power source just for the pump, in addition to the battery I'm already using for the motors. So I'm not too keen on this option.
So which shield should I go for? Or is there another option I haven't thought of yet? Any advice would be appreciated!
Neither of those shield are good for your motors. Not enough current capability.
You need a motor driver that can handle the stall (starting) current of the motors. That could be up to 10 times the free running current. The motor data sheet should list the stall current.
Thanks for the heads up! Yeah, the stall current of the motors is...a lot more than1.8A, I'll have to throw the motor shield idea out then.
My motors also have an accompanying motor controller that's required to be used in tandem with the motors in order to drive them. It has a different continuous/peak current. Does that affect anything?
I have no experience with that motor controller but my (brief) examination of the manual tells me that you do not need a driver at all. The controller drives the motor and can be controlled by a standard servo signal into the PWM input (among other options). The Arduino Servo library outputs that type of signal.
I would suggest that you thoroughly study the documentation to see how to wire your motors to the controller, set up the controller firmware and use the controller.
Now what I'm worried about is the voltage. The battery I sourced is 12V (since the motors and pump have a nominal voltage of 12V) which I know would be hard for the Arduino to handle if plugged in directly. This was why I thought the motor shield was necessary for this situation. Would using a buck converter with the battery help with this?
Would using a buck converter with the battery help with this?
Yes, that is the route that I would recommend.
What Arduino are you using? If a 5V Arduino, use a 12V to 5V DC DC converter (buck converter) and connect the 5V to the 5V pin on the Arduino. Same for a 3.3V Arduino but replace 5V with 3.3V.
Some background on why to use a buck converter:
Powering through Vin or the power jack means that the Arduino and all peripherals that are on the 5V rail are powered by the onboard 5V regulator. The on board 5V regulator is not heat sinked so will supply limited current before it overheats and shuts down. The recommend max power dissipation for the regulator is 1 Watt. With 12V into the regulator the max current is about 140 mA (1W / (12V - 5V)). The Arduino uses around 50ma of that leaving less than 90mA (max) for everything else. I would use a buck converter to drop the 12V to 5V and connect that to the 5V on the Arduino, bypassing the, weak, 5V regulator. Then the rated current of the DC DC converter is available on the 5V line.
Here's a quick and dirty schematic with all your advice in mind. Everything seems good? I left out the pump since I'm going to have to go back to the drawing board regarding how to wire that baby up.
I know that you are not driving the motors from Uno pins, but that is what anyone that is looking at the schematic would think. Connecting the motor controllers to PWM pins is not necessary. Using the Servo library, servos can be controlled by any digital pin (including the "analog" pins which are digital pins with analog input as a special function). See the link to the library that I posted.
Can you post a data sheet for the pump? With that we can help you to choose a driver. Most pumps turn in only one direction (do not need reverse) so can be driven by a simple MOSFET driver.
Doesn't seem like the pump has a spec sheet, and I can't seem to find the manufacturer website. Here's the specs given on the Amazon page:
Specification:
Material: Engineering Plastic
Weight: 65g/0.14lb
Voltage: DC 12V
Power Rate: 4.8W
Noise: ≦40DB
Max Flow: 240L/H
Max Lift Height: 3m
Inlet/Outlet Diameter: 8mm
Life Span: 20000 hours
Max Water Temperature: 60°C
Water Resistance: IP68 waterproof
Product Size(Cord Length): 17.7''/45cm
Product Dimensions (L x W x H): 553441mm
Just to be sure, it is a DC brushed motor in the pump, right?
OK, as I said before, to be able to intelligently choose a MOSFET (or any motor driver) we must know the motor stall current. If the stall current is not specified we can estimate it by measuring the motor winding resistance and dividing the motor supply voltage by the measured resistance. Connect a DMM Ohmmeter to the motor power leads, notethe resistance, turn the motor a bit and note the resistance. Do that several times. Then divide the motor supply voltage by the lowest measured resistance. That gives the stall current.
Brushless motors take a different type of driver. The MOSFET driver will not work. Nor is the stall current, necessarily, correct. And I don't know enough about brushless motors to be of much help with finding a driver.
I think that you need to find an Electonic Speed Control (ESC) or brushless motor controller, like the ones for the other motors).