I have made a Traic based AC dimmer using Spark Photon Which i am controlling through a Webpage.It is working perfectly,but when my laptop charger is plugged into the socket the light starts to flickr,I think it might be due to EMI of the laptop charger.What can i do so that the light does not flicker when the laptop charger is plugged in?
To give a proper answer we would need to see your circuit. Without it I can only guess and that would be filtering. The laptop charger is a switching supply, causing a lot of noise on the mains. I guess that this noise is what causes the behavior (as you suggest yourself as well). Depending on the frequency of the switching supply in the charger you could use something like a bandpass, lowpass or a notch filter.
I’d rather say it’s purely electric not electro magnetic.
To drive a µC you need properly filtered DC while for charging (what chargers are meant for ;-)) purely rectified (almost) unfiltered would do.
So maybe add some filtering yourself (as @TheHawk1337 suggested) or use a quality DC supply rather than a charger.
Sorry for the late reply
I am using the above circuit.I am powering my Spark Photon from a samsung mobile charger which is plugged in the same socket (Not shown in the above Photo)
@UmangChheda, another member had issues with a phone charger as well. These chargers are not necessarily design to provide clean power, which is often the case. I suggest that you use a high quality supply like an Apple charger or one that is designed to provide 1A of current.
Three times the same advice There must be at least some sense in trying it out, or not?