-->
Page 5 of 9

Re: ADC ??

PostPosted: Fri Feb 13, 2015 10:37 am
by hreintke
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

Re: ADC ??

PostPosted: Fri Feb 13, 2015 12:11 pm
by pvvx
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

Re: ADC ??

PostPosted: Tue Feb 17, 2015 5:36 am
by SpenZerX
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?

Re: ADC ??

PostPosted: Sat Feb 21, 2015 4:46 am
by HolgerW
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