Welcome to Electronic and Microelectronic Control Systems

Welcome to your study notes for Electronic and Microelectronic Control Systems, an essential part of your CCEA AS 1 Option Paper (Systems and Control). Electronics can sometimes look intimidating with all its symbols, wiring circuits, and mathematical formulas, but don't worry if this seems tricky at first! We will break everything down step by step into simple, digestible pieces.

In this chapter, you will learn how electronic circuits take in information from the real world (inputs), make decisions or perform timing operations (process), and drive physical devices like motors, buzzers, and displays (outputs). Let's dive in!

---

1. Fundamental Circuit Calculations & Formulae

Before designing complex automated systems, you must master the fundamental mathematical rules that govern current, voltage, and resistance.

A. Ohm's Law and Power

Ohm's Law describes the relationship between Voltage (\(V\)), Current (\(I\)), and Resistance (\(R\)):
Voltage: \(V = I \times R\)
Current: \(I = \frac{V}{R}\)
Resistance: \(R = \frac{V}{I}\)

Electrical power (\(P\)), measured in watts (\(\text{W}\)), represents the rate at which electrical energy is converted into another form of energy (such as heat or light):
• \(P = V \times I\)
• \(P = I^2 \times R\)
• \(P = \frac{V^2}{R}\)

B. Resistor Networks

When designing circuits, you often need a specific resistance value that isn't available as a single standard component. You can combine resistors in two ways:

1. Resistors in Series: Current flows through one resistor after another along a single path. The total resistance increases because the current must pass through each opposition in turn:
\(R_{\text{total}} = R_1 + R_2 + \dots + R_n\)

2. Resistors in Parallel: Current divides along multiple parallel branches. The total resistance decreases because more paths are provided for the current to flow:
\(\frac{1}{R_{\text{total}}} = \frac{1}{R_1} + \frac{1}{R_2} + \dots + \frac{1}{R_n}\)

C. The Potential Divider (Voltage Divider)

A potential divider is one of the most frequently examined circuits in CCEA exams. It consists of two resistors (or a fixed resistor and a sensor) placed in series across a voltage supply (\(V_{\text{in}}\)). It splits the supply voltage into a smaller reference or sensing voltage (\(V_{\text{out}}\)).

The standard formula for calculating \(V_{\text{out}}\) across resistor \(R_2\) (where \(R_2\) is connected to the \(0\text{ V}\) rail) is:
\(V_{\text{out}} = V_{\text{in}} \times \left(\frac{R_2}{R_1 + R_2}\right)\)

Memory Trick: To find the voltage across a resistor, put that specific resistor on top of the fraction, divide by the sum of both resistors, and multiply by the input voltage.

D. Capacitors and the RC Time Constant

A capacitor stores electrical charge. When paired with a resistor, it forms an RC timing network where the rate of charging or discharging is controlled.

The Time Constant (\(\tau\) or \(T\)) is calculated as:
\(T = R \times C\)
Where \(T\) is time in seconds (\(\text{s}\)), \(R\) is resistance in ohms (\(\Omega\)), and \(C\) is capacitance in farads (\(\text{F}\)).

Charging & Discharging Profile:
• After \(1T\) (\(1\tau\)), a charging capacitor reaches approximately \(63\%\) of the supply voltage (\(V_{\text{s}}\)).
• After \(1T\) (\(1\tau\)), a discharging capacitor falls to approximately \(37\%\) of its initial stored voltage.
• A capacitor is considered fully charged or fully discharged after \(5T\) (\(5\tau\)).

E. LED Current Limiting Resistors

Light Emitting Diodes (LEDs) are delicate semiconductor devices. If connected directly across a power supply, excessive current will destroy them instantly. A series current limiting resistor (\(R_{\text{limit}}\)) must always protect the LED.

The required resistance is calculated using Ohm's Law across the resistor itself:
\(R_{\text{limit}} = \frac{V_{\text{supply}} - V_{\text{LED}}}{I_{\text{LED}}}\)
Standard single LEDs typically drop between \(1.6\text{ V}\) and \(2.2\text{ V}\) and operate safely at currents of \(10\text{ mA}\) to \(20\text{ mA}\) (\(0.010\text{ A}\) to \(0.020\text{ A}\)).

Key Takeaway for Calculations

Always convert engineering prefixes to base SI units before calculating! For example, convert kilo-ohms (\(\text{k}\Omega\)) to ohms by multiplying by \(10^3\), and microfarads (\(\mu\text{F}\)) to farads by multiplying by \(10^{-6}\).

---

2. Transducers and Input Components

Transducers convert one form of physical energy (such as light, heat, or movement) into electrical signals.

A. Environmental Sensors

