Re: Sensor/LED circuit-more help needed please-multiV's and dimmer




> Hi there,
> Thanks for the help on the test button question. Got another
> non-electronics technician problem.
> I am still working on this Sensor Circuit with LED indicators. The box
> I'm building, I want it to be able to be used on either system voltage
> of 14Vdc or 28Vdc with a spdt switch setting the box for the
> appropriate voltage.
> So I have eight sensors, eight LEDs (some with different ratings, see
> below), two voltages and two states of DAYTIME (Bright) and NIGHTTIME
> (Dim).
> The LEDs are supplied directly by the sensors. This means that each > > LED
> has it's own power supply so speak. But, all supplies will either be
> 14Vdc at one time, or 28Vdc at one time (you will not have both
> voltages at the same time).
> Because of the different LED colors I have to deal with a 2V and a 3V
> LED at the two voltages of 14Vdc and 28Vdc, so my resistances are 550,
> 600, 1.25K and 1.3K at 20mA.
> Its easy enough just to put a 600 ohm R inline with each LED, but how
> do I switch so that ALL LEDs have a 1.3K R in front of them without
> running all the power through my voltage selector switch (which would
> defeat the purpose of using the power from the sensors and having an
> indicator light up when power is supplied by the sensor)?
> My next problem will be to DIM all the LEDs for the NIGHTTIME setting,
> yet a third resistive value????
> I'm trying to use more passive components rather than ICs and trying > > to
> keep it simple as possible all the way, any suggestions are hugely
> appreciated.
> Thanks in advance.
> Gman

Gman wrote:
> Hi Ed,
>
> I found that the sensors operate by providing ground instead of power.
> How does this effect the suggested circuit above, if at all?
>
> Thanks and regards,
> Gman

Hi, Gman. Just to restate the bidding here:
* You've want a circuit whose power supply can be switched between
14VDC and 28VDC.
* You've got a sensor which turns sinks current to GND (low resistance
to GND) when the light is bright.
* You want to drive 8 LEDs in such a manner that, for either voltage
selected, they have higher current (say, 20mA) during the day, and a
lower current (say, 12mA) at night.
* For some reason you want to do the job with only discrete components
-- no ICs.

The responses you've been getting from others that you should be
driving the LEDs with a constant current source are good ones.
Actually, a transistor current source is a fairly good "one-trick pony"
which should do most of the work for your circuit.

` NPN Current Sink PNP Current Source`
`
` VCC VCC
` + +
` | |
` | | +
` | .-.
` R | |
` | |
` Load '-'
` | | -
` || |Vdrive + 0.7V
` || Vb|<
` |V Vdrive >---|
` |Ic |\
` | | |
` Vb|/ | |
` Vdrive>----| | V
` |> | Ic
` |Vdrive - 0.7V |
` | +
` .-. Load
` R | |
` | | |
` '-' |
` | - |
` | |
` === ===
` GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

The idea goes something like this: If you have an NPN transistor and
set it up so the base is driven with a stiff voltage source, the
transistor will try to keep it's emitter about 0.7V less than the base
by allowing current to pass through the collector. If you put a
resistor from the emitter to GND, that will mean the transistor will
try to keep the steady voltage across that resistor -- in other words,
constant current sink through the load. Likewise, with a PNP
transistor, the emitter will be kept about 0.7V higher than the base,
meaning you get a constant current source. Here's the simple way to
get the eight individual LED drivers (view in fixed font or M$
Notepad):

` VCC
` +
` |
` |
` V ~
` - ~
` |
` |
` Vb|/
` Vdrive>---| Q1 - Q8
` |>
` |
` | +
` .-.
` 100| |
` | |
` '-'
` | -
` |
` ===
` GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de


Your largish NPN transistor will have a voltage applied to the base,
and the collector current will be about 0.7V less than that. (This is,
of course, an approximation, but it should be sufficient for the needs
of the day.) So, if you've got a 100 ohm collector resistor, applying
2.7V at the base will mean 2V across the 100 ohm resistor. Since the
base current is only a very small fraction of the collector current
(usually about 1/40th for TO-200 power transistors), you can assume
your LED current will be about 20mA too, whether the supply voltage is
14VDC or 28VDC. If you put about 1.9V at the base, you'll get about
12mA through the collector. You'll need 8 of these -- 1 for each LED.

Now let's talk about supplying the eight NPN transistor bases with a
steady 2.7V in daylight (20mA) or 1.9V for darkness (12mA). I'm not
sure what you're using as a light sensor, but you give the impression
that it acts like a switch -- it has a high resistance to GND if it's
dark, and a low resistance to GND if it's light. Of course, you could
give more information if this isn't exactly what you have. But for the
sake of discussion, let's assume it is a switch (SW1). That would make
it fairly easy to provide the constant voltage source to the bases of
Q1 - Q8 with two more transistors:

` VCC VCC VCC VCC
` + + + +
` | | | |
` | | | |
` | DZ2 .-. | DZ1 .-.
` /-/ | | /-/ | |
` ^ | | ^ | |
` | '-' | '-'
` | | | |
` | | | |
` | |< | |<
` o-----| o----|
` | |\ | |\
` .-. | .-. |
` | | | | | |
` | | | | | |
` SW1 '-' | '-' |
` _/ | | | |
` .--o/ o--' | === |
` | | GND |
` | | | Vdrive
` === '------------------o------->
` GND |
` .-.
` | |47 ohms
` | |
` '-'
` |
` |
` ===
` GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

The zener diode shown would be a 1N4733, a 5.1V zener with a test
current of 49mA and a knee current of 1mA. Q9 is set up to supply a
constant 40 mA to the 47 ohm resistor (that's about 1.88V, for those
who are following with their calculators). The base of Q10 will
normally not be drawing any current, so it's off when it's dark. But
when the switch is turned on (it lights up), the 5.1V appears between
the base of Q10 and V+ (whether 14V or 28V), which means Q10 will
supply another 16.2mA to the 47 ohm resistor. That will total 56.2mA,
which means about 2.64V. Of course, the other transistors will draw
typically 0.3mA to 0.5mA each, but that total 2.4mA to 4mA won't affect
the voltage that much. If you find it's not quite there, tweak the 110
ohm resistor above Q9 down to 100 ohms, and the 270 ohm resistor down
to 240 ohms. That will increase the drive voltages to well over 2.7V
(light) and 1.9V (dark).

So that's 8 power NPNs, 2 power PNPs, 2 1N4733 zener diodes, and 13 1/4
watt resistors. I don't think you're going to reduce that parts count
too much.

Again, I'm kind of wondering what you'll use as a light sensor. I get
a feeling it might be a little more difficult than a switch to GND.
Feel free to post again with more information.

Good luck
Chris

.