Welcome to Electronic and Microelectronic Control Systems

Welcome to one of the most exciting and practical areas of your CCEA A2 Technology and Design course! Electronic and microelectronic systems form the hidden "brain" and "nervous system" behind everyday modern technology—from automated climate controls and robotic arms to smart alarms and medical monitoring devices.

Don't worry if electronic circuitry or formulas have seemed intimidating in the past. We will break down every concept step by step, using clear analogies, straightforward formulas, and practical design tips to ensure you feel completely confident walking into your examination.

---

1. Transducers and Input Systems

An electronic system always begins with an input. The devices that sense the physical world and convert that physical energy into electrical signals (or vice versa) are known as transducers.

Light Transducers

Light Dependent Resistors (LDRs): An LDR is a component whose resistance changes based on light levels. In total darkness, its resistance is very high (often in megaohms, \(\text{M}\Omega\)). When bright light falls upon it, its resistance drops dramatically (often down to a few hundred ohms, \(\Omega\)).
Memory Trick: LURD — Light Up, Resistance Down!

Photodiodes: These are semiconductor diodes designed to operate in reverse bias (connected "backwards" relative to standard current flow). When light strikes the junction, it generates a reverse current that is directly proportional to the light intensity. They respond much faster than LDRs.

Phototransistors: Similar to photodiodes, but they provide built-in current amplification, producing a larger output current for a given light level.

Temperature Transducers

Negative Temperature Coefficient (NTC) Thermistors: With standard conductors, resistance rises as they heat up. An NTC thermistor does the exact opposite: as temperature rises, its electrical resistance decreases.
Memory Trick: TURD — Temperature Up, Resistance Down!

Thermocouples: Made by joining two dissimilar metals together at a sensing junction. When this junction experiences a temperature difference compared to a cold reference junction, a small DC voltage is generated across the wires. This phenomenon is known as the Seebeck effect. Thermocouples are extremely robust and ideal for measuring very high industrial temperatures.

Mechanical and Pressure Transducers

Strain Gauges: A thin metallic foil pattern on a flexible backing. When stretched (tension), the wire becomes longer and thinner, increasing its electrical resistance. When compressed, the wire thickens and shortens, decreasing its resistance.

Load Cells: A structural element (often an aluminium or steel block) fitted with strain gauges configured inside a bridge circuit to measure weight, force, or mechanical load.

The Potential Divider Circuit

Sensors like LDRs and thermistors change their resistance, but microcontrollers and operational amplifiers require an input voltage. We convert changing resistance into changing voltage using a potential divider circuit.

A potential divider consists of two resistors (\(R_1\) and \(R_2\)) connected in series across a power supply (\(V_{\text{in}}\)). The output voltage (\(V_{\text{out}}\)) taken across \(R_2\) is calculated using:

\(V_{\text{out}} = V_{\text{in}} \times \frac{R_2}{R_1 + R_2}\)

Worked Example:
Suppose \(V_{\text{in}} = 9\text{ V}\), top resistor \(R_1 = 10\text{ k}\Omega\), and bottom component \(R_2\) is an NTC thermistor currently at \(20\text{ k}\Omega\).
\(V_{\text{out}} = 9 \times \frac{20\,\text{k}\Omega}{10\,\text{k}\Omega + 20\,\text{k}\Omega} = 9 \times \frac{20}{30} = 6.0\text{ V}\).
If the thermistor heats up so that its resistance drops to \(5\text{ k}\Omega\):
\(V_{\text{out}} = 9 \times \frac{5\,\text{k}\Omega}{10\,\text{k}\Omega + 5\,\text{k}\Omega} = 9 \times \frac{5}{15} = 3.0\text{ V}\).

Key Takeaway for Section 1

Transducers convert physical parameters into electrical signals. Potential dividers convert variable resistance into variable voltage using \(V_{\text{out}} = V_{\text{in}} \times \frac{R_2}{R_1 + R_2}\).

---

2. Operational Amplifiers (Op-Amps) and Signal Conditioning

Sensor voltages are often tiny, weak, or noisy. An Operational Amplifier (Op-Amp) is a high-gain DC voltage amplifier used to condition, boost, compare, or combine these signals.

Ideal Op-Amp Characteristics

In theoretical calculations, we treat op-amps as "ideal" devices with three core properties:
1. Extremely High Open-Loop Voltage Gain: \(A_{OL} \approx 10^5 \text{ to } 10^6\). Even a microscopic voltage difference between inputs drives the output to maximum.
2. Infinite Input Impedance: \(Z_{\text{in}} \to \infty\). No current flows into the input terminals (\(I_+ = I_- = 0\)).
3. Zero Output Impedance: \(Z_{\text{out}} \to 0\). The output can deliver full signal voltage regardless of the connected load.

The Open-Loop Comparator

