How do I connect 120AC (household plug) to run a 12dc and a 5dc motor with Uno.

Hey guys any help is appreciated. Total baby at this audrino/motors concept.

I have a very simple question. Would anybody know how to connect a 12dc and 5dc motor to the audrino but power it with a normal household plug 120V AC.

Any keywords or general direction will be helpful. I will google them.

Here is all the motors need to do:

12VDC - Run for 3 min. 5vdc - Run while the 12dc motor is running but for only 1 min.

I think you'll need to find a 12 and 5 mains ac-dc adapter, that's all. Then the ac is out of the equation.

Then switch the dc power with the Arduino through a relay or transistor. You would need h-bridges if you need to control direction.

I Googled all the items you mentioned and learned a lot and it seems like I may need a h-bridge.

Last night I thought a lot about how to frame the question on this forum so to be clear what I need help with...and here is what I came up with.

I should clarify a just bit just to be sure. I am building a birdfeeder with an auger for an Engineering project. It has 3 motors not 2 as mentioned above (redesigned) . One to fill a hopper with seed (via an auger) and one to spread the seed evenly also with an auger and another 1 to raise and lower the refill hopper.

1) I must be able to plug in the "unit" into a schools AC socket in the classroom. I can not have a battery with me or any other converter/amplifier (separate visible box). Relays and such are ok of course. 2) The 3 motors are all DC ranging from 5-12Volts. 3) I am using an Ardunio UNO to simply time each motor. And the kicker... 4) I must be able to control the RPM, and direction of the motor via the Arduinio Uno somehow.

So in essence my question is:

Can you guide me in a direction or with keyphrases about what I need in order to be able to run 3 DC motors (5V,8V,12V) with an Ardunio Uno while powering it all via a 120AC (normal household plug) and be able to control RPM and direction of the said motors????

Thank You in advance.

Well first off, you HAVE to have some kind of converter from mains AC to local DC. I'm not qualified to say if that conversion is easy to do if you roll your own: I do think though that dabbling in mains power without knowing exactly what you're doing is dangerous. I can say nothing other than you should get an off-the-shelf ac-dc converter. So you need to put that inside the box of the "unit" and just have a mains wire coming out of there.

I doubt if anyone here will encourage you to do the ac mains to dc 12v by any other means than off-the-shelf.

But you can get one that goes to 12V and then drop that to that 5 or 8 or whatever is required with components like 7805 which is inefficient but does work.

Go and have a look at Pololu: they have a huge range of voltage converters so if you get the 12VDC sorted from the mains ac, they have various devices to get you to other dc voltages. I have their 2120 for example.

Then regarding the motors. It's not easy to control a dc motor as carefully as you might need. So you should probably investigate both stepper motors and servos to see if they can do what you need. Steppers as the name implies move in well controlled steps of usually 1.8 degrees (200 per revolution); might be good for the auger. Servos move to a degree position, usually between 0 and 180 and are good for raising and lowering.

There are libraries to drive steppers and servos. Have a look at Pololu for stepper driver modules which take care of the electronics. Servos are dead simple.

edit... And pololu have modules with h-bridges to drive dc motors. Steer clear of old technology modules that use 293 or 298 chips... very wasteful of energy. I have a Pololu 2130 and it's good.

Ok thank you sooo much. I will google and research everything you mentioned here. I understand that everything I do is at my own risk of course.

Would the 2.1mm plug on the audrino uno also be able to drive a gear motor. If I buy Something like this:

Would the 2.1mm plug on the audrino uno also be able to drive a gear motor.

Not sure what you mean, since that’s an input to the Arduino.

Whether or not a supply like that can provide enough current to drive a motor as well as the Arduino depends on the current requirement of the motor.

You need to spec the motors to do the job you need them to do, then look at the datasheets of the motors and make sure you supply enough current, at the appropriate voltage.

But you would probably want to look at ways of tapping the supply from such an adapter from a point before the jack, so you have (say) the 12V going to your motor (or dc-dc reducing devices for the other motors) in parallel with the same 12V to the Arduino jack.

I’ll post a rough pic of that parallel arrangement in a minute… done