With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
I sloved the problem completely. Thanks for the help.
Yes.i think the problem lies with intenal and external inturrupts. When we use both in same sketch it doesnt work well. Thats may be the reason when we use delay for dimming,the flickering doesnt apper. I have increased the number of brighness steps for 320. I called the ISR with 30microseconds delays and the flickering reduced to almot zero. To reduce the time concumed for ISR i used Direct port manipulation insted of digitalWrite and pinMode.
Mr. Bloke. Did you run the circuit with the timer inturrupt code. And did it work smoothly? .
Yes. An Uno
i tested it with your sample code ,which does not use the timer interrupts. it worked fine without flicker. flicker is only visible with the timer interrupt code. please help me to solve this problem. thank you.
I used your sample code from the begining. Result is the same.flickring pattren is same. And i used only one lamp.
Thank you verymuch for the responce and yes , i saw your3 bulb example. But i didnt do it that way. I just use your timer interrupt code and copy- paste it 5 times.added 5 variables for zero cross detect ,5 for dim and anothre 5 for i. As you said i added 5 triacs and one zerocrossing detector. That is not the problem. I only used your code and the diagram. But the problem is same. As i said the flickering is periodic. It has a pattern. I powered arduino from the laptop usb.the Flickering can be obsrerved about 70%below the brightness. It depends on the wattage of the bulb. When use 25 w bulb it can obseved from about 70%.when the bulb is 75w there is no flicker obsrved untill about 50%,40%. . When the bulb in full brightness- no flicker.
"Disconnect your microcontroller and put 5 volt on the entrance of your circuit. Do you have flickering too?" I didnt understand this. What do you mean by entrance
Android Bluetooth Control LED. (Part 2)
Now its clear. Thank you very much
thank you. i have another problem.you said that the zero cross detection signal come to the arduino pin 2.but you didn't use that pin as an input anywhere in the written codes.how you track the zero cross signal.attachInterrupt(0, zero_crosss_int, RISING)you use this function. but according to arduino.cc ,first of all ,we need to attach the pin to a interrupt number by using digitalPinToInterrupt(pin) statement .so how your code works. please help me.
Join 2 million + to receive instant DIY inspiration in your inbox.
© 2016 Autodesk, Inc.