Analog AC Current Sensor
Analog AC Current Sensor
I recently purchased this sensor from DFrobot: Gravity: Analog AC Current Sensor (10A) SKU:SEN0288 along with 30 and 50 amp 1V sensors.
I tested using an Arduino UNO board and the sample program provided here: https://wiki.dfrobot.com/Gravity_Analog ... _#target_5
In the Arduino code editor I set the following lines depending on the sensor I was testing with:
#define ACTectionRange 20; //set Non-invasive AC Current Sensor tection range (5A,10A,20A)
#define VREF 5.0 // set this to 5.0 for the UNO and 3.3 for the ESP32
I used a hair dryer labeled as 1250 watts on a 120v AC line and tested both the highest heat setting and the loweset, unfortunately I do not have a AC current meter to confirm the actual amps being used).
I adjusted the 'ACTectionRange' variable to match the each of the three sensors I bought, recompiled each time and got the following readings:
low = lowest heating setting on the hair dryer
high = highest heat setting on the hair dryer
Arduino UNO
10amp sensor low 1.3a high 7.11a
20amp sensor low .95a high 6.75a
30amp sensor low .72a high 6.11a
conclusion: as I use a larger Split-core Current Transformer sensor the accuracy goes way down. Is there a way to adjust for a larger amp sensor in the code ?
The I tried a ESP32 board which is a 3.3 board with a 12 bit ADC (values from 0 to 4095). I changed the code from voltageVirtualValue = (voltageVirtualValue / 1024 * VREF ) / 2; to voltageVirtualValue = (voltageVirtualValue / 4096 * VREF ) / 2; but the readings seem way off:
ESP32
10amp sensor low .80a high 6.8a
20amp sensor low .00a high 5.3a
30amp sensor low .00a high 3.7a
Is the 'AC Current Signal Conversion Module' board I plug the sensor into which connects to the Arudino or ESP designed for just a specific sensor (example 20amp) ?
what does this line in the code do? where does the value .707 come from ?
voltageVirtualValue = peakVoltage * 0.707; //change the peak voltage to the Virtual Value of voltage
thanks
I recently purchased this sensor from DFrobot: Gravity: Analog AC Current Sensor (10A) SKU:SEN0288 along with 30 and 50 amp 1V sensors.
I tested using an Arduino UNO board and the sample program provided here: https://wiki.dfrobot.com/Gravity_Analog ... _#target_5
In the Arduino code editor I set the following lines depending on the sensor I was testing with:
#define ACTectionRange 20; //set Non-invasive AC Current Sensor tection range (5A,10A,20A)
#define VREF 5.0 // set this to 5.0 for the UNO and 3.3 for the ESP32
I used a hair dryer labeled as 1250 watts on a 120v AC line and tested both the highest heat setting and the loweset, unfortunately I do not have a AC current meter to confirm the actual amps being used).
I adjusted the 'ACTectionRange' variable to match the each of the three sensors I bought, recompiled each time and got the following readings:
low = lowest heating setting on the hair dryer
high = highest heat setting on the hair dryer
Arduino UNO
10amp sensor low 1.3a high 7.11a
20amp sensor low .95a high 6.75a
30amp sensor low .72a high 6.11a
conclusion: as I use a larger Split-core Current Transformer sensor the accuracy goes way down. Is there a way to adjust for a larger amp sensor in the code ?
The I tried a ESP32 board which is a 3.3 board with a 12 bit ADC (values from 0 to 4095). I changed the code from voltageVirtualValue = (voltageVirtualValue / 1024 * VREF ) / 2; to voltageVirtualValue = (voltageVirtualValue / 4096 * VREF ) / 2; but the readings seem way off:
ESP32
10amp sensor low .80a high 6.8a
20amp sensor low .00a high 5.3a
30amp sensor low .00a high 3.7a
Is the 'AC Current Signal Conversion Module' board I plug the sensor into which connects to the Arudino or ESP designed for just a specific sensor (example 20amp) ?
what does this line in the code do? where does the value .707 come from ?
voltageVirtualValue = peakVoltage * 0.707; //change the peak voltage to the Virtual Value of voltage
thanks
2023-06-16 13:40:02
I cant make it work with ESP32, only read 0, could you share the way you make it with esp32. thanks
Luis.Correa