LDR stands for Light Dependent Resistor and is also known as a Cadmium Sulphide (CdS) cell, a photoresistor or a photocell. An LDR is made of a high resistance semiconductor. It is similar to a normal resistor with the exception that a normal resistor has a fixed value and the LDR’s resistance is dependent on ambient light, the light that exists in the LDR’s vicinity. So a photocell is a variable resistor, which produces a resistance proportional to the amount of light it senses. It is very hard to use an LDR to determine the exact amount of light in a given setting but these components are great for determining light in a broader sense, whether it is dark or light. There are two basic circuits that use LDRs:
Image from Adafruit
To measure the resistance of an LDR you will need a multimeter:
Image from www.doctronics.co.uk
A transistor is a semiconductor with 3 leads:
Transistors allow or restrict current flow with the application of voltage.
There are two types of transistors: bipolar and field-effect transistors (FETs). Unlike bipolar transistors, the leads of FETs are referred to as gate, source and drain.
Bipolar transistors can be divided into two categories: NPN and PNP. NPN transistors act like normally opened switches. PNP transistors act like NC switches.
Transistors can amplify the current or can be used as switches.
These values vary and you must refer to the datasheets.
Bipolar Transistors are composed of three layers:
Layers can be N-type (negative) or P-Type (positive).
Layers are formed by doping silicon with traces of impurities. Silicon treated with Boron produces negative type material. It is negative because it has a surplus of electrons. Doping the silicon with Phosphorous produces positive material, or material with a surplus of electron holes.
Silicon transistors are considered semiconductors because they conduct only a small amount of current unless a change in voltage is applied at a juncture.
When current is applied to the input layer, or the emitter of an NPN transistor, electrons flow to the P-type base and fill the positive material, or electron holes.
When the holes are filled, the material no longer conducts current. But when
a small voltage is applied to the control layer, or base, that current will produce additional holes which in turn allows current to flow from the emitter through the base to the collector.
The difference between a PNP transistor and an NPN transistor is the polarity, or proper biasing of the junctions. Transistors restrict the amount of current passed according to a smaller, controlling current. The main current from collector to emitter (PNP) or from emitter to collector (NPN) depends on the type of transistor it is. The small current that controls the main current goes from base to emitter (PNP), or from emitter to base (NPN), depending on the kind of transistor it is.
The arrow always points against the direction of electron flow.
Bipolar transistors are called bipolar because the main flow of electrons through them takes place in two types of semiconductor material: P and N, as the main current goes from emitter to collector (or vice versa). Two types of charge carriers: electrons and holes, comprise the main current through the transistor.
All currents must be going in the proper directions for the device to work as a current regulator. The small, controlling current is usually referred to as the base current because it is the only current that goes through the base wire of the transistor.
The large, controlled current is referred to as the collector current because it is the only current that goes through the collector wire.
Transistors are not a good choice when switching large currents (> 5A). When switching large currents, you need to use relays.
If there is no current through the base of the transistor, the transistor shuts off the controlled current like an open switch and prevents current through the collector. A base current, turns the transistor on like a closed switch and allows a proportional amount of current through the collector. Collector current is primarily limited by the base current, regardless of the amount of voltage available to push it.
The BC548 is a general purpose silicon NPN BJT transistor.
Which transistor is the BC548: