Help on the Concepts

I am building an automatic dog-feeder using a cereal dispenser. My plan is to use a motor to turn the knob on the dispenser for a set number of seconds. I've done some preliminary research (I'm very new to this) and this is my main question right now:

I know that I will need some sort of external power supply to power the motor. In order to keep the project looking clean, I would like to use a single DC supply from an ordinary wall-jack to the Arduino and motor. Is this possible? If so, do you have any links to a good how-to or resource guide?

I would imagine it should be something like this Arduino DC Motor Control Tutorial - YouTube but I will not have a USB connection and the 9v battery would be a DC supply instead. How would I connect the DC to the Arduino simultaneously?

Hopefully I've worded this in a way that makes sense. Thanks for any help.

Depends on what motor you plan to use ? (voltage, current?)

The Arduino needs 7-12V on its plug to get a decent 5V on board

So if your servo's are in that range one wall plug would work ...

I plan on using a motor with these specs:

Voltage: 3 - 12 Volts
Gear Ratio: 150:1
Stall Torque: 185 oz-in. (@ 12V)
Speed: 20 RPM (@ 12V)
No Load Current: 95 mA (@ 12V)
Stall Current: 0.5A (@ 12V)
Insulation Resistance: 10 MOhm
Dielectric Strength: 300VDC
DC Reversible

As the Arduino might need up to 0.5A too you should start with a 12V 1 Amp wall wart

(disclaimer no EE :slight_smile:

Awesome. Good info, thanks. Now... I still do not need to use a relay, correct?

Fredthedog:
Awesome. Good info, thanks. Now... I still do not need to use a relay, correct?

The I/O pins on an Arduino cannot supply enough current for any motor so you need something in between. A relay is one option, but the pins can't supply enough current for a relay either (unless you get a solid state relay). A simple way to allow the Arduino to control a greater current is to use the Arduino to control a transistor which, in turn, controls the larger curreMy plan is to have a 104 pin socket on perfboard, or a PCB eventually, that this would plug into.
Looking at a project where this and several other processors would be connected together.
Going to wirewrap them to start until I find a connection/interface scheme I am satisfied with, and then perhaps go to a larger PCB for them all.nt.

HOWEVER it seems to me for your project it would be much easier to use a small servo which can be controlled directly by the Arduino. If you just want to tilt something a regular servo can be used. If you need several revolutions you need a continuous rotation servo. And it is generally an easy matter to convert a cheap regular servo to continuous rotation. Google knows everything. :slight_smile:

...R

If you use a relay, you'll need a transistor to drive it.
So might just as well skip the relay and use a transistor. to drive the motor. Don't forget the flyback diode!

And note that the current draw of an Arduino is nowhere near half an amp!
It is closer to 1/10th of that.

And note that the current draw of an Arduino is nowhere near half an amp!

from the specs - http://arduino.cc/en/Main/ArduinoBoardUno

Summary

Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA

20 pins time 40mA = 800mA ==> worst case so my 0.5A was even too low.

OK in practice you seldom get this level but even at 20mA per pin it uses at least 0.4A...

so in the end it depends what you connect to the Arduino..

so in the end it depends what you connect to the Arduino..
Yes! If you plug in an LCD shield that draws 200mA, then of course that would make a difference.

20 pins time 40mA = 800mA ==> worst case so my 0.5A was even too low.

OK in practice you seldom get this level but even at 20mA per pin it uses at least 0.4A...

It doesn't work that way. You can't do that. Well, you can, but you would exceed the published spec.

Maximum DC current is 200.0 mA on Vcc for the 328.
So you can't source 20mA from 20 pins. Not without exceeding the spec by 100%.

But you might think that you can source 40mA from 5 pins at the same time. Well...it's not really a good idea to go right up against the limits.

From the datasheet: " Exposure to absolute maximum rating conditions for extended periods may affect device reliability."

There is a spec you can violate relatively safely: the max clock speed / voltage specs.
You can run a 16mHz board at 3.3V, even though it is technically out of spec.