Arduino AC + DC voltage measurement

Thread Starter

rpschultz

Joined Nov 23, 2022
838
Well, long story. I can't seem to get the esp32 and the new circuit (post 15) to work. I suspect it is some code thing specific to esp32 that is different than Arduino Nano that I don't understand yet.

However, I was able to take a circuit I built for Arduino Nano last fall and get 2 different versions to work.

1st:, original zero crossing code from Amanda Ghassaei, I added all the specific frequency stuff at the end. This jumps around a bit but in general works. It has a delay in it.
Zero Crossings Video

2nd: Using same circuit, I uploaded code from this Arduino Forum thread (same frequency stuff I wrote). As Jerry suggested, more gain is better. I increased my original gain from 5 to 20 and that helped a lot. This does not have any delays in it, and seems to work pretty well.
AutoCorrelation Code Video

Both codes use pin A0... but I'm not sure how to specify ESP32 pins.
 

Veracohr

Joined Jan 3, 2011
783
If you have an oscilloscope I recommend measuring the output of your pickups. If I recall, my generic humbuckers get to about 1V peak at the beginning of the pluck.
 
Top