indicating switch status with 2 leds

Thread Starter

Deen198

Joined Feb 17, 2022
13
I'm trying to convert a signal coming from an electronic controller. the controller has 2 internal switches (relays) and resistors I cannot acces.
Depending on which relay is active I would like to light one or the other LED.
Unfortunately I can't figure it out myself. I tried to build something from transistors and comperators, but it did't work :(

All help or ideas are welcome .

schematic.jpg
 

BobTPH

Joined Jun 5, 2013
9,106
It is an boring problem if you just brute force it, more interesting if you try to come up with a simple, clever solution.

Can you come up with a set of comparisons that will tell you which of the four states it is in? After you do that it is simple.

A brute force solution would have 4 outputs from the comparators, only one of which is ever high. Can you do that much?
 

Audioguru again

Joined Oct 21, 2019
6,746
Only if the output from the two resistors has no other connections:
An opamp can be used as a comparator to light a white LED when the input current is 6mA (from the 2k resistor) or light a green LED when the current is 12mA (from the1k resistor).
 

Ya’akov

Joined Jan 27, 2019
9,228
I had assumed that TS wanted a solution using comparators and logic gates, not MCU.
Well, he said he failed doing it that way but I didn’t read it as a specification. The ATTiny85 would do it, it has 4 10-bit DACs and the parts count would certainly be very low.
 

Thread Starter

Deen198

Joined Feb 17, 2022
13
hi,
Is the Green arrowed line normally to 0V or some other point?
E
it was originally connected to 1 led, that had 2 brightness levels depending on the which switch is active. As the brightness difference was hard to see, I decided to use 2 leds instead
 

Thread Starter

Deen198

Joined Feb 17, 2022
13
I had assumed that TS wanted a solution using comparators and logic gates, not MCU.
yes I would like to do it with logic components. I found a solution using a comperator, but this requires a reference voltage from the source. My goal is to avoid running an extra wire from the battery, as it not easy to run an extra wire to this location.

The goal is to only use the available chassis ground and the output wire from the red box.
 

MrChips

Joined Oct 2, 2009
30,920
yes I would like to do it with logic components. I found a solution using a comperator, but this requires a reference voltage from the source. My goal is to avoid running an extra wire from the battery, as it not easy to run an extra wire to this location.

The goal is to only use the available chassis ground and the output wire from the red box.
Of course, there must be a return wire to the battery.
 

WBahn

Joined Mar 31, 2012
30,229
How much current do each of the LEDs need?

When SW2 is closed (and SW1 is open), you would only get 6 mA if the output of the box were shorted to ground. With a White LED, you are looking at only about 4 mA. Unless your LED is able to be sufficiently visible at something like 1 mA, you aren't going to have much to work with.

If you LEDs are able to work at the 1 mA level, then I think there is a solution that is pretty simple.
 

BobTPH

Joined Jun 5, 2013
9,106
The goal is to only use the available chassis ground and the output wire from the red box.
Then you should have said that in the fist post. In your diagram the 12V line, as well as the ground is outside the box, so I assumed those two were available.
 
Top