@op, care to share the code ? π
Great project!!! ππ
@op, care to share the code ? π
Great project!!! ππ
I will share the code later. But there isn't much to speak of to be honest. 1. sample 2. draw. 3. reddit :)
Thanks, will wait for it π
Great project bro!
Looks amazing! What is the max frequency you can probe on built in ADC?
Thanks. Max sampling rate seems to be near 250ksps if your adc_clk_div=8, but it's done in bursts. I don't know if it would be possible to achieve monotonous sampling for something like audio processing for example. It seems like it should be possible, but I wouldn't bet on that. esp8266 is a strange beast.
If Colorchord is any indication, it's probably possible. I haven't been able to get it to work, but I'm not particularly smart when it comes to programming. See what you can do with it!
Interesting. Colorchord is much more involved than my 2-hours weekend escapade though :)
Upd: I checked out that project. It uses some very old SDK where everything is super-low level. But it seems that he's sampling on timer interrupt and the sampling rate is 8kHz. Which is pretty good for most applications, I might consider this method later.
This video should have sound actually, besides interesting project, keep moving on)
I will be glad to test it my self If you share the code
A weekend project using stuff I bought long time ago and forgot.
I never could find any good info on the builtin ADC in esp8266 before. As it turns out it can be perfectly usable. I'm using a TL074 (only one gate of it) to buffer and centre line level audio signal. It reads as 512 when silent. adc_clk_div is 16, I sample using system_adc_read_fast() and just throw away extra samples. It's a completely offline application so wifi is always off.
[deleted]
Thanks. 160MHz (ADC always runs from 80MHz peripheral clock as far as I can tell).
My sampling goes at about 8us/sample, which is 125ksps. At adc_clk_div=8, it should be double that rate βΒ I haven't tried because even this speed is way more than I need. By the way, I suspect that sample rate is not constant and actually depends a little on values being read βΒ which wouldn't be surprising for a SAR ADC. You can't sample monotonously at this rate, or rather I don't know how to do that.
I display samples at stride 8. Take 1024 samples, display 1 out of 8, that fills 128 pixel wide screen. Buffer length is 3072 samples (\~ 25ms). I take 3x more than I need at once because you never know where the trigger position would be. Having more samples increases the chances of triggering nicely and having a consistent display.
It's worth mentioning that this is a NodeMCU board which has a resistive divider on the ADC pin so the input range is "expanded" to 0..3.3V. On bare modules ADC voltage must not exceed 0..1V. Just something to keep in mind when designing analog front end.
BTW I used this simple calculator for the op-amp resistor calculation:
https://www.daycounter.com/Calculators/Op-Amp/NonInverting-Op-Amp-Resistor-Calculator.phtml