When an op-amp has no feedback connected, it operates as a comparator. It compares the voltage at the non-inverting input (\(V_+\)) to the inverting input (\(V_-\)):
• If \(V_+ > V_-\), the output swings fully positive to the positive supply rail (\(+V_{\text{sat}}\)).
• If \(V_+ < V_-\), the output swings fully negative to the negative supply rail (\(-V_{\text{sat}}\) or \(0\text{ V}\)).

The Schmitt Trigger (Eliminating Noise with Hysteresis)

Standard comparators can "chatter" or switch on and off rapidly if an input signal is slow-moving or noisy around the reference voltage. To solve this, a Schmitt Trigger uses positive feedback (a resistor connecting the output back to the non-inverting input \(V_+\)).

Positive feedback creates two distinct switching thresholds:
• Upper Threshold Voltage (\(V_{UT}\)): The input must rise above this level to switch the output.
• Lower Threshold Voltage (\(V_{LT}\)): The input must drop below this lower level to switch back.
The difference between these levels (\(V_{UT} - V_{LT}\)) is called the hysteresis band. It guarantees clean, bounce-free switching even on noisy signals.

Negative Feedback Op-Amp Configurations

When we send a portion of the output signal back to the inverting input (\(V_-\)), we establish negative feedback. This reduces the enormous gain to a stable, predictable level set entirely by external resistors.

1. Inverting Amplifier:
The input signal enters the inverting terminal via input resistor \(R_{\text{in}}\), with feedback resistor \(R_f\) running from the output back to the inverting terminal. The non-inverting terminal is tied to \(0\text{ V}\) (creating a "virtual earth" at \(V_-\)). The output is amplified and inverted (phase shifted by \(180^\circ\)):
Voltage Gain: \(A_v = -\frac{R_f}{R_{\text{in}}}\)
Output Voltage: \(V_{\text{out}} = -\frac{R_f}{R_{\text{in}}} \times V_{\text{in}}\)

2. Non-Inverting Amplifier:
The input signal enters the non-inverting terminal directly. A feedback divider (\(R_f\) and \(R_1\)) connects the output to the inverting terminal. The output is in phase with the input:
Voltage Gain: \(A_v = 1 + \frac{R_f}{R_1}\)
Output Voltage: \(V_{\text{out}} = \left(1 + \frac{R_f}{R_1}\right) \times V_{\text{in}}\)

3. Summing Amplifier (Inverting):
Combines multiple separate input voltages (\(V_1, V_2, \dots, V_n\)) into a single inverted output:
\(V_{\text{out}} = -R_f \left( \frac{V_1}{R_1} + \frac{V_2}{R_2} + \dots + \frac{V_n}{R_n} \right)\)
If all input resistors are equal (\(R_1 = R_2 = R_{\text{in}}\)), the formula simplifies to \(V_{\text{out}} = -\frac{R_f}{R_{\text{in}}}(V_1 + V_2 + \dots)\).

4. Difference (Differential) Amplifier:
Amplifies only the voltage difference between its two input terminals while completely rejecting any noise voltage common to both inputs (known as common-mode rejection).

Key Takeaway for Section 2

Comparators use open-loop gain to switch at rail limits. Schmitt triggers use positive feedback to create hysteresis against noise. Inverting (\(A_v = -\frac{R_f}{R_{\text{in}}}\)) and Non-Inverting (\(A_v = 1 + \frac{R_f}{R_1}\)) amplifiers use negative feedback for stable, linear amplification.

---

3. Timing, Oscillators, and Waveform Generation

RC Time Constants

When a capacitor charges through a resistor from a DC supply, the rate of charging depends on the resistance (\(R\)) and the capacitance (\(C\)).
The time constant (\(\tau\), Greek letter tau) is defined as:

\(\tau = R \times C\)

(where \(\tau\) is in seconds, \(R\) is in ohms \(\Omega\), and \(C\) is in farads \(\text{F}\)).

Important timing rules for your exam:
• After \(1\tau\), the capacitor charges to approximately 63% of the supply voltage.
• After \(5\tau\), the capacitor is considered fully charged (reaches over 99% of supply voltage).

The 555 Integrated Circuit Timer

The 555 timer is an industry-standard 8-pin IC used to create accurate timing pulses and oscillations.

1. Monostable Mode ("One-Shot" Pulse Generator):
In monostable mode, the 555 circuit has one stable state (output LOW). When a brief falling-edge trigger pulse (dropping below \(\frac{1}{3}V_{cc}\)) is applied to Pin 2, the output immediately jumps HIGH for a fixed duration (\(T\)) while an external capacitor charges through resistor \(R\):

\(T = 1.1 \times R \times C\)

After time \(T\) elapses, the output returns LOW until the next trigger pulse arrives.

