Sensors, Actuators and Microcontrollers
Real-world data collect karne aur devices ko control karne ke liye use hone wale components ke baare mein seekhiye.
🔹 Transducer
Yani agar kisi system me mechanical, electrical, light, chemical, thermal ya electromagnetic energy ko kisi doosri energy me badla jaye to us process me transducer ka use hota hai.
Transducer ka main kaam:
🌟 Examples of Transducer
Solar Cell
Light energy ko electrical energy me convert karta hai.
Motor
Electrical energy ko mechanical motion me convert karti hai.
🔹 Sensor
Sensor ek aisa device hota hai jo environment se input data collect karta hai aur usse readable form me display karta hai. Ye environment me hone wale changes ko detect karta hai.
Sensor physical quantity ko electrical signal me convert karta hai taaki system us data ko process kar sake.
Sensor ka output signal human readable form me display kiya ja sakta hai ya kisi controller/system ko bheja ja sakta hai.
🔹 Example of Sensor – LDR
LDR (Light Dependent Resistor) ek light sensor hota hai jiska resistance light ke according change hota hai.
Jab Light Kam Hoti Hai
📈 Resistance Badh Jata Hai
Jab Light Jyada Hoti Hai
📉 Resistance Kam Ho Jata Hai
👉 Isi wajah se LDR ko light sensor kaha jata hai.
🔴 Types of Sensors
Sensors alag-alag physical quantities ko detect aur measure karne ke liye use kiye jate hain. Har sensor ka apna specific kaam hota hai aur ye environment ke different parameters ko monitor karta hai.
1. Temperature Sensor
Measures temperature changes
Temperature sensor kisi bhi vastu ya environment ke temperature ko measure karta hai. Ye changes ko detect karke electrical signal generate karta hai.

Examples: LM35, Thermocouple, Thermometer
Uses: AC system, Refrigerator, Weather monitoring
2. Proximity Sensor
Detects object presence without touch
Proximity sensor kisi object ki presence ya distance ko bina touch kiye detect karta hai. Ye nearby object ka pata bahut aasani se laga leta hai.

Types: Inductive, Capacitive, Magnetic
Uses: Smartphone screen control, Robot navigation
3. Infrared (IR) Sensor
Uses IR rays for detection
Ise IR blaster ya remote sensor bhi kaha jata hai. Isme Transmitter aur Receiver hote hain. Jab light reflect hokar wapas aati hai to object detect hota hai.

Types: Reflective Type, Transmissive Type
Uses: TV remote, Automatic door system, Obstacle detection
4. Light Sensor
Converts light energy to electrical signal
Light sensor ek photo-electric device hota hai. Ye light intensity ko detect karta hai aur uske according output signal generate karta hai.

Examples: Photo diode, Photo resistor, Photo transistor
Uses: Mobile brightness, Street lights, Security systems
5. Accelerometer Sensor
Measures motion and direction
Accelerometer kisi moving device ki speed, motion aur direction ko measure karta hai. Ye acceleration detect karta hai.

Example: Mobile rotate karne par screen rotate hona.
Uses: Smartphones, Robots, Aircraft, Rotating devices
6. Pressure Sensor
Detects pressure levels
Pressure sensor pressure ko detect karta hai aur usse electrical signal me convert karta hai. Ye controller ko information deta hai.

Examples: Pressure transmitter, Piezometer
Uses: Pneumatic system, Hydraulic system, Vacuum system
7. Ultrasonic Sensor
Uses sound waves for distance
Ye ultrasonic sound waves ka use karke object ki distance aur velocity measure karta hai. Reflected waves detect hoti hain.

Working: Transmit waves → Hit object → Return → Detect → Calculate
Uses: Self-driving robots, Distance measurement
8. Touch Sensor
Tactile human touch detection
Touch sensor ko tactile sensor bhi kaha jata hai. Ye human touch ko detect karta hai aur uske according signal generate karta hai.

Uses: Light switch, Remote control, Laptop touchpad, Smartphone screen
9. Smoke & Gas Sensor
Detects harmful gases and smoke
Smoke aur gas sensor harmful gases aur smoke ko detect karne ke liye use hota hai. Ye security systems me important role nibhata hai.

