Arduino Yun Analog from 0-5v to 0-1v Scale

Hi All,

I have a device that outputs analog readings on a scale of 0-1v. I understand the Yun reads voltages between 0-5v. How do I implement a 0-1v reading solution within my code? I have attached my .ino file for a reference.

Thank you very much,
Orchard

Dust02.ino (6.94 KB)

Depends on the accuracy required. 0 to 1v is an analogue range of 0 to approx 200. If this is sufficient accuracy, use that range and multiply to give the reading you want.

Otherwise make an amplifier with a gain of 5.

Weedpharma

Hi Weedpharma,

Thank you for the advice. Are you able to shed some light into a schematic for an amplifier? Pardon my inexperience.

Thank you,
Orchard

I have not worked on design of amps for many years so would not be much help.

There are other members that have current skills that may be able to help.

Weedpharma

according to the reference leonardo supports AnalogReference(INTERNAL); analogReference() - Arduino Reference
Jantje

Hi,

If you read down the page you will find that you can use an external analog reference.
This means if you have 0 to 1V, then you can input a fixed voltage of 1V to the ARef pin and you will have full 10bit AtoD from 0 to 1V, instead of 0 to 5V.

Tom..... :slight_smile:

Orchard87:
Hi Weedpharma,

Thank you for the advice. Are you able to shed some light into a schematic for an amplifier? Pardon my inexperience.

Thank you,
Orchard

Here is a good reference on Instrumentation Amplifiers.

Orchard87:
Hi All,
I have a device that outputs analog readings on a scale of 0-1v. I understand the Yun reads voltages between 0-5v.
...

Yun has hardware bug, the power supply has only ~4.5V and changed with environment temperature, Yun reads voltages between 0-~4.5v and changed with environment temperature as well.
Use second generation Yun shield or Dragino Yun shield to void problem.

Doesn't the Yun have a 1.1volt Aref.
Use that, and you don't need external hardware.
Leo..

http://www.arduino.cc/en/Reference/AnalogReference

Official Arduino document misrepresents ATmega32u4's AnalogReference

Motorola/Atmel ATmega32u4 document

AVCC is connected to the ADC through a passive switch. The internal 2.56V reference is generated
from the internal bandgap reference (VBG) through an internal amplifier. In either case, the
external AREF pin is directly connected to the ADC, and the reference voltage can be made
more immune to noise by connecting a capacitor between the AREF pin and ground. VREF can
also be measured at the AREF pin with a high impedance voltmeter. Note that VREF is a high
impudent source, and only a capacitive load should be connected in a system.

internal 2.56V reference

So a resolution of 400 steps when you measure 0-1volt with a 2.56volt Aref.
2.5mV/step.
Leo..