arduino making 7805 output noisy

doors666:
Then I took measurements with the mega connected to 7812 and generating the PWM. the 7805 output has become very noisy (even at 10 times the scale of 200mv).. How do i avoid/suppress this.

How much current is being controlled by the PWM signal?

Do you have a groundplane and good high-frequency layout (ie minimum
stray inductance)?

Are you aware that standard scope probes pick up induced voltages need
swtiching/logic circuits that are spurious. A low-impedance probe properly
connected is the only way to see anything like the true signal on a power rail.

You are seeing switching transients on the timescale of 10's to 100's of ns - stray
inductance and capacitance dominate the picture in that regime.