MCP9701 Temperature Sensor connected with ADC of ESP12-F

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
vuhams
New user
Posts: 4
Joined: 08 Jun 2017, 10:07
Location: India

MCP9701 Temperature Sensor connected with ADC of ESP12-F

#1 Post by vuhams » 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?
___________________________
HAM Callsign: KD0NER

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#2 Post by toffel969 » 01 Feb 2018, 14:47

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
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

TD-er
Core team member
Posts: 8828
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#3 Post by TD-er » 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.

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#4 Post by toffel969 » 01 Feb 2018, 20:39

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?
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

TD-er
Core team member
Posts: 8828
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#5 Post by TD-er » 01 Feb 2018, 22:33

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=

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#6 Post by toffel969 » 02 Feb 2018, 13:26

TD-er wrote: 01 Feb 2018, 22:33 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=
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)
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

TD-er
Core team member
Posts: 8828
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: MCP9701 Temperature Sensor connected with ADC of ESP12-F

#7 Post by TD-er » 02 Feb 2018, 20:47

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests