Author Topic: Basic electronic question[Serial port]  (Read 2299 times)

0 Members and 1 Guest are viewing this topic.

Offline h3roTopic starter

  • Full Member
  • ***
  • Posts: 110
  • Helpful? 0
Basic electronic question[Serial port]
« on: March 24, 2008, 08:26:56 PM »
Hallo,

Im working on a very small project, but I would like to check with you people before I accually do somethingg.

I want to connect some relays to my serial port, but I have a small problem. The voltage in the serial port is not strong enough to trigger my relays.
Would it work if I connect some capacitors before the relay, like this showed in the picture?

Thanks in advance for any help

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,653
  • Helpful? 21
  • narobo.com
Re: Basic electronic question[Serial port]
« Reply #1 on: March 24, 2008, 08:31:58 PM »
serial port won't have enough current to trigger your relays

connect a transistor to trigger the relays and that should solve all your problems .Transistor is then connected to serial port. SO serial port utnrs on transistor which triggers relay
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline h3roTopic starter

  • Full Member
  • ***
  • Posts: 110
  • Helpful? 0
Re: Basic electronic question[Serial port]
« Reply #2 on: March 24, 2008, 08:34:12 PM »
Do I have to connect a battry to the transistor as well? I played a round with it, and could not get it to work without a battery.

Thanks

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: Basic electronic question[Serial port]
« Reply #3 on: March 24, 2008, 09:06:56 PM »
yes. a transistor is like a relay. but it's solid state and has 3 pins. imput output and the trigger.
maybe try parallel port? more outputs and probably easier to interface.  http://www.codeproject.com/KB/cs/csppleds.aspx
« Last Edit: March 24, 2008, 09:08:16 PM by ed1380 »
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline h3roTopic starter

  • Full Member
  • ***
  • Posts: 110
  • Helpful? 0
Re: Basic electronic question[Serial port]
« Reply #4 on: March 25, 2008, 01:42:22 AM »
Quote
yes. a transistor is like a relay. but it's solid state and has 3 pins. input output and the trigger.
maybe try parallel port? more outputs and probably easier to interface.  http://www.codeproject.com/KB/cs/caplets.asp


i am using the parallel port. Sorry for giving the wrong information.

I have re done my "diagram". Is it correct now?

Thanks for the replies so far :)

EDIT:
I managed to press the notify button. If a admin checks in, I'm sorry.
« Last Edit: March 25, 2008, 01:45:30 AM by h3ro »

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Basic electronic question[Serial port]
« Reply #5 on: March 25, 2008, 02:54:24 AM »
This is difficult, if not impossible to do.  The serial port's pin's arent meant to be set "on/off" but rather to transmit data through quick on/off's.  I'm not sure if it is possible to just set a certain pin to be high or low indefinitely

As for using a transistor to switch a relay, you need to check that the transistor you are using is capable of switching your relay (check current ratings, as well as max voltage input). 

You can probably buy some premade board that switches relays from your serial port, with a nice interface.  Otherwise, you could easily do it with a microcontroller, although it would be overkill; just have it wait for the "on command" from the serial port (you can send it through the hyperterminal) and then respond by making your I/O pin connected to the transistor high or low.

If you are experimenting with your serial port you may want to buy a cheap USB-serial converter (<$10 from Amazon) and a USB hub with a fuse to protect your computer.

Offline h3roTopic starter

  • Full Member
  • ***
  • Posts: 110
  • Helpful? 0
Re: Basic electronic question[Serial port]
« Reply #6 on: March 25, 2008, 03:05:17 AM »
Quote
This is difficult, if not impossible to do.  The serial port's pin's arent meant to be set "on/off" but rather to transmit data through quick on/off's.  I'm not sure if it is possible to just set a certain pin to be high or low indefinitely

As for using a transistor to switch a relay, you need to check that the transistor you are using is capable of switching your relay (check current ratings, as well as max voltage input).

You can probably buy some premade board that switches relays from your serial port, with a nice interface.  Otherwise, you could easily do it with a microcontroller, although it would be overkill; just have it wait for the "on command" from the serial port (you can send it through the hyperterminal) and then respond by making your I/O pin connected to the transistor high or low.

If you are experimenting with your serial port you may want to buy a cheap USB-serial converter (<$10 from Amazon) and a USB hub with a fuse to protect your computer.

Thanks for your reply.

For "protection" im using a really old laptop that I dont care to much about, but ill look into the USb converter. Can I program it the same way or do I need to start changing thing?
I am using the parallel port, not the serial port. I mistaken when I created the thread. Is the parallel port better, or does it not make a difference?
Is my diagram correct or am im mistaken somewhere?

I want to try to keep everything as simple as possible. I find it hard to get started when I dont know how anything work. It is better to have a "base" to work from.

Thanks again

Offline bulkhead

  • Full Member
  • ***
  • Posts: 102
  • Helpful? 0
Re: Basic electronic question[Serial port]
« Reply #7 on: March 26, 2008, 01:31:11 AM »
Sorry, I didn't see that you were using the parallel port.  In that case, I suggest you post again for assistance with the parallel port, as I really don't know anything about them.

USB-serial converters "emulate" a serial port.  Once you install the correct drivers for the USB-serial converter, the device, whenever it is plugged in, should show up as a serial port under control panel>device manager>ports> comX where X is the com port number.

What exactly are you trying to do?  I don't know how popular (or if it's even possbile) to get/emulate a parallel port on a modern computer with USB ports only.  You might need to consider that if you plan to move on from your "test laptop".

Also, if you want to do more than just switch relays, you may want to start with a microcontroller kit.  If it is really just switching relays, there may be easier ways around this.

 


Get Your Ad Here

data_list