Don_dody
Full Member level 1
- Joined
- Nov 4, 2012
- Messages
- 96
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Indonesia
- Activity points
- 1,921
This project will control the lighting system inside a room. It will maintain comfortable light intensity by dimming or brightening the AC lamps based on the outside light source (sun).
3 LDRs are used to measure light intensity inside a room (LDR front, LDR middle, LDR back). Output of these LDRs will be used to control 3 AC lamps (front, middle, back.
A zero crossing detector is used to enable the external interrupt of my AVR. Phase firing theory is also implemented.
Now, I've built the whole hardware and my problem is in programming.
I can dim one AC lamp by MANUALLY change the firing delay time through the code.
My Problem:
1. I don't know how to dim THREE AC lamp at once with different intensity?
2. I can display the ADC value (8bit) into LCD but I cannot use it to automatically change the firing delay of three lamps. Let say if ADC1 > 200 then increase firing delay1, if ADC1 < 150 then decrease firing delay1. So do ADC2 and ADC3
Please help me out.
I use codevisionAVR for compiling.
3 LDRs are used to measure light intensity inside a room (LDR front, LDR middle, LDR back). Output of these LDRs will be used to control 3 AC lamps (front, middle, back.
A zero crossing detector is used to enable the external interrupt of my AVR. Phase firing theory is also implemented.
Now, I've built the whole hardware and my problem is in programming.
I can dim one AC lamp by MANUALLY change the firing delay time through the code.
My Problem:
1. I don't know how to dim THREE AC lamp at once with different intensity?
2. I can display the ADC value (8bit) into LCD but I cannot use it to automatically change the firing delay of three lamps. Let say if ADC1 > 200 then increase firing delay1, if ADC1 < 150 then decrease firing delay1. So do ADC2 and ADC3
Please help me out.
I use codevisionAVR for compiling.