Hello
I'm working on a small project where I use stand alone ATmega 168 for some audio and LED fading.
It will be a small pcb that runs on 12v and has a audio line input and output.
A Sharp GP2Y0A02YK infrared distance sensor will be used to control audio volume and LED brightness.
It all works quite well except for the things.
As soon as i plug in the Sharp sensor I get a high pitch sound on the speaker.
I'm not sure why this happens but I think I need to separate the audio from the power supply.
The second issue is that my 5v power regulator is getting really hot.
Even if the circuit is only drawing about 100mA.
Here is the circuit diagram. Any suggestions?