arduno robot?

I would like to buld a simple arduno robot with a touch senser, and I do not know what pins to conect the motors to. I also need help on what power suply to atach the arduno to and how. I would like to have a 5v power suply to the motor. Thanks, I'm a total newbe.

You will need to drive the motors off a motor shield as the arduino doesn't have the power to drive motors, or
Arduino Playground - DCMotorControl.
Touch sensor, Robotics/Sensors/Touch Sensors - Wikibooks, open books for an open world

Is there any way that you could build a motor sheld?

Here is a link with robot shields, motors, and other. Robotics - SparkFun Electronics

Oberling:
Is there any way that you could build a motor sheld?

Sure - if you know how to solder and read (or make) a schematic, you can easily build an L293 (SN754410) based h-bridge "shield" on a piece of perfboard; building an L298-based shield on a regular piece of perfboard, though, is -almost- impossible (the pins of an L298 do not follow a 0.1 inch hole spacing pattern), but you can buy adaptor PCBs to allow you do do it. Anything beyond that you would need to build using discrete components (transistors/mosfets), which can (if you aren't experienced with design and construction of h-bridges) end up costing more (due to burning components out) that just purchasing an equivalent h-bridge.

Something I have used is a Electronic Speed Controller (ESC) controlled just like a servo. The speed controller could be plugged directly into your Arduino, or through a Sensor Shield. There is a link to the MINDS-i library that and the example code on the website. mindsirobotics.com/code. While your at the webiste you can check out the Arduino Autonomous Module http://www.mymindsi.com/shop/cart.php?target=product&product_id=337&category_id=74 Basically, It uses an Arudino Uno and the Sensor Shield. You could also buy those individually elsewhere online (like yourduino.com), but the module from works with any of the MINDS-i kits, which I think is a good place to start. I actually teach a robotics merit badge to some boy scouts on the side and they can get a little servo bot or ESC and DC motor robot going in no time.

Let me know if this helps,

Tim

The L298 chip will work fine, but if the motors being control eat currents for breakfast ( way over 500 mA ) , you will have some "problems" The chip may getting hot and burn. So the question for you is : What type of motors you are using ? Picture of the motor will be helpfull. Or a link of the product will be OK.

Depending on if you want to have variable speed control, or if you just want them on/ off, you could always use TIP120 transistors to fire your motors up. This will basically provide an on / off switch that the Arduino can control. These are also great to fire off larger relays for very power hungry motors.

Here is an awesome little Instructables link about controling motors with TIP120 Transistors:


If its smaller motors that you want to control, you need variable speed, or more options, and the motors are around 1A (Peak) or smaller, I would recommend a motor shield. I personally use the "Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0"
Its about $20 for the unassembled one and is also a great way to learn about basic soldering.
Here's the link: Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits

I procured a motor shield that fits neatly on the top of the Arduino. I do not know how to code it with the Arduino so that I can run it in forwards and backwards. Thank you!

I procured a motor shield that fits neatly on the top of the Arduino.

Give us a clue which one.

I do not know how to code it with the Arduino so that I can run it in forwards and backwards.

See previous statement.

I have done something similar quite recently and used NPN transistors instead.
Attach the base to whatever pin you would like to use, the emitter to the motor (with the other lead attached to ground), the collector to the 5v output on the arduino. Unfortunately, the motor can only turn one way, but it is a lot cheaper than say a motor shield.

jaredpi:
... the emitter to the motor (with the other lead attached to ground), the collector to the 5v output on the arduino. ...

I've always understood that the load should be upstream of the transistor, between the collector and the +ve supply.

http://www.danielsoltis.com/notdatasheets/BC547.pdf

But I have no idea why it should be so.... what's wrong (if anything) with having the load downstream, on the emitter to ground?

JimboZA:
But I have no idea why it should be so.... what's wrong (if anything) with having the load downstream, on the emitter to ground?

Because the common emitter configuration of an NPN transistor has a higher current gain than the common collector configuration. This means that the base draws less current for a given amount of load current in the common emitter configuration. By placing the load on the collector side, you are increasing the load on the Arduino output driving the transistor.

EnigmaCypher7:
If its smaller motors that you want to control, you need variable speed, or more options, and the motors are around 1A (Peak) or smaller, I would recommend a motor shield. I personally use the "Adafruit Motor/Stepper/Servo Shield for Arduino kit - v1.0"
Its about $20 for the unassembled one and is also a great way to learn about basic soldering.
Here's the link: Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits

Although I have not tried it yet, but LadyAda suggest for more amperage, to stack L293Ds pin to pin. My L298Ns have the heatsink flange for all kinds of cooling tricks :smiley:

Quote from: jaredpi on May 30, 2012, 07:23:19 PM
... the emitter to the motor (with the other lead attached to ground), the collector to the 5v output on the arduino. ...

I've always understood that the load should be upstream of the transistor, between the collector and the +ve supply.

http://www.danielsoltis.com/notdatasheets/BC547.pdf

But I have no idea why it should be so.... what's wrong (if anything) with having the load downstream, on the emitter to ground?

Because the common emitter configuration of an NPN transistor has a higher current gain than the common collector configuration. This means that the base draws less current for a given amount of load current in the common emitter configuration. By placing the load on the collector side, you are increasing the load on the Arduino output driving the transistor.

There are a couple of problems here.

  1. you should never power your motors with "the 5v output on the arduino". Use a
    separate battery for the motors. The Arduino 5V pin cannot really drive a lot
    of current and probably not deal with noisy devices attached either.

  2. loads can be attached either in the collector lead [eg, NPN inverter configuration]
    or in the emitter lead [emitter follower config]. The former has the advantage
    that you can use any voltage, as required, on the motor, eg 12V battery. The latter
    has the disadvantage that the maximum voltage that can be applied to the
    motor is the signal voltage [eg, 5V from the Arduino I/O pin] minus approx
    Vbe = 0.7V, so at best you'd get only 4.3V on the motor, no matter what
    voltage is connected to the collector.

In both cases, the transistor base current is (motor current / NPN current gain),
so the Arduino I/O pin actually must pump that much current, so you cannot really
drive very big motors this way. A better way is to use an N-channel logic-level
MOSFET wired in the inverting configuration.

That makes my brain hurt, and explains why I studied civil not electrical engineering :slight_smile:

@JimboZA
If you like, you can look at the circuit equations, but it may be an even bigger
headache.