<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Articles &amp; Tutorials | Khaled HAMIDI</title><link>https://khaledhamidi.com/en/writing/</link><atom:link href="https://khaledhamidi.com/en/writing/index.xml" rel="self" type="application/rss+xml"/><description>Articles &amp; Tutorials</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Thu, 01 Jan 2026 00:00:00 +0000</lastBuildDate><image><url>https://khaledhamidi.com/media/sharing.jpg</url><title>Articles &amp; Tutorials</title><link>https://khaledhamidi.com/en/writing/</link></image><item><title>MATLAB Training for Engineers: Advanced Applied Approach</title><link>https://khaledhamidi.com/en/writing/matlab/</link><pubDate>Thu, 01 Jan 2026 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/matlab/</guid><description>&lt;p>A specialized training program in MATLAB and Simulink launched with an engineering-focused applied methodology based on solving real-world problems, building models, and implementing simulations.&lt;/p>
&lt;p>The program emphasizes practical applications and direct engineering use cases, integrating AI tools to accelerate programming and analysis processes. Designed for engineers seeking to master computational tools and apply them directly in engineering projects.&lt;/p>
&lt;h2 id="training-modules">Training Modules&lt;/h2>
&lt;p>&lt;strong>MATLAB Fundamentals:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Computational operations and matrices&lt;/li>
&lt;li>Real-world engineering and mathematical applications&lt;/li>
&lt;li>Data processing and analysis&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Simulink and Modeling:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Building models and studying systems&lt;/li>
&lt;li>Dynamic simulation and analysis&lt;/li>
&lt;li>Mechanical and electrical system applications&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>AI in Programming:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Leveraging AI in code writing&lt;/li>
&lt;li>Solution optimization and accelerated development&lt;/li>
&lt;li>Intelligent data analysis&lt;/li>
&lt;/ul>
&lt;h2 id="course-introduction">Course Introduction&lt;/h2>
&lt;iframe width="100%" style="aspect-ratio: 16/9; max-width: 800px;" src="https://www.youtube.com/embed/videoseries?si=8eA4UTnMNNRuMBx2&amp;amp;list=PLapVad9ynIrP8lsshvaVNHaeArrVNwjZs" title="MATLAB Training Course" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>&lt;/iframe>
&lt;h2 id="simulink-cinematic-introduction">Simulink Cinematic Introduction&lt;/h2>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/qzhbylIzBDA?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video">&lt;/iframe>
&lt;/div>
&lt;h2 id="certified-credential">Certified Credential&lt;/h2>
&lt;p>A free certified credential (basic or advanced level) is available after completing the training and passing the exam. To apply for the exam, contact through available channels.&lt;/p>
&lt;h2 id="join-now">Join Now&lt;/h2>
&lt;p>To join:
&lt;/p></description></item><item><title>DATCOM: Ready Aircraft Models &amp; Aerodynamic Output Files</title><link>https://khaledhamidi.com/en/writing/aircraft/datcom/</link><pubDate>Tue, 09 Dec 2025 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/aircraft/datcom/</guid><description>&lt;h1 id="usaf-digital-datcom--ready-to-use-aerodynamic-dataset">USAF Digital DATCOM – Ready-to-Use Aerodynamic Dataset&lt;/h1>
&lt;h2 id="what-is-digital-datcom">What is Digital DATCOM?&lt;/h2>
&lt;p>&lt;strong>Digital DATCOM&lt;/strong> (Data Compendium) is a computer program developed by the &lt;strong>United States Air Force&lt;/strong> to estimate aircraft stability and control characteristics. It implements the methods documented in the classic USAF Stability and Control DATCOM handbook and was originally created at Wright–Patterson Air Force Base.&lt;/p>
&lt;p>From these models, the code can compute:&lt;/p>
&lt;ul>
&lt;li>Lift coefficient (CL) and lift‑curve slope (CLα)&lt;/li>
&lt;li>Drag polar and zero‑lift drag (CD0)&lt;/li>
&lt;li>Pitching‑moment coefficient (Cm) and static margin&lt;/li>
&lt;li>Lateral–directional derivatives (Cyβ, Cnβ, Clβ)&lt;/li>
&lt;li>Dynamic derivatives (CLq, Cmq, Clp, Cnr)&lt;/li>
&lt;/ul>
&lt;p>This makes DATCOM a practical tool for early‑stage design, stability analysis, and flight‑simulation models.&lt;/p>
&lt;h2 id="the-input-format-problem">The Input Format Problem&lt;/h2>
&lt;p>Digital DATCOM uses a strict &lt;strong>FORTRAN NAMELIST&lt;/strong> input format. On a modern machine, most “mysterious” errors are actually formatting issues, not aerodynamic problems.&lt;/p>
&lt;p>Some frequent pitfalls are:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Comments&lt;/strong>: The &lt;code>*&lt;/code> character is &lt;em>not&lt;/em> a valid comment symbol.&lt;/li>
&lt;li>&lt;strong>NACA card&lt;/strong>: Use dashes, for example &lt;code>NACA-W-5-23014&lt;/code> instead of &lt;code>NACA W 5 23014&lt;/code>.&lt;/li>
&lt;li>&lt;strong>Blank lines&lt;/strong>: Empty lines inside a namelist will stop the parser.&lt;/li>
&lt;li>&lt;strong>Namelist prefix&lt;/strong>: Each &lt;code>$NAMELIST&lt;/code> must start in column 1 (no leading spaces).&lt;/li>
&lt;li>&lt;strong>Inline comments&lt;/strong>: The &lt;code>!&lt;/code> character generally breaks the parser.&lt;/li>
&lt;li>&lt;strong>Case termination&lt;/strong>: Each case must be closed with a &lt;code>NEXT CASE&lt;/code> card.&lt;/li>
&lt;/ol>
&lt;p>Typical error messages look like:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">** ERROR ** UNKNOWN NAMELIST NAME
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">** ILLEGAL CONTROL CARD
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">ERROR(S), THIS CASE NOT RUN
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you see these, the first thing to check is the file format and card layout.&lt;/p>
&lt;h2 id="ready-to-use-package">Ready-to-Use Package&lt;/h2>
&lt;p>To avoid spending hours chasing format errors, this package provides &lt;strong>corrected input files&lt;/strong> and &lt;strong>pre‑computed output files&lt;/strong> that you can use directly for analysis, plotting, or MATLAB post‑processing.&lt;/p>
&lt;h3 id="included-aircraft-models">Included Aircraft Models&lt;/h3>
&lt;p>ASW 20, B 737, Canard, Citation, Navion, Seneca2, MiG 17, Cessna 172&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Aircraft&lt;/th>
&lt;th>Type&lt;/th>
&lt;th style="text-align: right">Alpha Range&lt;/th>
&lt;th style="text-align: center">Mach&lt;/th>
&lt;th>Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>ASW‑20&lt;/strong>&lt;/td>
&lt;td>Sailplane&lt;/td>
&lt;td style="text-align: right">-2°–4°&lt;/td>
&lt;td style="text-align: center">0.10&lt;/td>
&lt;td>High‑performance glider&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>B‑737&lt;/strong>&lt;/td>
&lt;td>Transport&lt;/td>
&lt;td style="text-align: right">-16°–24°&lt;/td>
&lt;td style="text-align: center">0.20&lt;/td>
&lt;td>Commercial jet airliner&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Canard&lt;/strong>&lt;/td>
&lt;td>Research&lt;/td>
&lt;td style="text-align: right">-6°–24°&lt;/td>
&lt;td style="text-align: center">0.60&lt;/td>
&lt;td>Canard‑configuration study&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Citation&lt;/strong>&lt;/td>
&lt;td>Business jet&lt;/td>
&lt;td style="text-align: right">-16°–24°&lt;/td>
&lt;td style="text-align: center">0.40&lt;/td>
&lt;td>Cessna Citation II (Model 550)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Citation_simple&lt;/strong>&lt;/td>
&lt;td>Business jet&lt;/td>
&lt;td style="text-align: right">-16°–24°&lt;/td>
&lt;td style="text-align: center">0.40&lt;/td>
&lt;td>Simplified Citation model&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Citation_airfoil&lt;/strong>&lt;/td>
&lt;td>Business jet&lt;/td>
&lt;td style="text-align: right">-16°–24°&lt;/td>
&lt;td style="text-align: center">0.40&lt;/td>
&lt;td>Citation with custom airfoil&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Navion&lt;/strong>&lt;/td>
&lt;td>General aviation&lt;/td>
&lt;td style="text-align: right">-2°–20°&lt;/td>
&lt;td style="text-align: center">0.158&lt;/td>
&lt;td>Ryan Navion light aircraft&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Seneca2&lt;/strong>&lt;/td>
&lt;td>Twin‑engine&lt;/td>
&lt;td style="text-align: right">-8°–20°&lt;/td>
&lt;td style="text-align: center">0.24&lt;/td>
&lt;td>Piper PA‑34‑200T&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>MiG‑17&lt;/strong>&lt;/td>
&lt;td>Fighter&lt;/td>
&lt;td style="text-align: right">-4°–14°&lt;/td>
&lt;td style="text-align: center">0.60&lt;/td>
&lt;td>Classic Soviet jet fighter&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Cessna172&lt;/strong>&lt;/td>
&lt;td>General aviation&lt;/td>
&lt;td style="text-align: right">-4°–16°&lt;/td>
&lt;td style="text-align: center">0.12&lt;/td>
&lt;td>Cessna 172 Skyhawk, popular trainer&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="package-contents">Package Contents&lt;/h3>
&lt;p>The archive &lt;strong>&lt;code>datcom_pack.zip&lt;/code>&lt;/strong> contains:&lt;/p>
&lt;ul>
&lt;li>&lt;code>datcom.exe&lt;/code> – Digital DATCOM executable&lt;/li>
&lt;li>&lt;code>*.dcm&lt;/code> – DATCOM input files (same format, different extensions)&lt;/li>
&lt;li>&lt;code>*.out&lt;/code> – Pre‑computed output files (ready for MATLAB or other tools)&lt;/li>
&lt;/ul>
&lt;h3 id="matlab-integration">MATLAB Integration&lt;/h3>
&lt;p>The &lt;code>.out&lt;/code> files provide tabulated aerodynamic data that can be read directly into MATLAB and other numerical tools for:&lt;/p>
&lt;ul>
&lt;li>Flight‑simulation models&lt;/li>
&lt;li>Static and dynamic stability analysis&lt;/li>
&lt;li>Control‑system design and gain tuning&lt;/li>
&lt;li>Performance and envelope calculations&lt;/li>
&lt;/ul>
&lt;p>Each case has already been run and checked, so you can go straight to plotting, curve fitting, or building state‑space models.&lt;/p>
&lt;p>&lt;strong>For MATLAB usage&lt;/strong>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">aero = datcomimport(&amp;#34;filename.out&amp;#34;); % Load Digital DATCOM output
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="download">Download&lt;/h2>
&lt;p>You can download the full package here:&lt;/p>
&lt;p>&lt;strong>
&lt;/strong>&lt;/p>
&lt;p>All input cases have been tested and verified to run correctly with the provided executable and MATLAB post‑processing.&lt;/p>
&lt;hr>
&lt;p>&lt;em>Reference: AFWAL‑TR‑79‑3032; DATCOM‑Tools (GPL‑3.0) by YANG‑DEMIN; USAF Stability and Control DATCOM.&lt;/em>&lt;/p></description></item><item><title>Workshop on Research Paper Writing and Scientific Citation</title><link>https://khaledhamidi.com/en/writing/writing/</link><pubDate>Sat, 26 Apr 2025 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/writing/</guid><description>&lt;p>The Student Office at the International University for Science and Renaissance, in collaboration with the Tamayuz Platform, is pleased to announce a special training workshop titled: &lt;strong>&amp;ldquo;Research Paper Writing and Scientific Citation.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>This practical training is designed for university students and graduates, combining scientific skills with systematic preparation to enhance your research capabilities.&lt;/p>
&lt;p>&lt;strong>Event Details:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Date:&lt;/strong> Saturday &amp;amp; Sunday, May 3-4, 2025&lt;/li>
&lt;li>&lt;strong>Time:&lt;/strong> 8:30 PM (Syria Time)&lt;/li>
&lt;li>&lt;strong>Platform:&lt;/strong> Microsoft Teams&lt;/li>
&lt;/ul>
&lt;p>An electronic certificate of attendance will be awarded to all participants. We invite you to seize this unique opportunity to strengthen your research skills and join a select group of individuals aspiring to academic excellence.&lt;/p></description></item><item><title>AI Skills for a Promising Future</title><link>https://khaledhamidi.com/en/writing/ai/</link><pubDate>Fri, 25 Apr 2025 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/ai/</guid><description>&lt;p>Building on the incredible success of our first series, we are proud to announce the launch of the second installment of our 2025 Artificial Intelligence training program: &lt;strong>&amp;ldquo;Excel with Intelligence.&amp;rdquo;&lt;/strong>&lt;/p>
&lt;p>This series is designed to empower participants with the essential tools and skills of AI, focusing on practical, hands-on applications in a variety of fields including writing, translation, programming, education, and scientific research.&lt;/p>
&lt;p>&lt;strong>Training Details:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Platform:&lt;/strong> Microsoft Teams&lt;/li>
&lt;li>&lt;strong>Certification:&lt;/strong> An electronic certificate of attendance will be awarded to participants who complete at least 70% of the training hours.&lt;/li>
&lt;li>&lt;strong>Cost:&lt;/strong> The series is free and open to everyone.&lt;/li>
&lt;/ul>
&lt;p>Don&amp;rsquo;t miss this opportunity to sharpen your skills and prepare for a future driven by intelligence! Follow our accounts for session schedules and registration information.&lt;/p></description></item><item><title>Building a Van de Graaff Generator: A DIY Guide</title><link>https://khaledhamidi.com/en/writing/van/</link><pubDate>Sun, 23 Jun 2024 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/van/</guid><description>&lt;h2 id="introduction-the-spark-of-static-electricity">Introduction: The Spark of Static Electricity&lt;/h2>
&lt;p>Have you ever felt a light, sudden electric shock when touching a metal doorknob, or seen your hair stand on end when taking off a wool sweater on a dry day? That small spark is a miniature version of a tremendous force latent in nature: static electricity. What if we could tame this force and generate it before our eyes in the lab? This is where the Van de Graaff generator comes in, the device that transforms this simple, everyday phenomenon into a stunning and safe scientific spectacle.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="First design of a Van de Graaff generator" srcset="
/en/writing/van/1_hu_4f389aa00d72729d.webp 400w,
/en/writing/van/1_hu_e093cfc799718d5a.webp 760w,
/en/writing/van/1_hu_cb3a37f52d58515e.webp 1200w"
src="https://khaledhamidi.com/en/writing/van/1_hu_4f389aa00d72729d.webp"
width="292"
height="300"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;hr>
&lt;h2 id="how-does-the-generator-work">How Does the Generator Work?&lt;/h2>
&lt;p>The Van de Graaff generator relies on transferring electric charges from a lower point to the upper metal dome using a belt made of an insulating material.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Diagram of the generator&amp;rsquo;s working principle" srcset="
/en/writing/van/daigram_hu_e5b802696f1b12b8.webp 400w,
/en/writing/van/daigram_hu_83e50c328c53c90f.webp 760w,
/en/writing/van/daigram_hu_deca6bf73528d37f.webp 1200w"
src="https://khaledhamidi.com/en/writing/van/daigram_hu_e5b802696f1b12b8.webp"
width="507"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="the-principle">The Principle:&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>The lower voltage source&lt;/strong> charges the lower combs.&lt;/li>
&lt;li>&lt;strong>The lower comb&lt;/strong> transfers the charge to the surface of the insulating belt.&lt;/li>
&lt;li>&lt;strong>The moving belt&lt;/strong> carries the charges upward.&lt;/li>
&lt;li>&lt;strong>The upper comb&lt;/strong> draws the charge from the belt.&lt;/li>
&lt;li>&lt;strong>The metal dome&lt;/strong> accumulates the charges until it reaches a very high voltage.&lt;/li>
&lt;/ol>
&lt;hr>
&lt;h2 id="building-the-generator-step-by-step">Building the Generator: Step-by-Step&lt;/h2>
&lt;p>This model was built using materials available in the laboratory at the lowest possible cost.&lt;/p>
&lt;hr>
&lt;h3 id="1-building-the-wooden-frame">1. Building the Wooden Frame&lt;/h3>
&lt;p>A simple wooden frame was prepared to mount the motor, pulleys, and belt.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="A%20%281%29.jpg" alt="Assembling the wooden frame" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="A%20%282%29.jpg" alt="Mounting the motor" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;/tbody>
&lt;/table>
&lt;p>The motor used here is a &lt;strong>Johnson 70312&lt;/strong> DC motor, a powerful motor typically used in power tools that operates efficiently at 12 volts. It has good torque, sufficient to rotate the belt pulley at a constant speed.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="A%20%282%29.jpg" alt="Type of motor used" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>After that, the upper and lower pulleys were installed in a parallel and secure manner.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="A%20%283%29.jpg" alt="Installing the pulleys" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="A%20%284%29.jpg" alt="The completed frame" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h3 id="2-preparing-the-copper-combs">2. Preparing the Copper Combs&lt;/h3>
&lt;p>The combs are the most sensitive part of the Van de Graaff generator. Their function is to transfer charges to and from the belt.&lt;/p>
&lt;p>To prepare them, fine copper strands were extracted from a multi-strand electrical wire, then fixed on a wooden rod to form a charging and a collecting comb.&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Extracting copper strands" srcset="
/en/writing/van/B_hu_6aea1db5b4182300.webp 400w,
/en/writing/van/B_hu_1449ae519983e956.webp 760w,
/en/writing/van/B_hu_3e4d855c27a054ad.webp 1200w"
src="https://khaledhamidi.com/en/writing/van/B_hu_6aea1db5b4182300.webp"
width="760"
height="343"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;th style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="B%20%281%29.jpg" alt="Preparing the comb" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="B%20%282%29.jpg" alt="Fixing the strands" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/td>
&lt;td style="text-align: center">
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="B%20%283%29.jpg" alt="The final comb" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>The comb must be close to the belt, at a distance of &lt;strong>1–3 mm&lt;/strong>, without touching it, as the precise distance is what determines the success of the charging process via Corona Discharge.&lt;/p>
&lt;hr>
&lt;h3 id="3-final-assembly">3. Final Assembly&lt;/h3>
&lt;p>After preparing the frame, pulleys, combs, and motor, they were fully integrated and the motor was connected to a 12-volt source.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="The final model of the generator" srcset="
/en/writing/van/C_hu_b45d6ff95422179d.webp 400w,
/en/writing/van/C_hu_db2b5acb5468cc91.webp 760w,
/en/writing/van/C_hu_3c5b8367c1e6feac.webp 1200w"
src="https://khaledhamidi.com/en/writing/van/C_hu_b45d6ff95422179d.webp"
width="251"
height="557"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;hr>
&lt;h2 id="results-and-lessons-learned">Results and Lessons Learned&lt;/h2>
&lt;p>After connecting the generator to power, the belt rotated well, but the device was unable to generate static electricity.&lt;/p>
&lt;h3 id="why-didn">&lt;strong>Why Didn&amp;rsquo;t It Work? Potential Technical Reasons&lt;/strong>&lt;/h3>
&lt;h4 id="1-belt-and-pulley-materials">1. &lt;strong>Belt and Pulley Materials&lt;/strong>&lt;/h4>
&lt;p>The charging effect depends on the Triboelectric Series.
If the belt material is unsuitable, no effective charge transfer will occur.&lt;/p>
&lt;h4 id="2-comb-design">2. &lt;strong>Comb Design&lt;/strong>&lt;/h4>
&lt;p>If the strands are too far or too close, the charge transfer stops.
Also, any loose connection will lead to a complete leakage of the charge.&lt;/p>
&lt;h4 id="3-high-humidity">3. &lt;strong>High Humidity&lt;/strong>&lt;/h4>
&lt;p>Humidity is a direct enemy of static electricity. Humid air leaks the charge before it accumulates.&lt;/p>
&lt;h4 id="4-charge-leakage-from-the-frame">4. &lt;strong>Charge Leakage from the Frame&lt;/strong>&lt;/h4>
&lt;p>The presence of sharp corners or exposed screws near the dome leads to immediate charge leakage through partial discharge.&lt;/p>
&lt;h4 id="5-lack-of-an-ideal-metal-dome">5. &lt;strong>Lack of an Ideal Metal Dome&lt;/strong>&lt;/h4>
&lt;p>The dome must be:&lt;/p>
&lt;ul>
&lt;li>Very smooth&lt;/li>
&lt;li>Without edges&lt;/li>
&lt;li>Without holes&lt;/li>
&lt;li>And made of a thin, well-conducting metal&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="conclusion-of-the-experiment">Conclusion of the Experiment&lt;/h2>
&lt;p>Although the device did not succeed in generating a charge, the experiment provided:&lt;/p>
&lt;ul>
&lt;li>A practical understanding of the mechanism of static electricity generators&lt;/li>
&lt;li>Experience in designing combs and pulleys&lt;/li>
&lt;li>Knowledge of the actual problems facing educational electrical devices&lt;/li>
&lt;li>The possibility of developing the model in the next version by improving the materials and structure&lt;/li>
&lt;/ul>
&lt;p>These experiments are the real basis for actual engineering learning.&lt;/p>
&lt;p>Let me know if it works for you.&lt;/p></description></item><item><title>Miniature Tesla Coil: Wireless Power Transfer</title><link>https://khaledhamidi.com/en/writing/tesla/</link><pubDate>Sat, 09 Sep 2023 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/tesla/</guid><description>&lt;p>Nikola Tesla refused to let electricity remain imprisoned in wires. He envisioned energy radiating through the ether, crossing the ocean from America to Europe without a single cable, just as radio waves travel through the air without permission. For this vision, he dedicated years of his life to resonant coils, high-frequency voltages, and experiments where he tried to prove that electricity could be broadcast just like sound and light.&lt;/p>
&lt;p>From the heart of these attempts, the Tesla coil was born—a resonant circuit that makes voltage leap to enormous values, turning the air itself into part of the system. In this guide, we will build a miniature, safe model of this coil to see in practice how the idea of &amp;ldquo;wireless power transfer&amp;rdquo; transforms from a dream in Tesla&amp;rsquo;s mind into an experiment you can perform on your own table.&lt;/p>
&lt;h2 id="the-physics-behind-the-tesla-coil-and-wireless-power-transfer">The Physics Behind the Tesla Coil and Wireless Power Transfer&lt;/h2>
&lt;p>The core idea of a Tesla coil isn&amp;rsquo;t the &amp;ldquo;spark&amp;rdquo; or the visual spectacle, but the creation of a high-frequency resonant system capable of storing and exchanging electromagnetic energy between its electric and magnetic fields, and then leaking a portion of this energy into the surrounding space in a way that can be captured elsewhere.&lt;/p>
&lt;p>Theoretically, a Tesla coil operates as a &lt;strong>Resonant Transformer&lt;/strong> consisting of:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Primary Circuit:&lt;/strong> A primary coil, a capacitor, and a switching/excitation element.&lt;/li>
&lt;li>&lt;strong>Secondary Circuit:&lt;/strong> A secondary coil with a high number of turns and a distributed capacitance (the top dome or toroid).&lt;/li>
&lt;/ul>
&lt;p>Both the primary and secondary circuits can be viewed as RLC resonant circuits with a natural frequency:&lt;/p>
$$ f_0 = \frac{1}{2\pi\sqrt{LC}} $$&lt;p>Where $L$ is the inductance of the coil, and $C$ is the equivalent capacitance of the primary capacitor or the distributed capacitance of the secondary&amp;rsquo;s top load.&lt;/p>
&lt;p>When both circuits are tuned to approximately the same frequency (&lt;strong>Resonant Coupling&lt;/strong>), the following occurs:&lt;/p>
&lt;ol>
&lt;li>Energy accumulates in the magnetic field of the primary coil during the excitation phase.&lt;/li>
&lt;li>This energy is transferred via the intertwined magnetic field to the secondary coil (&lt;strong>Weakly Coupled Resonators&lt;/strong>).&lt;/li>
&lt;li>In the secondary, energy alternates between a magnetic field (L) and an electric field (C) at the resonant frequency, leading to &lt;strong>Voltage Magnification&lt;/strong> at the expense of current.&lt;/li>
&lt;li>As the voltage at the top of the secondary coil increases, the electric field strength becomes sufficient to ionize the air, creating an air discharge (Corona/Streamer) that consumes part of the energy stored in the resonant system.&lt;/li>
&lt;/ol>
&lt;p>What Tesla was trying to do was deeper than just generating a spark:&lt;/p>
&lt;ul>
&lt;li>In conventional systems, power is transferred via current in a metallic conductor.&lt;/li>
&lt;li>In his vision, power should be transferred primarily through the electromagnetic field itself—either through the Earth as a massive conductor or through the air/atmosphere as a medium for the field.&lt;/li>
&lt;/ul>
&lt;p>From a modern physics perspective, the idea of &amp;ldquo;wireless power transfer&amp;rdquo; in a Tesla coil can be summarized in two modes:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Near-Field Coupling:&lt;/strong> Where the near fields (the strong magnetic field around the coil) are used to transfer energy to other nearby resonant circuits tuned to the same frequency (like a receiver coil or a nearby neon lamp). Here, a significant portion of power is transferred with reasonable efficiency over short distances—the same principle used today in &lt;strong>Resonant Inductive Coupling&lt;/strong> for wireless charging.&lt;/li>
&lt;li>&lt;strong>Far-Field Radiation:&lt;/strong> At certain frequencies and with special designs, a Tesla coil can radiate a portion of its energy as an electromagnetic wave into the far field, which can theoretically be received by antennas tuned to the same frequency. However, the efficiency of this mode, especially at the low frequencies Tesla aimed for to transmit power over continental distances, is practically very poor due to losses and attenuation.&lt;/li>
&lt;/ul>
&lt;p>In the small-scale educational model you build with 24V DC, what you will practically see is:&lt;/p>
&lt;ul>
&lt;li>A primary-secondary resonant system that raises the voltage to levels sufficient for short air discharges.&lt;/li>
&lt;li>An oscillating electromagnetic field around the secondary coil strong enough to light up fluorescent/neon bulbs at close range without wires, as a clear example of transferring energy through a field, not a wire.&lt;/li>
&lt;li>A practical demonstration of the idea that energy can &amp;ldquo;live&amp;rdquo; in the field, not just in the wire—the essence of what Tesla was trying to prove on a much larger scale.&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Illustrative image of a Tesla coil" srcset="
/en/writing/tesla/1_hu_89d841abdb8f19cd.webp 400w,
/en/writing/tesla/1_hu_6815df9451921173.webp 760w,
/en/writing/tesla/1_hu_af859a9f86a46b11.webp 1200w"
src="https://khaledhamidi.com/en/writing/tesla/1_hu_89d841abdb8f19cd.webp"
width="596"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="building-the-coil-step-by-step">Building the Coil: Step-by-Step&lt;/h2>
&lt;ol>
&lt;li>&lt;strong>Charging the Primary Circuit:&lt;/strong> A 24V DC power source charges a capacitor.&lt;/li>
&lt;li>&lt;strong>Energy Discharge:&lt;/strong> When the capacitor reaches its maximum capacity, a spark gap breaks down and discharges all the stored energy through the primary coil.&lt;/li>
&lt;li>&lt;strong>Generating Oscillations:&lt;/strong> This rapid discharge creates high-frequency oscillations in the primary circuit.&lt;/li>
&lt;li>&lt;strong>Power Transfer:&lt;/strong> The oscillating magnetic field transfers to the secondary coil, which has a much larger number of turns.&lt;/li>
&lt;li>&lt;strong>Voltage Amplification:&lt;/strong> The secondary coil amplifies the voltage significantly (up to 2500V in this design), causing the energy to discharge as electrical sparks from the top capacitor (the toroid).&lt;/li>
&lt;/ol>
&lt;h3 id="1-winding-the-secondary-coil">1. Winding the Secondary Coil&lt;/h3>
&lt;ul>
&lt;li>Use a thin, insulated copper wire.&lt;/li>
&lt;li>Wind 2000 turns around a plastic insulating tube.&lt;/li>
&lt;li>Connect the bottom end of the coil to the circuit&amp;rsquo;s negative terminal and leave the top end free to connect to the top capacitor later.&lt;/li>
&lt;/ul>
&lt;h3 id="2-making-the-top-capacitor-toroid">2. Making the Top Capacitor (Toroid)&lt;/h3>
&lt;ul>
&lt;li>Prepare a paper ball and cover it completely with aluminum foil.&lt;/li>
&lt;li>Connect the top end of the secondary coil to this ball. This will be the point from which sparks are generated.&lt;/li>
&lt;/ul>
&lt;h3 id="3-assembling-the-circuit">3. Assembling the Circuit&lt;/h3>
&lt;ul>
&lt;li>Use an electromagnetic induction circuit as a high-frequency generator.&lt;/li>
&lt;li>Connect the primary circuit components (power source, capacitor, spark gap, primary coil) as shown in the diagram.
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Tesla tower design" srcset="
/en/writing/tesla/2_hu_ddd63b290a7182ce.webp 400w,
/en/writing/tesla/2_hu_86afef36091f2ec2.webp 760w,
/en/writing/tesla/2_hu_5de73e6cebce56df.webp 1200w"
src="https://khaledhamidi.com/en/writing/tesla/2_hu_ddd63b290a7182ce.webp"
width="634"
height="341"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/li>
&lt;/ul>
&lt;h3 id="4-powering-up-and-testing">4. Powering Up and Testing&lt;/h3>
&lt;ul>
&lt;li>After ensuring all components are connected correctly, connect the 24V DC power source to the circuit.&lt;/li>
&lt;li>You should observe sparks generating from the top capacitor.&lt;/li>
&lt;/ul>
&lt;p>&lt;em>Note: The resulting spark was less than expected. This could be due to non-uniform winding of the secondary coil, which affects the resonance efficiency.&lt;/em>&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Tesla tower design" srcset="
/en/writing/tesla/3_hu_6180129e21cc2927.webp 400w,
/en/writing/tesla/3_hu_b280a0375cffcb49.webp 760w,
/en/writing/tesla/3_hu_db0312737cef803c.webp 1200w"
src="https://khaledhamidi.com/en/writing/tesla/3_hu_6180129e21cc2927.webp"
width="239"
height="427"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Tesla tower design" srcset="
/en/writing/tesla/4_hu_fd8c37aec4d873c7.webp 400w,
/en/writing/tesla/4_hu_8fc892822b89041b.webp 760w,
/en/writing/tesla/4_hu_9b304dda4eb1ff46.webp 1200w"
src="https://khaledhamidi.com/en/writing/tesla/4_hu_fd8c37aec4d873c7.webp"
width="433"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p></description></item><item><title>Induction Heating: How to Build Your Own Heater</title><link>https://khaledhamidi.com/en/writing/induction-heating/</link><pubDate>Fri, 11 Aug 2023 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/induction-heating/</guid><description>&lt;h2 id="what-is-induction-heating">What is Induction Heating?&lt;/h2>
&lt;p>Induction heating is the process of heating metals via electromagnetic induction without any direct contact. When the metal is exposed to a changing magnetic field, eddy currents are generated within it, and these currents produce heat due to the metal&amp;rsquo;s resistance.
The technique is characterized by rapid heating, high efficiency, and the ability to heat only a specific part of the metal.&lt;/p>
&lt;h2 id="how-does-the-system-work">How Does the System Work?&lt;/h2>
&lt;p>The system works by passing a high-frequency alternating current through a copper coil, which creates a changing magnetic field. When a metal piece is placed inside this field, strong currents are generated within it, raising its temperature quickly.
In homemade ZVS (Zero Voltage Switching) circuits, the frequency is generated automatically based on the values of the coil and capacitors, and it is often between &lt;strong>80–150 kHz&lt;/strong>.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Principle of Induction Heating" srcset="
/en/writing/induction-heating/1_hu_864325ce66388bf5.webp 400w,
/en/writing/induction-heating/1_hu_99c94aa900f2f98f.webp 760w,
/en/writing/induction-heating/1_hu_e332b3b0a9fbc397.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/1_hu_864325ce66388bf5.webp"
width="750"
height="339"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="building-the-circuit-step-by-step">Building the Circuit: Step-by-Step&lt;/h2>
&lt;p>The design used here is the famous &lt;strong>ZVS Mazilli&lt;/strong> circuit, a simple and effective circuit that operates at low voltage (12–36V) and can drive induction coils capable of heating metals in seconds.
The circuit consists of four LC tank capacitors, a pair of high-power MOSFETs, and several resistors to start the oscillation.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Circuit Diagram Used" srcset="
/en/writing/induction-heating/2_hu_425139a59d88ee98.webp 400w,
/en/writing/induction-heating/2_hu_c393cc9a2ab3a8d7.webp 760w,
/en/writing/induction-heating/2_hu_31e9545eb1792f37.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/2_hu_425139a59d88ee98.webp"
width="476"
height="499"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="1-assembling-the-components">1. Assembling the Components&lt;/h3>
&lt;h4 id="transistors-and-capacitors">&lt;strong>Transistors and Capacitors&lt;/strong>&lt;/h4>
&lt;ul>
&lt;li>Use a suitable MOSFET such as &lt;strong>IRFP250N&lt;/strong> or &lt;strong>HUFA76407&lt;/strong> to handle high current.&lt;/li>
&lt;li>Mount the MOSFETs on a heat sink with a thermal pad.&lt;/li>
&lt;li>The capacitors should preferably be of the &lt;strong>MKP polypropylene&lt;/strong> type with values of 0.33–0.47µF, connected in parallel to reduce ESR and improve resonance capability.&lt;/li>
&lt;li>The four capacitors with the coil form an &lt;strong>LC Resonant Tank&lt;/strong> circuit that determines the system&amp;rsquo;s frequency.&lt;/li>
&lt;/ul>
&lt;h4 id="the-coil">&lt;strong>The Coil&lt;/strong>&lt;/h4>
&lt;p>The coil is the most critical part of the heating circuit, and here are its ideal specifications:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Wire Type:&lt;/strong> OFC single-core copper, with an enamel coating.&lt;/li>
&lt;li>&lt;strong>Wire Diameter:&lt;/strong> Between &lt;strong>2.0mm – 3.0mm&lt;/strong> to handle high current.&lt;/li>
&lt;li>&lt;strong>Number of Turns:&lt;/strong> From &lt;strong>8 to 12 turns&lt;/strong>.&lt;/li>
&lt;li>&lt;strong>Space Between Turns:&lt;/strong> 1–2mm to improve cooling and reduce parasitic capacitance.&lt;/li>
&lt;li>&lt;strong>Inner Coil Diameter:&lt;/strong> 25–45mm.&lt;/li>
&lt;li>&lt;strong>Wire Length:&lt;/strong> Usually between 70–120cm.&lt;/li>
&lt;/ul>
&lt;p>The coil is connected directly to the resonant capacitors and the oscillating output of the circuit.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Transistors" srcset="
/en/writing/induction-heating/3_hu_b21aa266e7c7abaf.webp 400w,
/en/writing/induction-heating/3_hu_7284dd5c27580101.webp 760w,
/en/writing/induction-heating/3_hu_818787ece0bb7a14.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/3_hu_b21aa266e7c7abaf.webp"
width="760"
height="502"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Capacitors on the Heatsink" srcset="
/en/writing/induction-heating/4_hu_88a621f5755c1820.webp 400w,
/en/writing/induction-heating/4_hu_98d254ad40761a3a.webp 760w,
/en/writing/induction-heating/4_hu_e1e15246d5a968e1.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/4_hu_88a621f5755c1820.webp"
width="760"
height="343"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="2-connecting-the-power-source">2. Connecting the Power Source&lt;/h3>
&lt;p>The circuit operates efficiently at &lt;strong>24V DC&lt;/strong>, but a power supply capable of providing a high current of &lt;strong>10–20 amps&lt;/strong> must be used.
The resulting power is:&lt;/p>
\[
P = V \times I = 240–480 \text{ Watts}
\]&lt;p>This power is sufficient to heat iron and steel until they glow red.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="24V Power Source" srcset="
/en/writing/induction-heating/5_hu_25538c6313121742.webp 400w,
/en/writing/induction-heating/5_hu_19a89f682513c908.webp 760w,
/en/writing/induction-heating/5_hu_bd06d3e05d3276f2.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/5_hu_25538c6313121742.webp"
width="760"
height="449"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="3-the-testing-phase">3. The Testing Phase&lt;/h3>
&lt;ul>
&lt;li>Place a metal piece (a magnetic material like iron) inside the coil.&lt;/li>
&lt;li>Turn on the power source.&lt;/li>
&lt;li>Within seconds, you will notice the temperature of the piece rising, and it may reach a full red glow.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Important Note:&lt;/strong>
The technique works effectively only with &lt;strong>Ferromagnetic&lt;/strong> materials.
Aluminum and copper do not heat up with the same efficiency because they lack the required magnetic permeability.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Testing a different metal piece" srcset="
/en/writing/induction-heating/7_hu_91fa60a1fc496948.webp 400w,
/en/writing/induction-heating/7_hu_1a2a74fdaad4ec15.webp 760w,
/en/writing/induction-heating/7_hu_d9ebd9673ae6d2e4.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/7_hu_91fa60a1fc496948.webp"
width="371"
height="281"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Testing a metal piece" srcset="
/en/writing/induction-heating/6_hu_8461f2ed0d7c6a63.webp 400w,
/en/writing/induction-heating/6_hu_5b5224df87cf1358.webp 760w,
/en/writing/induction-heating/6_hu_c096e64b0a1c5047.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/6_hu_8461f2ed0d7c6a63.webp"
width="434"
height="481"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="additional-application-wireless-charger">Additional Application: Wireless Charger&lt;/h2>
&lt;p>The same principle of induction can be used to create a simple wireless charger.
In this case, the primary coil acts as a transmitting coil, while the receiving coil consists of one or two turns connected to a rectifier and an LED.
When the receiving coil is brought near the transmitting field, energy is transferred wirelessly, and the LED lights up.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Wireless LED Lighting" srcset="
/en/writing/induction-heating/8_hu_835c8cf43509a93.webp 400w,
/en/writing/induction-heating/8_hu_760acb7ef1e2059.webp 760w,
/en/writing/induction-heating/8_hu_95ef72bebceb7593.webp 1200w"
src="https://khaledhamidi.com/en/writing/induction-heating/8_hu_835c8cf43509a93.webp"
width="760"
height="612"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p></description></item><item><title>Connecting an LCD with Arduino</title><link>https://khaledhamidi.com/en/writing/arduino/lcd/</link><pubDate>Thu, 19 Mar 2020 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/arduino/lcd/</guid><description>&lt;p>Liquid Crystal Displays (LCDs) are one of the most common electronic components in Arduino projects for displaying information and text. In this article, we will cover how to connect a 16x2 LCD with an Arduino board and program it to display a welcome message.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="screen"
src="https://khaledhamidi.com/en/writing/arduino/lcd/lcd.gif"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h3 id="required-components">Required Components&lt;/h3>
&lt;ul>
&lt;li>Arduino board (Arduino Uno or any other model).&lt;/li>
&lt;li>16x2 LCD screen.&lt;/li>
&lt;li>Jumper wires.&lt;/li>
&lt;li>Breadboard for easy connection.&lt;/li>
&lt;/ul>
&lt;h3 id="connection-diagram">Connection Diagram&lt;/h3>
&lt;h3 id="connection-table">Connection Table&lt;/h3>
&lt;p>Here is a table detailing the connections between the LCD and the Arduino:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th style="text-align: left">LCD Pin&lt;/th>
&lt;th style="text-align: left">Connection to Arduino&lt;/th>
&lt;th style="text-align: left">Description&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td style="text-align: left">VSS&lt;/td>
&lt;td style="text-align: left">GND&lt;/td>
&lt;td style="text-align: left">Ground&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">VDD&lt;/td>
&lt;td style="text-align: left">5V&lt;/td>
&lt;td style="text-align: left">Power Supply&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">VEE&lt;/td>
&lt;td style="text-align: left">GND (or Potentiometer)&lt;/td>
&lt;td style="text-align: left">Contrast Control&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">RS&lt;/td>
&lt;td style="text-align: left">Pin 7&lt;/td>
&lt;td style="text-align: left">Register Select&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">RW&lt;/td>
&lt;td style="text-align: left">GND&lt;/td>
&lt;td style="text-align: left">Read/Write (Ground for write)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">E&lt;/td>
&lt;td style="text-align: left">Pin 6&lt;/td>
&lt;td style="text-align: left">Enable&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">D4&lt;/td>
&lt;td style="text-align: left">Pin 5&lt;/td>
&lt;td style="text-align: left">Data Pin 4&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">D5&lt;/td>
&lt;td style="text-align: left">Pin 4&lt;/td>
&lt;td style="text-align: left">Data Pin 5&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">D6&lt;/td>
&lt;td style="text-align: left">Pin 3&lt;/td>
&lt;td style="text-align: left">Data Pin 6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">D7&lt;/td>
&lt;td style="text-align: left">Pin 2&lt;/td>
&lt;td style="text-align: left">Data Pin 7&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">A (Anode)&lt;/td>
&lt;td style="text-align: left">5V (with resistor)&lt;/td>
&lt;td style="text-align: left">Backlight Power&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td style="text-align: left">K (Kathode)&lt;/td>
&lt;td style="text-align: left">GND&lt;/td>
&lt;td style="text-align: left">Backlight Ground&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="the-code">The Code&lt;/h3>
&lt;p>The following code initializes the screen and displays a welcome message. You can download the code directly from the attached file.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-cpp" data-lang="cpp">&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// Include the library for the LCD
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="cp">#include&lt;/span> &lt;span class="cpf">&amp;lt;LiquidCrystal.h&amp;gt;&lt;/span>&lt;span class="cp">
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="cp">&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// Define the pins connected to RS, EN, D4, D5, D6, D7
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="k">const&lt;/span> &lt;span class="kt">int&lt;/span> &lt;span class="n">rs&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">7&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">en&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">6&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d4&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">5&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d5&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">4&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d6&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">3&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d7&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">2&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">LiquidCrystal&lt;/span> &lt;span class="nf">lcd&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">rs&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">en&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d4&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d5&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d6&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">d7&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">void&lt;/span> &lt;span class="nf">setup&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Set up the serial terminal for communication with the computer
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">begin&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">9600&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;setup ...&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Specify the dimensions of the screen (16 columns and 2 rows)
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">begin&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">16&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">2&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Write a message to the screen
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;wellcome, I&amp;#39;m&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Call a function to print the name
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">Print&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">void&lt;/span> &lt;span class="nf">loop&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;.&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Temporarily turn off the screen display
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">noDisplay&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">delay&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">500&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Turn the screen display back on
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">display&lt;/span>&lt;span class="p">();&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">delay&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">250&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">// Function to print the name character by character
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span>&lt;span class="kt">char&lt;/span> &lt;span class="n">myName&lt;/span>&lt;span class="p">[]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="s">&amp;#34;Khalid Hamidi :)&amp;#34;&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kt">void&lt;/span> &lt;span class="nf">Print&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;printing &amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">myName&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Serial&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">println&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">int&lt;/span> &lt;span class="n">delayTime&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">150&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">int&lt;/span> &lt;span class="n">len&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="k">sizeof&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">myName&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">for&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="kt">int&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">0&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span> &lt;span class="o">&amp;lt;&lt;/span> &lt;span class="n">len&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="n">i&lt;/span>&lt;span class="o">++&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="c1">// Set the cursor position (column i, second row)
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">setCursor&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">lcd&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">print&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">myName&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="n">i&lt;/span>&lt;span class="p">]);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">delay&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">delayTime&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">delayTime&lt;/span> &lt;span class="o">*=&lt;/span> &lt;span class="mf">0.88&lt;/span>&lt;span class="p">;&lt;/span> &lt;span class="c1">// Gradually decrease the delay time
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1">&lt;/span> &lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">delay&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="mi">100&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>
&lt;/p>
&lt;h3 id="code-explanation">Code Explanation&lt;/h3>
&lt;ol>
&lt;li>&lt;strong>&lt;code>#include &amp;lt;LiquidCrystal.h&amp;gt;&lt;/code>&lt;/strong>: Includes the necessary library to control the LCD.&lt;/li>
&lt;li>&lt;strong>&lt;code>LiquidCrystal lcd(...)&lt;/code>&lt;/strong>: Creates an object from the library, specifying the numbers of the connected ports.&lt;/li>
&lt;li>&lt;strong>&lt;code>lcd.begin(16, 2)&lt;/code>&lt;/strong>: In the &lt;code>setup()&lt;/code> function, we initialize the screen by specifying its dimensions (16 columns and 2 rows).&lt;/li>
&lt;li>&lt;strong>&lt;code>lcd.print(...)&lt;/code>&lt;/strong>: This function is used to write text on the screen.&lt;/li>
&lt;li>&lt;strong>&lt;code>lcd.setCursor(col, row)&lt;/code>&lt;/strong>: Sets the cursor position before writing.&lt;/li>
&lt;li>&lt;strong>&lt;code>lcd.noDisplay()&lt;/code> and &lt;code>lcd.display()&lt;/code>&lt;/strong>: Used to hide and show the text on the screen, creating a blinking effect in the &lt;code>loop()&lt;/code> function.&lt;/li>
&lt;/ol>
&lt;h3 id="video-tutorial">Video Tutorial&lt;/h3>
&lt;p>Here is a video that shows the practical result of the code and connection:&lt;/p>
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/placeholder_video_id?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video">&lt;/iframe>
&lt;/div>
&lt;p>TODO: fix video.*&lt;/p>
&lt;p>With this, we have finished explaining how to connect and program an LCD with Arduino. You can now modify the code to display the data you want in your own projects.&lt;/p></description></item><item><title>Time Response Analysis of RC and RLC Circuits: Understanding Signal Behavior</title><link>https://khaledhamidi.com/en/writing/rlc_analysis/</link><pubDate>Thu, 12 Dec 2019 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/rlc_analysis/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>When your phone rings, your router picks up a Wi-Fi signal, or a car&amp;rsquo;s control unit makes a split-second decision, a hidden phenomenon is at work: &lt;strong>the response of electrical circuits to a sudden change in signal&lt;/strong>. This response determines a system&amp;rsquo;s speed, accuracy, and stability, and it&amp;rsquo;s what separates a reliable device from one that is unstable or slow.&lt;/p>
&lt;p>Despite the complexity of modern electronics, the essence of this phenomenon can be explained through just three circuits: &lt;strong>series RC, series RLC, and parallel RLC.&lt;/strong> These circuits are not just collections of components; they are the models upon which signal filters, communication circuits, power converters, control systems, and sensors are built. Understanding their time response is the first step to understanding how electrons interact with time and how waves are formed inside every device we use daily.&lt;/p>
&lt;hr>
&lt;h1 id="first-the-rc-series-circuit--the-school-of-charging-and-discharging">First: The RC Series Circuit — The School of Charging and Discharging&lt;/h1>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="RC Circuit" srcset="
/en/writing/rlc_analysis/rc_hu_e7f2f35599ca823d.webp 400w,
/en/writing/rlc_analysis/rc_hu_697efc7e2558ca3b.webp 760w,
/en/writing/rlc_analysis/rc_hu_b033bd8480d144bc.webp 1200w"
src="https://khaledhamidi.com/en/writing/rlc_analysis/rc_hu_e7f2f35599ca823d.webp"
width="760"
height="426"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="the-basic-idea">The Basic Idea&lt;/h2>
&lt;p>The RC circuit is the simplest model through which an engineer can understand how a circuit responds to any changing signal. The time constant, &lt;/p>
$$ \tau = RC $$&lt;p>, is a direct indicator of how quickly the circuit reacts to the signal.&lt;/p>
&lt;h2 id="simulation-analysis">Simulation Analysis&lt;/h2>
&lt;ul>
&lt;li>The input signal is a square wave (an instantaneous change).&lt;/li>
&lt;li>The output signal is curved due to the capacitor charging and discharging.&lt;/li>
&lt;li>This behavior represents a &lt;strong>Low Pass Filter&lt;/strong>.&lt;/li>
&lt;/ul>
&lt;h3 id="real-world-uses">Real-World Uses&lt;/h3>
&lt;ul>
&lt;li>Smoothing the output of DC converters&lt;/li>
&lt;li>Filtering noise from signals&lt;/li>
&lt;li>Time delay circuits&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="second-the-rlc-series-circuit--damped-oscillation">Second: The RLC Series Circuit — Damped Oscillation&lt;/h1>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="RLC Series" srcset="
/en/writing/rlc_analysis/rlc_hu_404b4c2a8479a3ca.webp 400w,
/en/writing/rlc_analysis/rlc_hu_80be9ed717282466.webp 760w,
/en/writing/rlc_analysis/rlc_hu_af77dd633b2d3427.webp 1200w"
src="https://khaledhamidi.com/en/writing/rlc_analysis/rlc_hu_404b4c2a8479a3ca.webp"
width="760"
height="426"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="the-basic-idea-1">The Basic Idea&lt;/h2>
&lt;p>With both a capacitor and an inductor, the circuit begins to exchange electrical and magnetic energy. However, the presence of the resistor causes the oscillation to gradually decrease. The resonant frequency is:&lt;/p>
$$ f_0 = \frac{1}{2\pi\sqrt{LC}} $$&lt;h2 id="what-does-the-simulation-show">What Does the Simulation Show?&lt;/h2>
&lt;ul>
&lt;li>A sinusoidal oscillation that starts large and then fades away.&lt;/li>
&lt;li>The current and voltage swing around an equilibrium point.&lt;/li>
&lt;li>Stability is gradually achieved due to the resistance.&lt;/li>
&lt;/ul>
&lt;h3 id="real-world-uses-1">Real-World Uses&lt;/h3>
&lt;ul>
&lt;li>Selective frequency filters&lt;/li>
&lt;li>Radio receivers&lt;/li>
&lt;li>System stability analysis&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="third-the-rlc-parallel-circuit--nearly-free-oscillation">Third: The RLC Parallel Circuit — Nearly Free Oscillation&lt;/h1>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="RLC Parallel" srcset="
/en/writing/rlc_analysis/rlc2_hu_cf5e60826bf8801b.webp 400w,
/en/writing/rlc_analysis/rlc2_hu_e9a0f9b9dc0a29b0.webp 760w,
/en/writing/rlc_analysis/rlc2_hu_2797560b87792e37.webp 1200w"
src="https://khaledhamidi.com/en/writing/rlc_analysis/rlc2_hu_cf5e60826bf8801b.webp"
width="760"
height="426"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="the-basic-idea-2">The Basic Idea&lt;/h2>
&lt;p>Connecting the components in parallel reduces the effect of resistance, allowing for a stronger and longer-lasting oscillation:&lt;/p>
&lt;ul>
&lt;li>More energy is exchanged between L and C&lt;/li>
&lt;li>A clear and stable frequency&lt;/li>
&lt;li>Very slow decay of the response&lt;/li>
&lt;/ul>
&lt;h2 id="simulation-results">Simulation Results&lt;/h2>
&lt;ul>
&lt;li>The oscillation has a higher amplitude than the series circuit.&lt;/li>
&lt;li>The waveform is purer.&lt;/li>
&lt;li>Damping is very weak.&lt;/li>
&lt;/ul>
&lt;h3 id="real-world-uses-2">Real-World Uses&lt;/h3>
&lt;p>This particular circuit is the heart of:&lt;/p>
&lt;ul>
&lt;li>Antennas&lt;/li>
&lt;li>RF Resonators&lt;/li>
&lt;li>Frequency amplification circuits&lt;/li>
&lt;li>RFID and NFC&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="comprehensive-comparison">Comprehensive Comparison&lt;/h1>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Circuit&lt;/th>
&lt;th>Behavior&lt;/th>
&lt;th>Applications&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>RC Series&lt;/strong>&lt;/td>
&lt;td>Exponential charge/discharge&lt;/td>
&lt;td>Filters, Control, Power Conversion&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>RLC Series&lt;/strong>&lt;/td>
&lt;td>Damped oscillation&lt;/td>
&lt;td>Communications, Analysis, Filters&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>RLC Parallel&lt;/strong>&lt;/td>
&lt;td>Nearly free oscillation&lt;/td>
&lt;td>Antennas, RF, Resonant Systems&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h1 id="conclusion">Conclusion&lt;/h1>
&lt;p>These three circuits are not just laboratory exercises; they are fundamental to understanding how a signal oscillates, how a circuit stabilizes, and how systems behave during any sudden change. Using simulation tools like &lt;strong>NI Multisim&lt;/strong>, these phenomena can be clearly visualized, providing insight into how all modern technologies are built.&lt;/p></description></item><item><title>Buck and Boost Converters: Understanding Voltage Step-Down and Step-Up Circuits</title><link>https://khaledhamidi.com/en/writing/buck_boost/</link><pubDate>Fri, 08 Nov 2019 00:00:00 +0000</pubDate><guid>https://khaledhamidi.com/en/writing/buck_boost/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>&lt;strong>DC-DC Converters&lt;/strong> are among the most fundamental building blocks in modern electronics. Whether you are working on a robot, a control board, a battery charger, or any electrical project, you will often need to either step down (Buck) or step up (Boost) a voltage.&lt;/p>
&lt;p>In this article, we will explore two basic circuits used in almost all power systems, explaining their mechanism, design laws, and practical simulation results.&lt;/p>
&lt;hr>
&lt;h1 id="first-the-buck-converter-step-down">First: The Buck Converter (Step-Down)&lt;/h1>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Buck circuit simulation" srcset="
/en/writing/buck_boost/buck_hu_fc9b246e811767b2.webp 400w,
/en/writing/buck_boost/buck_hu_4a2d5eeb10dfed5d.webp 760w,
/en/writing/buck_boost/buck_hu_fb479c0a0a9c543a.webp 1200w"
src="https://khaledhamidi.com/en/writing/buck_boost/buck_hu_fc9b246e811767b2.webp"
width="760"
height="426"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="how-a-buck-converter-works">How a Buck Converter Works&lt;/h2>
&lt;p>A Buck converter steps down the input voltage to a lower output voltage while maintaining high efficiency. The essential components are:&lt;/p>
&lt;ul>
&lt;li>An electronic switch S1&lt;/li>
&lt;li>An inductor L&lt;/li>
&lt;li>A diode D1&lt;/li>
&lt;li>A capacitor C2&lt;/li>
&lt;li>A load resistor R1&lt;/li>
&lt;/ul>
&lt;h3 id="mechanism-of-action">Mechanism of Action&lt;/h3>
&lt;h4 id="1-when-s1-is-on">1. &lt;strong>When S1 is ON&lt;/strong>&lt;/h4>
&lt;ul>
&lt;li>The input voltage is directly applied to the inductor.&lt;/li>
&lt;li>The inductor current increases according to the relation: $v_L = L \frac{di}{dt}$&lt;/li>
&lt;li>Energy is stored in a magnetic field within the inductor.&lt;/li>
&lt;/ul>
&lt;h4 id="2-when-s1-is-off">2. &lt;strong>When S1 is OFF&lt;/strong>&lt;/h4>
&lt;ul>
&lt;li>The voltage across the inductor suddenly drops.&lt;/li>
&lt;li>The inductor maintains current continuity through the diode D1.&lt;/li>
&lt;li>The energy is discharged into the load and the capacitor.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Result:&lt;/strong> The output voltage is lower than the input voltage.&lt;/p>
&lt;hr>
&lt;h2 id="basic-mathematical-relationship">Basic Mathematical Relationship&lt;/h2>
&lt;p>The output voltage is determined by: &lt;/p>
$$ V_{out} = D \cdot V_{in} $$&lt;p>Where D = Duty Cycle = the proportion of time the switch is ON.&lt;/p>
&lt;p>&lt;strong>Example:&lt;/strong> For D = 0.4 and Vin = 12V, we get &lt;/p>
$$ V_{out} = 0.4 \times 12 = 4.8\; \text{V} $$&lt;hr>
&lt;h2 id="waveform-analysis">Waveform Analysis&lt;/h2>
&lt;p>The curve shows the natural behavior of LC circuits:&lt;/p>
&lt;ul>
&lt;li>Initial transient response&lt;/li>
&lt;li>Fluctuation of the inductor current during ON/OFF states&lt;/li>
&lt;li>Voltage stabilization over time&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="second-the-boost-converter-step-up">Second: The Boost Converter (Step-Up)&lt;/h1>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img alt="Boost circuit simulation" srcset="
/en/writing/buck_boost/boost_hu_7603e94273ed411b.webp 400w,
/en/writing/buck_boost/boost_hu_a6c14d3b6e0d1b95.webp 760w,
/en/writing/buck_boost/boost_hu_54ae4f91982e3780.webp 1200w"
src="https://khaledhamidi.com/en/writing/buck_boost/boost_hu_7603e94273ed411b.webp"
width="760"
height="381"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="how-a-boost-converter-works">How a Boost Converter Works&lt;/h2>
&lt;p>A Boost converter steps up the voltage from a lower value to a higher one. The essential components are:&lt;/p>
&lt;ul>
&lt;li>A switch S2&lt;/li>
&lt;li>An inductor L1&lt;/li>
&lt;li>A diode D1&lt;/li>
&lt;li>An output capacitor C2&lt;/li>
&lt;li>A load resistor R1&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="mechanism-of-action-1">Mechanism of Action&lt;/h2>
&lt;h4 id="1-when-s2-is-on">1. &lt;strong>When S2 is ON&lt;/strong>&lt;/h4>
&lt;ul>
&lt;li>The inductor is connected to the input voltage only.&lt;/li>
&lt;li>The inductor current increases, and the magnetic field is stored.&lt;/li>
&lt;/ul>
&lt;h4 id="2-when-s2-is-off">2. &lt;strong>When S2 is OFF&lt;/strong>&lt;/h4>
&lt;ul>
&lt;li>The inductor tries to maintain the current.&lt;/li>
&lt;li>The voltage rises rapidly across the diode.&lt;/li>
&lt;li>The capacitor is charged to a voltage higher than Vin.&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="basic-mathematical-relationship-1">Basic Mathematical Relationship&lt;/h2>
&lt;p>The output voltage follows the relation: &lt;/p>
$$ V_{out} = \frac{V_{in}}{1-D} $$&lt;p>&lt;strong>Example from the simulation:&lt;/strong> With D = 0.2 and Vin = 12V, we calculate &lt;/p>
$$ V_{out} = \frac{12}{1-0.2} = 15\; \text{V} $$&lt;p>This is very close to the measured value: &lt;strong>15.478V&lt;/strong>.&lt;/p>
&lt;hr>
&lt;h2 id="waveform-analysis-1">Waveform Analysis&lt;/h2>
&lt;p>The curve shows:&lt;/p>
&lt;ul>
&lt;li>A gradual increase in voltage&lt;/li>
&lt;li>The output stabilizes at ~15.4V&lt;/li>
&lt;li>A time response that depends on the L and C values&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h1 id="quick-comparison">Quick Comparison&lt;/h1>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Circuit&lt;/th>
&lt;th>Function&lt;/th>
&lt;th>Basic Relationship&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>Buck&lt;/strong>&lt;/td>
&lt;td>Steps down voltage&lt;/td>
&lt;td>$V_{out} = D \cdot V_{in}$&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>Boost&lt;/strong>&lt;/td>
&lt;td>Steps up voltage&lt;/td>
&lt;td>$V_{out} = \frac{V_{in}}{1-D}$&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;hr>
&lt;h1 id="conclusion">Conclusion&lt;/h1>
&lt;p>The &lt;strong>Buck&lt;/strong> and &lt;strong>Boost&lt;/strong> circuits are the foundation of voltage converters in all modern electronics. Understanding them is essential for any engineer working in fields such as:&lt;/p>
&lt;ul>
&lt;li>Robotics&lt;/li>
&lt;li>Solar power systems&lt;/li>
&lt;li>Battery chargers&lt;/li>
&lt;li>Microcontroller units&lt;/li>
&lt;li>Portable systems&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Multisim&lt;/strong> software allows you to simulate these circuits and verify the correct values before implementing them in reality.&lt;/p></description></item></channel></rss>