Page 1 of 1

Basic electrical question

Posted: Tue May 02, 2017 2:48 am
by axel77
I want my rpi zero to know if a wire to an LED on an appliance is either getting current or not, no need to measure more than on or off.

What's the best way to safely transfer this information to the rpi?

Re: Basic electrical question

Posted: Tue May 02, 2017 9:31 am
by pcmanbob
Hi.

It will very much depends on how the LED is controlled within the circuit.
there are 2 options

1. LED has permanent feed to it and negative side is switched to turn it on.
2. LED has permanent negative and the live is switched on to turn it on.

which ever it is and you would need to know and what voltages are involved as well as the voltage present may not be sufficient to register as a high on the GPIO. you will need to make more than one connection to the circuit as you will need a return path and this may upset the existing function of the circuit.

the simpler way would it be to replace the LED with an opio-isolator that way the output of the opto-isolator could be used to signal the Pi.

Re: Basic electrical question

Posted: Tue May 02, 2017 10:10 am
by davidcoton
You may be able to wire the LED of an opto-isolator in series with the indicator LED (check the current in the existing circuit and the opto's spec first). That may dim the LED a bit but probably OK. Note that any modification to the appliance will invalidate any guarantee , and you really need to understand what you are doing (particularly if the appliance is mains powered) to keep yourself and your home safe.

Re: Basic electrical question

Posted: Tue May 02, 2017 6:45 pm
by stderr
axel77 wrote:What's the best way to safely transfer this information to the rpi?
A camera.

Re: Basic electrical question

Posted: Tue May 02, 2017 7:45 pm
by boyoh
If the led indicator is on mains appliance, suggest you use a non intrusive circuit
Using a photo transistor . Might do the job, This will mean securing it over
The led indicator, and blanking out the ambient light Use a transistor ,switched
By the phototransistor to give you a active 1 or active 0 , (3.3v or 0v)
Do you understand basic electronics

Re: Basic electrical question

Posted: Tue May 02, 2017 9:30 pm
by Heater
What kind of appliance is this?

Do you still need to see that LED once you are monitoring via the Pi.

You could even use just another LED as a photodetector to detect if your LED is on.

I have not tried this but I suspect that a red LED collecting light from another red LED will generate enough voltage to move a Raspi GPIO input from 0 to 1.

I advise against opening up the appliance and attaching any wires if you have so little experience of electrical things.

Re: Basic electrical question

Posted: Wed May 03, 2017 9:01 am
by pcmanbob
Heater wrote: You could even use just another LED as a photodetector to detect if your LED is on.

I have not tried this but I suspect that a red LED collecting light from another red LED will generate enough voltage to move a Raspi GPIO input from 0 to 1.
No you can't do that LEDs do not produce voltage if you shine light on them even form another LED.

LED = Light Emitting Diode

Re: Basic electrical question

Posted: Wed May 03, 2017 9:33 am
by Mortimer
pcmanbob wrote:
Heater wrote: You could even use just another LED as a photodetector to detect if your LED is on.

I have not tried this but I suspect that a red LED collecting light from another red LED will generate enough voltage to move a Raspi GPIO input from 0 to 1.
No you can't do that LEDs do not produce voltage if you shine light on them even form another LED.

LED = Light Emitting Diode
Yes but its true:
http://makezine.com/projects/make-36-bo ... ect-light/
http://www.instructables.com/id/LEDs-as-light-sensors/

Bit of a novelty granted. There are better ways to detect whether light is on or off.

Re: Basic electrical question

Posted: Wed May 03, 2017 11:01 am
by pcmanbob
Mortimer wrote:
Yes but its true:
http://makezine.com/projects/make-36-bo ... ect-light/
http://www.instructables.com/id/LEDs-as-light-sensors/

Bit of a novelty granted. There are better ways to detect whether light is on or off.
ok so you get a small voltage from a very bright light as you say a novelty using it to detect another led being on not going to work realistically.

Re: Basic electrical question

Posted: Thu May 04, 2017 4:36 am
by axel77
The type of appliance is a washing machine and dryer. Was planning on taking the shroud off the display and wiring into the small green led that indicates power (the warranty/guarantee isn't an issue since they passed a year ago). Original idea was to sugru a LDR sensor over the led and get the reading that way, but thought it might be easier to simply daisy chain the zero and get a reading without using the LDR.

In all honesty I haven't yet opened up either cabinet so I don't know what I'll find behind the display shroud. Thought I'd ask if it was even possible before attempting.

To the original idea, I never thought that it might not be possible to have a sensor read light from an LED. Would this LDR module not work for my purposes?

Re: Basic electrical question

Posted: Thu May 04, 2017 8:59 am
by pcmanbob
axel77 wrote:The type of appliance is a washing machine and dryer. Was planning on taking the shroud off the display and wiring into the small green led that indicates power (the warranty/guarantee isn't an issue since they passed a year ago). Original idea was to sugru a LDR sensor over the led and get the reading that way, but thought it might be easier to simply daisy chain the zero and get a reading without using the LDR.

In all honesty I haven't yet opened up either cabinet so I don't know what I'll find behind the display shroud. Thought I'd ask if it was even possible before attempting.

To the original idea, I never thought that it might not be possible to have a sensor read light from an LED. Would this LDR module not work for my purposes?
an LDR may well work but the one you linked to is for an Arduino and operates at 5v you do not want to connect that directly to you 3.3v gpio or it will damage the gpio.

Re: Basic electrical question

Posted: Thu May 04, 2017 10:26 am
by Jednorozec
pcmanbob wrote:an LDR may well work but the one you linked to is for an Arduino and operates at 5v you do not want to connect that directly to you 3.3v gpio or it will damage the gpio.
It says that the working voltage is 3.3V-5V so it should be ok.

Re: Basic electrical question

Posted: Thu May 04, 2017 3:15 pm
by boyoh
axel77 wrote:The type of appliance is a washing machine and dryer. Was planning on taking the shroud off the display and wiring into the small green led that indicates power (the warranty/guarantee isn't an issue since they passed a year ago). Original idea was to sugru a LDR sensor over the led and get the reading that way, but thought it might be easier to simply daisy chain the zero and get a reading without using the LDR.

In all honesty I haven't yet opened up either cabinet so I don't know what I'll find behind the display shroud. Thought I'd ask if it was even possible before attempting.

To the original idea, I never thought that it might not be possible to have a sensor read light from an LED. Would this LDR module not work for my purposes?
Reading your answers to soma of the posts ,leads me to that you have no basic knowledge of electronics

Point one DO NOT GO INSIDE THE WASHING machine

Point two learn how to use voltage leveling, be fore interfacing with the Pi GPIO's.

Once you understand voltage Leveling, learn how Pi GPIO's work.

The forum is there ,to give you some good advice, but not to do it all for you.

Learning electronics is not all plug and play, It is not a weekend course.

It is READ READ BUILD BUILD TEST TEST.

You never finish learning electronics

Re: Basic electrical question

Posted: Thu May 04, 2017 7:03 pm
by Mortimer
And blow a few things up along the way!

Re: Basic electrical question

Posted: Fri May 05, 2017 8:18 am
by boyoh
Mortimer wrote:And blow a few things up along the way!
How right you are, I've sat and watched electrolytic capacitors burst with the wrong voltage across them
What a stink. We all make mistakes ,when learning, AND STILLDO.

Regards BoyOH

Re: Basic electrical question

Posted: Fri May 05, 2017 8:38 am
by pcmanbob
boyoh wrote:
Mortimer wrote:And blow a few things up along the way!
How right you are, I've sat and watched electrolytic capacitors burst with the wrong voltage across them
What a stink. We all make mistakes ,when learning, AND STILLDO.

Regards BoyOH
That's fine when its low voltage but when you start messing with mains at 240vac it can be fatal and often is, axel77 is talking about opening up a washing machine were you have water and electricity a bad combination when you know what your doing, deadly for an amateur.