Pages: [1]   Go Down
Author Topic: Using ADC with barebones Arduino  (Read 388 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.jameco.com/Jameco/workshop/JamecoBuilds/arduinocircuit.html

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!


Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 223
Posts: 6593
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

0
Offline Offline
Shannon Member
****
Karma: 198
Posts: 11625
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: