Subject: Re: Opposite of a photocell?
Date: Mon, 16 Dec 2002 12:32:54 +0000 (UTC)
NNTP-Posting-Date: Mon, 16 Dec 2002 12:32:54 +0000 (UTC)
User-Agent: tin/1.5.14-20020926 ("Soil") (UNIX) (Linux/2.4.19 (i686))
> On Sun, 15 Dec 2002 16:28:20 +0000 (UTC),
>>> I've got a little lighting project that I want to be activated upon
>>> the presence of darkness. Is there a simple all-in-one device I can
> Yes, this is true of relays. This doesn't however answer my question
> of "Is there a simple all-in-one device I can buy, which has the
> opposite effect of a photocell? That is, I want high resistance in the
> presence of light, and low resistance when there is no light."
None that spring to mind, but it generally doesn't matter.
> I agree that you have found a solution for my application (thanks!),
> but I'm still curious about the existence of a device which has high
> resistance in light and low resistance in darkness. Response time
> isn't an issue, it doesn't matter to me if it takes anywhere up to a
> minute for the resistance to change; this won't be a mission-critical
> or life-sustaining device.
> Still looking for an answer on this one; any help would be great. I
> wanted to use this darkness-activated switch to turn on a transistor
> instead of a relay because this application involves about 500ma of
> current at 5V DC. It seems like a waste to involve a relay in such a
> low-power circuit. But I'm just a novice with all of this, so I may be
> wrong. ;)
In general, you can connect the photocell/... in another manner, so that
it turns off the transistor/relay when it goes low resistance, rather
than turns it on.
For example, for a very simple circuit, find the resistance at the light
level you want to switch. (assuming a CDS photocell).
Assuming a 5V supply, you'd then work out an approximate resistor value
to produce about 1.5V when the CDS cell is connected to ground, and the
photocell to 5V.
Now, connect the base of a common NPN small signal transistor (BC557) to
the junction via a 1K resistor, the collector to +5V, the emitter to
the base of a NPNpower transistor.
(you can probably get away with another BC557 at 500ma, though a bigger
transistor will be more reliable, as if the light level varies slowly
enough, it may overheat the power transistor)
The power transistors emitter is grounded, and the collector powers
The way this works is that when the base of the first transistor rises
above a certain voltage, current flows into it through the 1K resistor
(there to protect it from too much current) and turns on.
It then conducts and puts current from the collector to the emitter,
and into the base of the power transistor.
This causes it to turn on, and switch on the load.
The voltage across a transistors emitter-base is about 0.6V when it's starting
to turn on, so if you look at the circuit, you'll see that there are two
emitter-base junctions in series, so the voltage it needs to start to
turn on is about 1.2V
If you swap the photocell and the resistor around, then generally it'll
turn off when it turned on before.
IMO, the best thing to understand this sort of stuff relatively quickly
is to get a plug-in-breadboard, a pack of 100 BC557 and BC567 (NPN and PNP
transistors, $3/100), assorted resistors and capacitors, a copy
of "The Art of Electronics", and a DMM (one with a Hfe tester is invaluable
in finding if you killed a transistor)
AOE is pretty good.
You generally don't need to understand or remember more than one or three
equations for a first read. (ohms law, RC time-constant, ...) The text
pretty much gets the 'rules of thumb' across, and you can go back and
read closer if stuff doesn't work the way you expect.
http://inquisitor.i.am/ | mailto:firstname.lastname@example.org | Ian Stirling.
Things a surgeon should never say:
Better save that for the autopsy.