Arduino Mega ADC reading error

Hi, i am using arduino mega for my project. Arduino mega is powered by external regulated 5v(connected to usb connector 5v and Gnd). Aref pin is connected to same external regulated 5v too.
Volt meter(zmpt101) is powered by same external 5v too. With above setup i get the smooth and stable voltage reading at my adc pin.
Problem is when i connect ultrasonic sensor(hc-sr04) to arduino mega, the voltage reading is not stable(value will goes up like 5 points and not stable). Ultrasonic sensor Vcc and Gnd are connected to Arduino 5v and Gnd.
Any idea what is triggering the voltage reading unstable when ultrasonic sensor is connected?

AREF should not connected to anything except a 100 nF capacitor on the PCB. Try removing that connection. As it is, if you try to use the internal 1.1 reference voltage, you may destroy the ADC.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.