-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NO LOAD READINGS ARE FUNNY #27
Comments
Did this work for you afterwards? I'm also seeing occasionally every 30 secs, Voltage and Current values are Crazy ~ Volgate around ~12340 (jump from 226-230) and Current ~426 (jump from 0.3 A) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello @xoseperez i am trying your code in my project for measuring current, voltage power and power factor but somehow it is not working properly or i am unable to ride it properly i am using the code from basic.ino hlw8012 please help.At no load it is giving me readings like Voltage = 0, 480,36000, 0,75... similar to current and power
#define SERIAL_BAUDRATE 115200
// GPIOs
#define RELAY_PIN 12
#define SEL_PIN 5
#define CF1_PIN 13
#define CF_PIN 14
// Check values every 2 seconds
#define UPDATE_TIME 2000
// Set SEL_PIN to HIGH to sample current
// This is the case for Itead's Sonoff POW, where a
// the SEL_PIN drives a transistor that pulls down
// the SEL pin in the HLW8012 when closed
#define CURRENT_MODE HIGH
// These are the nominal values for the resistors in the circuit
#define CURRENT_RESISTOR 0.001
#define VOLTAGE_RESISTOR_UPSTREAM ( 5 * 470000 ) // Real: 2280k
#define VOLTAGE_RESISTOR_DOWNSTREAM ( 1000 ) // Real 1.009k
HLW8012 hlw8012;
void unblockingDelay(unsigned long mseconds) {
unsigned long timeout = millis();
while ((millis() - timeout) < mseconds) delay(1);
}
void calibrate() {
}
void setup() {
}
void loop() {
}
it's not only that i have taken no load readings i also connected 20W bulb to it and then got weird readings. PLEASE HELP
The text was updated successfully, but these errors were encountered: