Need settling time for sct-013-030 (Used w/Nodemcu)
-
My project involves sensing the current on my washing machine (115VAC). If statements will check for zero amps and 2.5 amps or greater up to 30 amps. Unfortunately during power-up or reset the com port displays some garbage current reading and need to figure out how to allow the readings to settle to close to zero before continuing to on. Here are the initial power-up or reset problematic reading:
Current ON
75.01
Current ON
16.88
Current ON
3.98After this settles the reading start to report steady current reading. The only problem if the current does not settle out close to zero from the start it will cause false "IF" statement triggers.
Here are the results after the current settles out. I turn the load on and off to show the current reading.
Current ON
2.51
Current ON
2.55
Current ON
2.52
Current ON
2.50
Current ON
2.55
Current ON
2.40
No Current
0.17
No Current
0.04Here is the unfinished code.
https://pastebin.com/kDjx5zQM -
My project involves sensing the current on my washing machine (115VAC). If statements will check for zero amps and 2.5 amps or greater up to 30 amps. Unfortunately during power-up or reset the com port displays some garbage current reading and need to figure out how to allow the readings to settle to close to zero before continuing to on. Here are the initial power-up or reset problematic reading:
Current ON
75.01
Current ON
16.88
Current ON
3.98After this settles the reading start to report steady current reading. The only problem if the current does not settle out close to zero from the start it will cause false "IF" statement triggers.
Here are the results after the current settles out. I turn the load on and off to show the current reading.
Current ON
2.51
Current ON
2.55
Current ON
2.52
Current ON
2.50
Current ON
2.55
Current ON
2.40
No Current
0.17
No Current
0.04Here is the unfinished code.
https://pastebin.com/kDjx5zQM@goddur Hi, and welcome to the forum!
So what exactly is your question/problem?If it is the time until you get a stable reading after reset of the Arduino, you could just count the time until you get a stable reading.
Then include this delay after startup before reporting the first value and you're done.
Something like:static int startupCycles = 10; // 10 seconds initial startup delay void loop() { delay(1000); Irms = emon1.calcIrms(1480); // Calculate Irms only if (startupCycles) { --startupCycles; return; } if (Irms < .2) { // your original code... } }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login