Capacitance over long wires

I'm measuring LED pulses from a electricity meter using an LDR connected to the Arduino. I've attached the circuit, but in essence

5V - LDR - Split to Arduino_PIN2 and 150K to ground. The itself is connected to about 15m of very thin twin-core flex cable.

The LED I'm trying to measure is quite dim, so I had use 150K resistor between the LDR and ground to offset the voltage going to the arduino enough to get a shift between high and low. I measured using a oscilloscope (forgot the waveforms at work):
LED off: 1.8V at lowest
LED on: 3.9V at highest

BUT you can clearly see the capacitance of the wire becoming an issue. The pulse is extremely rounded. When the LED switched off, the voltage slowly tapers (linearly) back from 3.9V to 1.8V over about 2 seconds.

I'm guessing this is because of the large resistances involved and the length of the cable. The LED i'm measuring is in a sealed tamper-proof enclosure, so there's no chance of replacing it with a higher brightness. I'm strugging to find an LDR with better sensitivity or lower resistance. What else can I try to get more square-like waves?

A few notes:
I'm using rising-edge interrupt, so analog inputs aren't feasible.
The reason for the long cable is because of the distance between the computer and the LED.
The cable I'm using is rather cheap, it's about 2mm wide at its thickest, and is normally used in alarm systems for those magnetic contact switches.

Anything around 1 second is not cable capacitance. Cablle capacitance is in picofarads... The RC time constant is simply R x C, so that 1uF into 1Meg Ohm is one second, or 1000uF into 100 Ohms.

LDRs are known for being slow, but I don't think they are that slow and I think there is something else going on.

How fast are the pulses?

The pulses are around 0.4Hz at its fastest. From the scope measurements, the signal barely reaches LOW before another pulse is triggered. I'll try and take some measurements with the scope again tomorrow and post them here.

What are you using as a scope probe?

I bet that 150k to ground is why, try 50k instead.

You could run extra wires and put a transistor out there with the LDR for more 'contrast'.

GoForSmoke:
put a transistor out there with the LDR for more 'contrast'.

Or better yet, use a photo-transistor.

This is the circuit I used to count the pulses from my power meter.
http://1474orchard.ca/projects/?x=entry:entry101225-004920

Its a PicoScope 2203 with a normal entry-level oscilloscope probe

Thanks for the information. The meter has a red LED and I'm struggling to find photo-transistors that aren't specifically for infrared. Will an infrared one work? Also how does the two-pin phototransistors differ from the 3 pin ones?

gardner:

GoForSmoke:
put a transistor out there with the LDR for more 'contrast'.

Or better yet, use a photo-transistor.

This is the circuit I used to count the pulses from my power meter.
power monitor « Projects

I think that most phototransistors will have useful response in the visible red-LED wavelength. If you have one to hand, it won't take a few minutes to try out.

The idea of a phototransistor is that the base junction works like a tiny solar cell and generates the base current to turn the transistor on. A three-lead unit brings the base out so that you can supply a bias to adjust the sensitivity. For most binary on/off applications, I don't think you'd need that. If you were analogue sensing light levels, then you'd maybe want to bias the transistor into a more linear range for your particular light level, or something more sophisticated.

Red leds I have seen do put out a lot of IR. Look at the thing with a web cam or digital camera and if it shows up as a white dot, it's putting out a lot of near-IR.

Here are transparent bulb (not filtered in visible wavelengths) phototransistors:

While these have their highest sensitivity at a little less than 900 nm, they are perhaps 20% as sensitive at 650 nm which is red. If the red led puts out red and IR, it should catch that.

You could even use LEDs to measure the pulses. See here for an example: LED Camera | Blinkenlight. Of course you would need to match the LED to the meter's led. You have to make sure that the LED will have a longer wavelength then the meter's LED.

A phototransistor might be a better choice though. I would expect that an infrared sensitive transistor should be sufficient. An LDR is definitely to slow for your application.

I successfully use these on a variety of electric meters with red LED pulses. http://parts.digikey.com/1/parts/949780-phototransistor-npn-side-look-sdp8406-003.html

They are only typically on for 20 milliseconds during a pulse, I doubt an LDR would keep up.

They are dead easy to tape to the meter too.