Arudino + LM34 Sensors + 120VAC

Hope I'm posting in the right area lol ....

Ok, I have a Mega 2560 and interfacing with the sensors is not a problem. That's all done working and displaying on a LCD accordingly.

In the same project box I have a 120VAC plug terminating onto a "distribution block" which than connects to a pair of Neutrik PowerCon receptacles but is being controlled by a pair of toggle switches which is rated for the amount of AMPs I'm putting through them, about 1.5A per switch.

Should the 120VAC affect the performance of the Mega? Or could it cause it to just "not work" randomly when the switches are flipped on or off?

My issue is when we toggle the power on or off fairly quickly (within about 5 seconds) sometimes the Mega will just display a blank LCD and seem to not work. Which requires either pressing the reset button or unplugging the wall wart and plugging it back in.

The 120VAC never touches the Mega directly nor does the Mega control the power, it's simply there to read the temp sensors and display on the LCD and happens to be in the same enclosure. To close to each other perhaps?

The only common point the two (mains and Mega) have is they are using the same power strip for power. Any suggestions or ideas would be MUCH appreciated as this is quite puzzling to me.

Decoupling, decoupling, decoupling.......

http://en.wikipedia.org/wiki/Decoupling

The electronic bit.

Ah! I knew I was missing a step in this wiring. Much appreciated, a start cap is on its way that I will utilize for the mains application. I believe that's my weak point in the power side of everything.

Thanks!

Some extra small ones (100nF) on the 5v lines to the processor and the LCD wouldn't go amiss either. It very easy to have too little, and almost impossible to have too much....

Yes those I planned on soon, I'm in the process of experimenting with PCB DIY so should have that portion together in the next week as well. Right now everything is fairly direct wired or on project board and ugly but functional.

Thanks alot!