Experimental Physics Lab · Arduino Interfacing & Circuit Simulator

Virtual Arduino Circuits Workbench

Pick components from the right-hand drawer, mount them onto the solderless breadboard, draw professional multi-point orthogonal wires, and run real-time C++ firmware simulations with live telemetry.

CIRCUITS
Shift+Click: Select Component / Wire (Move / Delete)
00:00.000
ARDUINO UNO ATmega328P-PU 16.000 ON L DIGITAL (PWM ~) TX▸ RX◂ AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 1 0 POWER IOREF RESET 3.3V 5V GND GND VIN ANALOG IN A0 A1 A2 A3 A4 A5
SOLDERLESS BREADBOARD • 400 TIE-POINTS + + − − 1 5 10 15 20 25 30 a a b b c c d d e e f f g g h h i i j j 1 5 10 15 20 25 30 + + − −
Resistor
LED
RGB LED
Pushbutton
Potentiometer
Slide Switch
Capacitor
Diode
Photoresistor
Ultrasonic Sensor
PIR Motion Sensor
TMP
Temperature (TMP36)
Tilt Sensor
Micro Servo SG90
Piezo Buzzer
DC Motor / Fan
7-Segment LED
8x8 Dot Matrix
Stepper 28BYJ-48
IR TSOP1838
LM393 Sound
Bluetooth HC-05
P4P LAB
1.8" TFT / LCD
Breadboard Small
Arduino Uno R3
--- Serial Monitor Ready (9600 baud) ---

Physics Laboratory Interfacing Curriculum

Experiment 01

Determination of 'g' via Optical Photogate Timing

Measure time period $T$ of a simple pendulum with microsecond accuracy using hardware interrupt Pin 2 (INT0).

Governing Equations

$$ T = 2\pi \sqrt{\frac{L}{g}} \implies g = 4\pi^2 \frac{L}{T^2} $$

When the pendulum bob passes through the optical gate twice, the hardware interrupt timer registers period $\Delta t$ in microseconds and calculates local gravitational acceleration $g$.

Experiment 02

RC Circuit Transient Charging & Discharging Curve

Capacitor voltage transient response through resistor $R = 10\text{ k}\Omega$, $C = 100\ \mu\text{F}$ ($\tau = 1.00\text{ s}$).

Exponential Dynamics

$$ V_C(t) = V_0 \left(1 - e^{-t / RC}\right) \quad (\text{Charging}), \quad V_C(t) = V_0 e^{-t / RC} \quad (\text{Discharging}) $$

Digital Pin 10 drives square-wave charging cycles while Analog Pin A0 measures the capacitor voltage every 50ms, producing real-time exponential curves on the Serial Plotter.

Experiment 03

Speed of Sound & Distance via HC-SR04 Ultrasonic Ping

Acoustic time-of-flight echo measurement using $40\text{ kHz}$ ultrasonic wave bursts.

Acoustic Time-of-Flight

$$ d = \frac{v_{\text{sound}} \cdot \Delta t}{2} \quad \text{where } v_{\text{sound}} \approx 343\text{ m/s} = 0.0343\text{ cm/}\mu\text{s} $$

Trigger Pin 9 transmits a $10\,\mu\text{s}$ pulse. The echo duration returned on Echo Pin 8 measures obstacle distance with millimetric resolution.

Experiment 04

Potentiometer Voltage Divider & 10-Bit ADC Telemetry

Verify Ohm's law and potential divider relation with 1024-step analog digitization.

Linear Potential Gradient

$$ V_{\text{out}} = V_{\text{in}} \cdot \frac{R_2}{R_1 + R_2}, \quad \text{ADC} = \left\lfloor \frac{V_{\text{out}}}{5.0\text{V}} \times 1023 \right\rfloor $$

Turning the rotary wiper continuously varies the potential between $0\text{V}$ and $5\text{V}$, providing $4.88\text{ mV}$ precision per ADC step.

Experiment 05

Photoresistor (LDR) Solar Insolation & Light Sensing

Semiconductor photoconductivity in CdS photoresistors under variable ambient illumination.

Photoconductive Relation

$$ R_{\text{LDR}} \propto E_{\text{lux}}^{-\gamma}, \quad V_{\text{out}} = 5.0\text{V} \cdot \frac{R_{\text{fixed}}}{R_{\text{LDR}} + R_{\text{fixed}}} $$

Light photons create electron-hole pairs, reducing LDR resistance from $1\text{ M}\Omega$ (dark) to $500\ \Omega$ (bright light), detected on Analog Pin A1.

Experiment 06

Micro Servo SG90 Kinematics & Angular Positioning

Closed-loop servo positioning mapped from potentiometer ADC across $0^\circ$ to $180^\circ$.

Pulse-Width Angular Encoding

$$ \theta = \frac{\text{ADC}}{1023} \times 180^\circ, \quad \tau_{\text{pulse}} \in [1000\,\mu\text{s}, 2000\,\mu\text{s}] $$

Arduino C++ #include <Servo.h> sends a $50\text{ Hz}$ PPM train with pulse widths proportional to the target angle, driving the motor horn in real time.

Syllabus Exp 01

LDR Ambient Light Detector & Automatic Lamp Switch

Detect room light level and actuate a 5V relay / lamp when illumination drops below a programmable threshold.

Optical Relay Thresholding

