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.
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..
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.
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.