1. Thermistors (NTC): CCEA specifications focus on Negative Temperature Coefficient (NTC) thermistors. As temperature rises, thermal agitation frees charge carriers, causing their electrical resistance to decrease.
Memory Aid: Negative = Temperature goes UP, Resistance goes DOWN.

2. Light Dependent Resistors (LDRs): Made from Cadmium Sulphide (CdS). When light hits the surface, incoming photons liberate electrons, causing the electrical resistance to decrease as light level increases (LURD: Light Up, Resistance Down).

3. Moisture Probes: Use the electrical conductivity of water/damp soil. As moisture levels increase, electrical conduction increases, lowering the resistance between the probes.

4. Thermocouples: Made by joining two dissimilar metals together. They generate a tiny, measurable millivolt signal directly proportional to the temperature difference between the hot and cold junctions.

5. Photodiodes and Phototransistors: Semiconductor devices that detect light. Photodiodes respond very rapidly when reverse-biased by altering reverse leakage current with light. Phototransistors provide built-in current amplification, generating larger output currents when exposed to light.

B. Switches and Mechanical Inputs

Switches provide simple digital on/off control:
SPST (Single Pole Single Throw): Basic on/off switch with two terminals.
SPDT (Single Pole Double Throw): Routes current from one common terminal to either of two different paths.
DPDT (Double Pole Double Throw): Two isolated SPDT switches operated by a single mechanism; commonly used to reverse the polarity and direction of DC motors.
PTM (Push-to-Make): Normally open; closes the circuit only while held down (e.g., a doorbell).
PTB (Push-to-Break): Normally closed; breaks the circuit only while pressed (e.g., an emergency stop or fridge door light switch).
Microswitches: Highly sensitive, spring-loaded lever switches used for end-of-travel limit detection in automated machinery.
Rotary Switches: Multi-position switches operated by turning a central knob to select different modes or circuit branches.

Key Takeaway for Inputs

Sensors like LDRs and thermistors produce a changing resistance. To make this useful for an electronic circuit, you must always pair the sensor with a fixed resistor in a potential divider to produce a changing voltage.

---

3. Capacitors: Types and Configurations

Capacitors are categorized based on their dielectric materials, value ranges, and polarity characteristics:

1. Electrolytic Capacitors:
Polarised: Must be inserted in the correct orientation. The positive terminal (anode) must connect to the higher potential, and the negative pin (marked with a stripe and minus sign) must connect to \(0\text{ V}\) or ground.
High Capacitance: Used for high-capacity applications like power supply smoothing and long-duration timing circuits (typically in the microfarad range: \(\mu\text{F}\)).
Warning: Connecting an electrolytic capacitor backwards can cause it to overheat and fail destructively!

2. Non-Polarised Capacitors (Ceramic and Polyester):
Non-polarised: Can be connected in either direction within a circuit.
Low Capacitance: Offer smaller capacitance values ranging from picofarads (\(\text{pF}\)) to nanofarads (\(\text{nF}\)).
• Frequently used for high-frequency filtering, noise suppression, and short-duration timing networks.

---

4. Output Components, Actuators, and Driver Stages

Input sensors and processing chips rarely provide enough electrical current to power heavy loads like motors or lamps. Driver stages bridge this gap.

A. Bipolar Junction Transistors (BJTs)

BJTs are current-controlled semiconductor devices available in NPN and PNP configurations. In CCEA systems, NPN transistors are most commonly used as electronic switches.

Base-Emitter Voltage (\(V_{\text{be}}\)): Silicon transistors require approximately \(0.7\text{ V}\) across the base-emitter junction to turn on fully (saturate).
Current Gain (\(h_{\text{fe}}\) or \(\beta\)): The ratio of collector current (\(I_{\text{c}}\)) to base current (\(I_{\text{b}}\)):
\(h_{\text{fe}} = \frac{I_{\text{c}}}{I_{\text{b}}}\)
• A tiny base current allows a much larger collector current to flow, switching on the load connected to the collector.

B. MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors)

Unlike BJTs, MOSFETs are voltage-controlled devices.
• The Gate is electrically insulated from the Drain and Source channels.
• When the Gate-to-Source voltage (\(V_{\text{gs}}\)) exceeds a specific threshold, the channel conducts, allowing high current to flow between Drain and Source.
• Because the gate draws virtually zero steady-state current, MOSFETs are ideal for interfacing directly with low-power microcontrollers.

C. Relays, Solenoids, and the Crucial Flyback Diode

Relays are electromechanical switches that use a small coil current to magnetically pull contacts closed, allowing a low-voltage DC circuit to switch a completely isolated, high-power DC or AC circuit.

The Back-EMF Hazard & Protection:
When an inductive coil (in a relay or solenoid) is suddenly switched off, its collapsing magnetic field induces a massive, reverse-voltage spike known as back-EMF. This high-voltage spike can easily destroy sensitive driver transistors.

