Author Topic: 1 pin, 1 switch, 1 bi-color LED?  (Read 4048 times)

G. Hoffman

1 pin, 1 switch, 1 bi-color LED?
« on: March 15, 2013, 05:44:08 AM »
I'm wanting to control a two color LED with a C, and I want to keep to a one pin, one switch, one LED design.  With the addition of one other pin for the whole schematic, this will work, but I'm wondering if there is an easier way to go about this?  Input A turns on the LED, and input B picks the color for all of the LEDs in the system; each one gets a bit less than 50% duty cycle (the remainder for the switch, of course).  Input A is also the switch input to the C.  I'd kind of rather not use any IC's, because there will be a bunch of these distributed throughout the chassis, and I don't want to have 24 4049's with only one or two gates being used.  Besides, a simple 4049 doesn't actually do what I need, as then I can't turn the LED off.

So, as I said, can I reduce the part count by much?  I feel like Q2 should be redundant, but when I bread board the circuit, it doesn't work without Q2.  Also, is C1 going to give me enough persistence on the LED to be worth the cost, or should I not bother with it?  How about if I use a 1F?  Though I suppose that would depend on the value of R3, R4, R5, & R6, wouldn't it?

Oooops, almost forgot the schematic!

« Last Edit: March 15, 2013, 05:46:16 AM by G. Hoffman »


Re: 1 pin, 1 switch, 1 bi-color LED?
« Reply #1 on: March 15, 2013, 07:46:38 AM »
Hi Gabriel,

Generally,  I'd say this really is a job for some CMOS glue logic - less power, and high impedance inputs  ;)   How exactly is the switch connected on pin A? Series or parallel, ground or Vcc? Does this circuit create the load that tells the uC the switch is on?


EDIT: after a couple of beers and an episode of ST:V,  I'm thinking you maybe could do this with a 74HCT02, a resistor and the LED, with one gate left over.  Basically 2 NOR gates and an inverter (the 3rd NOR gate)
« Last Edit: March 15, 2013, 09:56:04 AM by greaser_au »


Re: 1 pin, 1 switch, 1 bi-color LED?
« Reply #2 on: March 15, 2013, 11:21:51 AM »
I dont understand very well the "switch part".

If im gettin it right, you could be done with something like this. Notice the Vcc/2 supply.

Varying the duty cycle on B you can chage the colour of the light that both leds produces.

If the output on B has a freq > 30hz, you dont need C1. It would seem that the led always stays on (like multiplexing) except if you have some kind of strobe light near it.
--Is there any body out there??--