Motor speed, timing and direction control - newbie help

Hello,
I have a basic project and zero knowledge of electronics.

My project is programming a motor to run at various speeds in both directions for set periods of time. e.g. forward 7 seconds at 20rpm then 1 second pause then 7 seconds reverse at 20 rpm etc.
My motor will be spinning a drum of chemicals - kind of like this (but not in water).

Can someone suggest the simplest way to power the motor and the Arduino and shield? I'm wanting to run this from the wall outlet.
And any advice in general or on what I am missing (resistors etc.) would be appreciated.

Here is my parts:

Pololu Dual VNH5019 Motor Driver Shield for Arduino

Details for Motor Driver Shield here:

Arduino Uno

67:1 Metal Gearmotor 37Dx54L mm

Thank you.

Well the motor is rated with a stall current of 5A (if I have the right specification) so the motor supply ideally dhould be 5A at 12V - if its that powerful it shouldn't have any voltage-dropouts when the motor starts or otherwise pulls its full stall current. Some power supplies are not regulated, and such a supply can be labelled "12V" yet put out 18 or 20 volts or so on no-load - avoid such a supply, a decent switch-mode PSU is a good choice here with +/-5% tolerance on the output at all valid loads would be a good choice. Adding some decoupling to the output to reduce motor-induced noise might be a wise idea.

To power the Arduino you want a fairly clean supply - perhaps a 10V or 8V regulator from the 12V supply with significant decoupling to provide a stable supply into the Arduino's Vin. Having an extra regulator like this helps to prevent noise spikes from the motor supply getting onto the Arduino's supply, and shares the heat dissipation that would otherwise be all on the in-board regulator on the Arduino. Decoupling on the intermediate regulator's output will help prevent drop-outs on the 12V supply reseting the Arduino (and might allow a somewhat smaller 12V supply to be used (assuming no permanent stall conditions arise - which they shouldn't as they will damage the motor through over-heating). Having a separate regulated 5V PSU just for the Arduino (although a complication) will allow a smaller 12V supply without worries about temporary PSU dropouts reseting the Arduino...

That Pololu driver has a motor-current sense output - ideally you should use it and implement a "cut-out" if the motor starts to pull significantly more current than normal for more than, say, 1 second - that way any mechanical seizing or jamming shouldn't lead to motor over-heating. You want to allow temporary overloads for a fraction of a second though (this will happen when starting or increasing the speed).

motionid:
Can someone suggest the simplest way to power the motor and the Arduino and shield? I'm wanting to run this from the wall outlet.

Simplest? Probably something like a pre-built 12V 10A power supply:

Use a filter capacitor at the connection to the Arduino to filter out the worst of the interference from the motor, and you'll probably do fine. The recommendation to use a second regulator stage (regulating down to 9V or 7.5V) would help against harsh spikes, but is probably not necessary.

Thanks very much for replying and for the specific link.
This has been really helpful.

Sorry to indulge your time even further.

In regards to your suggestion of a Filter Capacitor,

The Doc's for the Motor Driver Shield suggest:

Solder a 0.1 µF ceramic capacitor across the terminals of your motors, or solder one capacitor from each terminal to the motor case (see the pictures to the right). For the greatest noise suppression, you can use three capacitors per motor (one across the terminals and one from each terminal to the case).

Make your motor leads as thick and as short as possible, and twist them around each other. It is also beneficial to do this with your power supply leads.

Route your motor and power leads away from your logic connections if possible.

Place decoupling capacitors (also known as “bypass capacitors”) across power and ground near any electronics you want to isolate from noise. These can typically range from 10 uF to a few hundred uF.

Would this achieve the same thing?

Also, I assume the power supply you have suggested will allow the unit to draw the power that it needs (up to a maximum) rather than outputting a fixed amperage and overloading the unit?

Cheers.

what about running a stepper motor. It doesnt appear to require alot to turn that drum?
so the power supply would be easy to get at a lower amps.
and in turn you could use old computer power supply, and it would be nicely regulated.
But you said you already have those parts ?

[quote author=motionid link=topic=98887.msg741646#msg741646 date=1333017026]
[quote]
Solder a 0.1 µF ceramic capacitor across the terminals of your motors, or solder one capacitor from each terminal to the motor case (see the pictures to the right). For the greatest noise suppression, you can use three capacitors per motor (one across the terminals and one from each terminal to the case).

Make your motor leads as thick and as short as possible, and twist them around each other. It is also beneficial to do this with your power supply leads.

Route your motor and power leads away from your logic connections if possible.

Place decoupling capacitors (also known as “bypass capacitors”) across power and ground near any electronics you want to isolate from noise. These can typically range from 10 uF to a few hundred uF.

Would this achieve the same thing?
[/quote]

Pretty much, yes. They filter slightly different things in different ways, so the best option is to do both, but you seldom need the best option, just something that's good enough :slight_smile:
A handful of high-voltage 0.1 uF ceramic capacitors are cheaper than a high-voltage large electrolytic, for sure.

@ woody_unreal

Thanks for the suggestion.
I already have the parts but if its not working 100% I might try what you have suggested.

@ jwatte

That's for letting me know about the capacitors. Good to know I'm on the right track.

Once I have this up and running I will post the results.
Thanks very much for everyones help.