QUOTE(sshlady @ Sep 9 2008, 03:39 PM)
a part of my project is to control electrical appliances using pc.
parallel port<mcu<electrical appliances ie: lamps,fans etc
a friend did almost the same project only that he uses led to demonstrate the appliances part where he needn't to consider 240V ac supply from ac mains. here is where i got it all confused.
1)how do we isolate the high voltage from mcu and pc?
-i googled around and found this. http://www.codeproject.com/csharp/control_...&select=1286423
It says opto coupler isolate the pc from ac power supply. How about the relay?i only heard about these two components over a year ago. so, complete noob here.
2) i want to add a dimmer circuit connected to my lamp/bulb.
pc>mcu>dimmer>lamp>ac mains
i should add an opto coupler between mcu and dimmer, no?
my primary concern is safety.So i need some assurance that this will not blow up on me. *Hee*
Added on September 10, 2008, 8:44 pmhelp, anyone?
i'm going less technical with the explaination. What youre planning to to do is actually quite easy. On a parallel port (That LPT1), each 'ON' state supply 5v on the each of the 8 output pins.parallel port<mcu<electrical appliances ie: lamps,fans etc
a friend did almost the same project only that he uses led to demonstrate the appliances part where he needn't to consider 240V ac supply from ac mains. here is where i got it all confused.
1)how do we isolate the high voltage from mcu and pc?
-i googled around and found this. http://www.codeproject.com/csharp/control_...&select=1286423
It says opto coupler isolate the pc from ac power supply. How about the relay?i only heard about these two components over a year ago. so, complete noob here.
2) i want to add a dimmer circuit connected to my lamp/bulb.
pc>mcu>dimmer>lamp>ac mains
i should add an opto coupler between mcu and dimmer, no?
my primary concern is safety.So i need some assurance that this will not blow up on me. *Hee*
Added on September 10, 2008, 8:44 pmhelp, anyone?
so what you should do is pretty much use that 5v to flick a wall switch. That where the relay comes in. the 5v will drive the relay which will to turn on another circuit, in this case the AC 240 main switch for the appliance. Your friend on the other hand uses that 5v directly to light up an LED.
How to achive the ON state on the pins, is by programmatically duping the PC into believing it's talking to a printer/etc thru the parallel port.
the guide above pretty much explains that, and it comes with the DLL that simplifies the process. But you still need to be handy with VB.NET/C# to make any good use of it. write a code that call the DLL and use the HEX addressing to trigger the ON state on the pin u choose. each pin will have one relay, tht switch one circuit, that will turn ON one appliance.
The opto coupler are there to protect your PC's motherboard from back EMF coming from the parallel port. It's good to have if you love your PC, but not a nessessity to get it to work.
And finally, do you want to control the dimming from the PC as well? If yes, then thereare two approach to that, mechanical approach or by using a controller. Well go to that once you've experimented with the above guide and understands the "idea" first.
Oct 30 2008, 02:26 PM

Quote
0.0145sec
0.48
7 queries
GZIP Disabled