Types: Hydrogen sensor, CO sensor, Air pollution sensor
Uses: Building security, Airplane safety, Industry safety
10. Humidity Sensor
Measures moisture/water vapor
Humidity sensor environment me moisture ya water vapor ki quantity ko measure karta hai. Ye temperature dono ko monitor karta hai.

Examples: DHT11, DHT22, AM2302
Uses: AC systems, Weather monitoring, Agriculture
11. Flow Sensor
Measures liquid or gas flow rate
Flow sensor kisi liquid ya gas ke flow rate ko measure karta hai. Isme magnetic device aur switch liquid movement ko detect karte hain.

Uses: Water control devices, Oil industry, Power plants
12. Sound Sensor
Detects sound waves
Sound sensor sound waves ko detect karta hai aur unhe electrical signals me convert karta hai. Ye microphone ki tarah kaam karta hai.

Uses: Security system, Home automation, Smart phone, Audio amplifier
🔹 Actuator
Ye control signal aur power source ki help se kaam karta hai. Jab actuator ko electrical signal milta hai to ye us signal ko physical movement me convert kar deta hai.
👉 "Actuator signal ko motion me convert karta hai"
🔹 Working of Actuator

🔹 Power Sources of Actuator
Electric voltage/current
Hydraulic pressure
Pneumatic pressure
🔹 Applications of Actuator
Actuator ka use industries aur automation systems me bahut jyada hota hai. Ye systems me motion control provide karta hai.
🔴 Types of Actuators
Actuators ko motion aur power source ke basis par divide kiya jata hai.
🔹 According to Type of Motion
• Linear Actuator
• Rotary Actuator
🔹 According to Type of Power
• Hydraulic Actuator
• Pneumatic Actuator
• Electrical Actuator
• Mechanical Actuator
1. Linear Actuator
Converts energy to straight-line motion
Linear actuator energy ko straight-line motion me convert karta hai. Ye push aur pull function perform karta hai.

Uses: Positioning applications, Sliding systems, Automation devices
Example: Linear motor
2. Rotary Actuator
Converts energy to rotational motion
Rotary actuator energy ko rotational motion me convert karta hai. Ye circular movement produce karta hai.

Examples: AC motor, DC motor
3. Hydraulic Actuator
Uses hydraulic fluid pressure
Hydraulic actuator hydraulic fluid aur pressure ki help se mechanical movement produce karta hai. Isme cylinder aur motor ka use hota hai. Ye linear, rotary aur oscillatory motion generate kar sakta hai.

Features: Heavy load handle kar sakta hai, High force produce karta hai
Uses: Construction equipment, Industrial machines
4. Pneumatic Actuator
Uses compressed air pressure
Pneumatic actuator compressed air ya vacuum pressure par kaam karta hai. Ye air pressure ko motion me convert karta hai.

Features: Fast response, Clean operation, Low maintenance
Uses: Robotics, Automation systems, Air control systems
5. Electrical Actuator
Converts electrical to mechanical energy
Electrical actuator electrical energy ko mechanical energy me convert karta hai. Ye sabse common actuator hota hai aur AC ya DC current se kaam karta hai.

Features: Easy control, High efficiency, Simple technology
Example: Solenoid valve
6. Mechanical Actuator
Converts rotary to linear motion
Mechanical actuator rotary motion ko linear motion me convert karta hai. Ye purely mechanical mechanism par based hota hai.

Examples: Chain block, Hoisting system, Jack system
🔴 Microcontroller
Ye ek small computer ki tarah kaam karta hai jiske andar processor, memory aur input-output peripherals ek hi chip me available hote hain.
Microcontroller ka use electronic systems aur automated devices ko control karne ke liye kiya jata hai.
🔹 Working of Microcontroller
Microcontroller input devices se data receive karta hai, us data ko process karta hai aur output devices ko control karta hai.

