reading electricity meter ir impulses

9,556

Circuit Image

Yesterday, an attempt was made to read the infrared impulses from an electricity meter using a phototransistor. The phototransistor can detect infrared signals from various remote controls in the house but fails to detect the blinking signal from the electricity meter, which is visible with a camera and appears bright and powerful. The issue may stem from the fact that remote controls emit a long train of pulses, while the meter only emits a single short pulse. This could indicate that either the frequency response or sensitivity of the phototransistor is inadequate. An oscilloscope may be necessary to visualize the signal. There is confusion regarding the circuit configuration, particularly the connection of a 10k resistor from the phototransistor to pin 2 of the Arduino, raising questions about how the Arduino biases the phototransistor and the mode of pin 2. It seems more appropriate for the resistor to connect to +5V, with the junction of the phototransistor and resistor leading to pin 2. There is also a noted issue in the Arduino code, where an attempt to control a status LED with a delay function is problematic since delays do not function in the interrupt service routine. The short impulse from the meter likely explains the detection issue, contrasting with the remote control's longer pulse train. There is a suggestion to modify the code accordingly. Additionally, the necessity of a pull-up resistor on the Arduino is mentioned, which is likely 100k, but a smaller resistor may be needed for better speed.

The circuit involves a phototransistor that detects infrared light emitted by the electricity meter. The phototransistor's output is connected to an Arduino microcontroller, specifically to pin 2, which is configured to receive digital signals. The 10k resistor serves as a pull-up resistor, but concerns arise regarding its value and the overall biasing of the phototransistor. It is crucial to ensure that the resistor connects to the +5V supply to properly bias the phototransistor, allowing it to switch states effectively when it detects an infrared pulse from the meter.

In this setup, the phototransistor operates in a mode where it conducts current when exposed to infrared light, resulting in a change in voltage at pin 2 of the Arduino. The Arduino's pin mode must be set to INPUT to detect these changes. If the phototransistor is not sensitive enough or if the pulse width from the electricity meter is too short, the Arduino may not register the signal, leading to the observed issue.

To analyze the output from the phototransistor, the use of an oscilloscope is recommended. This tool can visualize the signal waveform, providing insights into the frequency and duration of the pulses emitted by the electricity meter. Adjustments to the code may be necessary to ensure that the interrupt service routine correctly handles the short pulse from the meter, allowing for accurate detection and response.

In summary, the circuit's effectiveness relies on the proper configuration of the phototransistor, resistor values, and Arduino code. Ensuring that the phototransistor is adequately biased and that the microcontroller is set up to handle the incoming signals will enhance the likelihood of successfully reading the infrared impulses from the electricity meter.Yesterday I was triyng to read the infrared impulses from my electricity meter. The phototransistor I`m using, can see the IR from all the remotes in the house. but doesn`t read the blink from the electricity meter. I can see the IR blink of the meter with any camera, is bright and powerful enough. I wonder why the phototransistor doesn`t see it You see the remotes since they put out a long train of pulses, the meter is apparently only putting out one short pulse. So either the frequency response or the sensitivity of the phototransistor is too low. Do you have an oscilloscope that you can view the signal with You see the remotes since they put out a long train of pulses, the meter is apparently only putting out one short pulse.

So either the frequency response or the sensitivity of the phototransistor is too low. Do you have an oscilloscope that you can view the signal with But I don`t really understand your circuit. You have a 10k resistor going from the PT to pin 2 of the Arduino. So how does the Arduino bias the PT What is the mode of pin 2 It would seem that you would want the resistor going to +5V and the junction of the PT and the resistor going to pin 2.

Just saw in Arduino`s documentation that I actually have a problem in my code. I`m trying to turn the status LED on and off there. and that`s not possible with a delay (just learned that delay doesn`t work in the function called by attachInterrupt: ). You were right, the impulse probably is too short and I don`t have a blink and with remote control works because they put out a long train of pulses.

I should modify the code to: But I don`t really understand your circuit. You have a 10k resistor going from the PT to pin 2 of the Arduino. So how does the Arduino bias the PT What is the mode of pin 2 It would seem that you would want the resistor going to +5V and the junction of the PT and the resistor going to pin 2. Yes, I asked from the start about the 10k resistor. There must be a pull up resistor on the Arduino. It is probably 100k. To get speed I think the pull up to +5V resister must be much smaller than 100k. There are some unknowns here. 🔗 External reference