To prevent damage, a freewheeling (flyback) diode must always be connected in reverse bias directly across the relay coil. Under normal operation, the diode does not conduct. When the coil switches off, the induced reverse spike forward-biases the diode, safely dissipating the energy through the coil loop.

D. Displays: LEDs and 7-Segment Displays

A 7-segment display consists of seven individual LED bars arranged in a figure-eight pattern (plus an optional decimal point).
Crucial Exam Design Rule: Every individual segment must have its own dedicated current-limiting resistor.
Common Exam Mistake: Never place a single shared resistor on the common pin! If a single resistor is shared, the total current divides among whichever segments are lit. As a result, displaying the digit "1" (2 segments lit) would look intensely bright, while the digit "8" (7 segments lit) would look very dim.

Key Takeaway for Outputs

Always check inductive loads for a reverse-biased flyback diode, and ensure every segment of an LED display has its own dedicated current-limiting resistor.

---

5. Operational Amplifiers (Op-Amps)

Operational Amplifiers (such as the standard 741 or dual 358 ICs) are high-gain differential voltage amplifiers with an inverting input (\(-\)) and a non-inverting input (\(+\)).

A. The Comparator Mode

In open-loop comparator mode, the op-amp compares the voltage at the non-inverting input (\(V_+\)) with the voltage at the inverting input (\(V_-\)):
• If \(V_+ > V_-\), the output swings fully positive (saturates near the positive supply rail, High).
• If \(V_+ < V_-\), the output swings fully negative (saturates near the negative supply rail or \(0\text{ V}\), Low).

This allows an op-amp to turn on a heating or lighting system as soon as a sensor voltage crosses a set reference threshold set by a potentiometer.

B. The Schmitt Trigger and Hysteresis

A basic comparator can suffer from rapid output "chatter" or noise if the input sensor signal hovers right on the threshold line.

A Schmitt Trigger solves this by introducing positive feedback (a resistor connected between the output and the non-inverting \(+\) input). This creates two separate switching thresholds:
1. Upper Threshold Voltage (UTV): The input must rise above this higher point to switch the output.
2. Lower Threshold Voltage (LTV): The input must fall below this lower point to switch the output back.

The gap between these two thresholds is called hysteresis. It completely eliminates false triggering caused by noise on slow-moving sensor signals (e.g., slowly rising morning light on an LDR).

---

6. The 555 Timer IC

The 555 Timer is one of the most versatile chips in electronics, operating in two primary configurations:

A. Monostable Mode (One-Shot Pulse Generator)

In monostable mode, the 555 has one stable state (output LOW). When a negative trigger pulse (falling below \(\frac{1}{3}V_{\text{cc}}\)) is applied to Pin 2, the output immediately jumps HIGH for a fixed time delay before automatically returning LOW.

The duration of the output pulse (\(T\)) is determined by an external resistor and capacitor:
\(T = 1.1 \times R \times C\)
Example application: Automatic stairwell lighting or a timed hand dryer that stays on for a set number of seconds after a button is pressed.

B. Astable Mode (Oscillator / Clock Generator)

In astable mode, the 555 has no stable states. The output continuously switches back and forth between HIGH and LOW, generating a square wave.

The timing is set by two resistors (\(R_1\), \(R_2\)) and one capacitor (\(C\)):
Time Output is High: \(t_{\text{high}} = 0.693 \times (R_1 + R_2) \times C\)
Time Output is Low: \(t_{\text{low}} = 0.693 \times R_2 \times C\)
Total Period: \(T = t_{\text{high}} + t_{\text{low}} = 0.693 \times (R_1 + 2R_2) \times C\)
Frequency: \(f = \frac{1}{T} \approx \frac{1.44}{(R_1 + 2R_2)C}\)
Mark-to-Space Ratio: \(\frac{t_{\text{high}}}{t_{\text{low}}} = \frac{R_1 + R_2}{R_2}\)

Note: In a standard 555 astable circuit, \(t_{\text{high}}\) is always longer than \(t_{\text{low}}\) because the capacitor charges through \((R_1 + R_2)\) but discharges only through \(R_2\).

---

7. Digital Logic and Microcontrollers (PICs)

A. Digital Logic Gates

Combinational logic systems make instant binary decisions based on the current states of their inputs (where Logic \(1 = \text{HIGH} / 5\text{ V}\), and Logic \(0 = \text{LOW} / 0\text{ V}\)):

