I am trying to create an electric meter reading setup for Arduino, and I have been searching for it and almost every posts available is using LDR sensor.

http://www.reuk.co.uk/wordpress/solar/flashing-led-on-electricity-meter/ https://jonarcher.info/2014/03/arduino-based-electricity-monitor/

And since it is using LDR, the system should be kept in a dark area, or that the LDR is taped to the flashing LED so that no other light source will interfere the sensor.

But I wanted to have a different setup, and what I am thinking is:

  1. inside the electric meter, tap into the blinking LED
  2. From the LED, connect it to an LLC (https://www.sparkfun.com/products/12009)
  3. From the LLC, connect it to the Arduino
  4. Arduino will sense/detect the pulse of the LED.

Is this a possible setup? Will it not fry the Arduino or the LLC? Will Arduino be able to detect the pulse?

If not, are there any other options? can I use discrete components instead? (I will be the one creating the circuit connection for the LED and Arduino, using resistor, diodes, etc.)

  • 1
    You know you aren't allowed to open you electricity meter, right? If the company finds out, you're screwed.
    – Gerben
    Feb 27, 2018 at 15:49
  • Yes, I am quite aware of that. But this is for a project only. :)
    – weyhei
    Feb 27, 2018 at 15:51
  • Relieved to hear that. Then an opto-coupler is the most ideal solution.
    – Gerben
    Feb 27, 2018 at 15:54
  • for a project only ... is this for a school project? ... if i was teaching your course, i would give you lower marks because of the use of an illegal hack
    – jsotola
    Feb 27, 2018 at 17:09

1 Answer 1


When you aren't using the same power supply as the product you are interfacing with, it's usually a good idea of have some form of electrical isolation, which is what the LDR+LED was doing -- there was no way for a voltage spike to reach the Arduino, nor was there any way that different "ground" potentials could cause problems. (Imagine if the ground reference for the meter was floating at a high voltage with respect to earth-ground, but your Arduino power supply's negative line was referenced to earth ground.)

A good way to get electrical isolation is with an opto-coupler, also called an opto-isolator, which is essentially an LED and a photo-transistor inside the same package. The LED side is completely electrically isolated from the photo-transistor side, but light can pass from the LED to the phototransistor.

You would connect the opto-coupler so that current passes through the LED side when the pulse happens, and with a pull-up or pull-down resistor on the phototransistor side, which gets pulled down or up (depending on the circuit) when the LED is on.


simulate this circuit – Schematic created using CircuitLab

  • so this means the LED side of the opto-coupler will be the one tapped into the electric meter's LED?
    – weyhei
    Feb 27, 2018 at 15:36
  • Correct. Depending on the particular model of opto-coupler, you can put it's LED in series with the meter's LED and hope the voltage drop will not be too much, or you can just replace the meter's LED with the opto-coupler's LED if you are allowed to make that kind of modification. Feb 27, 2018 at 15:49
  • Oh okay. How about the connection for the Arduino side? Is it okay if the 5V will come from Arduino Uno's 5V and then the "Arudino input" will be connected to Arduino's Pin 10?
    – weyhei
    Feb 27, 2018 at 15:53
  • 5V would come from the Arduino 5V supply, yes. The input would be any digital input pin -- if your code wants to check pin 10, no problem. Feb 27, 2018 at 15:57
  • If you plan to put the opto, instead of the led, you may have to add an additional resistor in series with the led. Depending on what value they used in the meter. As the opto uses a IR led, which has a lower forward voltage that the visible led you'd replace.
    – Gerben
    Feb 27, 2018 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.