I have connected my Raspberry Pi to the controller of an external device (an espresso machine) with a couple of solder connections to the power button (so the RasPi can turn it on and off via a software timer). This works great. However, I can't sense whether the machine is actually on or off already.
The same controller has LEDs that indicate whether it is on or off. Is there a circuit I can connect to the LED terminals to determine whether or not the LED is on or off? If I put a simple transistor switch in parallel with the LED, will I be able to tap a small enough current to turn on the switch and still light the LED? I'd rather not try to desolder the LED for something inline.
Thanks!
-
- Posts: 3
- Joined: Wed May 07, 2014 12:24 pm
Re: Determining if an external LED is on or off
I think a transistor could work if you tie the devices' grounds together.
You might be better off running an opto-isolator in parallel with the LED though. That would allow you to keep the two devices completely electrically isolated.
You might be better off running an opto-isolator in parallel with the LED though. That would allow you to keep the two devices completely electrically isolated.
-
- Posts: 3
- Joined: Wed May 07, 2014 12:24 pm
Re: Determining if an external LED is on or off
Sounds good -- I was thinking about an optoisolator, but the LED is on the outside of the machine, and I want the electronics to be inside. I'll try the transistor first.
- tedhale
- Posts: 114
- Joined: Thu Sep 20, 2012 4:52 pm
- Location: Williamsburg, VA, USA
- Contact: Website
Re: Determining if an external LED is on or off
See my blog post
http://raspberrypihobbyist.blogspot.com ... ensor.html
I do what you are looking to do.
http://raspberrypihobbyist.blogspot.com ... ensor.html
I do what you are looking to do.
- Ted B. Hale
http://raspberrypihobbyist.blogspot.com
http://raspberrypihobbyist.blogspot.com
Re: Determining if an external LED is on or off
Hi
"Connect the grounds together" is OK advice if you are absolutely sure that the coffee-maker has a ground. Many appliances have control electronics which are connected to the live circuit. Make sure that your coffee-maker has an isolating supply.
A conventional mains transformer will generally provide isolation as will **some** switch-mode supplies.
Does the device have an earth(ground) wire in the plug? Can you see where it goes?
Please do not connect if you cannot confirm the isolation.
On the other hand an opto-isolator, correctly connected, provides the galvanic isolation needed as has been said already.
I assume that the "solder connections" to the go button are from a relay. The relay probably provides isolation.
Connecting to a.c. devices can be dangerous.
"Connect the grounds together" is OK advice if you are absolutely sure that the coffee-maker has a ground. Many appliances have control electronics which are connected to the live circuit. Make sure that your coffee-maker has an isolating supply.
A conventional mains transformer will generally provide isolation as will **some** switch-mode supplies.
Does the device have an earth(ground) wire in the plug? Can you see where it goes?
Please do not connect if you cannot confirm the isolation.
On the other hand an opto-isolator, correctly connected, provides the galvanic isolation needed as has been said already.
I assume that the "solder connections" to the go button are from a relay. The relay probably provides isolation.
Connecting to a.c. devices can be dangerous.
-
- Posts: 3
- Joined: Wed May 07, 2014 12:24 pm
Re: Determining if an external LED is on or off
Re: "Connect the grounds together" is OK advice if you are absolutely sure that the coffee-maker has a ground. Many appliances have control electronics which are connected to the live circuit. Make sure that your coffee-maker has an isolating supply."
I'm good here -- the controller unit is isolated from the rest of the machine's electronics.
Re: Blog post -- awesome, thanks for the info!
I'm good here -- the controller unit is isolated from the rest of the machine's electronics.
Re: Blog post -- awesome, thanks for the info!