🔹 Uses of Microcontroller
Microcontroller ka use different embedded systems me kiya jata hai:
🔴 Features of Microcontroller
Microcontroller ki important features:
🔹 1. Low Cost and Small Size
Microcontroller ka size bahut chhota hota hai aur iska cost bhi kam hota hai. Isliye ise small electronic devices me easily use kiya jata hai.
🔹 2. Operates on Clock Rate
Ye clock rate/frequency par operate karta hai. Microcontroller different clock frequencies par kaam kar sakta hai.
🔹 3. Bit Processing
Microcontroller 8-bit, 16-bit aur 32-bit processing support karta hai. Jitna jyada bit size hoga, utni fast processing hogi.
🔹 4. Low Power Consumption
Microcontroller bahut kam power consume karta hai. Isliye battery-operated devices me iska use bahut hota hai.
🔹 5. Embedded Device Support
Microcontroller specially embedded systems ke liye design kiya gaya hai. Ye real-world devices ko directly control kar sakta hai.
🔹 6. Program Storage
Microcontroller me programs ROM memory me permanently store kiye ja sakte hain. Isliye system repeatedly same instructions execute kar sakta hai.
🔴 Microcontroller vs Microprocessor
Microcontroller aur Microprocessor me important differences:
| 🔲 Microcontroller | 🖥️ Microprocessor |
|---|---|
| ✦Ye embedded applications ke liye use hota hai | ✦Ye multitasking systems ke liye use hota hai |
| ✦Single tasking ke liye suitable hota hai | ✦Multiple tasking perform kar sakta hai |
| ✦Iske andar RAM, ROM aur I/O components already chip me hote hain | ✦Isme external RAM, ROM aur I/O devices lagane padte hain |
| ✦Cost kam hoti hai | ✦Cost jyada hoti hai |
| ✦Power consumption kam hota hai | ✦Power consumption jyada hota hai |
| ✦Power saving mode available hota hai | ✦Usually power saving mode nahi hota |
| ✦Washing machine, MP3 player etc. me use hota hai | ✦PC aur laptop me use hota hai |
| ✦Small size aur compact design hota hai | ✦Size comparatively bada hota hai |
🔴 Different Types of Microcontroller
Microcontrollers ko unki processing capability, memory structure, instruction set aur architecture ke basis par alag-alag categories me divide kiya jata hai.
🔹 1. On the Basis of Bit
Microcontroller ko bit size ke according divide kiya jata hai. Bit size batata hai ki microcontroller ek time me kitna data process kar sakta hai. Jitna jyada bit size hoga, utni fast aur powerful processing hogi.
🔸 (A) 8-bit Microcontroller
Ek baar me 8-bit data process karta hai. Simple aur low-cost applications me use hota hai.
Ex: 8051, Toys, Home appliances
🔸 (B) 16-bit Microcontroller
Ek time me 16-bit data process karta hai. 8-bit se jyada fast aur efficient hota hai.
Ex: Industrial automation
🔸 (C) 32-bit Microcontroller
High-speed processing provide karta hai. Complex calculations me use hota hai.
Ex: Robotics, IoT, Smart systems

🔹 2. On the Basis of Memory
Microcontroller ko memory architecture ke according bhi divide kiya jata hai.
🔸 (A) Embedded Memory Microcontroller
RAM, ROM aur I/O ports chip ke andar hi available hote hain. Ye compact aur low-cost hote hain.
Uses: Embedded systems, Smart devices
🔸 (B) External Memory Microcontroller
Memory externally connect ki jati hai. Jahan large memory ki zarurat hoti hai, wahan use hota hai.
Uses: Industrial systems

🔹 3. On the Basis of Instruction Set
Instruction set ke basis par microcontroller ko do categories me divide kiya jata hai.
🔸 (A) CISC (Complex Instruction Set Computer)
Large aur complex instruction set hota hai. Ek hi instruction multiple tasks perform kar sakta hai.
✅ Program size kam hota hai
⚠️ Hardware complexity jyada hoti hai
🔸 (B) RISC (Reduced Instruction Set Computer)
Simple aur limited instructions hote hain. Har instruction ek simple task perform karta hai.
✅ Fast execution, simple design
✅ High efficiency (Modern IoT devices)

🔹 4. On the Basis of Architecture
Architecture ke basis par microcontroller ko memory access structure ke according divide kiya jata hai.
🔸 (A) Harvard Architecture
Program memory aur data memory alag-alag hoti hain. Processor ek hi time par instruction fetch aur data transfer dono kar sakta hai.
⚡ Fast processing, better performance
Uses: DSP systems, Advanced embedded devices
🔸 (B) Von Neumann Architecture
Program memory aur data memory same hoti hain. Instructions aur data dono ek hi memory aur bus share karte hain.
⚙️ Simple design, low cost
⚠️ Slow processing compared to Harvard

