Use an ESP32 PWM and A/D for a vehicle loop detect.
Posted: Fri Jan 19, 2024 2:33 pm
Like the saying, Know enough to be dangerous, but not enough to do anything. That is how I am about this question.
I have seen many circuits using a 555 to generate a square wave to connect to an in-ground loop for vehicle detection. Then use a voltage comparison to determine a voltage drop because a car is over the loop and changes the voltage. Seems like the ESP32 PWM could generate the square wave and the A/D senses the voltage change. If so, what would that look like?
Update: 1/22/2024
I did generate a PWM and looped it back into the ESP32. Then using 'FreqCountESP', I was able to count the frequency. Maybe now I am getting into circuit design rather than programming, but are there any ideas?
I have seen many circuits using a 555 to generate a square wave to connect to an in-ground loop for vehicle detection. Then use a voltage comparison to determine a voltage drop because a car is over the loop and changes the voltage. Seems like the ESP32 PWM could generate the square wave and the A/D senses the voltage change. If so, what would that look like?
Update: 1/22/2024
I did generate a PWM and looped it back into the ESP32. Then using 'FreqCountESP', I was able to count the frequency. Maybe now I am getting into circuit design rather than programming, but are there any ideas?