romel_emperado
Advanced Member level 2
- Joined
- Jul 23, 2009
- Messages
- 606
- Helped
- 45
- Reputation
- 132
- Reaction score
- 65
- Trophy points
- 1,318
- Location
- philippines
- Activity points
- 6,061
I got this site very detail about the dimmer circuit.. but the source code is written in assembly... ahaha lol I can make my own code as soon I understand the working of the circuitry.
so one thing I dont understand.. the zero crossing detector circuit is connected after the diode so that is no longer AC then how would it detect the zero crosing point?
The transformer is used to provide both power to the circuit and to get the zero cross detection pulse. The 7805 is used to fix the supply to 5 Volts. There are 2 potentiometers connected in series. The first one (R7), is used to set the minimum luminosity (that needs the maximum trigger delay). The R3 is used to control the dimmer! This is actually the control potentiometer.
I hate messing high and low voltages. SAFETY FIRST! That's why i use the transformer for the zero cross detection (and not just some 4 MOhm resistors), and that's why i use the optocoupler. I use the MOC3021, for Greece has 220V mains. For 110/120 volts you may consider using the MOC3011. Check out the datasheet of the MOC series (find it in the Bill Of Materials section at the end of this article).
Sorry about that, sometimes I forget you haven't studied Assembly Language, better put that on your todo list!
I actually haven't had a chance to look at the code, but you should be able to figure out the register configurations for PWM and other peripherals.
ok,,, this is clear.The zero cross detection point is still zero even with full-wave rectification.
this is the problem I don't understand What is the process going on if the zero point is detected..Which is then converted to a pulse or trigger and then feed into GP2
this is the problem I don't understand What is the process going on if the zero point is detected..
I understand this is the timing to control the pulse being feed to triac gate.. still unclear on this part.
ah okay so this is the logic.. when the zero crossing is detected we activate our pwm or that's the time we drive out pwm to the gate of triac ?
and also I found this.. is this good enough?
PIC Writer Programmer - Microchip - WIDE.HK
You can not use the PIC PWM to control an AC lamp using triac.
Plus, in the PIC, frequency is at 100s of Hz or in the kHz range. So, you can't use that. You have to sync the signal with the line frequency.
When using triacs remember to include some kind of mains filter in your design. Triacs tend to generate massive noise in power network without proper filtering.
I actually meant using the PWM in the kilohertz range generated from the CCP module. Guess I was being a little unclear. If you generate a PWM at line frequency, then, yes, of course it is possible.I'm afraid your statement is incorrect, I and countless others have successfully used a PIC, PWM and a TRIAC to control an AC load and there are numerous projects published online and in texts to support this fact.
While your option is a viable one, it is not the only option. A little more research on your part would be prudent before making such a statement.
A PWM frequency in the 100s, 10s or 1s of Hz are all doable, in fact fairly simple to generate. Utilizing the PIC's CCP/ECCP is an option not a requirement.
Hope this clears up any confusion,
BigDog
Yes..PIC microcontrollers are vulnerable while working with AC designs. An optocoupler and a filter is recomended to keep EMI's at bay. While AVR's like the AT tiny 13 may also be implimented to work with AC where the microcontroller may bbe directly connected to AC live through a 2M2 resistor to sense the zerocrossing and the gate of the triac may be directly triggered by the micro eliminating the need of an opto isolator. I have used Attiny in my various designs and are prooved to work well even with capacitor based power supplies which provide compactness to the design.
Cheers
I've also used PIC12F with capacitor-resistor-based transformless non-isolated power supplies and sensed mains zero-crossing with 1M resistor directly and fired triac (gate-sensitive ones) directly from PIC
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?