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.

need some suggestions for this circuit-PIC light dimmer

Status
Not open for further replies.

bogdanfirst

New Member
ok. i have this circuit. it uses a PIC(not shown in the diagram) to drive some lamps trough a triac. the cicuit is intended to work only with exact connections for Phase and Ground. i want to make the circuit work even if the mains connections(phase and ground) are swapped. so i need to drive the triac with an optoinsulator and figure a way so that i don't have the phase connected to the PIC directly in case the mains ground and phase are swapped.
the pic is not shown in the figure. the optocoupler is used to provide syncronization with the phase for the pic. the triac is driven from the pic directly.
 
bogdanfirst said:
ok. i have this circuit. it uses a PIC(not shown in the diagram) to drive some lamps trough a triac. the cicuit is intended to work only with exact connections for Phase and Ground. i want to make the circuit work even if the mains connections(phase and ground) are swapped. so i need to drive the triac with an optoinsulator and figure a way so that i don't have the phase connected to the PIC directly in case the mains ground and phase are swapped.
the pic is not shown in the figure. the optocoupler is used to provide syncronization with the phase for the pic. the triac is driven from the pic directly.

I can't see a diagram anywhere!.

So, while I can't comment on the circuit, all you need to do is derive zero-crossing pulses off a bridge rectifer - this gives a zero-crossing pulse for each half cycle, independent of mains polarity.
 
oops. sorry for that.......

here is the diagram....
 

Attachments

  • dimmer.JPG
    dimmer.JPG
    43.4 KB · Views: 1,010
Re: oops. sorry for that.......

bogdanfirst said:
here is the diagram....

Feed the input to the opto-isolator from a mains bridge rectifer, so from the positive side of the bridge to R3, and from the negative side of the bridge to bottom end of the LED - disconnecting it from ground of course.

This will give you zero-crossing pulses every half cycle, you will probably have to rewrite the PIC software to compensate.
 
ok. just one more question.
how could i insulate(optoinsulate) the triac from the other circuit. lets lasy i have another circuit powered from battery wich will need to driva the triac. and i need optoinsulation.
 
what about this modification? all i need is to drive the triac via an opto coupler. could i use the same type as the first on.
note. the optocoupler is an a.c. type. it also has a diode in reverse connected in paralel with the led.
 

Attachments

  • dimmer3.GIF
    dimmer3.GIF
    15.1 KB · Views: 998
bogdanfirst said:
what about this modification? all i need is to drive the triac via an opto coupler. could i use the same type as the first on.
note. the optocoupler is an a.c. type. it also has a diode in reverse connected in paralel with the led.

Slight mistake, you've fed the PSU for the PIC (R6 etc.) from the output of the bridge, that still needs feeding from the incoming mains (DC won't work too well with a capacitive mains dropper).

Yes, you could use the same sort of opto-coupler to feed the triac - but it would be pretty pointless as the PIC is still live! - you would need to feed the PIC from a mains transformer.
 
what about now?
also i am not familiar to insulating the triac. do you have any link to a circuit that showa how to do it?
 

Attachments

  • dimmer4.GIF
    dimmer4.GIF
    17.4 KB · Views: 1,039
I really don't understand, why You need an opto for sync., if the PSU not isolated from mains. See this:
 

Attachments

  • dim.gif
    225.4 KB · Views: 907
Sebi said:
I really don't understand, why You need an opto for sync., if the PSU not isolated from mains. See this:

Using a bridge rectifier gives you a zero crossing signal every half cycle, the method in the diagram only gives one every full cycle. An opto-coupler is a convenient way to generate a narrow zero-crossing pulse, every half cycle - because it's connected to the bridge rectifier, and therefore 'floating' at half mains, the opto-coupler isolates it from the full mains.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top