2. Astable Mode (Free-Running Oscillator):
In astable mode, the 555 timer has no stable states. It continuously switches between HIGH and LOW, generating an ongoing square wave. It uses two timing resistors (\(R_A\) and \(R_B\)) and one capacitor (\(C\)):
• Charge time (Output HIGH): \(t_1 = 0.693 \times (R_A + R_B) \times C\)
• Discharge time (Output LOW): \(t_2 = 0.693 \times R_B \times C\)
• Total Period of one complete cycle: \(T = t_1 + t_2 = 0.693 \times (R_A + 2R_B) \times C\)
• Output Frequency (cycles per second, in Hertz \(\text{Hz}\)):
\(f = \frac{1}{T} = \frac{1.44}{(R_A + 2R_B) \times C}\)

Key Takeaway for Section 3

\(\tau = RC\) gives the basic charging time constant. A monostable 555 outputs a single timed pulse of duration \(T = 1.1RC\). An astable 555 oscillates continuously with total period \(T = 0.693(R_A + 2R_B)C\).

---

4. Digital Microcontrollers and PIC Control

A Programmable Interface Controller (PIC) or microcontroller is a complete miniature computer integrated onto a single silicon chip. It replaces bulky banks of discrete logic gates with software-programmable flexibility.

Microcontroller Architecture

• CPU (Central Processing Unit): Executes the stored instructions sequentially.
• RAM (Random Access Memory): Volatile memory used to hold temporary variables during program execution.
• ROM / Flash Memory: Non-volatile memory that retains the programmed control algorithm even when power is disconnected.
• General Purpose I/O Ports: Input and output pins connected to switches, sensors, LEDs, and drivers.
• Analogue-to-Digital Converter (ADC): Converts continuous analogue input voltages (e.g., \(0\text{ V}\) to \(V_{cc}\)) into discrete binary numbers. An 8-bit ADC divides the voltage range into \(2^8 = 256\) steps (\(0\text{--}255\)), while a 10-bit ADC provides \(2^{10} = 1024\) discrete steps (\(0\text{--}1023\)).

Flowchart Programming Conventions

When designing PIC routines, CCEA examination questions frequently require standard flowchart symbols:
• Terminator (Oval / Capsule): Represents START, STOP, or SUBROUTINE ENTRY/RETURN.
• Process (Rectangle): Represents an internal operation, calculation, or time delay (e.g., "Set Counter = 0" or "Wait 500 ms").
• Decision (Diamond): Represents a branch condition with at least two labeled exit paths (e.g., "Is Pin 1 HIGH? — YES / NO").
• Input / Output (Parallelogram): Represents reading external inputs or updating physical outputs (e.g., "Read ADC Channel 0" or "Switch Motor ON").
• Flowlines (Arrows): Indicate the exact sequence and direction of control flow.

Logic Minimization

Digital subsystems rely on standard logic gates: AND, OR, NOT, NAND, NOR, and XOR.
Complex Boolean expressions are simplified into minimal hardware gates using:
• De Morgan’s Laws:
\(\overline{A \cdot B} = \overline{A} + \overline{B}\) (Breaking an AND bar splits it into inverted OR parts)
\(\overline{A + B} = \overline{A} \cdot \overline{B}\) (Breaking an OR bar splits it into inverted AND parts)
• Karnaugh Maps (K-Maps): A graphical method of grouping adjacent binary 1s in powers of two (\(1, 2, 4, 8\dots\)) to eliminate redundant variables from a logic expression.

Key Takeaway for Section 4

PICs combine CPU, memory, ADC, and I/O pins. Flowcharts strictly require standard symbols (oval, rectangle, diamond, parallelogram). Logic systems are simplified using De Morgan’s laws and Karnaugh mapping.

---

5. Actuators, Output Interfacing, and Protection

Microcontrollers and op-amps produce low-voltage, low-current signals (typically \(5\text{ V}\) at under \(20\text{ mA}\)). Most real-world actuators (solenoids, motors, and high-power relays) require much higher currents or operating voltages. We must use transistor driver circuits to safely bridge this gap.

Common Actuators

• Relays: Electromechanical switches that allow a small low-voltage circuit to control a completely isolated high-power circuit.
• Solenoids: Linear actuators that produce pulling or pushing mechanical movement when energized.
• DC Motors: Provide continuous rotational motion; speed is controlled via voltage or PWM (Pulse Width Modulation).
• Stepper Motors: Move in precise discrete angular steps; ideal for precision positioning without feedback sensors.
• Servomotors: Geared DC motors with built-in position feedback, allowing exact angular positioning (usually across \(0^\circ\text{--}180^\circ\)).

Transistor Driver Circuits

