Results 1 to 7 of 7

Thread: Serial port, relay, and a bunch of LEDs

  1. #1
    _
    Join Date
    Mar 2004
    Location
    Little Elm, Texas
    Posts
    13,501

    Serial port, relay, and a bunch of LEDs

    I'm looking for a way to turn a batch of relays on and off all at the same time via the PC.

    I'm thinking it's possible to do so with just a serial port, some wire, and a relay.

    Only thing is, I'm not sure what pins on a serial port I would need to use.

    I can pretty easily figure out the ground...but not the other ports...partially because I'm not sure how this would be coded...or if there's a simple program would allow for something like this.

    Anyone?

    btw - if at all possible, I'm not wanting to use a phidget board for something like this if at all possible.
    Jan Bennett
    FS: VW MKIV Bezel for 8" Lilliput - 95% Finished

    Please post on the forums! Chances are, someone else has or will have the same questions as you!

  2. #2
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Well the least amount of pins you would use for a only out connection would be ground and DataSend. For a minimalist send/recieve then just ground, dataSend, and dataReceive.

    Also you won't be able to control a relay directly from a serial port. You will need to use a transistor to ramp up the voltage and then send through a relay.

    What happened to that board everyone was checking out earlier with all the LED's?

    Also do you want to turn the relays all on or all off, or do you want to control them all individually from the PC?

    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  3. #3
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    9,851
    Also if you wanted only 2 controls, and no way of fine control meaning just on/off then don't even mess with the data signals. Just use the DTR and RTS ports.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  4. #4
    Variable Bitrate
    Join Date
    Jan 2007
    Location
    Szeged, Hungary
    Posts
    293
    And as far as I know, THERE IS a parallel port on the mainboard of your MII (as pinouts).
    By means of this you could be able to drive approx. 12 relays (8 data lines + other lines of diff. purpose). You also have at least 2-3 digital inputs via parallel port.
    A cheap transistor like BD138/139 is enough to drive an automotive relay.

    Other possibility is to use FETs, that is more space-sparing, but could provide less current (max 5A) - of course depending on the type of FET.
    My example is for a tiny SMD irlms6802, other TO-220 package FETs could go up to 100A.
    When you want to switch high currents, I recommend relay, but for smaller things - like lamps under 60W - FETs are enough.

    Under XP you have to use a driver that allows you to use the printer port directly (eg.: AllowIO). Under W98 it is included.

  5. #5
    _
    Join Date
    Mar 2004
    Location
    Little Elm, Texas
    Posts
    13,501
    Quote Originally Posted by 2k1Toaster View Post
    What happened to that board everyone was checking out earlier with all the LED's?
    If I wanted to control RGB or do some cool pattern or something then it would be a good board..well, that and I've already got a lot of 12v white LEDs that apparently won't work for that...I'd have to source a whole bunch of random LEDs.

    Also do you want to turn the relays all on or all off, or do you want to control them all individually from the PC?
    Here's the deal. The amps will all be lit with white leds. The amps are mounted on 1/8" black plexi, then 1/4" clear plexi, then 1/8" steel plate that will be painted black as well.

    The white LEDs will shine through just the clear plexi.

    It would be cool to be able to have them do patterns and what not, but not if it requires sourcing a bunch of one off LEDs that all have to have resistors soldered in, and have to mess with 30 wires per amp and try and fit them, along with rca, speaker, and power and ground through a 2 1/4" pipe...lol
    Jan Bennett
    FS: VW MKIV Bezel for 8" Lilliput - 95% Finished

    Please post on the forums! Chances are, someone else has or will have the same questions as you!

  6. #6
    _
    Join Date
    Mar 2004
    Location
    Little Elm, Texas
    Posts
    13,501
    Quote Originally Posted by bbalazs View Post
    And as far as I know, THERE IS a parallel port on the mainboard of your MII (as pinouts).
    I need to change that since that set-up isn't in my car any more...actually I'm in the process of changing out the system.

    Thanks for the other information!
    Jan Bennett
    FS: VW MKIV Bezel for 8" Lilliput - 95% Finished

    Please post on the forums! Chances are, someone else has or will have the same questions as you!

  7. #7
    Newbie
    Join Date
    Feb 2007
    Location
    Santa Cruz, California
    Posts
    26
    If you want an example of a simple serial to relay driver interface, we've published our schematics, PCB layout, and assembly source for our Serial I/O product on our website here:

    http://www.bibaja.com/products/index.php?page=serio

    We use a ULN2003 driver to drive the relays. This widget was originally designed to live inside a Mini-ITX PC and connect to the internal COM port pin headers that VIA provides on some models.

    Good luck with your project!
    Mark Stubbs
    Bibaja, LLC
    http://www.bibaja.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •