×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Controlling Motor With Computer

Controlling Motor With Computer

Controlling Motor With Computer

(OP)
Does anyone know if I can use visual basic to regulate the voltage that comes through pins on a serial port I just want one pin to be ground and the others to be basically funtion generators.  I want them to output some voltage that I can control... Any ideas?

~Noochstyle

RE: Controlling Motor With Computer

The serial port generally will only have perhaps two outputs that you can control; the serial output itself and the serial handshake.

You might be able to do what you want on the parallel port.  The parallel port has at least 8 outputs that you can control.

TTFN

RE: Controlling Motor With Computer

I agree with IRstuff about the serial port, the parallel port is much more usable. The serial port transmits a series of pulses down one wire and receives a series of pulses on another wire. So you would need to convert these from serial to parallel or vice-versa before you used them.
There's also a lot of other stuff you need to do - setting Start Bits, Stop Bits, Parity etc. It's usually not worth the effort.

A quick search on Google will get you more information about using the parallel port but only try this stuff on an old computer that you can afford to break! Also, the latest computers have "enhanced" printer ports - these may not work at all and I think some (newer) operating systems try to stop you accessing the ports directly.

See the following for an example of what is available...
http://www.hut.fi/Misc/Electronics/circuits/parallel_output.html

RE: Controlling Motor With Computer

It is possible to use either serial or parallel port:
The parallel port may even be shared between the printer
and the controlled circuit.

You regulate the voltade using DAC -- Digital - Analog Converter. Some you can control with two pins/lines
or even one, with additional logic.

<nbucska@pcperipherals.com>

RE: Controlling Motor With Computer

As nbucska stated above, it is possible to use either the serial or the parallel port. If you look up serial ports (either on the net or in a decent reference book) you can find out what lines (pins) are inputs and what lines are outputs. Any input line can be read from and any output line can be written to using the appropriate software, no matter what the line or pin is called.

However, if you are hoping to write a Windoze program then you will probably need to learn something like C++ and how to write DLL files because any Operating System like NT,2000 or XP will not allow an application to interact directly with hardware (9x systems may allow some kind of access).

Other options include building external hardware to process 'normal' serial data to achieve what you want, or be satisfied with programming and using plain DOS (not under Windoze).

It may be easier to use the parallel port. Decoding parallel ASCII can be done quite easily and could be controlled using a Windoze application that simply printed to a 'Generic / Text Only' printer. If the size of a parallel cable and/or cable length limitations were a problem, you could use a USB-to-Parallel adapter cable. This would effectively give you a serial connection and be relatively easy to write software (that would run under Windoze or DOS) for.


RE: Controlling Motor With Computer

The parallel port is magnitude of order faster and easier
to program -- and you can use two internal timers with
a few microsec. resolution.

<nbucska@pcperipherals.com>

RE: Controlling Motor With Computer

Could set up software pwm generators that you connect to an rc network to generate a voltage at the outside for the motors/whatever...or just use the pwm output directly...easier and safer on motors than varying the voltage (i'm assuming you're wanting to change the speed right?).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources