In message <001f01c096cd$c6d3b840$b2bcb2d1@engine2000>, Andre Abelian writes >Hi to all engineers. > >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. You can't fed a triac with a PWM output, you have to adjust the point on each mains cycle that you trigger the triac. Basically you need to detect the zero-crossing point of each mains half cycle, then delay before triggering the triac - the shorter the delay the brighter the lamp (being careful not to delay longer than one half cycle). -- Nigel. /--------------------------------------------------------------\ | Nigel Goodwin | Internet : nigelg@lpilsley.co.uk | | Lower Pilsley | Web Page : http://www.lpilsley.co.uk | | Chesterfield | Official site for Shin Ki and New Spirit | | England | Ju Jitsu | \--------------------------------------------------------------/ -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu