Page 1 of 1
MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 01 Feb 2018, 14:17
by vuhams
Hi,
How to setup espeasy mega 2.0 to get MCP9701 Temperature Sensor connected with ADC of ESP12-F working?
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 01 Feb 2018, 14:47
by toffel969
vuhams wrote: ↑01 Feb 2018, 14:17
Hi,
How to setup espeasy mega 2.0 to get
MCP9701 Temperature Sensor connected with
ADC of ESP12-F working?
From checking the data sheet:
Yes it is possible.
Be sure to use a voltage divider (ADC pin takes only 1.0V). If you use a Wemos or NodeMCU, the voltage divider is already onboard, i you use a "bare" ESP you will have to build it from resistors. Check the wiki
https://www.letscontrolit.com/wiki/inde ... ge_divider
and supply with 3.3v
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 01 Feb 2018, 19:25
by TD-er
You probably also have to recompile the ESPeasy firmware.
If my memory serves me well, the vcc define is not set for the normal releases. I have no idea why, but it is set as an option using defines in the code.
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 01 Feb 2018, 20:39
by toffel969
TD-er wrote: ↑01 Feb 2018, 19:25
You probably also have to recompile the ESPeasy firmware.
If my memory serves me well, the vcc define is not set for the normal releases. I have no idea why, but it is set as an option using defines in the code.
How does the vcc define relate to usage of normal ADC function?
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 01 Feb 2018, 22:33
by TD-er
As long as FEATURE_ADC_VCC is not set to true, it cannot be used.
Use the source:
https://github.com/letscontrolit/ESPEas ... _VCC&type=
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 02 Feb 2018, 13:26
by toffel969
TD-er, I understand that and I am aware of need to change source to enable it, but isn't this feature just used to measure the supply voltage? I can use normal analog sensors (like TO is trying to do) wiht a "stock" release bin. So please correct me if I am wrong :
1. to measure input Voltage, one needs to change the source. Then the ADC channel shows the input voltage
2. to use analog sensors, the source is not changed. The analog sensor is connected to the adc pin (via voltage divider to reduce voltage to 0-1V)
Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F
Posted: 02 Feb 2018, 20:47
by TD-er
OK, then maybe I have misinterpreted the sourcecode then.
If the ADC is already present, to use in plugins, then I am wrong.
I thought there was only one ADC on the ESP12F and on most boards it is connected to the Vcc via resistors and thus useless for other signals.