Difference between revisions of "Analog"
Line 5: | Line 5: | ||
== Hardware == | == Hardware == | ||
− | Connect a potentiometer between ground and the ADC pin. Note that the Analog input of the ESP-'''chip''' can only read up to 1V (8bit Resolution= 1024 steps). Most analog hardware available uses either 3.3 or 5V. In order to reduce the voltage, a voltage devider (resistor network) must be used to reduce the voltage accordingly. For a more detailed explanation see [[ Analog Pressure sensor | Analog pressure gauge]] | + | Connect a potentiometer between ground and the ADC pin. Note that the Analog input of the ESP-'''chip''' can only read up to 1V (8bit Resolution= 1024 steps). Most analog hardware available uses either 3.3 or 5V. In order to reduce the voltage, a voltage devider (resistor network) must be used to reduce the voltage accordingly. For a more detailed explanation see [[ Analog Pressure sensor | Analog pressure gauge]] example |
---- | ---- |
Revision as of 22:36, 15 April 2017
Contents
Introduction
The ESP module can read an analog signal and send its value to your controller.
The input signal needs to be connected to the ADC (also referred as Tout) pin on the ESP module. On the ESP-01, this pin is not available.
Hardware
Connect a potentiometer between ground and the ADC pin. Note that the Analog input of the ESP-chip can only read up to 1V (8bit Resolution= 1024 steps). Most analog hardware available uses either 3.3 or 5V. In order to reduce the voltage, a voltage devider (resistor network) must be used to reduce the voltage accordingly. For a more detailed explanation see Analog pressure gauge example
Note that most ESP-Boards (like the NodeMCU, Wemos,...) already have that voltage devider connected between the ESP-Chip Analog pin and their A0-Pin
Software
Custom Sketch
ESP Easy
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "Analog Input" from the dropdown box.
Enter the IDX found in the Domoticz device page. That should be all.