Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By hreintke
#9653 pvxx,
To be honest, I do not completely understand your code but have the following questions.

Are you (shortly) disabling wifi send/receive when reading out current adc value ?
If yes, what effect would that have on web(server) functionality on the esp ?
Would I be able to read adc value around 5-10 times per second ?

In an earlier post in this thread igrr mentions :
'SDK 0.9.3 has a system_adc_read() function that takes care of issues related to WiFi'
How does your implementation compare to the system_adc_read ?

Would I be able to use your implementation using the FREERTOS SDK ?

Kind regards,
Herman
User avatar
By pvvx
#9658
hreintke wrote:In an earlier post in this thread igrr mentions :
'SDK 0.9.3 has a system_adc_read() function that takes care of issues related to WiFi'
How does your implementation compare to the system_adc_read ?

ADC uses 14 bits. The maximum sampling frequency 45..50us (20..22kHz).
Test save 2.6kbytes WAV:
TestWav.gif

Code https://yadi.sk/d/xB_vsQ_bdqeMg , forum http://esp8266.ru/forum/threads/razrabo ... sp8266.56/ + viewtopic.php?f=13&t=1065
Test 1kHz square wave.
1kHz_sq.gif

Test 100Hz square wave + resistor and capacitor.
100Hz_C.gif

FREERTOS SDK = BAG :D
You do not have the required permissions to view the files attached to this post.
User avatar
By SpenZerX
#10000 Hi,
do you think the ADC is capable to measure Voltage from an TGS 4161 Air Quailty Sensor without amplification?
Output Voltage is 350mV + 44-72mV (EMF 350ppm - EMF 2500ppm) i think. Or better connect it with amplification chip?

How accurate is the ADC?
User avatar
By HolgerW
#10309 Hi pvvx,
i tried your code in #9580 but it doesnt work with my 9.2 SDK.
Can you more explain your code, e.g. what means len ? i tried some values but the result is alway 0.
I tried the original read_adc(), it work fine if i call it after i got the http request, but in a 5 sec timer i get very different values.
Can you help please ?

Holger