Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Controlling Motors

Hey guys, I'm looking to control motors in C++, and I've got a question, would I want to connect the relay to the serial port, or the parallel port? I looked on google ;), but I couldn't find the answer.

Btw, the motors do not need to give input to the computer, they'll only be output.

I don't think it's even possible to have a regular motor as an input object :P

Anyway, thanks a lot in advance guys.
what do you mean with motors?
And do you gonna use a microcontroller?
If you gonna use a microcontroller then it should be possible to program it, but that depends on what controller you are using.

anyway give some more details...
OK, well something like the Arduino has a serial port and a parallel port, right? Well, should I write the program to give voltage through the serial port, or the parallel port, which will then switch the relays to power the motors. (They will be big motors)

So the question is not so much a "How do I?" question, it's more of a "Which should I use?" question, meaning which port should I use for motor output.

I'm sorry if this doesn't really make sense, I only started learning C++ like, 1 month ago.
I haven't used the Arduino specifically, but i have used other microcontrollers like it. U said u are using relays. are u using the relays as (basically a power boost) to turn on the motors?
you shouldn't be using the serial or paralles ports for anything other then to connect to the computer.
you want to plug in all your devices to the digital/analog input/output headers. for example, you would plug a sensor (depending on the type) into the digital or analog input header.
motors are output devices so they go to the output headers
what exactly are you using the relays for?
OK, I'm just using the relays to give large amounts of electricity to the motors, something that the computer cannot give.

Where exactly are these output headers located on a normal computer?

Thanks for the help.
Well.. i havent yet go my hand on any arhuino and only recently learnt it's existance (thx bsdpunk), but what i dont get is the question are you going to be passing through a MC or not? If not, then the parallel port is your best bet and is in fact extremely simple to use on linux, and even simpler on freebsd (which i'd strongly recommend for parallel port programming) thanks to their great "ppi" driver.

http://www.softwareplug.com/FreeBSD/man/ppi/4
http://www.excamera.com/articles/21/parallel.html

And ofc, no matter what the size of your motors (i'm guessing simple DC and not one of those triphased servo thingys) with enough relays, you can power it from your paralell port ;)
Thanks for the information, I really appreciate it, and the links you've given me. :)

As for the MC, well, I may or may not use one. We're still deciding on what to use. Although we'll probably end up using a normal pc.

Seriously, you were a great help. If I could +rep I would :P

Thank you very much,


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Assembly] by chwiztophewSep 17, 2012 02:44 PM 1 175 Sep 17, 2012 02:44 PM
Last Post: DaRkReD
by Automatic CodingMar 24, 2012 09:31 AM 0 91 Mar 24, 2012 09:31 AM
Last Post: Automatic Coding
by rafailosJan 29, 2012 06:32 PM 8 144 Jan 29, 2012 06:32 PM
Last Post: MrZander