Arduino Mega 0 - 10V analog input?

Is it possible to configure the Arduino to give me 0-10V analog input?

I realize that I can use a voltage divider. I was just wondering if I can use a larger range for the analog input.


Input voltages can be "scaled" down to suit the Arduino's ADC input voltage range.
As Oli says, a 10V input can be scaled down with a potential divider.
In its most basic form this can be two resistors.

As shown below, the input current flows through R1 and through R2.
Voltage drop across a resistor = V = I x R
As both resistors carry identical current (= input current)
the voltage drop across each resistor is proportional to the resistor value

Arduino Mega 0 - 10V analog input?

So, if R1 = R2 then the the voltage across each is equal so they each drop half the input voltage.

In the general case - input voltage is across R1+R2. Output voltage is across R2 only. So Vout = Vin x R2 / (R1 + R2)

ie the division ratio = R2 / (R1 + R2)

When R1 = R2 the division ratio is 1/2 so
a 0-10V input will be reduced to o-5 volts.

R1 and R2 can be typically 10k ohms each in this case.

Much larger values can be used but they can affect the conversion accuracy. eg 100k + 100k.
Usually it is wise to limit R2 to not more than about 20k ohm.

I believe the analogue pins natively take 0-5V. In which case, you simply need to use a potential divider to halve your input voltage.

You can modify the Arduino (ie, the assembly/pcb) with resistive dividers, op-amps, or whatever to change the input range (though it may be easier to mount these off board) by prescaling the signal before it reaches the AVR chip.

You cannot however increase the actual input range of the AVR chip itself that is on the board.

The resistor divider example is the easiest. If you arrange two resistors of equal value (say 1K ohm & 1k ohm), with one end attached to Ground (0v) and the other furthest end to your input, at the midpoint (ie where they are connected to each other) the voltage will equal half of the input votage. Can't do a very goo diagram here bu esserntially:-

Vinput ---///--- Voutput ---///--- Ground. Where ---///--- is each resistor.

The equation given above is correct.

Think of it as two springs where voltage is how far they are extended; If you pull on the top of both springs, the midpoint will be half the height of the top. Hence half the voltage. An easy pictorial analogy.


Category: input Time: 2011-11-08 Views: 2

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.225 (s). 12 q(s)