hello all,
i am using a the ADC of Espeasy Esp8266 to measure the temperature (TMP37 20mv/C)
full scale is 1024= 1v which means in my case that i need to divide the ADC value by 19
According helppage i can do this by using %valu%/19 at the bottom of the Devices / task settings / values.
Problem:
sometimes it shows the "Raw" value and sometimes the calculated values.
Therefore Domoticz via MQTT sometimes e.g. 20 (degrees) and sometimes 380.
any idea.
using Binary Filename:⋄ ESP_Easy_mega_20240229_normal_ESP8266_4M1M
thanks/ Dankie
EspEasy (8266 adc)
Moderators: grovkillen, Stuntteam, TD-er
Re: EspEasy (8266 adc)
You should use this in the formula field:
(You had a typo in your post)
And how is this sensor connected?
Do you use a long cable?
Have you tried adding some small capacitor close to the ESP over A0 and GND? (100 nF)
Does your board have resistors soldered to the A0 pin? A lot of boards have resistors to scale 3V3 or 3V6 down to 1V to the A0 pin.
Code: Select all
%value%/19
And how is this sensor connected?
Do you use a long cable?
Have you tried adding some small capacitor close to the ESP over A0 and GND? (100 nF)
Does your board have resistors soldered to the A0 pin? A lot of boards have resistors to scale 3V3 or 3V6 down to 1V to the A0 pin.
Re: EspEasy (8266 adc)
Thanks, indeed a typo,
the sensor is connected via a buffer opamp directly connected to ESP8266 ADC input.
Voltage are verified with an oscilloscope (Tektronic ) no spike whats so ever.
besides that. if so then you can't have one moment 377 and next moment 19
these two values are pretty close to the formula %value%/19
(the reason why it is not exactly 19 is die the fact that i cannot read the adc value "raw" and divided at the same time)
If the input voltage is "unstable" then there should be more different values then close to divided by 19 and it is always close to 19.
i am pretty sure its not a hardware issue. i have attached the schematic. please shoot at it if something is not correct.
thanks
i will try to add an 100nF at the input but that's not considered as good engineering because the opamp is capable to source/sink a lot of current into/from the capacitor.
Ps
ignore dutch and english text in schematic
the sensor is connected via a buffer opamp directly connected to ESP8266 ADC input.
Voltage are verified with an oscilloscope (Tektronic ) no spike whats so ever.
besides that. if so then you can't have one moment 377 and next moment 19
these two values are pretty close to the formula %value%/19
(the reason why it is not exactly 19 is die the fact that i cannot read the adc value "raw" and divided at the same time)
If the input voltage is "unstable" then there should be more different values then close to divided by 19 and it is always close to 19.
i am pretty sure its not a hardware issue. i have attached the schematic. please shoot at it if something is not correct.
thanks
i will try to add an 100nF at the input but that's not considered as good engineering because the opamp is capable to source/sink a lot of current into/from the capacitor.
Ps
ignore dutch and english text in schematic
- Attachments
-
- schematic 2024-03-10 114828.png (190.28 KiB) Viewed 1161 times
Re: EspEasy (8266 adc)
in addition attached a picture of Domoticz temperature of the central heating radiator. temperature is going from eg 20 degrees to 383.
As you can see a normal cooling down of a radiator if you ignore the scale.
As you can see a normal cooling down of a radiator if you ignore the scale.
- Attachments
-
- chart.jpeg (47.42 KiB) Viewed 1158 times
Re: EspEasy (8266 adc)
I meant 100 nF at the analog input of the ESP.
It is just to suppress any noise picked up when using a longer cable.
Took me a while to find the Dutch words in the schematic, but found them![Lach :)](./images/smilies/icon_e_smile.gif)
I can be blind to those myself as it is my "moerstaal"![Lach :)](./images/smilies/icon_e_smile.gif)
Do you use "oversampling" on the ADC plugin?
This will also leave out the min and max. value seen during the oversampling period.
The analog input may give some erratic value when WiFi is active.
ESPEasy will try to not take a sample when WiFi is active, but if there is only a single sample taken every N seconds, you might get the fluke value, which would have been filtered out when using oversampling.
I don't understand how you may get any value over ~50 if you're using the formula %value%/19.
Do you have some other calculations set in the ADC plugin?
It is just to suppress any noise picked up when using a longer cable.
Took me a while to find the Dutch words in the schematic, but found them
![Lach :)](./images/smilies/icon_e_smile.gif)
I can be blind to those myself as it is my "moerstaal"
![Lach :)](./images/smilies/icon_e_smile.gif)
Do you use "oversampling" on the ADC plugin?
This will also leave out the min and max. value seen during the oversampling period.
The analog input may give some erratic value when WiFi is active.
ESPEasy will try to not take a sample when WiFi is active, but if there is only a single sample taken every N seconds, you might get the fluke value, which would have been filtered out when using oversampling.
I don't understand how you may get any value over ~50 if you're using the formula %value%/19.
Do you have some other calculations set in the ADC plugin?
Re: EspEasy (8266 adc)
In your graph I was expecting to see mostly values around 20 degrees, and a couple of 'spikes' around the 400 mark, but it's more the other way around, mostly around 400, and only a few in the 20-range. Not sure what to think of that yet.
/Ton (PayPal.me)
Re: EspEasy (8266 adc)
That's what i want to explain.
it is mostly the measured value and not the calculated value. so it cannot be the input voltage and an 100nF won't do anything unless it is at the input of the buffer
must be software but will replace the ESP8266, maybe an micro issue.
it is mostly the measured value and not the calculated value. so it cannot be the input voltage and an 100nF won't do anything unless it is at the input of the buffer
must be software but will replace the ESP8266, maybe an micro issue.
Who is online
Users browsing this forum: No registered users and 19 guests