atmega standalone circuit

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.

You might try placing a small capacitor (non-polarized) between the audio inputs/outputs and the DS1809, plus caps across the power supply pins and grounds of the DS1809...

The second issue is that my 5v power regulator is getting really hot.
Even if the circuit is only drawing about 100mA.

That's because the 7805 is not a very efficient beast, especially when dropping 12V to 5V, as noted. You should really put a heat sink on that device, and maybe a small fan. However, it might be better to look into one of the "new" switcher regulators for replacing the 7805; they aren't cheap, though; see:

http://www.dimensionengineering.com/DE-SW050.htm

...as an example.

:slight_smile: