Pages: [1]   Go Down
Author Topic: Analog voltage reference question.  (Read 1146 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a piece of meteorological equipment that takes a 12V input voltage and outputs 0-5V for each of three different sensors.  I also have an Arduino Pro Mini which is a 3.3V device, so I'm going to use a voltage divider on the analog inputs.

But here's my question, I'm not feeding the sensors with the same supply that I would use for ARef.  I'm going to have to take a separate 5V regulated supply and divide it.  Will that work?  My novice understanding is that the Arduino simply compares the input to the reference, so I'm basing my results on the fact that the sensor output SHOULD be in the range 0-5V.  I might lose a little bit of accuracy but I can live with that.
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I'm not feeding the sensors with the same supply that I would use for ARef.
Doesn't matter, as long as there's a common ground.

Quote
I'm going to have to take a separate 5V regulated supply and divide it.
Why?  Aref is, by default, internally tied to Vcc, which is running off the 3.3V regulator on the Pro Mini.

You'll need to divide the 5V outputs to match a 3.3V ADC, make sure the devices use a common ground, and you're done.

-j

Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why?  Aref is, by default, internally tied to Vcc, which is running off the 3.3V regulator on the Pro Mini.

You'll need to divide the 5V outputs to match a 3.3V ADC, make sure the devices use a common ground, and you're done.
Why?  Because ..... well I don't know why. smiley-grin

I was thinking of the voltage dividers I've seen which simply divide in half.  So if I did that my 0-2.5V signal would need to be compared to a 2.5V reference, right?  But if I can split that 0-5V signal into 0-3.3V then that would be cool and groovy!

How do I do that?  Got to be the right combination of resistors right?  I could be showing my ignorance here, but the dividers I've seen have two equal resistors to ground and to the input pin with the signal in the middle.  I have not done any research on this clearly.  :smiley
Logged

Copenhagen / Denmark
Offline Offline
Edison Member
*
Karma: 6
Posts: 2360
Do it !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes you just find the formula for voltage dividers and find the combination of resistors that gives you the output you want.

Try this : http://www.raltron.com/cust/tools/voltage_divider.asp
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you choose, for example, a 1.7k for the "top" divider, and a 3.3k for the "bottom" (or a 3.4k and 6.6k), this will translate your 5v down to a 3.3v range.

I guess the examples showing equal resistors do that to make it a bit more obvious what's happening.

FYI, you generally want to pick resistors that aren't going to lead to a lot of current flow.  E.g. a 17 ohm and a 33 ohm would divide 5v to 3.3v, but the resulting 50 ohm path to ground would likely draw way to much current from your sensor output, drawing excessive power and either distorting the data or killing the device.  The 1.7k/3.3k I suggested are a decent place to start, but you could go up (3.4k and 6.6k, etc).

Keep in mind with standard resistor values (or resistor values you happen to have on hand), you may have to make some small compromises that will result in less than a max of 3.3v at your divider output.  You'll have to determine how much that means to your application...

-j

Logged

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 91
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Awesome guys, thanks!  I should have done more research of course, but this is exactly what I need, and now I can go about getting this off the breadboard and into a finished project.
Logged

Pages: [1]   Go Up
Jump to: