Go Down

Topic: Using ADC with barebones Arduino (Read 2437 times) previous topic - next topic


I am working on building a few bare-bones arduinos a la:


I have come across this statement in the tutorials I've checked out:

"Pin 20 needs to be connected to power if ADC isn't being used, and if it is, it needs to be connected to power via a low-pass filter. (A low-pass filter is a circuit that lessens noise from the power source)."

Can someone please point me towards the necessary information to add such a low-pass filter to my circuit?

Also, if I'm just interested in using I2C, which uses analog pins 4 and 5, do I need the low-pass? Is I2C using the ADC?

My potential applications of I2C include:
Adafruit's I2C backpack: https://www.adafruit.com/products/1049
Reading an accelerometer: http://www.seeedstudio.com/depot/grove-3axis-accelerometer-p-765.html?cPath=144_146

Thanks very much for any help you can offer!


The low-pass filter is recommended if the ADC is being used. Whether it is essential or not depends on how noisy the +5V supply is and how accurate and consistent you needs the ADC readings to be. If you are not using the ADC, or you don't need its full accuracy, you can connect that pin (AVcc) directly to Vcc. Some Arduinos (for example, the Uno) don't have a low-pass filter on that pin.

I2C is totally separate from the ADC, even if it is using pins that can also be used as analog inputs such as A4 and A5.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.


A simple low pass filter would be a 10 ohm resistor and a 220uF electrolytic + 10uF ceramic - this reduces all noise from 100Hz up, and in particular will kill off a lot of the digital noise (which is mainly high frequency).  There will be a little voltage drop through the 10 ohm resistor but probably only a few millivolts.

Alternatively an RFC can be used (radio-frequency choke) instead of the 10 ohm resistor. Choosing the right RFC is more involved though.

If you are running from a battery you'll find there isn't that much noise on the 5V rail from just the microcontroller.  Running from a switch-mode power supply or DC-DC converter and you'll see definite noise if you don't filter it out in my experience.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up