Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Light Intensity Control with PWM (MOC3021)

Status
Not open for further replies.

macmmt

Newbie level 5
Joined
Dec 21, 2009
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
USA
Activity points
1,345
Hello,

I'm trying to control the light of a bulb with PWM. I'm using a PIC 18f2550 since i have to send information to the computer through USB and receive the set point from it.
As optocoupler, I have a MOC3021 that is coneccting the control circuit with the power circuit. In the power circuit I use a Triac BT136.

As I change the duty cycle of the PWM, It is supposed to change the intensity of the light, but it doesn't work. The PWM is working alright. I guess the problem is something with the power circuit or with the optocoupler.

I would like you help me to determine where the problem is.

Thanks for your help.
 

PWM with triacs and 50/60Hz mains won’t work ..
All what you can play with is 180deg – this will be your 0% to 100% of light intensity .. google for PHASE ANGLE TRIAC FIRING CIRCUITs ..
Once you understand how a triac can be triggered you’ll also understand why PWM is just wrong concept here ..

First, you have to synchronize PIC with the mains ..
Usually this is done with “zero-crossing” detector ..
Microchip has and appnote telling all about how to make a dimmer with a pic 12f508 ..
You hook one lag of the mains with a 20 Mohm resistor to RA 4 and the pic can read it when it zero crosses so you could use that part to read your zero crossing ..
https://ww1.microchip.com/downloads/en/AppNotes/40171a.pdf
From here you can start firing triac at different angles; 1deg resolution seems to be more than enough ..

Rgds,
IanP
:|
 

Thanks fro the reply.

Can I use the same configuration with PIC 18F2550?? or Could you tell any zero crossing detector circuit?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top