🔴 Types of Microcontroller
Different companies aur technologies ke according microcontrollers ke kai types hote hain. Har microcontroller ka apna architecture, speed aur application area hota hai.

🔹 1. 8051 Microcontroller
8051 sabse popular aur widely used microcontroller hai. Isse Intel company ne develop kiya tha. Ye ek 8-bit microcontroller hota hai jo embedded systems aur automation applications me use hota hai.
⚡ Features
- 8-bit processor
- 4 KB ROM & 128 bytes RAM
- 32 I/O pins
- Serial communication support
🛠️ Uses
- Home appliances
- Traffic light control
- Robotics & Industrial automation

🔹 2. PIC Microcontroller
PIC ka full form hota hai Peripheral Interface Controller. Ye Microchip company dwara develop kiya gaya microcontroller hai. Ye fast processing aur low power consumption ke liye famous hai.
⚡ Features
- High speed execution
- Low power consumption
- Easy programming
- Built-in peripherals
🛠️ Uses
- Medical devices
- Industrial systems
- Security systems

🔹 3. AVR Microcontroller
AVR microcontroller Atmel company ne develop kiya tha. Ye RISC architecture par based hota hai aur fast execution provide karta hai. Arduino boards me mostly AVR microcontroller use hota hai.
⚡ Features
- RISC architecture
- Fast processing
- Low power requirement
- Easy interfacing
🛠️ Uses
- Arduino projects
- IoT systems
- Embedded applications

🔹 4. ARM Microcontroller
ARM microcontroller advanced embedded systems ke liye use hota hai. Ye high-performance aur low power consumption provide karta hai. ARM processors modern smart devices me bahut jyada use hote hain.
⚡ Features
- 32-bit / 64-bit architecture
- High speed processing
- Large memory support
- Low power consumption
🛠️ Uses
- Smartphones
- Tablets
- Smart devices & IoT systems

🔹 5. MSP Microcontroller
MSP microcontroller Texas Instruments company dwara develop kiya gaya hai. Ye ultra-low power applications ke liye specially design kiya gaya hai.
⚡ Features
- Very low power consumption
- High efficiency
- Fast response
🛠️ Uses
- Battery-operated devices
- Wireless sensor systems
- Portable electronics
🔴 Elements of Microcontroller
Microcontroller ek complete embedded system hota hai jiske andar different hardware components hote hain. Ye sabhi elements milkar microcontroller ko processing aur control capability provide karte hain.

🔹 1. CPU (Central Processing Unit)
CPU microcontroller ka sabse important part hota hai. Isse microcontroller ka “brain” bhi kaha jata hai. Ye instructions ko execute karta hai aur poore system ko control karta hai.
⚡ Functions of CPU
- Instructions execute karna
- Arithmetic calculations karna
- Logical operations perform karna
- System ko control karna
🔹 2. Memory
Memory data aur programs ko store karne ke liye use hoti hai.
🔸 RAM (Temporary)
Processing ke dauran data store hota hai. Power OFF hone par data erase ho jata hai.
🔸 ROM (Permanent)
Programs permanently store hote hain. Power OFF hone par data delete nahi hota.
🔹 3. I/O Ports
I/O ports external devices ko connect karne ke liye use hote hain. Input ports sensors se data receive karte hain, output ports LEDs aur motors ko control karte hain.
🔹 4. Timers & Counters
Timers aur counters time-related operations aur event counting ke liye use hote hain.
🔹 5. Oscillator
Oscillator clock signals generate karta hai jo microcontroller ki speed aur timing ko control karte hain. Ye continuous pulses provide karta hai jinke basis par CPU instructions execute karta hai.
🔹 6 & 7. ADC & DAC
🔸 ADC (Analog to Digital)
Sensors ke analog data ko digital me convert karta hai (e.g. Temperature sensor data).
🔸 DAC (Digital to Analog)
Digital signals ko analog me convert karta hai (e.g. Audio systems, Analog control).
🔹 8. Serial Communication Port
Serial communication ports data ko serial form me transfer karte hain. Ye microcontroller ko dusre devices ke saath communicate karne me help karte hain.
🔹 9. Interrupt System
Interrupt system urgent events ko handle karne ke liye use hota hai. Jab koi important signal aata hai to interrupt CPU ko current task temporarily stop karke naye task ko execute karne ke liye force karta hai.