> I am making a simple light dimmer for my kids and > I am having hard time to make it work with a triac. > I am using pic16c72 hardware pwm , MOC3010, and Power triac. > The pic works fine I checked it with scope when I connect it > thru opto triac the lamp suppose to turn on low and go higher brightness > all I see while PWM goes from 0-70 % blinks a few times > and stays on on higher duty cycle for load I use regular 110 v lamp. > when I connect any LED on PIC output I can see it slowly increases > the brightness I am not sure if same thing happening inside of MOC3010. > I do not know what is wrong with it any help will highly appreciated. > attached is the schematic. Umm, I think your problem is you can't use PWM with a triac. A Triac will stay on until the current going through it goes to zero (i.e.. a zero crossing). Usually dimming is done using phase delay triggering. The longer you delay triggering after a zero crossing the less average power delivered to the bulb, this is how many dimmers work (unfortunately it suffers from alot of EMI if not designed and shielded well). The ones you can buy for a few dollars usually consist of a variable resister, a capacitor (which with the resistor creates a voltage divider with adjustable phase as well), a diac (so the triac doesn't get triggered with the few volts it needs to be triggered) and a triac. To implement this with a PIC simply detect zero crossings, delay a while and then trigger the triac, it will shut itself off again at the next zero crossing. Hope this helped. TTYL -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body