interfacing serial port

Discussion in 'The Projects Forum' started by arunmagesh, Jul 24, 2011.

  1. arunmagesh

    Thread Starter New Member

    Jul 24, 2011
    5
    0
    hai i need assitance in making a project to control a set of relay using pc via serial or parallel port. and what software needed for that! thank you in advance
     
  2. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    There are several ways to do this. I'd prefer the parallel port because circuitry gets smaller.

    The output voltages of a parallel port are usually TTL level. Although it might be possible with low current coil relays you should not use the parallel port to directly drive a relay because the output current specs can vary quite a bit.

    I'd recommend to use either a simple npn transistor buffer at the output, use a buffer IC like the SN7407 that has open collector outputs (will need extra 5Vcc though, could take it from an USB port if they have the same ground) or use an optocoupler to drive your relay, like the 6N139 which has low input current and can sink a good amount of current at the output (open collector as well).

    It depends a bit on what voltages / relays you want to work with/ you have at hand.


    There are also readymade products you could buy if you don't want to build one by yourself. http://www.electronics123.com/s.nl/it.A/id.2749/.f

    For software, the easiest would probably be with Visual Basic. Depends also on what exactly you want to do, if it will be part of a bigger software project with automatically switching relays or if you just want to switch on/off the relays with a mouse click.

    Maybe you should explain in detail what you want to do.
     
  3. arunmagesh

    Thread Starter New Member

    Jul 24, 2011
    5
    0
    I want to make a project like controling main lines to various sections of building by using pc! Wireless would be fine! Provide me with ckt diagram. Im not a expert.
     
  4. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    If you are not an expert you'd be better off buying readymade items/modules and to combine them. What you are asking for is the development of a whole system including PCB layout I guess, I doubt that anyone can give you that here.

    This forum is to point you in the right direction, help you about questions on specific circuit diagrams etc.

    For remote wireless switching of power lines you could use TX/RX modules you can buy for a few $ at digikey or newark.

    If it has to be wireless then using a TX-module you could still use the parallel port to transmit data to it. Some level adaption probably has to be made. If there is one centralized place from where you want to switch mains you'd only need one RX-module, whose data you pass to a microcontroller which could then decide which power line to turn on/off.

    So first you have to make a plan on what exactly you want and then you look for a solution.

    Does it have to be wireless?
    Will mains be switched from a centralized distribution unit?
    Are you willing to develop a system? This will cost you TIME.

    There are certainly readymade systems available which you can control over ethernet, like THIS for example
     
  5. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    Using a Serial port would be easier, considering most PC's do not have parallel ports anymore, and if you do not have a serial port, you can get a USB to Serial converter....
     
  6. arunmagesh

    Thread Starter New Member

    Jul 24, 2011
    5
    0
    how to control the seriial or parallel port opertion using pc!!! i am not much into programming.. parallel port is restricted to only 8 output. what to do if i need to extend it like expansion slot. my project is like controlling my whole college power supply with a use of single pc.
     
Loading...