Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Controlling 220V (lights) with my PC (parallel port)

Status
Not open for further replies.

Maxx0r

New Member
Hello all,

I am trying to connect my pc to a 220V circuit. The final idea is to have a (winamp) plugin control my parallel port output, to connect that through a solid state relais to a 220V system so that I can have disco lights.

I successfully made a circuit like that with a conventional relais (see below for picture)... but the clicking noise is annoying...

I have a S202S02 (.pdf!) solid state relais. Can I use it? If so, how? Simply replacing the relais with my SSR doesn't seem to do very much, but I don't understand why. I did read the available documentation (or, all I could find)... but frankly I don't even understand what voltage I need to make that SSR conducting. The documentation .pdf mentions Electro-optical Characteristics: Forward voltage: typ 1.2 V, max. 1.4 V. Does that mean that I shouldn't put more than 1.4 V across the DC part of the S202S02? :)

Uncertain as a proper newbie I feel I probably oversimplified the working of a SSR (I see it as a noiseless normal relais).

This is the circuit I used when I had a normal relais. LPT is the Parallel port of a PC, and "input / output" is the high voltage (220 V) side.
**broken link removed**
 
Use a complemtary darlington pair to drive the relay.

The NPN (Q1) transistor you're using is fine. Connect the collector of it to the base of the PNP (Q2) transistor. Connect the +5V to Q2's emitter. Connect Q2's collector to the coil and the other end of the coil to ground.
 
Maxx0r said:
Hello all,
I have a S202S02 (.pdf!) solid state relais. Can I use it? If so, how? Simply replacing the relais with my SSR doesn't seem to do very much, but I don't understand why. I did read the available documentation (or, all I could find)... but frankly I don't even understand what voltage I need to make that SSR conducting. The documentation .pdf mentions Electro-optical Characteristics: Forward voltage: typ 1.2 V, max. 1.4 V. Does that mean that I shouldn't put more than 1.4 V across the DC part of the S202S02? :)


This is the circuit I used when I had a normal relais. LPT is the Parallel port of a PC, and "input / output" is the high voltage (220 V) side.
**broken link removed**

Hi,
Look at this, from your datalink.

Take care as its mains powered circuit.

If you dont understand, ASK.;)
 
Last edited:
millsy5 said:
Use a complemtary darlington pair to drive the relay.

The NPN (Q1) transistor you're using is fine. Connect the collector of it to the base of the PNP (Q2) transistor. Connect the +5V to Q2's emitter. Connect Q2's collector to the coil and the other end of the coil to ground.

hi mills,
The OP wants to use a solid state relay, the mechanical relay works OK.

Can you see what you have missed out from your circuit description.?..:rolleyes:
 
Last edited:
ericgibbs said:
hi mills,
The OP wants to use a solid state relay, the mechanical relay works OK.

Can you see what you have missed out from your circuit description.?..:rolleyes:

ok, i only half read his problem :eek: .

i'm not as familiar with ssr's but i'd imagine that the signal at the base of the transistor isn't strong enough to drive it. the addition of the second transistor will increase the gain high to supply enough current.

his initial cct with the electromagnetic relay probably would not have worked if he used a higher rated coil eg +12V or higher.
 
hi mills,
The transistor idea was OK, you left out the resistors.
When Q1 switches ON, it connects the base of Q2 directly to 0V, either Q1 or Q2 would be damaged.

I hope you dont mind me pointing this out.:)
 
Maxx0r said:
The documentation .pdf mentions Electro-optical Characteristics: Forward voltage: typ 1.2 V, max. 1.4 V. Does that mean that I shouldn't put more than 1.4 V across the DC part of the S202S02? :)
[/IMG]
Yes. The relay has a LED diode input with a 1.2V to 1.4V drop when on. This controls the output optically to provide isolation. It requires a current, thus you need the resistor in series with the input to provide the proper current, (as shown in the circuit reference by ericgibbs).
 
Thanks all for replying to my problem :)

Ericgibbs, are you suggesting I connect it directly to my parallel port, with only a resistor in between?

How can I find out myself which resistor I should place in series with the low voltage side of the SSR? I can't seem to measure the resistance of the low voltage side (it's >200 k :eek:hm: , which seems a bit high to put in series with a ).

Funny thing: because this forum requires a moderator to review the first post of a newbie, I got no reply for a few hrs. Result: me being impatient, and just connecting the SSR where the normal relais is in my original scheme, and using a piece of wire connected to the +5V to "imitate" a signal from my parallel port (I was scared to connect it to the real PC). It just worked. The lamp was going on and off when I connected. But when I take off the 220V, my multimeter measures a very high resistance (inf?) in the 220V side of the SSR, even when it should be open. Can someone explain? (I'm a n00b, but eager to learn).

Anyway, is there a general flaw in my scheme (given the fact that it seems to work?) <-- they say that the only stupid question is the one you don't ask. I take comfort in that :D
 
You should be using a Opto-Isolator, at least that is what I was using when playing with X10 control. I am only playing with 110 here even though I would suggest using a opto type system.

-BaC
Just my 2cents
 
Maxx0r said:
Thanks all for replying to my problem :)

