I'm quite new to working with arduinos and I hope that maybe one of you could help me. What I am currently trying to build is a data logger for a kWh meter that we're using for one of our energy projects. We are using a Eastron SDM230-DR power meter (https://www.linemetrics.com/wp-content/uploads/2021/04/SDM230D_Series_Manual.pdf).
The power meter has 2 pulse outputs, for imported and exported energy. The test pulse output rate is 1000imp/kwh. So my idea was to count the amount of pulses so that I can convert this to kWh and log this per time.
I've started by reading the input data from the power meter.
On the power meter there are three ports.
8 = Pulse 1 Export active energy
9 = COM Ground
10 = Pulse 1 Import active energy
I've connect 9 to the GND, and 10 to the A0 port of the arduino UNO. I've placed a data logging shield over my arduino UNO. But I am not using the capabilities of this shield yet.
My results:
When the wires are connected to the power meter, but there is no flow of electricity through the power meter (it is off, see my second picture), the arduino still measures a pulse output? I am really confused by this..
What I hope to achieve:
*A better understanding of how the arduino can register a pulse when the power meter isn't turned on.
*How I should read the pulses properly, if that is even possible?
The key word that I tuned into was pulse. The I see the code trying to read the analog values of the pulse. Most likely one would want to count pulses, for a time. The do the math to get the kwh. If it is 1000 pulses per kwh then do the math.
Thank you. I changed the analog to a digital read, now I get 0 and 1 in my readings. Which is a lot better. If the power meter is on (so the lamp is on), I get these as my readings from the input.
I think that the signals that you are seeing are noise/mains hum that you are picking up on the wiring between the meter and the Arduino.
Try twisting your GND and signal wires together to reduce noise pickup.
That instruction sheet for the meter doesn't give a lot of information about the pulse output (other than it is 1000 pulses/kWh), however at the bottom of the introduction section, it does say that it is passive.
I think that means that there is no voltage coming out of the meter, but it is just being switched to the common.
If this is the case then you have to connect a pullup resistor to the +5V supply. The easiest way to do this is to use the internal pullup resistor on the input you are using.