$$ \text{ADC}_{\text{LDR}} = \left\lfloor \frac{R_F}{R_{\text{LDR}} + R_F} \times 1023 \right\rfloor, \quad \text{State} = \begin{cases} \text{LAMP\_ON}, & \text{ADC} < 450 \\ \text{LAMP\_OFF}, & \text{ADC} \ge 450 \end{cases} $$

In darkness, $R_{\text{LDR}}$ spikes to $500\text{ k}\Omega$, lowering ADC voltage at Pin A0 below 450, which asserts Digital Pin 13 HIGH to illuminate the lamp.

Syllabus Exp 04

TSOP1838 IR Receiver & TV Remote Hex Code Decoder

Demodulate 38 kHz infrared pulse-distance modulation from a consumer TV remote and decode 32-bit NEC Hex protocol packets.

38 kHz NEC Demodulation

$$ \text{Bit '0'} \to 562.5\,\mu\text{s burst} + 562.5\,\mu\text{s space} \quad (1.125\text{ ms}) $$ $$ \text{Bit '1'} \to 562.5\,\mu\text{s burst} + 1687.5\,\mu\text{s space} \quad (2.25\text{ ms}) $$

Interactive remote keypad transmits real NEC packets to TSOP1838 on Pin 11, printing decoded hex identifiers (e.g. 0xFFA25D for Power) to the Serial Monitor.

Syllabus Exp 05

HC-SR501 PIR Motion Sensor & Security Alarm

Pyroelectric infrared detection through Fresnel lens arrays, triggering LED indicators and acoustic sirens upon body movement.

Pyroelectric Charge Differential

$$ \Delta Q = \gamma \cdot A \cdot \Delta T, \quad V_{\text{out}} = \begin{cases} 3.3\text{V (HIGH)}, & \text{Motion in Field} \\ 0.0\text{V (LOW)}, & \text{Quiescent Background} \end{cases} $$

Moving the interactive avatar inside the $120^\circ$ detection cone creates differential thermal currents, driving Pin 2 HIGH and activating the alarm LED on Pin 13.

Syllabus Exp 07 & 09

7-Segment Display 0-9 & Decade Counter with Pushbutton Control

Cycle numbers 0 to 9 with 2-second timing, featuring start/stop toggle keys and reset pushbuttons.

Binary-to-7-Segment Truth Table

$$ \text{Digit } 0 \to \text{0b00111111}, \quad \text{Digit } 8 \to \text{0b01111111}, \quad \text{Digit } 9 \to \text{0b01101111} $$

Digital Pins 2-8 drive individual anode segments $A$ through $G$. Pressing the pushbutton pauses or resumes counting, while the reset key clears to 0.

Syllabus Exp 10

8x8 LED Dot Matrix Character & Alphabet Generator

Showcase numbers 0 to 9 and the entire English alphabet in upper and lower case using time-multiplexed matrix scanning.

Matrix Multiplexing Equation

$$ f_{\text{scan}} = N_{\text{rows}} \times f_{\text{refresh}} \ge 8 \times 60\text{ Hz} = 480\text{ Hz} $$

Persistence of vision (POV) allows 64 individual LEDs to be controlled with row and column scanning pulses, displaying scrolling text and alphanumeric glyphs.

Syllabus Exp 12

LM393 Acoustic Sound Sensor & Comparator Threshold

Electret condenser microphone input amplified through LM393 comparator with adjustable potentiometer sensitivity.

Comparator Trigger Condition

$$ V_{\text{mic}} > V_{\text{pot}} \implies D_0 = \text{HIGH}, \quad \text{LED State} = \text{ON} $$

Clicking the interactive "👏 Clap" button triggers an instantaneous acoustic impulse, driving Pin 7 HIGH and logging new sound detection to the Serial Monitor.

Syllabus Exp 13

RS-775 DC Motor Speed Control via L298 H-Bridge Driver

Dual full-bridge motor driver L298 with PWM speed variation and bidirectional rotation control.

H-Bridge PWM Speed Relation

$$ V_{\text{avg}} = V_{\text{source}} \times \frac{\text{PWM}}{255}, \quad \omega \approx k_e \cdot V_{\text{avg}} $$

PWM Pin 9 controls enable input ENA while Pins 8 and 7 set rotation direction, ramping the propeller from 0 to 255 PWM duty cycle.

Syllabus Exp 14

28BYJ-48 Stepper Motor 10° Angular Indexing via ULN2003

Precision 4-phase microstepping rotation indexing 10° steps every 5 seconds with pushbuttons to halt and initiate.

Stepper Gear Reduction Calculation

$$ \text{Steps per Revolution} = 32 \times 64 = 2048, \quad \text{Steps for } 10^\circ = \frac{10}{360} \times 2048 \approx 57\text{ steps} $$

Digital Pins 8, 9, 10, 11 energize Darlington pair phases on the ULN2003 driver, stepping the needle rotor precisely $10^\circ$ each interval.

Syllabus Exp 15

HC-05 Bluetooth Module & Smartphone Controller

Full-duplex UART serial telemetry with virtual smartphone controller (Arduino BlueControl) for voice and wireless device actuation.

UART Serial Telemetry Protocol

$$ \text{Baud} = 9600\text{ bps}, \quad \text{Format: 8-N-1}, \quad \text{Command: '1' } \to \text{LED HIGH}, \quad \text{'0' } \to \text{LED LOW} $$

Transmit characters from the interactive smartphone keypad into HC-05 RX Pin 10, controlling peripherals wirelessly and receiving sensor telemetry.