Ericgibbs, are you suggesting I connect it directly to my parallel port, with only a resistor in between?
Yes

How can I find out myself which resistor I should place in series with the low voltage side of the SSR? I can't seem to measure the resistance of the low voltage side (it's >200 k :eek:hm: , which seems a bit high to put in series with a ).
My sketch has the series resistor value to use.

:D
can't seem to measure the resistance of the low voltage side (it's >200 k , which seems a bit high to put in series with a ).
You are measuring a light emitting diode, with a DMM, you will get a high resistance value.

Hi,
Assume that the output pin of the parallel port is +5V when its High, [its actually more like +4V]

The Vfwd across the opto emitter is 1.2V.

So 5-1.2 = 3.8/.02 =190R, depending on the actual level of the voltage on the port pin you may have to reduce it to about 150R.
Measure the pin voltage with a DMM.

Look at my previous post drawing.

Does this explain it OK.?
 
Last edited:
Thanks for explaining.
I'm assuming that the value "0.02" that you divide by comes from the 20 mA that is specified in the .pdf that I linked to earlier (see 1st post)... (And then you use the well known V = IR).

I overlooked the specified amperage, which did complicate things for me :D

Also thanks for stating that I can connect the SSR directly to the parallel port. I thought that the power of the parallel port was insufficient.

Finally, can you tell me why the other scheme (in my first post) uses a 4.7 k:eek:hm: resistor? It seems to me that the more ohms, the safer for the PC (although, with an optically coupled circuit, like in my case, the dangers aren't that great anyway). Is this one higher because the transistor (BC547) is more, lets say, sensitive?

Thanks again! I'll be trying to build the whole thing (for 4 data pins and 4 lights) later today. I'll be trying it on an old PC, so if I make a mistake there's no crying or cursing :D
 
Maxx0r said:
Thanks for explaining.
Finally, can you tell me why the other scheme (in my first post) uses a 4.7 k:eek:hm: resistor?
Because the transistor requires far less base current to make it operate than does the 'emitter' diode in the opto ic.
It seems to me that the more ohms, the safer for the PC
Safer from what.?
(although, with an optically coupled circuit, like in my case, the dangers aren't that great anyway).
Thats is not quite correct, the opto still requires a resistor in order to limit the current thru the diode, thats drawn from the port pin.

Is this one higher because the transistor (BC547) is more, lets say, sensitive?
Yes

Thanks again! I'll be trying to build the whole thing (for 4 data pins and 4 lights) later today. I'll be trying it on an old PC, so if I make a mistake there's no crying or cursing :D

Hi,
I would remind you that while the low 5V port voltages are safe to work on , the MAINS side of the opto isolator/triac is NOT.
Draw and post a circuit of what you plan to do, before you build it.

REMEMBER: do NOT make a direct connection from the Mains output side of the opto isolator/triac to the PC driver side.

Do you follow.?
 
Maxx0r said:
I can't seem to measure the resistance of the low voltage side (it's >200 k :eek:hm: , which seems a bit high to put in series with a ).

It measures high with a standard ohmmeter since you are measuring the LED diode input. The low output voltage (perhaps 1V or less) of a standard ohmmeter is not enough to turn on the LED so it looks like a high resistance.

But when I take off the 220V, my multimeter measures a very high resistance (inf?) in the 220V side of the SSR, even when it should be open. Can someone explain? (I'm a n00b, but eager to learn).
Do you mean when the ouput is closed (ON)?
The output is likely a TRIAC which would also look like a high impedance to an ohmmeter, even when on. If you apply a couple volts you will see that it's conducting.
 
crutschow, thanks for explaining that.

I've bought some 10 and some 180 ohm resistors, and I plan to make the (simple) circuit as shown by ericgibbs (post #3, Yesterday, 01:42 PM). It seems the easiest, and also making several circuits in parallel is very easy this way.

I won't connect any mains to anything even close to the 5V (and thus my PC) circuit. I'm taking care a lot (let's call it a healthy paranoia about 220V), and I have isolated all connections of the mains side of the optoisolator/triac. I plan to re-do the isolation with silicone caulk to make it permanent once I've tested the circuit.
Thanks for worrying though, I do the same when explaining other engineering things (chemistry) to newbies :D
 
hi,

and using a piece of wire connected to the +5V to "imitate" a signal from my parallel port (I was scared to connect it to the real PC). It just worked. The lamp was going on and off when I connected

This particular opto emitter may have 'died' if you connected directly to +5V, that is without a series resistor.:eek:

You can use single 180R in the circuit rather than a 180R and 10R in series.
 
hi,
If you find that your PC parallel port pins has not got sufficient current drive capability for the opto-isolator 20mA, use the attached circuit.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top