1. Bipolar Junction Transistor (BJT):
Operates as a current-controlled switch. A small current at the base (\(I_b\)) controls a larger current flowing from collector to emitter (\(I_c\)).
The current gain is given by: \(h_{FE} = \frac{I_c}{I_b}\).
A base resistor (\(R_b\)) is strictly required to limit base current and prevent damaging the transistor junction.

2. MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor):
A voltage-controlled device. Applying a voltage to the Gate terminal switches on high current between Drain and Source. Because the Gate is electrically insulated, steady-state gate current is virtually zero. In the fully ON state, the internal resistance (\(R_{DS(\text{on})}\)) is extremely low, meaning very little power is wasted as heat.

3. Darlington Pair:
Two cascaded BJTs connected together inside one package so that the emitter current of the first feeds directly into the base of the second. This produces an exceptionally high total current gain:
\(h_{FE_{\text{total}}} \approx h_{FE_1} \times h_{FE_2}\)

Inductive Load Protection (The Flyback Diode)

When an inductive load (such as a relay coil, solenoid, or DC motor) is suddenly switched off, its collapsing magnetic field induces a massive, destructive reverse-voltage surge across the transistor switch. This is known as back-EMF.

To protect the semiconductor driver, a flyback diode (also called a free-wheeling diode) is connected directly across the inductive coil in reverse bias (cathode to the positive supply rail, anode to the collector/drain).
• During normal operation, the diode is reverse-biased and draws no current.
• At turn-off, the diode becomes forward-biased by the collapsing magnetic spike, safely recirculating and dissipating the energy through the coil windings.

Optocouplers / Optoisolators

An optocoupler packages an infrared LED and a phototransistor inside a light-tight sealed chip. Because the control signal is transmitted entirely via light, there is 100% galvanic (electrical) isolation between sensitive microcontrollers and noisy, high-voltage output machinery.

Key Takeaway for Section 5

BJTs, MOSFETs, and Darlington pairs boost low microcontroller currents to drive actuators. Flyback diodes must always be placed in reverse bias across inductive coils to absorb back-EMF spikes.

---

6. Control Principles and Feedback Systems

Open-Loop vs. Closed-Loop Control

Open-Loop Systems: The control action is independent of the final output. The system runs blindly according to its pre-set timer or program with no self-correcting feedback.
Everyday Example: A basic bread toaster. It runs for 2 minutes regardless of whether the bread is still raw or burning black.

Closed-Loop Systems: The output is continuously monitored by sensors. The measured output is fed back and compared against a reference setpoint to calculate an error signal:

\(\text{Error Signal} = \text{Setpoint Value} - \text{Measured Output}\)

The controller then automatically alters the actuator output to drive the error signal to zero.
Everyday Example: A domestic central heating thermostat that continuously measures room temperature and switches the boiler on or off to maintain exactly \(21^\circ\text{C}\).

Feedback Stability

• Negative Feedback: Subtracts the output from the setpoint. It stabilizes the system, self-corrects disturbances, and dampens unwanted oscillations.
• Positive Feedback: Adds the output back to the input, reinforcing deviations and driving outputs rapidly toward saturation. While avoided in linear control loops, it is used intentionally in Schmitt triggers and oscillators.

Key Takeaway for Section 6

Closed-loop systems use feedback to measure output against a setpoint and eliminate error signals. Negative feedback stabilizes; positive feedback reinforces deviation.

---

7. Common Exam Pitfalls and Revision Checklist

Make sure you do not lose easy marks by watching out for these common examiner-reported mistakes:

• Flyback Diode Direction: Never draw a protection diode in forward bias across an inductive load! In forward bias, it will create a direct short-circuit across your power rails when the transistor turns on. It must be in reverse bias.
• Electrolytic Capacitor Polarity: Remember that electrolytic capacitors are polarised. The positive leg (anode) must always connect to the higher potential. Connecting it in reverse will destroy the component.
• Op-Amp Saturation vs. Linear Gain: Open-loop comparators do not produce linear output; they hit the supply rails (\(\pm V_{\text{sat}}\)). Only op-amps with negative feedback can amplify linearly.
• Schmitt Trigger Terminology: When explaining a Schmitt trigger, always state that positive feedback creates a hysteresis band (\(V_{UT} - V_{LT}\)) designed to prevent false triggering from noise or switch bounce.
• Unit Prefixes: Double-check your powers of ten before calculating \(\tau = RC\) or \(555\) frequencies:
- Microfarads (\(\mu\text{F}\)) \(= \times 10^{-6}\text{ F}\)
- Nanofarads (\(\text{nF}\)) \(= \times 10^{-9}\text{ F}\)
- Picofarads (\(\text{pF}\)) \(= \times 10^{-12}\text{ F}\)
- Kilohms (\(\text{k}\Omega\)) \(= \times 10^{3}\,\Omega\)
- Megaohms (\(\text{M}\Omega\)) \(= \times 10^{6}\,\Omega\)