http://www.microchip.com/Download/Appnote/Category/rDesigns/40171a.pdf is an app note for a Lamp Dimmer for the PIC12C508
Fansler, David says:
- The schematic does not totally match the article
- The load would go between Hot Out and [Return].
- You would supply a Neutral (white wire) to Return.
- You would supply Hot (balck wirefrom power company) to Hot In
- Ground (green) is a good idea. It can be tied to Neutral (which is done in US breaker boxes).
Dave Bell says (Paul B. Webster and Donald Budette aggree) Don't! This is done in US breaker boxes, *but that's the only legal place to do it*! The Green/Grounding conductor should go to case ground if there is a metal case, and not be tied to the circuit anywhere.
- Vcc is generated by the circuit above the PIC (RV1, R1,2, C1-3, D1-3)
- I would take JP1 to be an external input to allow control of the circuit by an outside source (another PIC, automation system, etc.)
- While simple, a fair warning is given in the article that this circuit has no isolation from the AC main and therefore can bite you!
- If used for lighting purposes, this circuit will produce filament hum at low light levels (larger filaments hum more) A large choke in line with the load will kill the hum.
Donald Burdette says:
- C3 absolutely MUST be specifically rated as an Across-the-Line capacitor. C3 is where the line voltage gets dropped down to the Vcc level. If this cap fails shorted, something will blow up (quite literally). Line rated caps will not fail shorted. Don't make the mistake of assuming that R1 is to protect you from this. It will dissipate about 300 watts if the cap shorts, which will probably cause it to explode. R1 is there to limit the surge current when you plug this thing in.
Paul B. Webster says: It should really therefore, be a component rated for the purpose. Called a "fuse resistor", commonly used in TVs and so marked on the schematic. A slo-blo fuse of about 200mA rating may be a good addition.
- If you want to connect this circuit to any other devices, be very careful of grounds. JP3 pin 2 is connected to the line voltage neutral. This can be several volts or more different from ground. That's enough to damage your equipment or make it act wierd. Opto isolators would be a very good idea.
- This circuit switches the neutral line, which is normally not the correct thing to do. It means that when your lamp is off or partially dimmed, both sides of it are HOT, which I think is a violation of NEC rules and is an electrocution hazard.
- Your switches should be carefully selected to ensure that the contacts cannot be touched, even if the switch breaks, as many inexpensive switches will do when there are kids, pets, or clumsy adults around. If your circuit is built and functioning correctly, there's little danger, but if you plug it in backwards or if something fails, those contacts become HOT.
- I agree with David Fansler's wiring recommendations, except for one - if you are in the US, or probably anywhere else, NEVER connect ground to neutral. Ground is a separate circuit designed for your safety, and should never be used to carry current. If you connect it to neutral, will reduce its effectiveness. Also, you may reduce or defeat the effectiveness of GFCI breakers, which are now required for certain outlets in most US home construction.
Speaking of GFCI breakers, I would recommend that this circuit be plugged in through one. It will reduce some of the dangers mentioned above.
M. Admin Davis says:
...note that the triac should ALWAYS be considered to be on. If the only load is a neon bulb, for instance, it won't turn off since it draws so little current.
You might want to:
Questions:
Interested: