DC Motor Reverse and Overall Advice

Preface: I am fairly new to Arduino / micro-controllers but have been a software developer for 10+ years.

I read many posts that discourage from connecting a DC motor to the Arduino board directly and especailly not with USB 1 & 2

Being careful and only connecting the mega2560 board to a battery and only for one min or so, I was able to get this motor running using the following methods:

1) digitalWrite 50pin and 52pin HIGH and LOW and reverse.
2) analogWrite to PWM 13pin and Grn.
3) analogWrite to PMW 13pin with range from 0 to 255 for speed control.

My question is:

Supposing I want to use this chasis to build a simple robot, and knowing that this motor only has two connections, how can I build a circuit such as the one here onto that chasis?

My confusion is since the motor connections will go to 5V and Grd on the POWER side of the board to control direction, how can I control speed? Also how can I ensure not to burn my chip in long term use?

Finally, just a note of sharing (and bragging) I was able to get this sensor to work off the PWM pins also and wrote a quick and dirty script to account for noise using Bayes Rule in preparation for a fully autonomous Robot! So far very happy with Arduino!

I assume that your question "how can I build a circuit such as the one here onto that chasis?" Centers around how to add such a circuit without using the prototype board. The best choice would be stripboard.

Something like: 8019 Vector Electronics | Prototyping, Fabrication Products | DigiKey

Or: http://www.digikey.com/product-detail/en/adafruit-industries-llc/1608/1528-1101-ND/5154676

OK that seems intuitive now. One more question:

This Makeblock board http://www.makeblock.com/me-orion-base-on-arduino-uno/ is fairly useless but they are able to connect the motor directly to the Uno.

How are they doing so without a stripboard? I looked at their source code on github and those 9 and 10 pins (orange ports in image) do the same thing as a digital and analogWrite. That orange piece is soldered onto the board (I have it in-front of me).

Hi,

but they are able to connect the motor directly to the Uno.

Because of this;

Two channels additional with Me-motor driver through PORT_1&2

The controller is UNO "compatible", it has extra hardware on board including 2 x motor driver circuits.
The UNO does not have this.

Tom.... :slight_smile: