axel77
Posts: 8
Joined: Mon May 01, 2017 2:26 am

Basic electrical question

Tue May 02, 2017 2:48 am

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?

pcmanbob
Posts: 7254
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Basic electrical question

Tue May 02, 2017 9:31 am

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
davidcoton
Posts: 4243
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Basic electrical question

Tue May 02, 2017 10:10 am

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.
Signature retired

stderr
Posts: 2178
Joined: Sat Dec 01, 2012 11:29 pm

Re: Basic electrical question

Tue May 02, 2017 6:45 pm

axel77 wrote:What's the best way to safely transfer this information to the rpi?
A camera.

boyoh
Posts: 1347
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Basic electrical question

Tue May 02, 2017 7:45 pm

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
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

Heater
Posts: 13863
Joined: Tue Jul 17, 2012 3:02 pm

Re: Basic electrical question

Tue May 02, 2017 9:30 pm

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.
Memory in C++ is a leaky abstraction .

pcmanbob
Posts: 7254
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Basic electrical question

Wed May 03, 2017 9:01 am

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
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
Mortimer
Posts: 924
Joined: Sun Jun 10, 2012 3:57 pm

Re: Basic electrical question

Wed May 03, 2017 9:33 am

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.
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

pcmanbob
Posts: 7254
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Basic electrical question

Wed May 03, 2017 11:01 am

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

axel77
Posts: 8
Joined: Mon May 01, 2017 2:26 am

Re: Basic electrical question

Thu May 04, 2017 4:36 am

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?

pcmanbob
Posts: 7254
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Basic electrical question

Thu May 04, 2017 8:59 am

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Basic electrical question

Thu May 04, 2017 10:26 am

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.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

boyoh
Posts: 1347
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Basic electrical question

Thu May 04, 2017 3:15 pm

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
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

User avatar
Mortimer
Posts: 924
Joined: Sun Jun 10, 2012 3:57 pm

Re: Basic electrical question

Thu May 04, 2017 7:03 pm

And blow a few things up along the way!
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

boyoh
Posts: 1347
Joined: Fri Nov 23, 2012 3:30 pm
Location: Selby. North Yorkshire .UK

Re: Basic electrical question

Fri May 05, 2017 8:18 am

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
BoyOh ( Selby, North Yorkshire.UK)
Some Times Right Some Times Wrong

pcmanbob
Posts: 7254
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Basic electrical question

Fri May 05, 2017 8:38 am

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.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “General discussion”