conecting to diode - check state

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

conecting to diode - check state

#1 Post by Jufo » 20 Mar 2017, 11:40

Hi,I would like to check the status LEDs on the "other system" (common ground) when it is turned on and when it is turned off. How to connect and configure?
Voltage when it is switched on = 1,74 V
Voltage when it is switched off = -0,60V (meter error?)

I would like to plug in to GPIO09 or GPIO10. Eventually you to connect to the GPIO TX or RX (change the function gpio), "schema other system", marked in red LED:
Image

Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

Re: conecting to diode - check state

#2 Post by Jufo » 20 Mar 2017, 17:14

Problem solved i use ADC.

Shardan
Normal user
Posts: 1136
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: conecting to diode - check state

#3 Post by Shardan » 20 Mar 2017, 21:37

if i may suggest anyways....

Replace the LED with an optocoupler.
It separates the ESP from your circuit reliably and can be read with a standard GPIO input.

Regards
Shardan
Regards
Shardan

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: conecting to diode - check state

#4 Post by paxi » 20 Mar 2017, 21:43

... or use the signal at the upper end of R736 (via voltage divider if >3.3V). ;)

Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

Re: conecting to diode - check state

#5 Post by Jufo » 20 Mar 2017, 21:54

Thanks for the response,
I decided to leave on the ADC, I did not use it for anything, and here it works fine (for 1,74V shows 1024):
Image
Image
Image

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: conecting to diode - check state

#6 Post by paxi » 20 Mar 2017, 22:05

Are you aware that ADC is designed for 1V max?

Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

Re: conecting to diode - check state

#7 Post by Jufo » 20 Mar 2017, 22:16

paxi wrote:
20 Mar 2017, 22:05
Are you aware that ADC is designed for 1V max?
Thanks for the information. I thought the range is up to 3.3V.
What resistor to reduce the voltage to increase the range to 1.74V, what current is needed for the GPIO-ADC?

paxi
Normal user
Posts: 121
Joined: 02 Feb 2017, 00:48
Location: Germany

Re: conecting to diode - check state

#8 Post by paxi » 20 Mar 2017, 22:34

Gpio's are 3.3V, ADC isn't. Google those abreviations and read the datasheet.
Inputs are high impedance - asking for current is the wrong question. ;)

Resistors:
https://www.google.de/search?q=voltage+ ... calculator

Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

Re: conecting to diode - check state

#9 Post by Jufo » 20 Mar 2017, 22:49

Shardan wrote:
20 Mar 2017, 21:37
if i may suggest anyways....

Replace the LED with an optocoupler.
It separates the ESP from your circuit reliably and can be read with a standard GPIO input.
Regards
Shardan
Can I ask for an example of an optocoupler that would be suitable for use in this case? Is the output needed for a control transistor or can I directly connect to the gpio through 3.3V?
The LED is not removed.

Shardan
Normal user
Posts: 1136
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: conecting to diode - check state

#10 Post by Shardan » 21 Mar 2017, 21:16

Jufo wrote:
20 Mar 2017, 22:49
Shardan wrote:
20 Mar 2017, 21:37
if i may suggest anyways....

Replace the LED with an optocoupler.
It separates the ESP from your circuit reliably and can be read with a standard GPIO input.
Regards
Shardan
Can I ask for an example of an optocoupler that would be suitable for use in this case? Is the output needed for a control transistor or can I directly connect to the gpio through 3.3V?
The LED is not removed.
I assume a standardopto coupler as the 817 types should do (EL-817, LTV-817).
I've suggested a similiar circuit for another purpose here in the forum:
Image

You may try to connect the Optocoupler's LED in parallel to the existing one, but that might not work depending on the different paramters of the two LEDs.
If you don't want to remove the existing LED you can do this:
Use a resistor (330 ... 680 Ohm) and connect it from the Out-pin 5/R736 / Collector of T704 connection point to the LED of the opto coupler pin1. Connect the pin 2 from the opto coupler to ground of the circuit.
The output side can be connected directly to the GPIO pin, a pullup resistor (4,7KOhm) is connected from the GPIO to 3,3V (NOT 5V!!!).

Shardan
Regards
Shardan

Jufo
Normal user
Posts: 36
Joined: 12 Mar 2017, 13:47

Re: conecting to diode - check state

#11 Post by Jufo » 25 Mar 2017, 10:19

It works (on GPIO 3), thank you :)

Shardan
Normal user
Posts: 1136
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: conecting to diode - check state

#12 Post by Shardan » 25 Mar 2017, 10:29

Anytime :)
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: Jedrunia, NiCOOLaS and 3 guests