Problem with powering arduino through a switch

Dear all,

I am working on an interactive sculpture, in fact I am one step away from finishing the project that has taken nearly a year to produce!

My circuit is the one attached in the image.

My problem is that I have wired everything up as shown in the diagram but when I use the switch to turn the power to the arduino micro on and off it makes a strange high pitched buzzing sound and the sensors work erratically.

When I remove the switch from the circuit and have the arduino plugged straight into a 9v 1amp power supply everything works perfectly and their is no buzzing sound. I have also tried powering via USB, and this works too and have tried switching the switch from a push button to a toggle switch and both of these switches make this strange buzzing sound and erratic behaviour happen.

Another point to add is that if the switch is on when I plug the power in everything works fine, but when I turn the switch from on to off and back on again the buzzing and issues begin.

This is the very last things to work out and I am stumped! Please let me know if you might have any bright ideas.

Many thanks,

Aphra.

Hi,
What is your power supply that you use switch in?
Can you post a picture of your project please?
Can you try this, with the switch buzzing, use a piece of wire and short the terminals on the back of the switch, so you are bypassing the already closed switch to see if the buzzing stops.
Have you tried using just two pieces of wire, instead of the switch, and connected them together by hand to see if you get a buzzing.
Where exactly is the buzzing noise coming from?

Tom..... :slight_smile: