Go Down

Topic: Help reading PWM on analog input (Read 1 time) previous topic - next topic


Haven't checked with a meter but if I plug the + side of the HDD LED header from the motherboard into the breadboard then hook an LED from it to ground the LED is always on, it never goes out. If I hook an LED to 3v then ground it to the - side of the HDD LED header it works as intended.

This is exactly what you're been advised to do. The way your HDD LED is wired up, the +ve wire is always +ve and the -ve wire is switched. When the LED os 'off' the -ve wire is isolated which means it will float up to the voltage supplied on the +ve wire. When the LED is 'on' the -ve wire is pulled down to ground which causes a voltage difference across the LED so it glows.

You need to connect the LEDs -ve wire to the Arduino. Once problem you'll have is that if it is a plain old LED (without an integrated series resister) then the voltage across it will be very low, probably not enough to trigger a digital input. In that case you'll need to connect it to an analog input and compare the measured voltage with a threshold to decide whether the LED is on or off.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up