sallvadorrr
Posts: 2
Joined: Wed Feb 05, 2020 3:54 pm

Detecting low voltage signal

Wed Feb 05, 2020 4:05 pm

Hi,

I have a sensor with a PCB board on which there are two diodes. I'd like to detect when the diodes are on and off.

Red diode:
- OFF: 0.58V
- ON: 1V

Green diode:
- OFF: ~ 0V
-ON: 2.7V

I tried using an https://uk.rs-online.com/web/p/products ... lsrc=aw.ds, but it doesn't work with any of the diodes. The voltage on the green diode goes down to 1V when the optocoupler plugged in.

Would a transistor be better for this application (doesn't require a strong signal)?

Thanks for any help!

PhatFil
Posts: 1621
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Detecting low voltage signal

Wed Feb 05, 2020 4:31 pm

Do you need to see the leds as well as have your pi react to them ? there are unknown implications of drawing extra current to drive a transistor as you may over draw on the led supply and burn out something in your black box circuit.

a light reactive resistor masked off so it can only react to the led its above would be a non invasive solution perhaps.
https://pimylifeup.com/raspberry-pi-light-sensor/
think diy optocoupler ;)

If you still need a visible indicator you can add 2 x leds to spare gpio and mirror the inputs.

sallvadorrr
Posts: 2
Joined: Wed Feb 05, 2020 3:54 pm

Re: Detecting low voltage signal

Thu Feb 06, 2020 12:30 pm

@PhatFil
Thank you for you response.

I don't need to see the LEDs. Would you suggest removing them from the board and having an optocoupler in this place?

Thanks

PhatFil
Posts: 1621
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Detecting low voltage signal

Thu Feb 06, 2020 6:00 pm

No sorry if i wasn't clear, just use some tape or opaque hot glue (blutac?) to mask off ambient light and light from other leds so your light sensitive resistor can only be activated by the led it is monitoring.

an optocoupler is a combination of a light source and a light sensitive component .. your pcb has the light source built in (leds) , so you only need add the 2nd part the light sensitive aspect.. to make your own diy optocoupler to link the 2 circuits while maintaining a safe separation,

emma1997
Posts: 587
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Detecting low voltage signal

Thu Feb 06, 2020 6:43 pm

I agree with PhatFil that an LDR is the best solution. It's unfortunate that there's been a run here recently on optoisolators as cure-all for every issue. They will not kill virus or save the marriage. In reality they are generally only needed where, that's right, 'isolation' is actually required. Very rare. Relays too. Too bad so many beginners are convinced these are the only way out.

In some cases a transistor would do this but even then only when voltage level conversion is required. If neither isolation nor voltage conversion are involved then a simple piece of wire almost always does the trick.

In this case, since voltages to be sensed are so different, an LDR makes sense. Isolation is moot and a transistor with it's resistors etc just complicate things. LDR just one part connected directly to Pi. As he mentioned they are very easy to mask off with tape or shrink if ambient light interferes. Maybe even no masking if right part is chosen (GL5516-GL5549).

20 for a buck. Cheap and effective.

Return to “HATs and other add-ons”