NOT Gate (Inverter): Output is the opposite of the input (\(Q = \bar{A}\)).
AND Gate: Output is HIGH only when all inputs are HIGH (\(Q = A \cdot B\)).
OR Gate: Output is HIGH if at least one input is HIGH (\(Q = A + B\)).
NAND Gate: AND followed by NOT; output is LOW only when all inputs are HIGH (\(Q = \overline{A \cdot B}\)).
NOR Gate: OR followed by NOT; output is HIGH only when all inputs are LOW (\(Q = \overline{A + B}\)).
XOR Gate (Exclusive OR): Output is HIGH if the inputs are different from each other (\(Q = A \oplus B\)).

B. Microcontrollers (Programmable Interface Controllers / PICs)

A microcontroller is a complete computer on a single integrated chip. It replaces bulky combinations of discrete logic gates and timers with software-controlled flexibility.

Internal Architecture of a PIC:
CPU (Central Processing Unit): The "brain" that fetches, decodes, and executes program instructions.
ROM / Flash Memory: Non-volatile memory storing the user's control program.
RAM (Random Access Memory): Volatile temporary memory used to store active variables and counter values.
I/O Ports (Input/Output): Physical pins configured via software to read digital/analogue inputs or send signals to output drivers.
ADC (Analogue-to-Digital Converter): Converts variable analogue sensor voltages (like from an LDR) into proportional digital numbers (e.g., 0 to 255 for an 8-bit ADC) that software algorithms can process.

Advantages of PICs over Discrete Logic:
• Substantially reduces component count, PCB size, and assembly costs.
• Circuit behaviour can be modified or upgraded by simply updating flowchart software, without redesigning physical wiring.

---

8. Control System Fundamentals: Open-Loop vs. Closed-Loop

Understanding the difference between open-loop and closed-loop architectures is vital for system design questions:

1. Open-Loop Control:
An open-loop system carries out an action without measuring the actual result or outcome. There is no feedback path.
Example: A basic timed toaster or a timed microwave. It heats for 2 minutes regardless of whether the food is frozen, perfectly cooked, or burning.

2. Closed-Loop Control:
A closed-loop system continually monitors its output using sensors and feeds this data back to compare against the desired set-point. If an error is detected, the system adjusts the output automatically.
Example: A thermostatically controlled central heating system. The thermistor continuously feeds current room temperature back to an op-amp comparator or microcontroller, turning the boiler on or off to maintain a constant target temperature.

---

9. Common Exam Pitfalls & How to Avoid Them

Examiner reports frequently highlight avoidable errors. Review this checklist before your examination:

Unit Conversions: Always convert \(\text{k}\Omega\) to \(\Omega\) (\(\times 10^3\)) and \(\mu\text{F}\) to \(\text{F}\) (\(\times 10^{-6}\)) before calculating 555 timing or RC equations.
Freewheeling Diode Orientation: Always draw the flyback diode in reverse bias (cathode to the positive supply rail, anode to the transistor collector) across relay coils. Drawing it forward-biased creates a direct short-circuit!
Potential Divider Orientation: Pay attention to which component is in the top (\(R_1\)) versus bottom (\(R_2\)) position. If an LDR is at the bottom, \(V_{\text{out}}\) drops as light increases. If the LDR is at the top, \(V_{\text{out}}\) rises as light increases.
Capacitor Polarity: Always indicate the positive (\(+\)) and negative (\(-\)) markings on electrolytic capacitors in your schematic sketches.
7-Segment Resistors: Always draw a separate current-limiting resistor for every individual LED segment line rather than a single shared resistor on the common pin.
Feedback Identification: Do not call a system "closed-loop" simply because it has a timer. A system is only closed-loop if it includes active sensor feedback that checks and corrects the output state.

---

Chapter Quick Review Summary

Ohm's Law: \(V = I \times R\), \(P = V \times I\)
Potential Divider: \(V_{\text{out}} = V_{\text{in}} \times \frac{R_2}{R_1 + R_2}\)
RC Time Constant: \(T = R \times C\) (\(63\%\) charged at \(1T\), fully charged at \(5T\))
LED Resistor: \(R_{\text{limit}} = \frac{V_{\text{supply}} - V_{\text{LED}}}{I_{\text{LED}}}\)
NTC Thermistors & LDRs: Resistance decreases as temperature or light increases.
Transistors: BJTs are current-controlled (\(V_{\text{be}} \approx 0.7\text{ V}\)); MOSFETs are voltage-controlled.
Relays: Require a reverse-biased diode to suppress inductive back-EMF spikes.
Op-Amps: Used as open-loop comparators or with positive feedback as Schmitt triggers to provide noise-free hysteresis.
555 Timer: Monostable = \(T = 1.1RC\); Astable Frequency \(\approx \frac{1.44}{(R_1 + 2R_2)C}\)
Control Loops: Open-loop has no feedback; closed-loop uses sensor feedback to self-correct.