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