<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kushitha lakshitha on Medium]]></title>
        <description><![CDATA[Stories by Kushitha lakshitha on Medium]]></description>
        <link>https://medium.com/@kushithalakshitha?source=rss-0ff976e70d1f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Tg2Kv749djXDuo1MFeRhPA.jpeg</url>
            <title>Stories by Kushitha lakshitha on Medium</title>
            <link>https://medium.com/@kushithalakshitha?source=rss-0ff976e70d1f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:17:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kushithalakshitha/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AMS 1117 Voltage Regulator]]></title>
            <link>https://medium.com/@kushithalakshitha/ams-1117-voltage-regulator-0ce5c5caf34d?source=rss-0ff976e70d1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ce5c5caf34d</guid>
            <category><![CDATA[ldo]]></category>
            <category><![CDATA[ams1117]]></category>
            <category><![CDATA[voltage-regulator]]></category>
            <category><![CDATA[lm7805]]></category>
            <dc:creator><![CDATA[Kushitha lakshitha]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 07:35:39 GMT</pubDate>
            <atom:updated>2026-10-24T07:37:10.806Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J9bjGZlT7Q1f0054RXZ8VQ.png" /><figcaption>AMS1117 Voltage Regulator</figcaption></figure><h3>Introduction to the AMS1117 LDO Voltage Regulator</h3><p>The AMS1117 is a popular Low-Dropout (LDO) linear voltage regulator widely used in electronic circuits to provide a stable DC output voltage from a higher input voltage. It is commonly found in development boards, embedded systems, microcontroller circuits, sensor modules, and other electronic applications that require a regulated power supply.</p><p>One of the main advantages of the AMS1117 is its simple implementation, compact package, and availability in different fixed output voltage options, including 1.2 V, 1.5 V, 1.8 V, 2.5 V, 3.3 V, and 5.0 V, depending on the manufacturer and device variant. Adjustable versions are also available, allowing designers to set the desired output voltage using external resistors.</p><p>Despite its simplicity, the AMS1117 has several important design considerations, including dropout voltage, power dissipation, input and output capacitor requirements, thermal performance, and output voltage ripple. Understanding these characteristics is essential for designing a reliable and efficient power supply.</p><p>In this blog, we will explore how the AMS1117 works, its pin configuration, electrical characteristics, practical circuit design, and techniques for reducing output voltage ripple to achieve a stable power supply.</p><h3>AMS1117 LDO Pinout</h3><p>The AMS1117 is commonly available in a three-pin SOT-223 package, with an additional large metal tab used for thermal dissipation and electrical connection. Understanding the pin configuration is essential for correctly connecting the regulator in a circuit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/1*wFmw60Mo_RS9C9w-Z8AiiA.png" /><figcaption>Pinout Diagram</figcaption></figure><h4>Pin Functions</h4><ul><li><strong>GND / ADJ (Pin 1):</strong> In fixed-voltage versions, this pin is connected to ground. In the adjustable version, it is connected to a resistor network that sets the output voltage.</li><li><strong>VOUT (Pin 2):</strong> Provides the regulated DC output voltage, such as 3.3 V for the AMS1117–3.3 version.</li><li><strong>VIN (Pin 3):</strong> Receives the input DC voltage that needs to be regulated.</li><li><strong>Metal Tab:</strong> Helps transfer heat from the regulator to the PCB copper area and is electrically connected to VOUT in the standard pinout.</li></ul><h3>Practical Circuit Design of the AMS1117 LDO</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*PahFgGA_pVd4yhBdN0ZQiA.png" /><figcaption>Example Circuit</figcaption></figure><h4>Capacitor Selection and Stability</h4><p>The AMS1117 uses its output capacitor as part of its internal frequency-compensation system. An unsuitable capacitor can cause oscillation, excessive output noise, or poor transient response.</p><p><strong>Input Capacitor: </strong>An input capacitor supplies short bursts of current and reduces disturbances caused by input wiring and source impedance. Select its value based on the input supply characteristics and the manufacturer’s recommendations.</p><p><strong>Output Capacitor</strong>: The datasheet recommends a 22 µF solid tantalum capacitor for stability across operating conditions. A larger output capacitor, such as 100 µF, may improve transient response when the load current changes rapidly.</p><h4>Protection Diodes</h4><p>The AMS1117 includes internal protection mechanisms, and external protection diodes are not normally required for standard applications.</p><p>However, a diode from the output to the input may be recommended when a circuit uses a large output capacitor and the input can suddenly be shorted to ground, such as with an input crowbar protection circuit. This diode provides a discharge path that helps prevent excessive reverse current through the regulator.</p><h3>Output Ripple and Noise</h3><p>The ripple rejection values are measured with the adjustment pin bypassed. The impedance of the adjust pin capacitor at the ripple frequency should be less than the value of R1 (normally 100W to 200W) for proper bypassing and ripple rejection approaching the values shown. The size of the required adjust pin capacitor is a function of the input ripple frequency. If R1=100W at 120Hz, the adjust pin capacitor should be &gt;13 uF. At 10 kHz, only 0.16 uF is needed.</p><p>The ripple rejection will be a function of the output voltage in circuits without an adjust pin bypass capacitor. The output ripple will increase directly as a ratio of the output voltage to the reference voltage (VOUT / VREF ).</p><p>#KushithaLakshitha #LDO #AMS1117</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ce5c5caf34d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design and Simulation of a Portable 18650 Lithium-Ion Power Bank]]></title>
            <link>https://medium.com/@kushithalakshitha/design-and-simulation-of-a-portable-18650-lithium-ion-power-bank-58e2851205b5?source=rss-0ff976e70d1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/58e2851205b5</guid>
            <category><![CDATA[bm]]></category>
            <category><![CDATA[xl6009]]></category>
            <category><![CDATA[power-electronics]]></category>
            <category><![CDATA[tp4056]]></category>
            <category><![CDATA[power-bank]]></category>
            <dc:creator><![CDATA[Kushitha lakshitha]]></dc:creator>
            <pubDate>Sun, 29 Mar 2026 14:17:20 GMT</pubDate>
            <atom:updated>2026-03-30T13:56:15.867Z</atom:updated>
            <content:encoded><![CDATA[<h3>Design and Simulation of a Portable 18650 Lithium-Ion Power Bank Using TP4056, BMS Protection, and XL6009 Boost Converter</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfEBeEl6jsxRVGT8aK1o8Q.png" /></figure><h3>Introduction</h3><p>A power bank is a portable, battery-powered device designed to recharge electronics such as smartphones, tablets, and laptops when wall outlets are unavailable.</p><p>Portable power banks are widely used to provide backup energy for mobile devices. This project focuses on designing a compact and efficient lithium-ion power bank system capable of delivering a stable 5V USB output.</p><p>This is suitable for electronic devices such as Smartphones, IoT devices, embedded systems, and Portable electronics.</p><h3>Problem Statement</h3><p>The problem addressed in this project is the need to provide a stable and reliable 5V USB power output using lithium-ion batteries, which typically produce a nominal voltage of around 3.7V. Since most electronic devices require a constant 5V supply, a proper voltage conversion system is necessary. Additionally, lithium batteries are sensitive components that require careful management during charging and discharging. Without proper control, issues such as overcharging and overdischarging can occur, leading to reduced battery life, potential damage, or even safety hazards. Therefore, the main challenges involve safely charging the batteries, protecting them from unsafe conditions, efficiently converting the voltage from 3.7V to 5V, and ensuring overall battery safety and reliability in the system.</p><h3>Objectives of the Project</h3><p>· Design a <strong>portable power bank system</strong></p><p>· Implement <strong>safe lithium battery charging</strong></p><p>· Integrate <strong>battery protection circuit</strong></p><p>· Convert battery voltage to a <strong>stable 5V output</strong></p><p>· Design and simulate the circuit using <strong>Altium Designer</strong></p><h3>System Overview</h3><p>The system consists of four main modules:</p><p>1. Charging module</p><p>2. Battery protection system</p><p>3. Energy storage system</p><p>4. Boost converter for voltage regulation</p><h3>System Block Diagram</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/326/1*VoSF7VMlhd3h3OzaK-cJ6w.png" /><figcaption>Block Diagram of Power Bank</figcaption></figure><h3>Hardware Components</h3><h4>A.Lithium-ion 18650 Batteries</h4><p>The 18650 is a 3.7V cylindrical Lithium-ion rechargeable battery measuring, widely used in high-drain devices like flashlights, power tools, and laptops. They offer capacities typically between 1800 mAh and 3500 mAh, featuring high-rate discharge capabilities and a nominal voltage of 3.6V-3.7V.</p><p>· Nominal voltage: 3.7V</p><p>· Full charge voltage: 4.2V</p><p>However, 18650 batteries require careful handling and protection circuits because they are sensitive to unsafe conditions. Overcharging (above 4.2V) can cause overheating or even explosion, while over discharging can permanently damage the battery. That’s why modules like BMS (Battery Management System) and TP4056 charging modules are used to ensure safe charging, voltage regulation, and protection.</p><p>There are two main types of 18650 batteries: protected and unprotected. Protected batteries include an internal protection circuit that prevents overcharge, over discharge, and short circuits, while unprotected batteries rely on external circuits like your 1S BMS module.</p><h4>B.TP4056 Charging Module</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7U2YZUcS595LD2V3Wq-BzA.png" /><figcaption>TP4056 Module</figcaption></figure><p>The <strong>TP4056 charging module</strong> is a widely used solution for safely charging single-cell lithium-ion batteries such as 18650 cells. It is specifically designed to handle the complete charging process by following a controlled charging algorithm that ensures both efficiency and battery safety.</p><p>The module operates using two methods:</p><p>1. <strong>constant current (CC)</strong></p><p>2. <strong>constant voltage (CV)</strong></p><p>which is the standard technique for charging lithium batteries.</p><p>The main function of the TP4056 module is <strong>lithium battery charging</strong>, where it takes an input (typically 5V via USB) and properly regulates the charging of a 3.7V lithium-ion battery. During the initial phase, it provides <strong>constant current charging</strong>, meaning the battery is charged with a fixed current (commonly 1A, but adjustable via resistor). This helps to quickly increase the battery voltage while maintaining safe current levels. Once the battery voltage approaches its maximum limit (around 4.2V), the module switches to <strong>constant voltage charging</strong>, where it holds the voltage steady and gradually reduces the current.</p><p>The charging process happens in several important stages.</p><p>1. <strong>pre-charge stage</strong></p><p>2. <strong>constant current stage</strong></p><p>3. <strong>constant voltage stage</strong></p><p>First is the <strong>pre-charge stage</strong>, which occurs when the battery voltage is very low (typically below 3V). In this stage, the module supplies a small current to safely bring the battery voltage up without causing damage. Once the battery reaches a safe level, it enters the <strong>constant current stage</strong>, where the battery charges rapidly with a steady current. As the battery voltage nears 4.2V, the module transitions into the <strong>constant voltage stage</strong>, maintaining a fixed voltage while the charging current slowly decreases.</p><p>Finally, the process ends with <strong>charge termination</strong>, which occurs when the current drops to about 10% of the set charging current. At this point, the TP4056 automatically stops charging to prevent overcharging, ensuring the battery remains safe and its lifespan is preserved.</p><h4>C.1S BMS Protection Circuit</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*aT5ZPEloxItQiHXJYJlTGQ.png" /><figcaption>1S BMS</figcaption></figure><p>A <strong>Battery Management System (BMS)</strong> is an electronic circuit that protects and manages a battery.</p><p>In a <strong>1S system</strong> (1 cell lithium battery, like an 18650), the BMS ensures the battery works safely and lasts longer.</p><blockquote><em>Simply, a BMS acts like a </em><strong><em>security guard</em></strong><em> for your battery.</em></blockquote><p>The BMS monitors and controls:</p><ul><li>Battery voltage</li><li>Current (charging &amp; discharging)</li><li>Safety conditions</li></ul><p>It automatically <strong>disconnects the battery</strong> if something goes wrong.</p><h4>Protection Features of 1S BMS</h4><p>1. <strong>Overcharge Protection</strong></p><p><strong>What happens:</strong></p><p>· Lithium batteries should not be charged above <strong>4.2V</strong></p><p>· If charging continues beyond this, it becomes dangerous</p><p><strong>What BMS does:</strong></p><p>· Cuts off charging when voltage reaches the safe limit</p><p><strong>Why important:</strong></p><p>· Prevents battery swelling, overheating, or explosion</p><p>2. <strong>Over-Discharge Protection</strong></p><p><strong>What happens:</strong></p><p>· Battery should not go below <strong>~2.5V–3.0V</strong></p><p>· Deep discharge damages the battery permanently</p><p><strong>What BMS does:</strong></p><p>· Stops output when the voltage drops too low</p><p><strong>Why important:</strong></p><p>· Prevents capacity loss and battery death</p><p>3. <strong>Short-Circuit Protection</strong></p><p><strong>What happens:</strong></p><p>· Positive and negative terminals connect directly</p><p>· Causes a very high current instantly</p><p><strong>What BMS does:</strong></p><p>· Immediately disconnects the battery</p><p><strong>Why important:</strong></p><p>· Prevents sparks, fire, and circuit damage</p><p>4. <strong>Overcurrent Protection</strong></p><p><strong>What happens:</strong></p><p>· Too much current is drawn (heavy load or fault)</p><p><strong>What BMS does:</strong></p><p>· Cuts off power when the current exceeds the safe limit</p><p><strong>Why important:</strong></p><p>· Protects battery and connected devices</p><h4>D.XL6009 Boost Converter</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_R8Vu6Q3UPXxGTOERkaHw.png" /><figcaption>XL6009 Boost Converter</figcaption></figure><h4>Ranges</h4><p>Current: 4A max (recommended 2A only) No-load — 18mA</p><p>Efficiency: &lt;94% (greater the pressure, the lower the efficiency)</p><p>Frequency: Switching frequency 400KHz</p><p>Input Voltage: 3V ~ 32V</p><p>Length x Width x Height: 43mm x 21mm x 14mm</p><p>Output Voltage: 5V ~ 35V</p><h4>Why a Boost Converter is Needed</h4><p>Lithium-ion batteries (like 18650) do not provide a constant voltage. Their output voltage changes depending on charge level.</p><h4>Battery Voltage Range:</h4><ul><li>Fully charged: <strong>4.2V</strong></li><li>Low battery: <strong>around 3.0V</strong></li></ul><p>However, most devices (like USB outputs) require a stable voltage.</p><h4>Role of XL6009 Boost Converter</h4><p>The <strong>XL6009 boost converter</strong> is used to <strong>increase (boost) the battery voltage</strong> to a stable 5V.</p><p>👉 Even if battery voltage drops:</p><ul><li>From 4.2V → 3.7V → 3.0V</li><li>The boost converter still outputs <strong>constant 5V</strong></li></ul><h4>How XL6009 Maintains Stable 5V Output</h4><p>The <strong>XL6009 boost converter</strong> keeps the output voltage stable using a method called <strong>switching regulation (Below Image)</strong>.</p><p>Step-by-Step Working</p><ol><li><strong>Switching (ON/OFF control)</strong><br> Inside the XL6009, a high-speed switch turns ON and OFF very fast (thousands of times per second).</li><li><strong>Energy Storage (Inductor)</strong></li></ol><p>· When the switch is ON → energy is stored in an inductor</p><p>· When the switch is OFF → stored energy is released to the output</p><ol><li><strong>Voltage Boosting</strong><br> This repeated storing and releasing increases the voltage from:</li></ol><p>· <strong>3.0V–4.2V → 5V</strong></p><p>If output drops → increases switching time → raises voltage</p><p>If output rises → reduces switching → lowers voltage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*2KyLP2tLYXB9sN7tDebxiQ.png" /><figcaption>XL6009 Boost Converter Internal Diagram With Switching Regulation</figcaption></figure><h3>Battery Configuration</h3><p>I used to 3 of 18650 batteries with a 3P(3 x Parallel) configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*hkORX1Ev5vDxW_tO2AZEZg.png" /><figcaption>3P 18658 Batteries</figcaption></figure><p><strong>IMPORTANT</strong>:</p><p>A 1S BMS can be used with a 3P battery pack because connecting three batteries in parallel keeps the voltage the same as a single cell (about 3.7V) while <strong>increasing capacity</strong>. For example, if three identical 18650 batteries are connected in parallel, they act like one <strong>larger battery</strong>, so a 1S BMS is suitable. However, all batteries must be the <strong>same type</strong> and <strong>have similar voltage levels before connection</strong>, and the BMS should support the <strong>higher current</strong> of the combined cells to ensure safe operation.</p><blockquote>After connection, use 4.2 V — 5V voltage to active!</blockquote><p>A 1S BMS may <strong>not turn on automatically</strong> because it can go into protection mode. To activate it, apply a small <strong>charging voltage to P+ and P−.</strong> For example, connect a 5V charger through a <strong>TP4056 module</strong> to wake it up and start normal operation.</p><h3>Circuit Design</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*WTb92OUgvwf1Hxx_g0Kckw.png" /><figcaption>Circuit Diagram</figcaption></figure><h3>Simulation and Design Tool</h3><p>Altium Designer Schematic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*MzPdXPZwt8YeDTh11EQS3g.png" /><figcaption>Altium Designer Schematic</figcaption></figure><p>Real Simulation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*N-lIYbkRMnowADCZCUI__Q.png" /><figcaption>Real Implementation</figcaption></figure><h3>Applications</h3><p>Where this system can be used:</p><ul><li>Smartphone charging</li><li>IoT devices</li><li>Raspberry Pi power</li><li>Embedded systems</li><li>Portable electronics</li></ul><h3>Conclusion</h3><p>This project demonstrates the design of a portable lithium-ion power bank system integrating safe battery charging, protection, and voltage conversion. The design highlights practical concepts in power electronics and battery management systems.</p><h3>Author Section</h3><p>Kushitha Lakshitha<br>BSc (Hons) Electronics and Computer Science<br>University of Kelaniya</p><p>👤LinkedIn:<a href="https://www.linkedin.com/in/kushitha-lakshitha/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_contact_details%3BdYgDwgroQPuTGVQ1HDMUHw%3D%3D"><strong>linkedin.com/in/kushitha-lakshitha</strong></a></p><p>🔗 Full Project Report (DOI):<a href="https://zenodo.org/records/19335148">https://zenodo.org/records/19335148</a></p><p>💻 GitHub Repository:<a href="https://github.com/Kushitha1521/Power_Bank">https://github.com/Kushitha1521/Power_Bank</a></p><p>Interests:</p><ul><li>Embedded Systems</li><li>Hardware Design</li><li>Power Electronics</li><li>Cybersecurity</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58e2851205b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microcontroller vs Microprocessor: Understanding the Difference]]></title>
            <link>https://medium.com/@kushithalakshitha/microcontroller-vs-microprocessor-understanding-the-difference-fc05d5a01b9c?source=rss-0ff976e70d1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc05d5a01b9c</guid>
            <category><![CDATA[embeded-system]]></category>
            <category><![CDATA[microcontrollers]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[microprocessor]]></category>
            <dc:creator><![CDATA[Kushitha lakshitha]]></dc:creator>
            <pubDate>Mon, 16 Mar 2026 18:46:17 GMT</pubDate>
            <atom:updated>2026-03-16T18:48:45.880Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXreaQZo_cDZ_P1Kl1zg1A.png" /></figure><p>As a student or anyone interested in robotics, embedded systems, or IoT, understanding the difference between <strong>microcontrollers (MCUs)</strong> and <strong>microprocessors (MPUs)</strong> is a fundamental skill.</p><p>Both are integrated circuits (ICs) that process data and control electronic systems — but they are designed for very different purposes.</p><p>In this article, we’ll break down their <strong>differences, architectures, internal structures, types, and typical applications</strong>.</p><h3>1. Simple Idea</h3><p><strong>Microcontroller (MCU)</strong><br> Think of an MCU as a <strong>small computer on a single chip</strong>. It has everything needed to run an embedded system:</p><ul><li><strong>CPU</strong> (the brain)</li><li><strong>Memory</strong> (RAM and Flash)</li><li><strong>Input/output peripherals</strong></li></ul><p>MCUs are compact, power-efficient, and cost-effective, making them ideal for <strong>embedded systems</strong>.</p><p><strong>Examples:</strong></p><ul><li>Arduino Uno</li><li>ESP32</li><li>PIC16F877A</li><li>STM32F103</li></ul><p><strong>Applications:</strong></p><ul><li>Robots and drones</li><li>IoT devices</li><li>Home automation systems</li><li>Smart sensors</li><li>Automotive electronics</li></ul><p><strong>Microprocessor (MPU)</strong><br> An MPU is <strong>mainly a CPU-only chip</strong> that requires external memory and peripherals to function. It’s designed for <strong>high-performance general-purpose computing</strong>.</p><p><strong>Examples:</strong></p><ul><li>Intel 8086</li><li>Intel Core i7</li><li>AMD Ryzen 7</li><li>ARM Cortex‑A53</li></ul><p><strong>Applications:</strong></p><ul><li>Personal computers and laptops</li><li>Servers</li><li>Smartphones</li><li>High-performance computing systems</li></ul><h3>2. MCU vs MPU: Feature Comparison</h3><p>Microcontrollers and microprocessors differ in several important aspects, including their components, hardware requirements, power consumption, cost, performance, and typical usage.</p><p>A <strong>microcontroller (MCU)</strong> integrates multiple components on a single chip, including the <strong>CPU, memory, and input/output peripherals</strong>. Because these components are built into the same chip, microcontrollers require <strong>very little external hardware</strong> to operate. They are designed to be <strong>low-power, compact, and cost-efficient</strong>, making them ideal for embedded systems where efficiency and size are important. However, their processing capability is generally <strong>moderate</strong>, since they are optimized for performing specific tasks rather than heavy computations.</p><p>In contrast, a <strong>microprocessor (MPU)</strong> mainly contains the <strong>CPU</strong>, while other components, such as <strong>RAM, ROM, and input/output devices</strong> must be connected externally. This design allows microprocessors to achieve <strong>very high performance and flexibility</strong>, but it also increases <strong>power consumption, system complexity, and overall cost</strong>. Microprocessors are therefore commonly used in <strong>general-purpose computing systems</strong> such as personal computers, laptops, and servers, where high processing power is required.</p><h3>3. Internal Structure</h3><h3>Microcontroller (MCU)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*GYOic1xNaeLyIexCqJwr1A.jpeg" /><figcaption>MCU Internal Structure</figcaption></figure><p>A typical MCU integrates:</p><ul><li><strong>CPU</strong></li><li><strong>RAM</strong></li><li><strong>ROM / Flash memory</strong></li><li><strong>Peripherals</strong></li></ul><p><strong>Common Peripherals:</strong></p><ul><li>GPIO pins</li><li>Timers and Counters</li><li>ADC (Analog to Digital Converter)</li><li>PWM controllers</li><li>Communication protocols: UART, SPI, I2C</li></ul><p>This all-in-one design makes MCUs <strong>lightweight, energy-efficient, and easy to deploy</strong> in embedded systems.</p><h3>Microprocessor (MPU)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*XkghlA4F_8NZWlmS2jyp8g.png" /><figcaption>MPU Internal Structure</figcaption></figure><p>A microprocessor mainly contains:</p><ul><li><strong>ALU (Arithmetic Logic Unit):</strong> Performs calculations and logical operations</li><li><strong>Control Unit:</strong> Directs execution of instructions</li><li><strong>Registers:</strong> Small, fast memory inside the CPU</li><li><strong>Cache Memory:</strong> High-speed memory to speed up performance</li><li><strong>Processor Cores:</strong> Modern MPUs may have multiple cores (dual-core, quad-core, etc.) for parallel processing</li></ul><p><strong>External components needed:</strong> RAM, ROM/storage, I/O controllers, and chipsets.</p><p>This architecture allows <strong>high performance and flexibility</strong>, suitable for complex computing tasks.</p><h3>4. Architecture Differences</h3><h3>Von Neumann Architecture (Used by MPUs)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cWnJZ9SaeeU6g222EoMBYg.png" /><figcaption>Von Neumann Architecture</figcaption></figure><ul><li>Single memory for data and instructions</li><li>Shared bus for data transfer</li><li>Simpler, scalable design</li><li>CPU cannot fetch data and instructions simultaneously</li></ul><h3>Harvard Architecture (Used by MCUs)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*vrunoc3_dXIseAbw4rJ6Dg.png" /><figcaption>Harvard Architecture</figcaption></figure><ul><li>Separate memory for instructions and data</li><li>Allows simultaneous access to instructions and data</li><li>Efficient for real-time tasks and embedded systems</li></ul><h3>5. Types</h3><h3>Types of Microcontrollers</h3><p>Microcontrollers are categorized by <strong>data width</strong> and <strong>architecture</strong>:</p><p><strong>By Data Width:</strong></p><ul><li>8-bit MCUs → Simple devices like toys or remote controls</li><li>16-bit MCUs → More complex embedded systems</li><li>32-bit MCUs → High-performance IoT, robotics, and automotive systems</li></ul><p><strong>By Family:</strong></p><ul><li>ARM-based MCUs → Widely used in mobile and industrial devices</li><li>PIC microcontrollers → Robotics and home automation</li><li>AVR microcontrollers → Arduino-based projects</li></ul><h3>Types of Microprocessors</h3><p>MPUs are designed for <strong>general-purpose or specialized computing</strong>:</p><ul><li><strong>General Purpose Processors:</strong> PCs, laptops, servers</li><li><strong>DSP — Digital Signal Processors:</strong> Audio, image processing, telecommunications</li><li><strong>GPU — Graphics Processing Units:</strong> Graphics rendering, gaming, AI, crypto mining</li><li><strong>Network Processors:</strong> Routers, firewalls, telecom devices</li></ul><h3>Why Understanding This Matters</h3><p>Knowing the difference between MCUs and MPUs is crucial for:</p><ul><li>Embedded system design</li><li>Robotics development</li><li>IoT engineering</li><li>Chip and hardware design</li></ul><p>Choosing the <strong>right processor</strong> affects <strong>your project&#39;s performance, cost, power efficiency, and scalability</strong>.</p><p>💡 <strong>Key Takeaway:</strong></p><ul><li><strong>MCU = small computer for embedded systems</strong></li><li><strong>MPU = high-performance CPU for computers and servers</strong></li></ul><p>For students, hobbyists, and engineers, understanding this distinction is the foundation for building <strong>efficient and optimized electronic systems</strong>.</p><p><strong>Written by: Kushitha Lakshitha</strong></p><p>LinkedIn: <a href="https://www.linkedin.com/in/kushitha-lakshitha/?lipi=urn%3Ali%3Apage%3Ad_flagship3_profile_view_base_contact_details%3Bo5u9pC4PRjSUKghf0s4Sww%3D%3D">https://www.linkedin.com/in/kushitha-lakshitha/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc05d5a01b9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>