Pages: [1]   Go Down
Author Topic: Controlling two 3V motors without a motor shield.  (Read 3381 times)
0 Members and 1 Guest are viewing this topic.
New York, NY
Offline Offline
Full Member
***
Karma: 2
Posts: 142
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

I wanted to get some suggestions from all of you people for my first robot project. After searching the Intenet for two weeks, I found this cheap Robot wheeled kit for just 10 bucks. It has two 3V DC motors.
http://www.hobbyking.com/hobbyking/store/__26248__Simple_Expandable_Robot_Chassis_KIT_.html

I have an Arduino Uno, And I want to build a robot with that kit.However, I don't feel like spending another 10 bucks for just an Arduino Motor Shield so I want to make my motor power supplies out of a voltage regulator, which i'll get from RadioShack.
http://www.radioshack.com/product/index.jsp?productId=2062599

Later on I'll probably buy a Ping! Sensor for 30$ but for now i'll try to do some experimenting with 2 photon resistors that came with my MAKE: Getting Started with Arduino Kit. And if I'll want, i'll invest then a Motor Shield

But i'm worrying that the Regulator voltage is to hight for such small motors. How can I apply the ohms Law and find the needed resistance since i'm really bad at this? I just don't get one thing: Does Voltage decrease proportionally to the Amperage when you add a resistor? Or just the voltage decreases?

Thank You Guys,
Sincerely Michael.


* Web_Ohms_law_triangle.gif (12.37 KB, 400x391 - viewed 29 times.)

* pRS1C-2160509w345.jpg (2.81 KB, 345x235 - viewed 17 times.)

* 26248-sub1.jpg (70.03 KB, 565x414 - viewed 37 times.)
« Last Edit: October 10, 2012, 04:56:17 pm by mixania » Logged

Arduino Uno R3
Teensy 3.0
Mac OSX Yosemite

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34532
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Using a voltage regulator to drive a motor is a wrong idea. How are you going to wire this up?
You need a transistor to drive the motor and feed that transistor with a PWM signal to give the effect of the lower voltage. Do not put a seriese resistor with the motor.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5594
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ultimately, you need an h-bridge driver of some sort to control the motors fully (to be able to vary their speed with PWM, and change their directions). There is no way around this. But there are cheaper ways than an Arduino motor shield.

The standard shield uses two L293 (or equivalent devices). You could, for instance, purchase a couple of those, a breadboard or perf/veroboard with plated holes, plus a few other parts, and build one yourself. If you shop all surplus (and/or Ebay), you can do it for only a few dollars (plus your time).

Another alternative would be to use an L298-based driver board; you can find those cheap (again from China) on Ebay - I've seen 'em as low as $5.00 USD each in single quantity - and they may even be cheaper than that now (in multiples, you can get 'em as low as $2.50 each). You'll have to run wires and such from the Arduino to the controllers, but you wanted cheap.

I don't recommend using the L298 for homebrew boards unless you like a real challenge; the L298 has a weird pin spacing that isn't compatible with most (all?) 0.1" hole-spacing perfboards or breadboards, and without an adaptor board (which you can purchase - see this guy: http://www.jrhackett.net/index.shtml - he also sells a PCB for the L298 which you have to supply your own parts to complete; check it out!) they are very difficult to work with. Not to mention how it is nearly impossible to find a Multiwatt form-factor heatsink...

Another possibility would be to wire up your own small transistor h-bridge:

http://www.instructables.com/id/H-Bridge-on-a-Breadboard/

You can buy the transistors surplus (if you can, use both NPN and PNP transistors for the h-bridge; it's more efficient than an all NPN design, like the above link shows). Here's some more info:

http://letsmakerobots.com/node/9450

Just start googling "h-bridge", "transistors", "small", "2n2222", etc - you'll find plenty of designs, and since these small signal transistors are a dime a dozen, you can afford to experiment and blow a few. Here's another great design:

http://library.solarbotics.net/circuits/driver_4varHbridge.html
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

New York, NY
Offline Offline
Full Member
***
Karma: 2
Posts: 142
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ultimately, you need an h-bridge driver of some sort to control the motors fully (to be able to vary their speed with PWM, and change their directions). There is no way around this. But there are cheaper ways than an Arduino motor shield.

Hmm, I see. So the only option is a H-Brigde if not a Arduino Motor Shield. But would the Arduino have enough power to control just one 3V motor?
Logged

Arduino Uno R3
Teensy 3.0
Mac OSX Yosemite

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34532
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
But would the Arduino have enough power to control just one 3V motor?
You can only safely get less than 40mA from an arduino pin so unless you motor runs less that that no you can't power it directly.

There are many ways to control a motor without having to buy a shield. Have a read of this:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
and the other motors pages on my site.
Logged

New York, NY
Offline Offline
Full Member
***
Karma: 2
Posts: 142
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


There are many ways to control a motor without having to buy a shield. Have a read of this:-
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html
and the other motors pages on my site.

Oh, Wow! Thank You very much! That was just what I needed!
Logged

Arduino Uno R3
Teensy 3.0
Mac OSX Yosemite

Johannesburg. UTC+2
Offline Offline
Faraday Member
**
Karma: 105
Posts: 4681
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I stopped using my MotoMama 298 based shield (with a heatsink the size of a truck) and have been using one of these: http://www.pololu.com/catalog/product/2130
Logged

The Elders of the Internet know who I am
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Pages: [1]   Go Up
Jump to: