ADC - Use ADC and Ameba to make a voltmet
Introduction of ADC
- ADC (Analog to Digital Converter) component is capable of coverting analog signal to digital signal. The ADC component of Ameba is of 12-bit precision, and its effective range of measurement is 0V ~ 3.3V, so the minimum measurable difference i voltage is 3.3V / (2^12-1) = 8mV.
- Ameba x 1
- 10KΩ Potentiometer (Variable Resistor) x 1, if you don’t have potentiometer in hand, the 3V3 & 5V on Ameba can be used instead.
ADC is widely used in processing analog signal, such as voltage, audio signal, light, temperature, …etc. In real-life use case, ADC can be used to measure the voltage of a battery, or read the value of a volume knob.
In this example, we use ADC to get the voltage value. Open the sample code in “File” -> “Examples” -> “01.Basics” -> “ReadAnalogVoltage”
You can find detailed information of this example in the documentation of Arduino: https://www.arduino.cc/en/Tutorial/ReadAnalogVoltage We use analogRead(pin) to read the value from the specified analog pin directly: https://www.arduino.cc/en/Reference/AnalogRead