Hello there,
I would like to read an analog voltage from a circuit that is powered by different AC-DC transformer, different from the 220VAC-3.3VDC that powers my ESP: basically I would like to read the voltage of a led cathode to know if is on or not.
If I measure voltage between cathode and GND pin of the ESP with a multimeter sometimes I read 25V, sometiems 3V and sometimes a voltage that is out of scale! (>600V!!!)
How is it possible?!
Read external circuit voltage
-
- Posts: 4
- Joined: Sat Sep 12, 2020 11:47 pm
Read external circuit voltage
- Attachments
-
- IMG_20200913_011308_2.jpg (1.19 MiB) Viewed 5316 times
Last edited by JanickGers85 on Mon Sep 14, 2020 4:13 pm, edited 1 time in total.
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Read external circuit voltage
First of all, did you connect the ground of the original PCB to the ground of the ESP? If not, you're measuring the voltage difference between two separate circuits and that just picks up any EMF that hangs around in the air. Secondly, make sure that your LED actually is driven in a way where you can measure the output using only the cathode... it may be multiplexed or PWMmed or something.
In general, a nicer way is to take an optocoupler and put it's internal LED into the original circuit in such a way that it lights up when the LED you're interested in lights up. (Usually, this involves adding a series resistor and connecting that in parallel with the existing LED+series resistor.) This will give you a signal regardless of how the LED is controlled, and gives you galvanic isolation from the original PCB to boot, which stops you from electrocuting yourself if you happen to touch the ESP and the original PCBs power supply isn't galvanically isolated.
In general, a nicer way is to take an optocoupler and put it's internal LED into the original circuit in such a way that it lights up when the LED you're interested in lights up. (Usually, this involves adding a series resistor and connecting that in parallel with the existing LED+series resistor.) This will give you a signal regardless of how the LED is controlled, and gives you galvanic isolation from the original PCB to boot, which stops you from electrocuting yourself if you happen to touch the ESP and the original PCBs power supply isn't galvanically isolated.
-
- Posts: 4
- Joined: Sat Sep 12, 2020 11:47 pm
Re: Read external circuit voltage
Thanks for you reply.
It's the first time I work on a project like this, I know a few of electric theory but never done something like that so...
I like the option of a octocoupler but I don't know how to use it in my context.
I've mesured the voltage between anode and cathode and when off is 3.38V, when 2.46V when on; it's a blue led.
Honestly I'm a bit puzzled, BTW if I connect an octocoupler between anode and cathode I'll have the output always on regardless the LED is on or off, right?
How to use it correctly?
It's the first time I work on a project like this, I know a few of electric theory but never done something like that so...
I like the option of a octocoupler but I don't know how to use it in my context.
I've mesured the voltage between anode and cathode and when off is 3.38V, when 2.46V when on; it's a blue led.
Honestly I'm a bit puzzled, BTW if I connect an octocoupler between anode and cathode I'll have the output always on regardless the LED is on or off, right?
How to use it correctly?
Last edited by JanickGers85 on Mon Sep 14, 2020 8:10 am, edited 1 time in total.
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Read external circuit voltage
Hard to tell; there's some reverse engineering involved here. Can you post a clean picture of the back (as in: where the traces are) of that PCB the LED is on?
-
- Posts: 4
- Joined: Sat Sep 12, 2020 11:47 pm
Re: Read external circuit voltage
Here the PCB, front and back, and what I've understood analyzing the circuit.
I tried to find "the end" of the rectifier, where the DC voltage is picked up, but without success.
Moreover, the IC on the PCB has nothing printed on it so I can't understand how it operate.
Basically I would like to know if every of the LED are on, and I would like to simulate switch presses too but i think it should not be a big problem using optocoulplers.
I tried to find "the end" of the rectifier, where the DC voltage is picked up, but without success.
Moreover, the IC on the PCB has nothing printed on it so I can't understand how it operate.
Basically I would like to know if every of the LED are on, and I would like to simulate switch presses too but i think it should not be a big problem using optocoulplers.
- Attachments
-
- pcb_front_untouched.jpg (455.53 KiB) Viewed 5316 times
-
- pcb_front_described.jpg (520.31 KiB) Viewed 5316 times
-
- pcb_back_untouced.jpg (545.25 KiB) Viewed 5316 times
-
- Posts: 4
- Joined: Sat Sep 12, 2020 11:47 pm
Re: Read external circuit voltage
I lifted the big yellow capacitor and I've taken a clearer picture of the back.
- Attachments
-
- IMG_20200914_180203.jpg (1.03 MiB) Viewed 5316 times
-
- Posts: 9769
- Joined: Thu Nov 26, 2015 4:08 am
Re: Read external circuit voltage
That helps. It looks like the LEDs are multiplexed; measuring one pin is indeed not going to help you there. You're in luck that the LEDs are blue, as these have a pretty large forward voltage. You should be able to get away with taking an optocoupler with an 100 ohm or so resistor in series with the led, and hooking that up to the LED you want to monitor. Do note that because of the multiplexing, the LED actually isn't on 100% of the time, so you may need to monitor the optocoupler over the duration of 100mS or so to see if it's actually on.
Who is online
Users browsing this forum: No registered users and 59 guests