Using Serial Port to Trigger Electircal Equipment

xxdcmast
09-28-2004, 10:39 AM
Im not even sure if this is possible to do using visual basic or the serial port but this is what I am thinking of doing.

Im trying to write a program that when the user enters the right activation criteria (X, Y, and Z) then the device on the outside of the computer connected to the serial cable will activate some type of small electrical equipment such as a series of leds, or trigger a small switch. Is this even possible and is there any place that someone can point me to begin researching this?

koncept
09-28-2004, 11:14 AM
http://www.visualbasicforum.com/showthread.php?t=189745

Ziess
09-28-2004, 01:37 PM
its pretty easy... the idea is that when you turn on bits on the port, you could then use that to a low voltage relay and then control what ever.

-Ziess

xxdcmast
09-28-2004, 02:39 PM
Thats what im trying to figure out im not really that familiar with bringing stuff from the inside of the computer to make it affect something in the outside world. Other than the program inside the computer and the serial cable what other hardware would i need to use to interface the actual devices i want to control?

Im assuming there would have to be some kind of logic controller that will take a stream of bits and then can determine what pins to set hi/low? I guess this is really more of a hardware question first more than the actual programming.

skip0464
09-28-2004, 02:57 PM
Does your equipment have a command set? all the external equipment i deal with has a command set to control it.

quarque
09-28-2004, 03:30 PM
One quick way is to use the serial port outputs in a non-conventional way. Manually control the RTS line for example using the RTSenable property. You would need to build a hardware interface that can detect that change in voltage (compared to DC common, pin 5). If you do not have electronics experience then find a friend who can help with that part. The transmit line can also be forced high/low using the Break property.

xxdcmast
09-28-2004, 03:30 PM
See thats the thing im not very familiar with takign stuff form inside the comp and making outside stuff work. I dont even know what kind of equipment i would need to do this

quarque
09-28-2004, 03:38 PM
You will not get that sort of electronics help from a forum like this. It sounds like you can handle the software side of things but for detailed help on the electronics you need to find someone locally who can work with you on this. I could tell you how but it would fill a dozen pages. If you want to learn it yourself you should go to a community college.

xxdcmast
09-28-2004, 11:38 PM
Im in college right now but havent learned this yet, if you could point me in the direction of what hardware I need to do this I can begin researching that... thank you

quarque
09-29-2004, 10:35 AM
There are at least a dozen different ways to do this. Basically, you need a device that can sense the voltage difference between 2 pins and control a another device of higher current and/or voltage capacity. The drive capacity of the serial ports is relatively low but might be able to directly drive a low-power LED or lamp. For higher voltage stuff you would need to have it drive a relay (solid state or mechanical) and it in turn controls your device. So the question is what exactly are you trying to control?

xxdcmast
09-29-2004, 11:39 AM
There are at least a dozen different ways to do this. Basically, you need a device that can sense the voltage difference between 2 pins and control a another device of higher current and/or voltage capacity. The drive capacity of the serial ports is relatively low but might be able to directly drive a low-power LED or lamp. For higher voltage stuff you would need to have it drive a relay (solid state or mechanical) and it in turn controls your device. So the question is what exactly are you trying to control?

Ok what I am trying to control is the wires on a remote control car remote. I plan on hooking up the wires corresponding to the forward and backward motion to the pin outs on the board. The remote runs off of a 9.6v battery however i doubt the wires to send the signal to the receiver take that many volts.

SO basically i am looking for a way to connect the remote control to the board so that when a certain sequence of data from the computer is received it activates one or more of the motors.

quarque
09-29-2004, 12:33 PM
You will need to get a DVM and measure the current and voltage in those wires. That will tell you what sort of interface you need to build. This sounds like the "wired" style and not a wireless control?

xxdcmast
09-29-2004, 02:47 PM
You will need to get a DVM and measure the current and voltage in those wires. That will tell you what sort of interface you need to build. This sounds like the "wired" style and not a wireless control?

It is the wireless kind the two wires that I will need to be controlling are the ones on the hand held remote control that make the contact when you push the joystick up. I think connecting those wires will be the easy part it is just what equipment i will need that is giving me the trouble now.

BTW I really appreciate you taking the time to help me out on this so far every professor I have spoken with at my college has looked at me like I had 2 heads, and thats pretty sad considering im going for a computer engineering degree

quarque
09-29-2004, 05:58 PM
yes that is pretty sad. Do they have any hardware-related courses? I would think those people could help. Anyway...
The wireless control will be dealing with low current and low voltages. The next question is what type of circuit is in the control. The easiest way to simulate the contacts of a switch is to use a mechanical relay and drive the relay coil with the serial port signals. See if you can find a relay whose coil needs only about 6 volts and 10mA of current to switch it (tiny little relays are in this realm). This sounds like a fun project.

The Bat
10-02-2004, 04:52 AM
It would be much easier to do what you want using the parallel port. Each switch on the remote could be hooked up to the remote via a transistor to turn it on or off. Using transistors would be practical in a switching situation such as this, relays are only needed for much higher currents. It would only be wired to the remote it would be wireless from there on.To use the serial port you need to be talking to a device that understands RS232. The easiest way to do that would be with a microcontroller but the parallel port would be much easier.

quarque
10-02-2004, 02:26 PM
Yes he could use the parallel port but the output current capacity is pretty wimpy, requiring careful selection of transistors and bias resistors. I think that is perhaps too complicated for a newbie. The serial port can be used in ways other than sending characters (i.e. manually controlling the handshake lines and the transmit line via 'Break'). Transisitors could also be used here as well but again, tricky for a newbie.

webbone
10-02-2004, 04:14 PM
You might want to check here for the Parallel Port to Relay board (and other such items): http://www.electronickits.com/kit/complete/complete.htm

Also, check out this thread for the INPOUT32.DLL which will help you in your quest: http://www.visualbasicforum.com/showthread.php?t=37689

xxdcmast
10-03-2004, 04:05 PM
You might want to check here for the Parallel Port to Relay board (and other such items): http://www.electronickits.com/kit/complete/complete.htm

Also, check out this thread for the INPOUT32.DLL which will help you in your quest: http://www.xtremevbtalk.com/showthread.php?t=37689
I believe I will use the parralel port to send the triggering bits, I understand the use of transistors to be used in upping the current for the items we wish to power. I appreciate all the help you guy have given and will let u kno how it turns out.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum