Electronics development

Moderators: None (Apply to moderate this forum)
Number of threads: 512
Number of posts: 1020

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Interfacing with serial ports Posted by mobby_reload on 15 Dec 2003 at 10:37 AM
Hello all.
I'm computer science student. I need some idea regarding my project rest of work i'll do myself. The simple question is "say I've a small motor (which normally used in VCRs/Tape recorders) and I want to control it from computer (on/off) program. I've connected it to computer serial RS232 port. Please tell me the complete circuit of it and if possible the program (in c++)" Else tell me some good links if possible.
Thanx in advance.
mobb..
Report
Re: Interfacing with serial ports Posted by melissa_may1 on 6 Jan 2004 at 8:39 PM
: Hello all.
: I'm computer science student. I need some idea regarding my project rest of work i'll do myself. The simple question is "say I've a small motor (which normally used in VCRs/Tape recorders) and I want to control it from computer (on/off) program. I've connected it to computer serial RS232 port. Please tell me the complete circuit of it and if possible the program (in c++)" Else tell me some good links if possible.
: Thanx in advance.
: mobb..
:

Hi there!

The easiest way to use the serial port to control things like this is to use the control pins of the RS232. Take a look at DSR, DTR, RI, etc.

These pins can either be read (i.e. check the state of the RI), or changed (turn DTR on or off) from software.

You probably need a relay or some electronic buffer circuit to handle the current needed to drive the motor. The RS232 pins are very low current.




Melissa

Report
Re: Interfacing with serial ports Posted by My_Ausweis on 23 Jan 2004 at 12:44 AM
Also don't forget to use ic max232 /st232 to convert rs232 signal from/to ttl voltage

: : Hello all.
: : I'm computer science student. I need some idea regarding my project rest of work i'll do myself. The simple question is "say I've a small motor (which normally used in VCRs/Tape recorders) and I want to control it from computer (on/off) program. I've connected it to computer serial RS232 port. Please tell me the complete circuit of it and if possible the program (in c++)" Else tell me some good links if possible.
: : Thanx in advance.
: : mobb..
: :
:
: Hi there!
:
: The easiest way to use the serial port to control things like this is to use the control pins of the RS232. Take a look at DSR, DTR, RI, etc.
:
: These pins can either be read (i.e. check the state of the RI), or changed (turn DTR on or off) from software.
:
: You probably need a relay or some electronic buffer circuit to handle the current needed to drive the motor. The RS232 pins are very low current.
:
:
:
:
: Melissa
:
:

Report
Re: Interfacing with serial ports Posted by xkgdiam on 25 Jan 2004 at 7:09 PM
also, don't connect anything directly to your port,you can burn the internals diodes of your com very easily.MAX232 is a good choise for
that too, or use opto-isolators ics
: Also don't forget to use ic max232 /st232 to convert rs232 signal from/to ttl voltage
:
: : : Hello all.
: : : I'm computer science student. I need some idea regarding my project rest of work i'll do myself. The simple question is "say I've a small motor (which normally used in VCRs/Tape recorders) and I want to control it from computer (on/off) program. I've connected it to computer serial RS232 port. Please tell me the complete circuit of it and if possible the program (in c++)" Else tell me some good links if possible.
: : : Thanx in advance.
: : : mobb..
: : :
: :
: : Hi there!
: :
: : The easiest way to use the serial port to control things like this is to use the control pins of the RS232. Take a look at DSR, DTR, RI, etc.
: :
: : These pins can either be read (i.e. check the state of the RI), or changed (turn DTR on or off) from software.
: :
: : You probably need a relay or some electronic buffer circuit to handle the current needed to drive the motor. The RS232 pins are very low current.
: :
: :
: :
: :
: : Melissa
: :
: :
:
:

Report
Re: Interfacing with serial ports Posted by melissa_may1 on 26 Jan 2004 at 6:27 AM
: : Also don't forget to use ic max232 /st232 to convert rs232 signal from/to ttl voltage

Just to clarify, the MAX232 converst from serial-port-level voltages to TTL-level voltages. You only need this device if you are connecting the serial port directly to TTL devices.

In fact, it's overkill if you're just picking one or two pins to work with. You could do the same with discreet devices. That said, if you are interfacing with TTL devices, the MAX232 device is the most practical way to do it.

: also, don't connect anything directly to your port,you can burn the internals diodes of your com very easily.MAX232 is a good choise for
: that too, or use opto-isolators ics

Well, that's going a bit too far. Don't connect anything? I'd better run up and disconnect my printer and Wyse terminal from my UNIX system... :)

Many devices can obviously be connected to a serial port without a MAX232 or opto-isolators.

I've done tons of control circuits by wiring dierctly to the control pins of the serial port, and controlling the pins with software.

The first thing to do, of course, is to check out the RS232 specs, and see what voltages are present, when current expectations are, etc.




Melissa

Report
Re: Interfacing with serial ports Posted by xkgdiam on 28 Jan 2004 at 9:25 PM
: : also, don't connect anything directly to your port,you can burn the internals diodes of your com very easily.MAX232 is a good choise for
: : that too, or use opto-isolators ics
:
: Well, that's going a bit too far. Don't connect anything? I'd better run up and disconnect my printer and Wyse terminal from my UNIX system... :)
:
: Many devices can obviously be connected to a serial port without a MAX232 or opto-isolators.

i'm talking about printers or so, they take care of ports in safe,
but if you connect a experimental circuit directly, then a short circuit
or a reverse current (as from a mottor) can do the damage easily.

Report
Re: Interfacing with serial ports Posted by panic mode on 21 Jun 2004 at 7:44 PM
RS232 specification says that any RS232 port must be
designed to survive short circuit conditions. Due nature
of my work, I deal with serial ports all the time,
have two dozen of different cables in my laptop bag,
have shorted two or more RS232 pins on numerous occasions
while testing connections or forcing RS232 port to "talk RS422"
and never had problem like "com port blowing up".
If you are really paranoid, get yourself USB<>RS232
converter, they are really cheap nowdays and you can get
them everywhere.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.