1.
Circuits: Design, Wiring, and Passive
Components
Passive Electronic Components
These are parts in a circuit that cannot control current using another
electrical signal.
They only respond to the electricity given to them they don’t “think”
or amplify signals.
Resistors
o They reduce or limit the flow of electric current, which creates
a voltage drop.
o Think of them as speed breakers for electricity, slowing down
current to protect parts.
Capacitors
o They store electrical energy in an electric field between their
plates and release it when needed.
o They act like small rechargeable batteries used for filtering
noise or giving a quick power boost.
Diodes
o They allow current to flow in only one direction and have a
painted line that shows the negative side.
o Helpful for preventing reverse current that might damage a
circuit.
Transistors (Active Components)
o These are semiconductor devices used for switching,
amplification, and voltage regulation.
o They are like electronic switches that can also boost signals.
Integrated Circuits (ICs)
o They contain many tiny components packed together in a
small chip and come in various sizes.
o ICs make it possible to build powerful devices like
microcontrollers, sensors, and processors.
Circuit Wiring Example – Pushbutton
Connect one leg of the pushbutton to a digital pin (e.g., Pin 2) and to
a pull-down resistor (10K ohm) leading to ground. Connect the other
leg to 5V.
o This wiring ensures the pin always reads a stable value
instead of random noise.
Logic – Open (Unpressed)
o When unpressed, the button connects to ground through the
resistor, so the input reads LOW.
o LOW means the microcontroller sees a “0”.
Logic – Closed (Pressed)
o When pressed, the button connects to 5V, so the input reads
HIGH.
o HIGH means the microcontroller sees a “1”.
Floating Pins
o If an input pin does not have a pull-up or pull-down resistor, it
becomes “floating” and randomly reads HIGH or LOW.
o Floating pins cause unstable behaviour, so resistors ensure
clean signals.
2. Actuators: Types and Interfacing
Basics of Actuators
Actuators convert electrical energy into physical movement—linear,
rotary, or oscillating motion.
They are the “moving parts” in robotics and automation.
Actuators are chosen based on torque, speed, precision, range of
motion (like 180 degrees), and whether the movement is linear or
rotating.
Choosing the wrong actuator can make a robot weak or unstable.
Types of Motors
DC Gearless Motor
o Very high speed but low torque, used for light tasks like
powering propellers on small boats.
o Good when you want fast spinning but not heavy lifting.
DC Geared Motor
o Lower speed but high torque, suitable for robots and robotic
arms.
o Gears increase strength, making it good for carrying loads.
Brushless Motor
o Very high speed and low torque, commonly used in drones,
aerial robots, and RC boats.
o They are efficient, low-noise, and have a long lifespan.
Stepper Motor
o Provides good torque and precise rotational steps at variable
speeds but requires special driver circuits.
o Perfect for CNC machines, 3D printers, and plotters.
Servo Motor
o Offers good torque with limited movement (usually 180
degrees) and is controlled using PWM duty cycle.
o Used for controlled angle movement like steering wheels or
robotic joints.
DC Linear Actuator
o Converts rotation of a DC motor into straight linear movement
using a lead screw.
o Used in lifting systems, adjustable beds, and sliding
mechanisms.
Solenoid
o Electromechanical or pneumatic actuator with short
movement but very fast action.
o Often used in door locks, pin pushers, and valves.
Interfacing Actuators & Lights
LED Resistor Calculation
o Formula: R = (Vs – VL) / I, where Vs = supply voltage and VL =
LED voltage.
o Without the resistor, the LED burns out due to excess current.
Voltage Drops of LEDs
o Red ~1.7V, Green ~2.2V, Blue ~4.5V.
o Different colours require different voltages because of
semiconductor material differences.
Motor Driver Using NPN Transistor
o An NPN transistor can drive a motor with variable speed, but it
can't reverse direction.
o For direction control, H-bridge circuits like L298N are used.
Relays
o Used to control high-current or AC devices safely.
o They act like electrically controlled switches.
o Pros of Relays: Can switch AC or DC, handle high voltage
and high current.
Extra: Useful for appliances like pumps, lights, and
motors.
o Cons of Relays: They are bulky, slow, and need more power
than ICs supply.
Extra: For fast switching circuits, they are not ideal.
Optoisolators
o A cheaper and faster isolation method compared to relays,
works well for AC power systems.
o They protect microcontrollers by isolating high-voltage
circuits.
3. Prototyping Board (Arduino) Interfacing
Power & Memory
Vin Pin
o Used to supply external power (like a 9–12V adapter).
o Arduino’s regulator converts it into a safe voltage.
5V & 3.3V Pins
o Provide regulated voltage outputs for sensors and modules.
o Do not draw high current from these pins to avoid damaging
the board.
Memory of ATmega328
o Contains 32KB Flash, 2KB SRAM, and 1KB EEPROM.
o Flash stores your code, SRAM handles variables, EEPROM
holds permanent data.
Digital & Analog I/O
Digital I/O Pins 0–13
o Used for digitalRead and digitalWrite.
o Pins 0 and 1 also serve as serial RX/TX.
PWM Pins
o Used for dimming LEDs and controlling motor speed.
Analog Input Pins A0–A5
o Measure analog signals (0–5V).
o Used for sensors like temperature, light, and potentiometers.
AREF Pin
o Sets the reference voltage for analog inputs.
o Useful when using sensors with a smaller voltage range.
Communication Interfaces
UART Communication
o Pins 0 (RX) and 1 (TX) used for serial communication.
o Also used for uploading code to Arduino.
SPI Interface Pins
o Used for fast communication with modules like SD cards and
displays.
I2C (TWI) Interface
o Supports multiple devices on the same two wires.
4. Software Libraries and Shields
Purpose of Libraries
They add extra features to Arduino for interacting with hardware or
processing data.
Saves time because you don’t need to write everything from
scratch.
Install through Library Manager (Sketch > Include Library > Manage
Libraries).
Always update libraries for bug fixes.
Official Arduino Libraries
Robotics
o Servo.h: Used for controlling servo motors.
Extra: Allows easy angle control like [Link](90).
o Stepper.h: Used for controlling stepper motors (unipolar or
bipolar).
Extra: Helps move motors step-by-step accurately.
Communication
o SPI.h: Enables serial peripheral interface communication.
Extra: Much faster than I2C.
o Wire.h (I2C): Used for I2C communication.
Extra: Simple wiring with only two lines.
Connectivity
o Ethernet.h: For connecting Arduino to the internet via
Ethernet shield.
Extra: Stable and fast compared to WiFi.
o GSM.h: Used for GSM/GPRS communication with GSM shields.
Extra: Can send SMS or connect to mobile networks.
o WiFi.h: For using WiFi shields to connect wirelessly.
Extra: Lets Arduino host a webpage.
o ArduinoBLE.h: Provides Bluetooth Low Energy features.
Extra: Useful for mobile-controlled projects.
Audio
o Audio.h: Used for playing .wav files (only on Arduino Due).
Extra: Enables simple sound effects.