The best tools to make your project dreams come true

# Night Light Circuit using a PNP Transistor

By John LeDuc, Digi-Key Electronics

### Introduction

Most simple circuits that are using a current driven component will use an NPN transistor. This simple circuit uses an PNP so we can explain the differences between the two.

Reviewing the above schematic symbols, you should note that to turn on a NPN type transistor you will need to use positive current on the base lead.

To turn on PNP transistors you will need to use negative current or at ground level on the base lead.

NPN should have the load on Collector side which is controlled by positive current flowing to the base which then switches the Emitter to ground allowing current to flow from Collector to Emitter (calling this 'sourcing' the load).

For PNP type transistors, the Emitter is on the positive side of the supply voltage and the load is on the Collector side but sinking it to ground via negative current going to the base (listed as V-, Negative Voltage or at Ground).

(See our "Transistor Basics" article for a simpler but more details discussion on Transistors, and also for a different perspective explained another way, see our eewiki article titled How to Drive a Stepper Motor that may help further define how transistors function)

### Creating the circuit

Regarding the Night Light circuit below - we wanted to make use of a PNP transistor for circuit explanation (most discussions on the web are around NPN types)

and we wanted to create an easy, interesting circuit to help young students build a useful circuit they can experiment with (... as part of our Digi-Key local STEM outreach program).

By using a CDS photo-conductive photocell, we can create a night light (or a low light level indicator) by using just a couple resistors, a transistor (in this case, a PNP- 2N3906FS) and an LED in the schematic drawing below.

The Schematic above was made with Scheme-it. Click the picture above for more details.

Part number "PDV-P5003" CDS photocell, is simply a light dependent resistor. The more light that is exposed to it results in a lower resistance between the leads. Biasing the PNP base lead with a voltage divider will enable a trigger point at which current will flow from the emitter to the collector, energizing the LED or turning it on. If we review the datasheet, you will see that the dark resistance is around 1Meg Ohm or when the CDS photocell is absent from light. By using a 220,000 ohm resistor, we are able to properly make the sensitivity of biasing the base to a point where normal room light will keep the LED off and when you cover the photocell (or turn off the light in the room), it goes to very high resistance, allowing the base lead to be closer to ground or V- which in turn, turns on the emitter collector junction turning on the LED. R2 could be replace with a potentiometer to further tweak the sensitivity of turning on the LED or keeping it off.

The schematic above was created in Scheme it Here is a link to the circuit in Scheme it: Night Light

### Component List:

#### Further reading to learn electronics:

Probably the best book on Electronics that I've ordered and tends to be a great standard for referencing functions of electronic components is book: "The Art of Electronics" by Paul Horowitz and Winfield Hill - 2nd or 3rd edition

Another book worth purchasing that tends to be more 'Maker Friendly' is the Electronics CookBook by Simon Monk