ADC sampling at 2kHz

Posts: 1
Joined: Wed Aug 08, 2018 2:50 am

ADC sampling at 2kHz

Postby phoenixchinar » Wed Aug 08, 2018 3:26 am

I am trying to use ESP32 to control power to an appliance using a relay. The appliance is sensitive to have the right voltage, but our power supply is not consistent. I want ESP32 to turn the appliance off, in case the voltage is not within the range. I am using a ZMPT101B voltage sensor to feed the ADC on the ESP32. I would like to have around 2 kHz sampling rate, so as to get the supply voltage on each cycle (detecting +/- peaks on each cycle - the power supply is at 50Hz).

Is it possible to setup a continuous ADC sampling, or should I use HW timer to call an interrupt and then do the ADC sampling from there? I will be using ADC1 for the purpose.

New to IOT world!

Who is online

Users browsing this forum: No registered users and 9 guests