Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: tdogolf on September 01, 2007, 04:40:45 PM

Title: How to use electric motors with AC power?
Post by: tdogolf on September 01, 2007, 04:40:45 PM
Hello,
    I just found this site!  Wow!  I had no idea all of this stuff was out there!  I am not a robot builder.  But a builder of architectural models.  I have a project where I would like to use lights on the inside of my model to look like lights are on in certain rooms.  I think I can do this using a model train A/C power pack, and then hook up accessory lights that are available at train stores.  I would like this to be able to plug into an outlet so it can be on all day or night.  However, the real problem that I have here is that I would like for a portion of one of my exterior walls to open up exposing the interior of the model, kinda like a door swinging open 90 degrees.  I want to be able to put some sort of a switch to make this happen.  One for the lights, and one to activate the motor or servo to open the wall.  I am clueless on how to do this.  I have three brand new airtronics servos that someone gave to me.  I thought about using them, but then I saw this site where the electric motors may be the way.  Can anyone please suggest any ideas on how to accomplish this?   I will hinge the wall so it can swinge open.  I just don't know how to do the electronics, and I don't want to have to charge batteries every night.  The portion of the wall to open will be approximately 10 inches by ten inches, and will be 1/8" plastic.  Thanks for any ideas!  I am not against any programming either.  I need you guys brains and ideas for some cool stuff.  I have an elevator in the middle too that could go up and down if possible.

Thanks
Tony
Title: Re: How to use electric motors with AC power?
Post by: HDL_CinC_Dragon on September 01, 2007, 08:36:32 PM
This is going to be fun but difficult if you dont know what your doing.
Dont bother with A/C anything. You can easily plug something into a wall that uses DC (pretty much EVERYTHING you plug into a wall socket uses DC voltage). Its simple to convert AC to DC. All you need to do is use some diodes.
(http://diy.griffshp.com/wp-content/Rectifier.jpg)
I found this on google images which saved me the time in having to draw it myself :D

This is a rectifier, it takes AC and makes it DC. Use this for everything. Your going to need highish wattage diodes though.

For the whole wall opening thing all you need is a servo with enough torque to swing the wall open. Do the math to figure out how much torque is needed in your servo. Consult this page for some guidance on how to do that: Link (http://www.societyofrobots.com/mechanics_statics.shtml)

Then from there it should be easy for you to hook up your servo correctly. To control the servo though all you need to do is hook it up to a micro controller so that when you press a button, it will close it if its already open, and open it if its already closed. We can help you more with this part once you have the other parts all worked out and such

If you need help with anything else, post it :)
Title: Re: How to use electric motors with AC power?
Post by: dunk on September 02, 2007, 04:29:11 AM
hi Tony,
if all you want is a working solution i suspect you want to keep things as simple right?

i'd abandon the AC power pack and go buy a DC wall wart with a selector switch to adjust the output voltage. these are available in hardware shops quite cheaply.

the problem you will run into with servos is they require more electronics to run.
eg. a microcontroller that will need programming or a servo controller that will need connected to a computer of some description.
servos have the advantage you can tell them exactly what position to move to.
if you had a microcontroller controlling the project you wouldn't need to press any buttons. just have it on a timed loop so it opens and closes on it's own.
the down side of this is (as i'm sure you have guessed) there will be quite a lot of time consuming research to do on microcontrollers, how to program them and how to interface things to them.

a simple DC geared motor on the other hand can be connected straight to your wall wart with nothing more complicated than a switch.
the only control you will have though is it will only rotate one direction or the other so will require the user to let go of the switch when it reaches the end point.

dunk.
Title: Re: How to use electric motors with AC power?
Post by: tdogolf on September 09, 2007, 08:18:47 PM
Thank you for the DC wall wart knowledge.  Where can I buy little electric lights to run off the DC power?  If the wall wart is set on a particular voltage, say for the servos to run, what do you do if the lights are a different voltage? 
  Can a microcontroler control the speed that a servo moves?

Thanks Again!
Tony
Title: Re: How to use electric motors with AC power?
Post by: Admin on September 29, 2007, 02:26:36 PM
Quote
Where can I buy little electric lights to run off the DC power?
Look for LED from either digikey.com or mouser.com. You will also need a resistor at about 1.5k ohms in series with the LED, or it will fry.

Quote
If the wall wart is set on a particular voltage, say for the servos to run, what do you do if the lights are a different voltage?
You can run the LED lights at the same voltage as the servos, so dont worry about that.

Quote
Can a microcontroler control the speed that a servo moves?
Yeap! And even time certain motions however you like.

The big issue with a wall adaptor is that it might not supply enough current for your servos. It will need about .5 amps per servo.

This is a wall adaptor I converted for recharging batteries:

(http://www.societyofrobots.com/images/sbs_power_supply2.JPG)
Title: Re: How to use electric motors with AC power?
Post by: annoyin_kid on September 29, 2007, 03:32:38 PM
its been ages since i've been here,
anyway you could always try to use a microcontroller and control the servo. at my school we use picaxe microcontrollers. all u gotta do is get the microcontroller, download the software (its free) and make the programming cable (really simple). there is a command for controlling the servo and the datasheet explains the code so you can program it yourself. www.picaxe.com for more info, they also got a forum there if you get stuck
hope it helps