<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Hedy</title>
    <description>The latest articles on DEV Community by Hedy (@carolineee).</description>
    <link>https://dev.to/carolineee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1235784%2F7ca9b5fb-3787-4b71-91bf-b19f25ed7eae.jpg</url>
      <title>DEV Community: Hedy</title>
      <link>https://dev.to/carolineee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/carolineee"/>
    <language>en</language>
    <item>
      <title>How to Use Piper on a Raspberry Pi?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Mon, 09 Feb 2026 10:30:43 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-use-piper-on-a-raspberry-pi-2p2l</link>
      <guid>https://dev.to/carolineee/how-to-use-piper-on-a-raspberry-pi-2p2l</guid>
      <description>&lt;p&gt;&lt;strong&gt;1. What Is Piper (and Why You’d Use It on a Raspberry Pi)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Piper is a graphical mouse configuration tool for Linux.&lt;br&gt;
It works together with libratbag, a background service that talks directly to supported mice over USB or Bluetooth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u2qq4o5lbj65b9cwbuf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u2qq4o5lbj65b9cwbuf.jpg" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On a &lt;a href="https://www.ampheo.com/c/raspberry-pi/raspberry-pi-boards" rel="noopener noreferrer"&gt;Raspberry Pi&lt;/a&gt;, Piper is commonly used to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remap mouse buttons&lt;/li&gt;
&lt;li&gt;Adjust DPI (sensitivity) levels&lt;/li&gt;
&lt;li&gt;Configure polling rate&lt;/li&gt;
&lt;li&gt;Set profiles (for gaming, CAD, robotics UI, kiosks)&lt;/li&gt;
&lt;li&gt;Store settings directly in the mouse firmware (for supported models)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typical use cases on Raspberry Pi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gaming or retro-console setups&lt;/li&gt;
&lt;li&gt;Industrial HMIs using programmable mice&lt;/li&gt;
&lt;li&gt;Lab setups where precise pointer control matters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Check Before You Start (Very Important)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2.1 Mouse Compatibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Piper does not support all mice.&lt;/p&gt;

&lt;p&gt;It supports mice that work with libratbag, including many models from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logitech (G series)&lt;/li&gt;
&lt;li&gt;SteelSeries&lt;/li&gt;
&lt;li&gt;Roccat&lt;/li&gt;
&lt;li&gt;Corsair (limited models)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If Piper opens but shows “No devices found”, the mouse is likely unsupported.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Install Piper on Raspberry Pi OS&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;3.1 Update Your System&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.2 Install Piper and libratbag&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install piper libratbagd -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;piper → graphical configuration tool&lt;/li&gt;
&lt;li&gt;libratbagd → background daemon that communicates with the mouse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Enable and Start the libratbag Service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Piper will not work unless the service is running.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl enable libratbagd
sudo systemctl start libratbagd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check status:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl status libratbagd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Active: active (running)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. Launch Piper&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the desktop:&lt;/p&gt;

&lt;p&gt;Menu → Preferences → Piper&lt;/p&gt;

&lt;p&gt;Or from terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;piper
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your mouse is supported, it will appear immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Using Piper: Core Functions Explained&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;6.1 Button Mapping&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Piper, click any mouse button and assign:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Left / Right / Middle click&lt;/li&gt;
&lt;li&gt;Keyboard keys&lt;/li&gt;
&lt;li&gt;Media controls&lt;/li&gt;
&lt;li&gt;Disabled (useful for kiosks)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example&lt;br&gt;
Map a side button to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ctrl + C for copy&lt;/li&gt;
&lt;li&gt;Ctrl + V for paste&lt;/li&gt;
&lt;li&gt;Shift for CAD navigation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;➡ &lt;strong&gt;Engineering tip:&lt;/strong&gt;&lt;br&gt;
Button remapping is stored either in software or mouse firmware, depending on the model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.2 DPI (Sensitivity) Settings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most gaming mice support multiple DPI stages.&lt;/p&gt;

&lt;p&gt;In Piper you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable/disable DPI steps&lt;/li&gt;
&lt;li&gt;Set exact DPI values (e.g. 400 / 800 / 1600 / 3200)&lt;/li&gt;
&lt;li&gt;Choose DPI-switch behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Best practice on Raspberry Pi:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Desktop use: 800–1200 DPI&lt;/li&gt;
&lt;li&gt;4K display or CAD: 1600–2400 DPI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6.3 Polling Rate&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Polling rate defines how often the mouse reports position.&lt;/p&gt;

&lt;p&gt;Typical options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;125 Hz&lt;/li&gt;
&lt;li&gt;250 Hz&lt;/li&gt;
&lt;li&gt;500 Hz&lt;/li&gt;
&lt;li&gt;1000 Hz&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;➡ On Raspberry Pi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;500 Hz is usually the sweet spot&lt;/li&gt;
&lt;li&gt;1000 Hz offers minimal benefit and more USB load&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6.4 Profiles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some mice allow multiple profiles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gaming&lt;/li&gt;
&lt;li&gt;Desktop&lt;/li&gt;
&lt;li&gt;CAD / 3D modeling&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch profiles manually&lt;/li&gt;
&lt;li&gt;Assign profiles to DPI buttons&lt;/li&gt;
&lt;li&gt;Save profiles to mouse memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7. Common Problems and How to Fix Them&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Piper Opens but Shows “No Devices Found”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Causes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mouse not supported&lt;/li&gt;
&lt;li&gt;libratbag service not running&lt;/li&gt;
&lt;li&gt;Insufficient permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fix&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart libratbagd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try another USB port (avoid hubs).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DPI or Buttons Don’t Change&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Causes&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mouse firmware doesn’t support onboard storage&lt;/li&gt;
&lt;li&gt;Profile not applied&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fix&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click Apply or Save to Device&lt;/li&gt;
&lt;li&gt;Replug mouse&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Piper Crashes or Won’t Start&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fix&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;piper --debug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check for missing GTK dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install libgtk-3-0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8. Headless or Minimal Raspberry Pi (No GUI)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Piper requires a GUI.&lt;/p&gt;

&lt;p&gt;If you are running:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspberry Pi OS Lite&lt;/li&gt;
&lt;li&gt;Headless system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You must either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install a lightweight desktop (LXDE), or&lt;/li&gt;
&lt;li&gt;Configure mouse via libratbag CLI (advanced, limited)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. Performance and Stability Notes (Real-World Use)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Piper settings do not impact CPU load significantly&lt;/li&gt;
&lt;li&gt;Mouse polling is handled in kernel space&lt;/li&gt;
&lt;li&gt;Settings persist across reboot if stored in device&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For industrial or kiosk deployments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test settings after power cycling&lt;/li&gt;
&lt;li&gt;Avoid firmware-dependent profiles if reproducibility matters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;10. When Piper Is the Right (or Wrong) Tool&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Use Piper if:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You have a supported gaming/advanced mouse&lt;/li&gt;
&lt;li&gt;You need DPI or button remapping&lt;/li&gt;
&lt;li&gt;You want a GUI-based solution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Avoid Piper if:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using generic office mice&lt;/li&gt;
&lt;li&gt;Running headless Raspberry Pi only&lt;/li&gt;
&lt;li&gt;Mouse not supported by libratbag&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;11. Final Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Using Piper on a Raspberry Pi is straightforward once you understand its dependency on libratbag and device support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Workflow summary:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install piper + libratbagd&lt;/li&gt;
&lt;li&gt;Enable the service&lt;/li&gt;
&lt;li&gt;Plug in a supported mouse&lt;/li&gt;
&lt;li&gt;Configure DPI, buttons, and profiles&lt;/li&gt;
&lt;li&gt;Save settings to device&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>piper</category>
      <category>raspberrypi</category>
    </item>
    <item>
      <title>How to change the VID / PID of an Arduino Nano?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Tue, 03 Feb 2026 10:37:35 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-change-the-vid-pid-of-an-arduino-nano-531i</link>
      <guid>https://dev.to/carolineee/how-to-change-the-vid-pid-of-an-arduino-nano-531i</guid>
      <description>&lt;p&gt;Changing the VID / PID of an &lt;a href="https://www.ampheo.com/product/a000005-25542476" rel="noopener noreferrer"&gt;Arduino Nano&lt;/a&gt; depends entirely on which USB interface chip your Nano uses. This is not a software setting you can change from a sketch; it is defined by the USB firmware of the USB-to-serial chip.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fztxukflo4rz2vxyji9ip.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fztxukflo4rz2vxyji9ip.jpg" alt=" " width="750" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a clear decision path → implementation steps → risks and procurement implications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. First: Identify which Arduino Nano you have (this decides everything)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are three common Nano variants in the wild:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Nano type&lt;/th&gt;
&lt;th&gt;USB chip&lt;/th&gt;
&lt;th&gt;VID/PID changeable?&lt;/th&gt;
&lt;th&gt;How&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Original Nano&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;FT232RL&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Reprogram EEPROM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Clone Nano (most common)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;CH340 / CH341&lt;/td&gt;
&lt;td&gt;No (practically)&lt;/td&gt;
&lt;td&gt;Fixed in silicon&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Newer Nano (ATmega328P + ATmega16U2)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;ATmega16U2&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Flash USB firmware&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Most cheap Nano boards use CH340 → VID/PID cannot realistically be changed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. How to check which USB chip you have (don’t skip this)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;On Windows&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Plug in Nano&lt;/li&gt;
&lt;li&gt;Open Device Manager → Ports (COM &amp;amp; LPT)&lt;/li&gt;
&lt;li&gt;Check device name:&lt;/li&gt;
&lt;li&gt;USB Serial Converter → FT232&lt;/li&gt;
&lt;li&gt;USB-SERIAL CH340 → &lt;a href="https://www.ampheo.com/product/ch340t-27265631" rel="noopener noreferrer"&gt;CH340&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Arduino USB Serial → &lt;a href="https://www.ampheo.com/search/ATmega16U2" rel="noopener noreferrer"&gt;ATmega16U2&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;On Linux / macOS&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;lsusb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0403:6001  → FTDI (FT232)
1a86:7523  → CH340
2341:0043  → Arduino VID (16U2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Case A — Nano with FT232RL (VID/PID CAN be changed)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FTDI drivers installed&lt;/li&gt;
&lt;li&gt;FT_Prog (FTDI official utility, Windows)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step-by-step&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install FT_Prog&lt;/li&gt;
&lt;li&gt;Plug in Nano&lt;/li&gt;
&lt;li&gt;Open FT_Prog → Scan and Parse&lt;/li&gt;
&lt;li&gt;Navigate to:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;USB Device Descriptor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Change:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Vendor ID&lt;/li&gt;
&lt;li&gt;Product ID&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Program device&lt;/li&gt;
&lt;li&gt;Unplug and replug&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Important warnings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do NOT use a VID you do not own&lt;/li&gt;
&lt;li&gt;Changing VID/PID may break drivers&lt;/li&gt;
&lt;li&gt;Windows may require driver reinstallation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Procurement note&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you need custom VID/PID for a product, FT232 is acceptable only for low volume / internal tools. For shipping products, VID licensing matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Case B — Nano with CH340 / CH341 (VID/PID NOT changeable)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Reality check&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;VID/PID is hard-coded&lt;/li&gt;
&lt;li&gt;No EEPROM&lt;/li&gt;
&lt;li&gt;No official flashing tools&lt;/li&gt;
&lt;li&gt;Internet “guides” claiming success are wrong or misleading&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Your options&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Try to flash&lt;/td&gt;
&lt;td&gt;Impossible&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mask VID/PID in OS&lt;/td&gt;
&lt;td&gt;Hacky&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Replace USB chip&lt;/td&gt;
&lt;td&gt;Not realistic&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Use different Nano&lt;/td&gt;
&lt;td&gt;Correct approach&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Procurement implication&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you need VID/PID control, do not buy CH340-based Nanos.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Case C — Nano with ATmega16U2 (VID/PID fully programmable)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(Some “official-style” Nanos or custom boards)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What you need&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ISP programmer (USBasp / AVRISP / another Arduino)&lt;/li&gt;
&lt;li&gt;DFU or ISP flashing tools&lt;/li&gt;
&lt;li&gt;Custom USB firmware&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;High-level steps&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Put ATmega16U2 into DFU or ISP mode&lt;/li&gt;
&lt;li&gt;Modify USB descriptors in firmware:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#define USB_VENDOR_ID  0xXXXX
#define USB_PRODUCT_ID 0xYYYY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;Compile&lt;/li&gt;
&lt;li&gt;Flash firmware&lt;/li&gt;
&lt;li&gt;Replug device&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full USB control&lt;/li&gt;
&lt;li&gt;Can implement HID, CDC, composite devices&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Risks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to brick USB interface&lt;/li&gt;
&lt;li&gt;Requires firmware + USB knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Why Arduino sketches cannot change VID/PID&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your &lt;a href="https://www.onzuu.com/search/ATmega328P" rel="noopener noreferrer"&gt;ATmega328P&lt;/a&gt; sketch never talks USB.&lt;/p&gt;

&lt;p&gt;USB is handled by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FT232 → external IC&lt;/li&gt;
&lt;li&gt;CH340 → external IC&lt;/li&gt;
&lt;li&gt;ATmega16U2 → separate MCU&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Serial.begin();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;cannot affect VID/PID.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. When do you actually NEED to change VID/PID?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Valid reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Custom PC software binding&lt;/li&gt;
&lt;li&gt;USB driver matching&lt;/li&gt;
&lt;li&gt;Composite USB device&lt;/li&gt;
&lt;li&gt;Product branding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Invalid reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Just curiosity”&lt;/li&gt;
&lt;li&gt;Fixing driver problems&lt;/li&gt;
&lt;li&gt;Bypassing OS permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. Best practice recommendations (engineering + purchasing)&lt;/strong&gt;&lt;br&gt;
If you just want Arduino compatibility&lt;/p&gt;

&lt;p&gt;Do NOT change VID/PID&lt;/p&gt;

&lt;p&gt;If you need custom VID/PID&lt;/p&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arduino with ATmega16U2&lt;/li&gt;
&lt;li&gt;Native USB MCU (&lt;a href="https://www.ampheo.com/search/ATmega32U4" rel="noopener noreferrer"&gt;ATmega32U4&lt;/a&gt;, RP2040, &lt;a href="https://www.ampheo.com/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt;, ESP32-Sx)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re building a product&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do NOT ship with Arduino VID&lt;/li&gt;
&lt;li&gt;Buy your own VID or use USB-IF PID programs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. Quick decision summary&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your Nano has…&lt;/th&gt;
&lt;th&gt;Can you change VID/PID?&lt;/th&gt;
&lt;th&gt;Recommended action&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;FT232&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Use FT_Prog carefully&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CH340&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Replace board&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ATmega16U2&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Flash custom firmware&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Final takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Changing &lt;a href="https://www.ampheoelec.de/product/a000005-25542476" rel="noopener noreferrer"&gt;Arduino Nano&lt;/a&gt; VID/PID is a hardware decision, not a software trick.&lt;/p&gt;

&lt;p&gt;If VID/PID control matters:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose the right USB interface chip&lt;/li&gt;
&lt;li&gt;Decide this before procurement&lt;/li&gt;
&lt;li&gt;Don’t try to “fix it later in firmware”&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>arduinonano</category>
      <category>vid</category>
      <category>pid</category>
      <category>atmega16u2</category>
    </item>
    <item>
      <title>How to activate/deactivate other circuits with higher voltage from a microcontroller?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Fri, 30 Jan 2026 10:37:33 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-activatedeactivate-other-circuits-with-higher-voltage-from-a-microcontroller-2298</link>
      <guid>https://dev.to/carolineee/how-to-activatedeactivate-other-circuits-with-higher-voltage-from-a-microcontroller-2298</guid>
      <description>&lt;p&gt;To switch (activate/deactivate) higher-voltage circuits from a &lt;a href="https://www.ampheo.com/c/microcontrollers" rel="noopener noreferrer"&gt;microcontroller&lt;/a&gt;, you’re really choosing an isolation + switching method that matches:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Voltage &amp;amp; current of the load&lt;/li&gt;
&lt;li&gt;AC vs DC&lt;/li&gt;
&lt;li&gt;Switching speed (slow on/off vs PWM)&lt;/li&gt;
&lt;li&gt;Isolation requirement (safety/EMC)&lt;/li&gt;
&lt;li&gt;Failure mode you can tolerate (stuck ON is dangerous)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below is a practical decision guide, then concrete wiring patterns and real part examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmtni8oxhxt7ttnse6d3y.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmtni8oxhxt7ttnse6d3y.jpeg" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Decision logic: pick your switching “class”&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;A) DC load, low/medium current, want efficiency → MOSFET switch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best for: 12V/24V solenoids, LED strips, &lt;a href="https://www.onzuu.com/category/ac-dc-motors" rel="noopener noreferrer"&gt;DC motors&lt;/a&gt; (on/off), heaters&lt;/li&gt;
&lt;li&gt;Pros: efficient, cheap, fast (PWM capable)&lt;/li&gt;
&lt;li&gt;Cons: needs correct &lt;a href="https://www.onzuu.com/category/fets-mosfets" rel="noopener noreferrer"&gt;MOSFET&lt;/a&gt; + gate drive + protection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose low-side vs high-side&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low-side (N-MOSFET): easiest, cheapest&lt;/li&gt;
&lt;li&gt;High-side (P-MOSFET or high-side driver): needed when load must stay referenced to ground or for automotive conventions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;B) AC mains load (110/230VAC) → &lt;a href="https://www.onzuu.com/category/relays" rel="noopener noreferrer"&gt;Relay&lt;/a&gt; or Triac SSR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best for: lamps, heaters, mains pumps&lt;/li&gt;
&lt;li&gt;Pros: simple, isolation is common, safe when done right&lt;/li&gt;
&lt;li&gt;Cons: mechanical relays wear; triac SSRs leak current and aren’t for DC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;C) Need galvanic isolation or noisy environment → Optocoupler + switch&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best for: industrial systems, long cables, high EMI, safety isolation&lt;/li&gt;
&lt;li&gt;Pros: strong noise immunity, safety barrier&lt;/li&gt;
&lt;li&gt;Cons: slower, extra BOM, layout/creepage rules&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;D) Need to switch “anything” including unknown loads → Relay&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best for: prototypes, universal switching, low frequency&lt;/li&gt;
&lt;li&gt;Pros: load-agnostic, real isolation&lt;/li&gt;
&lt;li&gt;Cons: size, coil power, lifetime, contact arcing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2) The most common (and safest) patterns&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Pattern 1 — DC load with low-side N-MOSFET (most common)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use when: DC loads where switching the return (ground) is acceptable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wiring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load + → +V (e.g., 12V)&lt;/li&gt;
&lt;li&gt;Load − → MOSFET Drain&lt;/li&gt;
&lt;li&gt;MOSFET Source → GND&lt;/li&gt;
&lt;li&gt;MCU GPIO → gate &lt;a href="https://www.onzuu.com/category/resistors" rel="noopener noreferrer"&gt;resistor&lt;/a&gt; → MOSFET Gate&lt;/li&gt;
&lt;li&gt;Gate pulldown to GND&lt;/li&gt;
&lt;li&gt;Flyback diode across load if inductive (relay/solenoid/motor)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Typical values&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gate resistor: 33–220 Ω&lt;/li&gt;
&lt;li&gt;Gate pulldown: 100 kΩ&lt;/li&gt;
&lt;li&gt;Flyback diode: Schottky/fast diode sized for current&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Part selection&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MOSFET: logic-level N-MOSFET (low Rds(on) at 3.3V/5V gate)&lt;/li&gt;
&lt;li&gt;If PWM or large MOSFET: consider a gate driver&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example parts (no vendor preference, just common families)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;N-MOSFETs: &lt;a href="https://www.onzuu.com/search/IRLZ44N" rel="noopener noreferrer"&gt;IRLZ44N&lt;/a&gt; (older but common), &lt;a href="https://www.onzuu.com/product/alpha-and-omega-semiconductor-inc-ao3400a-5190082" rel="noopener noreferrer"&gt;AO3400A&lt;/a&gt; (small loads), AOD4184A (mid power)&lt;/li&gt;
&lt;li&gt;Flyback diode: &lt;a href="https://www.onzuu.com/search/SS34" rel="noopener noreferrer"&gt;SS34&lt;/a&gt;, &lt;a href="https://www.onzuu.com/search/1N5819" rel="noopener noreferrer"&gt;1N5819&lt;/a&gt; (small), &lt;a href="https://www.onzuu.com/search/UF4007" rel="noopener noreferrer"&gt;UF4007&lt;/a&gt; (faster than 1N4007)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Procurement impact: MOSFET selection changes thermal design and heatsink needs; diode selection changes EMI and reliability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern 2 — DC load with high-side switch (safer ground, common in automotive)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use when: you can’t “lift” the load ground, or you need the load referenced to chassis ground.&lt;/p&gt;

&lt;p&gt;Options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;P-MOSFET high-side (simple for low current)&lt;/li&gt;
&lt;li&gt;Dedicated high-side switch IC (best for robustness)&lt;/li&gt;
&lt;li&gt;N-MOSFET + driver/charge pump (for high current, low losses)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Recommended for products: High-side switch IC&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Built-in current limit, thermal shutdown, diagnostics (depends on part)&lt;/li&gt;
&lt;li&gt;Much more tolerant of shorts and hot-plug&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example part families&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;High-side switch ICs: BTS/PROFET-style, &lt;a href="https://www.onzuu.com/search/TPS1H" rel="noopener noreferrer"&gt;TPS1H&lt;/a&gt;/&lt;a href="https://www.onzuu.com/search/TPS2H" rel="noopener noreferrer"&gt;TPS2H&lt;/a&gt;-style, VNQ/VND-style&lt;br&gt;
(choose by voltage/current/channel count)&lt;/p&gt;

&lt;p&gt;Procurement impact: IC high-side switches reduce field failures and simplify safety compliance, but cost more than a discrete MOSFET.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern 3 — Relay module (universal on/off, slow switching)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use when: AC mains, unknown load type, or you need real isolation.&lt;/p&gt;

&lt;p&gt;MCU cannot drive relay coil directly (usually).&lt;br&gt;
Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NPN transistor or N-MOSFET coil driver&lt;/li&gt;
&lt;li&gt;Flyback diode across coil&lt;/li&gt;
&lt;li&gt;Separate supply for the coil (often 5V or 12V)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example driver parts&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;NPN: &lt;a href="https://www.onzuu.com/search/2N2222" rel="noopener noreferrer"&gt;2N2222&lt;/a&gt;, &lt;a href="https://www.ampheo.com/search/S8050" rel="noopener noreferrer"&gt;S8050&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Coil diode: &lt;a href="https://www.onzuu.com/search/1N4148" rel="noopener noreferrer"&gt;1N4148&lt;/a&gt; (small relays) or &lt;a href="https://www.onzuu.com/search/1N4007" rel="noopener noreferrer"&gt;1N4007&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Relay: SRD-05VDC-SL-C class modules (for learning), or industrial relays for products&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Procurement impact: Relays have lifecycle (mechanical), contact ratings, and sourcing variability; specify contact type and derate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pattern 4 — Solid-state relay (SSR)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;For AC loads: Triac SSR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros: silent, long life, easy isolation&lt;/li&gt;
&lt;li&gt;Cons: leakage current, heat at high current, not for DC&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SSR modules: SSR-xxDA style (AC output, DC input control)&lt;/li&gt;
&lt;li&gt;Prefer “zero-cross” for heaters/lamps, “random turn-on” for phase control&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;For DC loads: MOSFET SSR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pros: isolation + DC switching&lt;/li&gt;
&lt;li&gt;Cons: higher cost, on-resistance causes heat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3) Protection you should almost always add (affects success rate)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Inductive loads (relays, &lt;a href="https://www.onzuu.com/category/solenoids" rel="noopener noreferrer"&gt;solenoids&lt;/a&gt;, motors)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flyback diode (DC) or RC snubber / MOV (AC)&lt;/li&gt;
&lt;li&gt;Optional: TVS diode on the supply rail to clamp spikes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;MCU pin protection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If the switch driver is off-board / long cable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;series resistor (100–1k)&lt;/li&gt;
&lt;li&gt;ESD diode/TVS near connector&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Procurement impact: Adding protection parts is cheap insurance—dramatically reduces returns and “random reset” complaints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Quick “choose this” table&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your load&lt;/th&gt;
&lt;th&gt;Best default&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;12V LED strip (on/off or PWM)&lt;/td&gt;
&lt;td&gt;Low-side N-MOSFET&lt;/td&gt;
&lt;td&gt;Add fuse if long strip&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24V solenoid&lt;/td&gt;
&lt;td&gt;Low-side N-MOSFET + flyback&lt;/td&gt;
&lt;td&gt;Diode must handle current&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DC motor (on/off)&lt;/td&gt;
&lt;td&gt;N-MOSFET + flyback/TVS&lt;/td&gt;
&lt;td&gt;For direction control use H-bridge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AC heater/lamp&lt;/td&gt;
&lt;td&gt;Relay or AC SSR&lt;/td&gt;
&lt;td&gt;SSR leaks; relay clicks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Automotive load&lt;/td&gt;
&lt;td&gt;High-side switch IC&lt;/td&gt;
&lt;td&gt;Handles faults better&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;High noise/industrial&lt;/td&gt;
&lt;td&gt;Optocoupler + MOSFET/relay&lt;/td&gt;
&lt;td&gt;Layout &amp;amp; creepage matter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;5) Two common failure modes (and fixes)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. MCU resets when load switches&lt;/strong&gt;&lt;br&gt;
Cause: supply dip / ground bounce / EMI&lt;br&gt;
Fix: separate power rails, star ground, bulk cap (≥470 µF) near load, diode/TVS, shorten high-current loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. MOSFET runs hot&lt;/strong&gt;&lt;br&gt;
Cause: wrong MOSFET (not logic-level), high Rds(on), inadequate gate drive&lt;br&gt;
Fix: choose MOSFET specified at your gate voltage, reduce switching losses, add driver or heatsinking.&lt;/p&gt;

</description>
      <category>microcontroller</category>
      <category>relays</category>
      <category>solenoids</category>
      <category>motors</category>
    </item>
    <item>
      <title>How to program STM32 microcontroller?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Mon, 26 Jan 2026 09:47:22 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-program-stm32-microcontroller-2951</link>
      <guid>https://dev.to/carolineee/how-to-program-stm32-microcontroller-2951</guid>
      <description>&lt;p&gt;Programming an &lt;a href="https://www.ampheo.com/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt; is a pipeline of four layers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Write firmware (source code)&lt;/strong&gt;&lt;br&gt;
You write C/C++ (sometimes Rust) that configures peripherals (GPIO, UART, timers, ADC, etc.) and implements your application logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Build (compile + link) into a binary&lt;/strong&gt;&lt;br&gt;
Your toolchain (GCC/Clang/IAR/Keil) turns code into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;.elf (debuggable output)&lt;/li&gt;
&lt;li&gt;.bin / .hex (flashable image)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. Program (flash) the binary into on-chip Flash&lt;/strong&gt;&lt;br&gt;
STM32 stores your firmware in internal Flash. You load it using one of the supported programming paths:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SWD (Serial Wire Debug) via ST-LINK/J-LINK (most common)&lt;/li&gt;
&lt;li&gt;ROM bootloader (UART/I2C/SPI/USB DFU depending on chip) for “no debugger” flashing&lt;/li&gt;
&lt;li&gt;Mass storage drag-and-drop (on boards with built-in ST-LINK)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4. Reset + boot sequence runs your app&lt;/strong&gt;&lt;br&gt;
On reset, the MCU fetches the reset vector from Flash and starts executing. BOOT pins (e.g., BOOT0) decide whether it boots from Flash or jumps to ROM bootloader.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0brf4sq04zgqedwwfct2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0brf4sq04zgqedwwfct2.jpg" alt=" " width="686" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key concept: SWD vs Bootloader&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SWD = best for development (debugging, breakpoints, “connect under reset”, fastest iteration)&lt;/li&gt;
&lt;li&gt;Bootloader = best for production updates or rescue when SWD isn’t available&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Practical paths (the 3 common ways)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;A) SWD programming (recommended for engineering work)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hardware: ST-LINK/V2 (or onboard ST-LINK on Nucleo/Discovery)&lt;/p&gt;

&lt;p&gt;Signals you need (typical):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SWDIO&lt;/li&gt;
&lt;li&gt;SWCLK&lt;/li&gt;
&lt;li&gt;GND&lt;/li&gt;
&lt;li&gt;3V3 (VTref, recommended)&lt;/li&gt;
&lt;li&gt;NRST (optional but very helpful)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why it’s the best&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can flash + debug in one click&lt;/li&gt;
&lt;li&gt;You can recover chips with “connect under reset”&lt;/li&gt;
&lt;li&gt;Works even if your firmware breaks clocks/peripherals&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;B) ROM bootloader (no debugger required)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most &lt;a href="https://www.ampheoelec.de/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt; families include a factory ROM bootloader.&lt;/p&gt;

&lt;p&gt;Typical boot entry logic&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set BOOT0 = 1&lt;/li&gt;
&lt;li&gt;Reset&lt;/li&gt;
&lt;li&gt;MCU runs the ROM bootloader and waits for UART/USB DFU/etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why it’s used&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Production line flashing&lt;/li&gt;
&lt;li&gt;Field firmware update&lt;/li&gt;
&lt;li&gt;“My SWD pins are not accessible” scenarios&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;C) Drag-and-drop (only on some dev boards)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Boards with ST-LINK often expose a “USB drive”. Copy .bin → it flashes.&lt;br&gt;
Good for beginners, but SWD debugging is still the real workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 1: STM32F103C8T6 (“Blue Pill”) via ST-LINK (SWD)&lt;/strong&gt;&lt;br&gt;
What you use&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MCU/Board: &lt;a href="https://www.ampheo.com/product/stm32f103c8t6-131876" rel="noopener noreferrer"&gt;STM32F103C8T6&lt;/a&gt; (Blue Pill)&lt;/li&gt;
&lt;li&gt;Programmer: ST-LINK/V2&lt;/li&gt;
&lt;li&gt;IDE: STM32CubeIDE (or CubeProgrammer for pure flashing)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wiring (most common)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ST-LINK SWDIO → Blue Pill PA13&lt;/li&gt;
&lt;li&gt;ST-LINK SWCLK → Blue Pill PA14&lt;/li&gt;
&lt;li&gt;ST-LINK GND → GND&lt;/li&gt;
&lt;li&gt;ST-LINK 3V3 (VTref) → 3V3&lt;/li&gt;
&lt;li&gt;(Optional) ST-LINK NRST → NRST&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Workflow&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a project in STM32CubeIDE for STM32F103C8T6.&lt;/li&gt;
&lt;li&gt;Configure GPIO for an LED pin (many Blue Pills use PC13 LED).&lt;/li&gt;
&lt;li&gt;Build → get .elf and .bin.&lt;/li&gt;
&lt;li&gt;Click Debug (or Run). CubeIDE flashes via ST-LINK and starts debugging.&lt;/li&gt;
&lt;li&gt;Verify by toggling the LED in a loop.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why this works well: F103 + SWD is simple, stable, and very common.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 2: STM32F401RE (Nucleo-F401RE) “one cable” programming + debug&lt;/strong&gt;&lt;br&gt;
What you use&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Board: &lt;a href="https://www.onzuu.com/product/stmicroelectronics-nucleo-f401re-3236041" rel="noopener noreferrer"&gt;Nucleo-F401RE&lt;/a&gt; (&lt;a href="https://www.ampheo.com/search/STM32F401RE" rel="noopener noreferrer"&gt;STM32F401RE&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Tool: The board’s onboard ST-LINK&lt;/li&gt;
&lt;li&gt;Connection: USB cable only&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Workflow&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Plug the Nucleo into PC via USB.&lt;/li&gt;
&lt;li&gt;Build your project in CubeIDE.&lt;/li&gt;
&lt;li&gt;Click Debug → it flashes and debugs automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Best part: No external programmer wiring needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3: STM32G030F6P6 (or similar) via UART bootloader (no ST-LINK)&lt;/strong&gt;&lt;br&gt;
What you use&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MCU: &lt;a href="https://www.ampheo.com/product/stm32g030f6p6-129893" rel="noopener noreferrer"&gt;STM32G030F6P6&lt;/a&gt; (common low-cost &lt;a href="https://www.ampheo.com/search/STM32G0" rel="noopener noreferrer"&gt;STM32G0&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Tool: USB-to-UART adapter (3.3V logic)&lt;/li&gt;
&lt;li&gt;Software: STM32CubeProgrammer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typical steps (conceptual)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wire UART:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;MCU USART_RX ↔ adapter TX&lt;/li&gt;
&lt;li&gt;MCU USART_TX ↔ adapter RX&lt;/li&gt;
&lt;li&gt;GND ↔ GND&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Pull BOOT0 high (how you do this depends on your PCB/board).&lt;/li&gt;
&lt;li&gt;Reset the MCU.&lt;/li&gt;
&lt;li&gt;In CubeProgrammer: choose UART, select COM port → Connect.&lt;/li&gt;
&lt;li&gt;Program .bin/.hex.&lt;/li&gt;
&lt;li&gt;Set BOOT0 low again and reset → app boots from Flash.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Why this matters: You can program a bare chip even without SWD access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common “it won’t program” reasons (fast diagnosis)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No common ground between programmer and target&lt;/li&gt;
&lt;li&gt;BOOT0 left high → MCU stuck in bootloader&lt;/li&gt;
&lt;li&gt;Wrong voltage / unstable power&lt;/li&gt;
&lt;li&gt;SWD pins reused / noisy wiring → lower SWD speed, use short wires&lt;/li&gt;
&lt;li&gt;Need NRST for “connect under reset” recovery&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Quick rule-of-thumb for choosing the programming method&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Developing firmware + debugging → SWD with ST-LINK&lt;/li&gt;
&lt;li&gt;Factory flashing / field updates → ROM bootloader (UART/USB DFU)&lt;/li&gt;
&lt;li&gt;Learning on Nucleo → onboard ST-LINK is easiest&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>stm32</category>
      <category>stm32f103c8t6</category>
      <category>nucleof401re</category>
      <category>stm32cubeide</category>
    </item>
    <item>
      <title>How to pause FPGA based digital clock through buttons on FPGA?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Fri, 23 Jan 2026 10:15:07 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-pause-fpga-based-digital-clock-through-buttons-on-fpga-1ddf</link>
      <guid>https://dev.to/carolineee/how-to-pause-fpga-based-digital-clock-through-buttons-on-fpga-1ddf</guid>
      <description>&lt;p&gt;&lt;strong&gt;1) what “pause” means in an FPGA digital clock&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A typical &lt;a href="https://www.ampheo.com/c/fpgas-field-programmable-gate-array" rel="noopener noreferrer"&gt;FPGA&lt;/a&gt; digital clock has at least two parts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wtxrlomyxujrjt6192j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wtxrlomyxujrjt6192j.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Time base (tick generator)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates a clean 1 Hz (or 100 Hz) “tick” from the FPGA system clock (e.g., 50 MHz / 100 MHz).&lt;/li&gt;
&lt;li&gt;This tick drives seconds/minutes/hours counters.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. Timekeeping counters + display driver&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Counters update time on each tick.&lt;/li&gt;
&lt;li&gt;Display driver (7-segment / LCD / VGA) continuously refreshes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To “pause the clock” with a button, the safest approach is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best practice: freeze timekeeping, not the whole FPGA clock&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep the FPGA system clock running normally (display scanning still works).&lt;/li&gt;
&lt;li&gt;Pause only the time update by using a run enable (run=1) / pause (run=0) flag.&lt;/li&gt;
&lt;li&gt;When paused, you stop consuming the 1 Hz tick (or stop incrementing counters).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You avoid glitchy clock gating.&lt;/li&gt;
&lt;li&gt;Timing closure stays clean.&lt;/li&gt;
&lt;li&gt;Display remains stable and readable.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2) Button theory: why you must condition button signals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A push button is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Asynchronous to the FPGA clock → can cause metastability&lt;/li&gt;
&lt;li&gt;Bouncy → a single press can generate many transitions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the standard chain is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;2-FF synchronizer (bring button into clk domain)&lt;/li&gt;
&lt;li&gt;Debounce &lt;a href="https://www.onzuu.com/category/filters" rel="noopener noreferrer"&gt;filter&lt;/a&gt; (counter or shift register)&lt;/li&gt;
&lt;li&gt;Edge detect (make a one-clock “pressed” pulse)&lt;/li&gt;
&lt;li&gt;Toggle run flag (run &amp;lt;= ~run on each press)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This ensures one press = one toggle, reliably.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3) Architecture for a pauseable FPGA digital clock&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Signals&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;tick_1hz_pulse — one-cycle pulse each second (generated from sysclk)&lt;/li&gt;
&lt;li&gt;run — 1 = running, 0 = paused&lt;/li&gt;
&lt;li&gt;sec, min, hour counters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Update rule&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If run==1 and tick_1hz_pulse==1 → increment time&lt;/li&gt;
&lt;li&gt;Else → hold time steady&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Display rule&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display driver runs continuously (always refresh)&lt;/li&gt;
&lt;li&gt;It reads sec/min/hour and shows them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4) Real example (Artix-7 FPGA digital clock paused by a button)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Example target hardware&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FPGA family: Xilinx &lt;a href="https://www.vemeko.com/artix-7-fpga/" rel="noopener noreferrer"&gt;Artix-7&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Typical dev board: Basys 3 (&lt;a href="https://www.ampheo.com/search/XC7A35T" rel="noopener noreferrer"&gt;XC7A35T&lt;/a&gt;) or Nexys A7 (&lt;a href="https://www.ampheo.com/search/XC7A100T" rel="noopener noreferrer"&gt;XC7A100T&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;System clock: 100 MHz (common on these boards)&lt;/li&gt;
&lt;li&gt;Inputs: btn_pause&lt;/li&gt;
&lt;li&gt;Outputs: 7-segment display (HH:MM) or LEDs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is a Verilog reference design showing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Button conditioning&lt;/li&gt;
&lt;li&gt;1 Hz tick generator&lt;/li&gt;
&lt;li&gt;Time counters (HH:MM:SS internally)&lt;/li&gt;
&lt;li&gt;Pause via run enable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;A) Button conditioner (sync + debounce + press pulse)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module button_conditioner #(
    parameter integer CLK_HZ = 100_000_000,
    parameter integer DEBOUNCE_MS = 20
)(
    input  wire clk,
    input  wire rst,
    input  wire btn_async,
    output wire pressed_pulse
);
    // 1) Synchronize
    reg [1:0] sync;
    always @(posedge clk) begin
        if (rst) sync &amp;lt;= 2'b00;
        else     sync &amp;lt;= {sync[0], btn_async};
    end
    wire btn_sync = sync[1];

    // 2) Debounce
    localparam integer COUNT_MAX = (CLK_HZ/1000)*DEBOUNCE_MS;
    reg [$clog2(COUNT_MAX+1)-1:0] cnt;
    reg btn_stable;

    always @(posedge clk) begin
        if (rst) begin
            cnt        &amp;lt;= 0;
            btn_stable &amp;lt;= 1'b0;
        end else begin
            if (btn_sync == btn_stable) begin
                cnt &amp;lt;= 0;
            end else begin
                if (cnt == COUNT_MAX[$clog2(COUNT_MAX+1)-1:0]) begin
                    btn_stable &amp;lt;= btn_sync;
                    cnt &amp;lt;= 0;
                end else begin
                    cnt &amp;lt;= cnt + 1'b1;
                end
            end
        end
    end

    // 3) Rising-edge detect
    reg btn_d;
    always @(posedge clk) begin
        if (rst) btn_d &amp;lt;= 1'b0;
        else     btn_d &amp;lt;= btn_stable;
    end
    assign pressed_pulse = btn_stable &amp;amp; ~btn_d;
endmodule
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;B) 1 Hz tick generator (from 100 MHz)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module tick_1hz #(
    parameter integer CLK_HZ = 100_000_000
)(
    input  wire clk,
    input  wire rst,
    output reg  tick_pulse
);
    localparam integer DIV = CLK_HZ; // 100M cycles -&amp;gt; 1 second
    reg [$clog2(DIV)-1:0] c;

    always @(posedge clk) begin
        if (rst) begin
            c &amp;lt;= 0;
            tick_pulse &amp;lt;= 1'b0;
        end else begin
            tick_pulse &amp;lt;= 1'b0;
            if (c == DIV-1) begin
                c &amp;lt;= 0;
                tick_pulse &amp;lt;= 1'b1; // one-cycle tick
            end else begin
                c &amp;lt;= c + 1'b1;
            end
        end
    end
endmodule
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;C) Digital clock core with pause (HH:MM:SS)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module digital_clock_pause (
    input  wire clk,          // 100 MHz
    input  wire rst,
    input  wire btn_pause_async,
    output reg  run_led,        // shows running/paused
    output reg [5:0] sec,
    output reg [5:0] min,
    output reg [4:0] hour
);
    wire pause_press;
    button_conditioner #(.CLK_HZ(100_000_000), .DEBOUNCE_MS(20))
    u_btn (.clk(clk), .rst(rst), .btn_async(btn_pause_async), .pressed_pulse(pause_press));

    // run flag toggles on each press
    reg run;
    always @(posedge clk) begin
        if (rst) run &amp;lt;= 1'b1;
        else if (pause_press) run &amp;lt;= ~run;
    end

    always @(posedge clk) begin
        if (rst) run_led &amp;lt;= 1'b1;
        else     run_led &amp;lt;= run;
    end

    wire tick_1s;
    tick_1hz #(.CLK_HZ(100_000_000)) u_tick (.clk(clk), .rst(rst), .tick_pulse(tick_1s));

    // Timekeeping: only updates when run==1 AND tick arrives
    always @(posedge clk) begin
        if (rst) begin
            sec  &amp;lt;= 0;
            min  &amp;lt;= 0;
            hour &amp;lt;= 0;
        end else if (run &amp;amp;&amp;amp; tick_1s) begin
            if (sec == 59) begin
                sec &amp;lt;= 0;
                if (min == 59) begin
                    min &amp;lt;= 0;
                    if (hour == 23) hour &amp;lt;= 0;
                    else            hour &amp;lt;= hour + 1'b1;
                end else begin
                    min &amp;lt;= min + 1'b1;
                end
            end else begin
                sec &amp;lt;= sec + 1'b1;
            end
        end
        // else paused: hold sec/min/hour
    end
endmodule
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How “pause” works here&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The 1 Hz tick keeps being generated.&lt;/li&gt;
&lt;li&gt;When paused, the counters simply ignore the tick.&lt;/li&gt;
&lt;li&gt;Your display logic can keep refreshing uninterrupted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5) How to connect this to a 7-segment display (concept)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On boards like Basys 3, the 7-segment is multiplexed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You run a scan timer (e.g., 1 kHz–10 kHz)&lt;/li&gt;
&lt;li&gt;Cycle through digits and drive segment lines&lt;/li&gt;
&lt;li&gt;Convert hour/min/sec to BCD digits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Important: don’t pause the scan timer, only pause timekeeping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6) Practical model examples (real FPGA targets)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Xilinx examples (common)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Basys 3 (XC7A35T, 100 MHz clock) — ideal for button + 7-seg digital clock demos&lt;/li&gt;
&lt;li&gt;Nexys A7 (&lt;a href="https://www.ampheoelec.de/search/XC7A100T" rel="noopener noreferrer"&gt;XC7A100T&lt;/a&gt;, 100 MHz clock) — similar approach, more resources&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Intel examples&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;DE10-Lite (&lt;a href="https://www.vemeko.com/max-10-cplds/" rel="noopener noreferrer"&gt;MAX 10&lt;/a&gt;) — same RTL idea (sync/debounce + run enable), just different pin constraints.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7) Common mistakes (and quick fixes)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Mistake: Button causes multiple pause toggles&lt;br&gt;
Fix: Debounce + edge detect (as above)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mistake: Trying to gate the clock with the button&lt;br&gt;
Fix: Use run enable on counters instead&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mistake: Display goes blank when paused&lt;br&gt;
Fix: Keep display scan logic always running&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mistake: Multi-clock designs pause only one domain&lt;br&gt;
Fix: Synchronize run into each clock domain (or centralize timekeeping to one domain)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>fpga</category>
      <category>digitalclock</category>
      <category>artix7</category>
      <category>xc7a35t</category>
    </item>
    <item>
      <title>How to Use printf() on STM32 via Serial (UART)?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Thu, 22 Jan 2026 10:30:44 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-use-printf-on-stm32-via-serial-uart-40k9</link>
      <guid>https://dev.to/carolineee/how-to-use-printf-on-stm32-via-serial-uart-40k9</guid>
      <description>&lt;p&gt;Below is a practical, step-by-step guide to using printf() on an &lt;a href="https://www.ampheo.com/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt; via a serial (UART) wire, written for real projects (CubeIDE / HAL style).&lt;br&gt;
This is the most common and reliable debugging method on STM32.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzoov2m98xe5yxoe0mgs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzoov2m98xe5yxoe0mgs.jpg" alt=" " width="800" height="393"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Theory: How printf() Works on STM32&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;printf() does not magically know where to print.&lt;br&gt;
On STM32, you must redirect the standard output (stdout) to a UART peripheral.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data flow&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;printf()
  ↓
_putchar() / _write()
  ↓
UART TX register
  ↓
USB-UART adapter
  ↓
PC serial terminal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the core steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Initialize UART&lt;/li&gt;
&lt;li&gt;Retarget printf() to UART&lt;/li&gt;
&lt;li&gt;Connect UART TX to a PC&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;2. Hardware Setup (Serial Wire)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2.1 Required Hardware&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;STM32 board (e.g. &lt;a href="https://www.onzuu.com/search/Nucleo" rel="noopener noreferrer"&gt;Nucleo&lt;/a&gt;, Black Pill, Blue Pill)&lt;/li&gt;
&lt;li&gt;USB-to-UART adapter (3.3 V logic!)&lt;/li&gt;
&lt;li&gt;PC with serial terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2.2 Typical Wiring&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;USB-UART&lt;/th&gt;
&lt;th&gt;STM32&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;TX&lt;/td&gt;
&lt;td&gt;RX (e.g. PA10 for USART1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RX&lt;/td&gt;
&lt;td&gt;TX (e.g. PA9 for USART1)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;td&gt;GND&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Do NOT connect 5 V to STM32 UART pins&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Configure UART (STM32CubeIDE / HAL)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Example: USART1 @ 115200 baud&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mode: Asynchronous&lt;/li&gt;
&lt;li&gt;Word length: 8 bits&lt;/li&gt;
&lt;li&gt;Parity: None&lt;/li&gt;
&lt;li&gt;Stop bits: 1&lt;/li&gt;
&lt;li&gt;Flow control: None&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CubeIDE will generate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UART_HandleTypeDef huart1;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Retarget printf() to UART (HAL)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;4.1 Add this code (GCC / CubeIDE)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In main.c or a separate retarget.c:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#include &amp;lt;stdio.h&amp;gt;
#include "stm32f4xx_hal.h"

extern UART_HandleTypeDef huart1;

int _write(int file, char *ptr, int len)
{
    HAL_UART_Transmit(&amp;amp;huart1, (uint8_t *)ptr, len, HAL_MAX_DELAY);
    return len;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This redirects all printf() output to USART1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.2 Use printf() normally&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;printf("Hello STM32!\r\n");
printf("ADC value = %d\r\n", adc_value);
printf("Voltage = %.2f V\r\n", voltage);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. PC Side: Serial Terminal&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use any terminal:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PuTTY&lt;/li&gt;
&lt;li&gt;Tera Term&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ampheo.com/c/development-board-arduino" rel="noopener noreferrer"&gt;Arduino&lt;/a&gt; Serial Monitor&lt;/li&gt;
&lt;li&gt;minicom (Linux)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Settings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Baud rate: 115200&lt;/li&gt;
&lt;li&gt;Data bits: 8&lt;/li&gt;
&lt;li&gt;Parity: None&lt;/li&gt;
&lt;li&gt;Stop bits: 1&lt;/li&gt;
&lt;li&gt;Line ending: CR+LF recommended&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6. Common Problems &amp;amp; Fixes&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Nothing prints&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TX/RX swapped&lt;/li&gt;
&lt;li&gt;Wrong UART instance&lt;/li&gt;
&lt;li&gt;Baud rate mismatch&lt;/li&gt;
&lt;li&gt;Forgot \r\n&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output is garbled&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wrong baud rate&lt;/li&gt;
&lt;li&gt;Clock configuration incorrect&lt;/li&gt;
&lt;li&gt;USB-UART is 5 V logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;printf() causes huge flash usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;printf() pulls in heavy formatting code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable newlib-nano&lt;/li&gt;
&lt;li&gt;Avoid floats if possible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CubeIDE:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Project → Properties → C/C++ Build → Settings
→ MCU Settings → Use newlib-nano
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7. Lightweight Alternatives (Recommended for Production)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;7.1 sprintf() + HAL_UART_Transmit()&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;char buf[64];
sprintf(buf, "Temp=%d\r\n", temp);
HAL_UART_Transmit(&amp;amp;huart1, (uint8_t*)buf, strlen(buf), 100);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;7.2 puts() (very small footprint)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;puts("System started\r\n");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;8. Performance Tips (Important!)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;printf() is blocking&lt;/li&gt;
&lt;li&gt;Avoid calling it in:

&lt;ul&gt;
&lt;li&gt;Interrupts&lt;/li&gt;
&lt;li&gt;High-frequency loops&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Use DMA for high-speed logging&lt;/li&gt;

&lt;li&gt;Throttle output frequency&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9. Example: STM32 Black Pill (&lt;a href="https://www.ampheo.com/search/STM32F401" rel="noopener noreferrer"&gt;STM32F401&lt;/a&gt;/F411)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UART&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;USART1&lt;/li&gt;
&lt;li&gt;TX = PA9&lt;/li&gt;
&lt;li&gt;RX = PA10&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;printf("Black Pill ready\r\n");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Terminal&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;115200 baud&lt;/li&gt;
&lt;li&gt;CRLF&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Key Engineering Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://www.ampheoelec.de/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt;, printf() is a debugging tool, not a logging system.&lt;br&gt;
Use it wisely, retarget it properly, and never trust it inside interrupts.&lt;/p&gt;

</description>
      <category>stm32</category>
      <category>printf</category>
      <category>serial</category>
      <category>nucleo</category>
    </item>
    <item>
      <title>How to Overclock a Raspberry Pi?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Wed, 21 Jan 2026 09:28:26 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-overclock-a-raspberry-pi-go0</link>
      <guid>https://dev.to/carolineee/how-to-overclock-a-raspberry-pi-go0</guid>
      <description>&lt;p&gt;Overclocking a &lt;a href="https://www.ampheo.com/c/raspberry-pi/raspberry-pi-boards" rel="noopener noreferrer"&gt;Raspberry Pi&lt;/a&gt; means running the CPU, GPU, and memory at higher frequencies than default to gain extra performance. It’s popular for media centers, light servers, emulation, and development work—but it must be done carefully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou6ysx7y3qneph6wvf92.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou6ysx7y3qneph6wvf92.jpg" alt=" " width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a step-by-step, engineering-oriented guide, including limits, cooling, and recovery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Before You Overclock (Very Important)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Supported Models&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Overclocking works best on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raspberry Pi 3B / 3B+&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.ampheo.com/search/Raspberry%20Pi%204%20Model%20B" rel="noopener noreferrer"&gt;Raspberry Pi 4 Model B&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ampheo.com/search/Raspberry%20Pi%205" rel="noopener noreferrer"&gt;Raspberry Pi 5&lt;/a&gt; (more advanced cooling required)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What You Need&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Proper cooling (heatsink + fan strongly recommended)&lt;/li&gt;
&lt;li&gt;Stable &lt;a href="https://www.onzuu.com/category/external-internal-power-supply" rel="noopener noreferrer"&gt;power supply&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Pi 4: ≥ 5V / 3A&lt;/li&gt;
&lt;li&gt;Pi 5: ≥ 5V / 5A&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Updated OS
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;2. Check Current Frequencies &amp;amp; Temperature&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;CPU Frequency&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcgencmd measure_clock arm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Temperature&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcgencmd measure_temp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Throttling starts at 80°C.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Overclocking Method (config.txt)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Raspberry Pi overclocking is done via:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/boot/config.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Open the file&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /boot/config.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Safe Overclock Settings (By Model)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Raspberry Pi 4 (Recommended Starting Point)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arm_freq=1800
gpu_freq=600
over_voltage=4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;More Aggressive (Requires Good Cooling)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arm_freq=2000
gpu_freq=750
over_voltage=6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CPU: 1500 MHz&lt;/li&gt;
&lt;li&gt;GPU: 500 MHz&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Raspberry Pi 3B+&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arm_freq=1400
gpu_freq=400
over_voltage=2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Raspberry Pi 5 (Advanced)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arm_freq=2600
over_voltage=4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.ampheoelec.de/search/Pi%205" rel="noopener noreferrer"&gt;Pi 5&lt;/a&gt; must have an active cooler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Save &amp;amp; Reboot&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After reboot, verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcgencmd measure_clock arm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;6. Stress Test (Do NOT Skip)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Install stress tool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install stress -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run CPU stress test:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;stress --cpu 4 --timeout 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Monitor temperature:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;watch -n 1 vcgencmd measure_temp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sudden reboots&lt;/li&gt;
&lt;li&gt;throttling messages&lt;/li&gt;
&lt;li&gt;temperature &amp;gt; 80°C&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;→ Reduce frequency or improve cooling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Throttling &amp;amp; Stability Check&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check throttling flags:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcgencmd get_throttled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;0x0 → No throttling&lt;/li&gt;
&lt;li&gt;Other values → Power or thermal issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8. Cooling Strategies (Critical for Engineers)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cooling Method&lt;/th&gt;
&lt;th&gt;Suitable For&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Passive heatsink&lt;/td&gt;
&lt;td&gt;Mild overclock&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Heatsink + fan&lt;/td&gt;
&lt;td&gt;Most setups&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Active cooler (Pi 5)&lt;/td&gt;
&lt;td&gt;Heavy overclock&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Metal case (heat spreader)&lt;/td&gt;
&lt;td&gt;Silent builds&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Cooling matters more than voltage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Power Stability Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use short, thick USB-C cables&lt;/li&gt;
&lt;li&gt;Avoid cheap power adapters&lt;/li&gt;
&lt;li&gt;Check undervoltage warning:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vcgencmd get_throttled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;10. How to Recover from a Failed Overclock&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your Pi won’t boot:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Method A: Edit SD Card on Another PC&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Insert SD card into another computer&lt;/li&gt;
&lt;li&gt;Open config.txt&lt;/li&gt;
&lt;li&gt;Remove overclock lines&lt;/li&gt;
&lt;li&gt;Save and reinsert&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Method B: Safe Mode (Pi 4/5)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hold SHIFT during boot (HDMI connected).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;11. Does Overclocking Void Warranty?&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Old models: yes (historically)&lt;/li&gt;
&lt;li&gt;Newer models: Raspberry Pi firmware no longer permanently flags overclocking
Still:&lt;/li&gt;
&lt;li&gt;Physical damage from heat not covered&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;12. When Overclocking Makes Sense&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;✅ Emulation&lt;br&gt;
✅ Media encoding&lt;br&gt;
✅ Compiling code&lt;br&gt;
✅ Light servers&lt;/p&gt;

&lt;p&gt;❌ 24/7 mission-critical systems&lt;br&gt;
❌ High-temperature environments&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended Safe Rule of Thumb&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Moderate frequency + excellent cooling + stable power&lt;br&gt;
beats extreme overclocking every time.&lt;/p&gt;

</description>
      <category>raspberrypi</category>
      <category>overclock</category>
      <category>raspberrypi4modelb</category>
      <category>raspberrypi5</category>
    </item>
    <item>
      <title>How to turn on an Arduino LED in Tinkercad?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Tue, 20 Jan 2026 09:14:24 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-turn-on-an-arduino-led-in-tinkercad-7nd</link>
      <guid>https://dev.to/carolineee/how-to-turn-on-an-arduino-led-in-tinkercad-7nd</guid>
      <description>&lt;p&gt;Here’s the simplest, step-by-step way to turn on an &lt;a href="https://www.ampheo.com/c/development-board-arduino" rel="noopener noreferrer"&gt;Arduino&lt;/a&gt; LED in Tinkercad, perfect for beginners.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck48wllxfsouf6gnryad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fck48wllxfsouf6gnryad.png" alt=" " width="725" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Open Tinkercad Circuits&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Tinkercad&lt;/li&gt;
&lt;li&gt;Click Circuits&lt;/li&gt;
&lt;li&gt;Click Create new Circuit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You’ll see an empty workspace.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Add Components&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;From the components panel (right side), drag in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.ampheo.com/product/a000046-25542493" rel="noopener noreferrer"&gt;Arduino Uno&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;LED&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/resistors" rel="noopener noreferrer"&gt;Resistor&lt;/a&gt; (220 Ω or 330 Ω is ideal)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Wire the LED Correctly&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LEDs are polarized, so direction matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Correct wiring&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arduino pin 13 → Resistor&lt;/li&gt;
&lt;li&gt;Resistor → LED long leg (Anode +)&lt;/li&gt;
&lt;li&gt;LED short leg (Cathode −) → Arduino GND&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why the resistor?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It limits current and prevents the LED from burning out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Write the Arduino Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click Code → Text and paste this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void setup() {
  pinMode(13, OUTPUT);   // Set pin 13 as output
}

void loop() {
  digitalWrite(13, HIGH); // Turn LED ON
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This turns the LED on continuously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Start the Simulation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Click Start Simulation&lt;/p&gt;

&lt;p&gt;The LED should light up immediately.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Beginner Mistakes (and Fixes)&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;LED doesn’t turn on&lt;/td&gt;
&lt;td&gt;Flip the LED (polarity matters)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LED very dim&lt;/td&gt;
&lt;td&gt;Wrong resistor value (use 220–330 Ω)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nothing happens&lt;/td&gt;
&lt;td&gt;Make sure simulation is running&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wired to wrong pin&lt;/td&gt;
&lt;td&gt;Code and wiring pin numbers must match&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Bonus: Blink the LED (Optional)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Replace loop() with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void loop() {
  digitalWrite(13, HIGH);
  delay(1000);            // 1 second ON
  digitalWrite(13, LOW);
  delay(1000);            // 1 second OFF
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the LED will blink every second.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro Tip (Tinkercad shortcut)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Arduino pin 13 already has a built-in LED.&lt;br&gt;
You can skip all wiring and just run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, HIGH);
}
void loop() {}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tiny LED on the &lt;a href="https://www.ampheoelec.de/c/development-board-arduino" rel="noopener noreferrer"&gt;Arduino board&lt;/a&gt; will turn on.&lt;/p&gt;

</description>
      <category>arduino</category>
      <category>tinkercad</category>
      <category>arduinouno</category>
      <category>led</category>
    </item>
    <item>
      <title>How to simulate microcontroller output with maximum current and high voltage?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Mon, 19 Jan 2026 10:30:03 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-simulate-microcontroller-output-with-maximum-current-and-high-voltage-55im</link>
      <guid>https://dev.to/carolineee/how-to-simulate-microcontroller-output-with-maximum-current-and-high-voltage-55im</guid>
      <description>&lt;p&gt;A &lt;a href="https://www.ampheo.com/c/microcontrollers" rel="noopener noreferrer"&gt;microcontroller&lt;/a&gt; (MCU) pin can’t directly output “maximum current + high voltage.” In theory, an MCU GPIO is a logic-level signal source (3.3 V / 5 V, limited current), and any “high voltage / high current output” is created by an external power stage that the GPIO controls.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjss4bmlh9koppynfa51.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnjss4bmlh9koppynfa51.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What you’re really doing is simulating a “power output” that is commanded by a microcontroller:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCU GPIO (logic) → level shift / gate drive → power switch (&lt;a href="https://www.onzuu.com/category/fets-mosfets" rel="noopener noreferrer"&gt;MOSFET&lt;/a&gt;/&lt;a href="https://www.onzuu.com/category/igbts" rel="noopener noreferrer"&gt;IGBT&lt;/a&gt;/high-side switch) → external HV supply → load&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Below: theory first, then real, concrete part-number examples (no vendor names needed in your final article if you prefer, but I’m using well-known model numbers here so it’s actionable).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Theory: model the MCU output correctly&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1.1 GPIO is not a power source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A GPIO pin behaves roughly like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A voltage source (VDD, e.g., 3.3 V)&lt;/li&gt;
&lt;li&gt;With finite output resistance (so voltage droops as current increases)&lt;/li&gt;
&lt;li&gt;With strict absolute max limits (overcurrent can cause latch-up, permanent damage)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So you should never “maximize” current from the pin. Instead you use it as a control signal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1.2 High voltage and high current come from the external supply&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To simulate an MCU “power output,” you provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HV supply (12 V / 24 V / 48 V / 60–400 V, depending on your target)&lt;/li&gt;
&lt;li&gt;Current capability (amps to tens of amps)&lt;/li&gt;
&lt;li&gt;A switch (MOSFET/IGBT) that connects/disconnects the load&lt;/li&gt;
&lt;li&gt;Protection (flyback &lt;a href="https://www.onzuu.com/category/diodes" rel="noopener noreferrer"&gt;diode&lt;/a&gt;, &lt;a href="https://www.onzuu.com/category/tvs-diodes" rel="noopener noreferrer"&gt;TVS&lt;/a&gt;, current limiting, fusing)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1.3 Two switching topologies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Low-side switching (most common, simplest)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load to +HV&lt;/li&gt;
&lt;li&gt;Switch to ground&lt;/li&gt;
&lt;li&gt;Best for: &lt;a href="https://www.onzuu.com/category/solenoids" rel="noopener noreferrer"&gt;solenoids&lt;/a&gt;, &lt;a href="https://www.onzuu.com/category/motors-actuators-solenoids-and-drivers" rel="noopener noreferrer"&gt;motors&lt;/a&gt;, heaters, LED strips, &lt;a href="https://www.onzuu.com/category/relays" rel="noopener noreferrer"&gt;relays&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;High-side switching (when load must stay at ground)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Switch connects +HV to load&lt;/li&gt;
&lt;li&gt;Best for: automotive-style wiring, grounded loads, “sourcing” outputs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1.4 “Maximum current” is a power-stage problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want “max current simulation,” you control it by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A bench supply current limit (simple)&lt;/li&gt;
&lt;li&gt;A sense &lt;a href="https://www.onzuu.com/category/resistors" rel="noopener noreferrer"&gt;resistor&lt;/a&gt; + current limiter (accurate)&lt;/li&gt;
&lt;li&gt;A high-side/low-side current monitor and firmware control&lt;/li&gt;
&lt;li&gt;An electronic fuse / hot-swap controller for safety&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;1.5 If you need analog high-voltage outputs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For 0–10 V: PWM/&lt;a href="https://www.onzuu.com/category/digital-to-analog-converters" rel="noopener noreferrer"&gt;DAC&lt;/a&gt; → op-amp (powered from higher rail) → 0–10 V&lt;/li&gt;
&lt;li&gt;For 4–20 mA: PWM/DAC → current-loop driver → loop supply (often 24 V)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2) Practical simulation recipes (what engineers actually do)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Recipe A — High-voltage ON/OFF (DC loads): MOSFET low-side&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: MCU pin “simulates” switching a 24 V load at several amps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Blocks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MCU GPIO → gate resistor + pulldown&lt;/li&gt;
&lt;li&gt;Logic-level N-MOSFET (or gate driver + MOSFET for bigger loads)&lt;/li&gt;
&lt;li&gt;Flyback diode if inductive&lt;/li&gt;
&lt;li&gt;TVS on supply for transient suppression&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why it works: MCU only charges/discharges a gate (microamps average); the MOSFET and supply deliver amps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recipe B — High-side “sourcing” output (automotive/industrial)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: Simulate a PLC/ECU output that sources 24 V to a load.&lt;/p&gt;

&lt;p&gt;Use either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A high-side switch IC (easiest + protections)&lt;/li&gt;
&lt;li&gt;Or P-MOSFET + driver (good for moderate voltage/current)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Recipe C — High voltage (tens to hundreds of volts): isolated gate drive + MOSFET/IGBT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: Simulate an MCU controlling a 100–400 V power stage (e.g., DC bus).&lt;/p&gt;

&lt;p&gt;You typically need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Isolation (digital isolator or optocoupler)&lt;/li&gt;
&lt;li&gt;Gate driver (often isolated)&lt;/li&gt;
&lt;li&gt;MOSFET/IGBT with correct voltage/current ratings&lt;/li&gt;
&lt;li&gt;Snubbers/TVS, creepage/clearance rules, and safe probing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3) Real-world example builds (with actual model numbers)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Example 1: “STM32 outputs 24 V / 5 A ON/OFF” (industrial load)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCU (logic source)&lt;/strong&gt;: &lt;a href="https://www.ampheo.com/product/stm32f103c8t6-131876" rel="noopener noreferrer"&gt;STM32F103C8T6&lt;/a&gt; (3.3 V GPIO)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Power stage (low-side):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MOSFET: &lt;a href="https://www.onzuu.com/search/IRLZ44N" rel="noopener noreferrer"&gt;IRLZ44N&lt;/a&gt; (easy-to-find logic-level MOSFET; fine for learning/low-frequency switching)&lt;/li&gt;
&lt;li&gt;Gate resistor: 33 Ω&lt;/li&gt;
&lt;li&gt;Gate pulldown: 100 kΩ&lt;/li&gt;
&lt;li&gt;Flyback diode (inductive loads): &lt;a href="https://www.onzuu.com/search/SS54" rel="noopener noreferrer"&gt;SS54&lt;/a&gt; or &lt;a href="https://www.onzuu.com/search/1N5822" rel="noopener noreferrer"&gt;1N5822&lt;/a&gt; (Schottky, choose current/voltage margin)&lt;/li&gt;
&lt;li&gt;Supply protection: &lt;a href="https://www.onzuu.com/search/SMBJ33A" rel="noopener noreferrer"&gt;SMBJ33A&lt;/a&gt; TVS (for 24 V-ish rails; pick TVS rating based on your system)&lt;/li&gt;
&lt;li&gt;Add a fuse on the 24 V input&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to “simulate maximum current” safely:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use a bench supply at 24 V&lt;/li&gt;
&lt;li&gt;Set current limit to 0.5 A first, verify switching&lt;/li&gt;
&lt;li&gt;Increase limit gradually to your target (e.g., 5 A)&lt;/li&gt;
&lt;li&gt;Start with a dummy load: a power resistor (e.g., 4.7 Ω / 50 W) or an electronic load&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Notes:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;IRLZ44N is not a “modern best-in-class” MOSFET, but it’s a classic demonstration part.&lt;/li&gt;
&lt;li&gt;For faster PWM, higher efficiency, or tight thermal limits, you’d select a newer MOSFET with lower RDS(on) at VGS=2.5–4.5 V.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example 2: “Arduino-like GPIO simulates a 12 V relay driver”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;MCU: *&lt;/em&gt;&lt;a href="https://www.ampheo.com/search/ATmega328P" rel="noopener noreferrer"&gt;ATmega328P&lt;/a&gt; (5 V GPIO)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Driver stage (because relay coils are inductive):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/transistors" rel="noopener noreferrer"&gt;Transistor&lt;/a&gt;: &lt;a href="https://www.onzuu.com/search/2N2222" rel="noopener noreferrer"&gt;2N2222&lt;/a&gt; (or similar BJT) or a small logic MOSFET like &lt;a href="https://www.onzuu.com/product/alpha-and-omega-semiconductor-inc-ao3400a-5190082" rel="noopener noreferrer"&gt;AO3400A&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Flyback diode: &lt;a href="https://www.onzuu.com/search/1N4148" rel="noopener noreferrer"&gt;1N4148&lt;/a&gt; (small relay) or &lt;a href="https://www.onzuu.com/search/1N4007" rel="noopener noreferrer"&gt;1N4007&lt;/a&gt; (general) / &lt;a href="https://www.onzuu.com/search/SS14" rel="noopener noreferrer"&gt;SS14&lt;/a&gt; (fast Schottky)&lt;/li&gt;
&lt;li&gt;Base/gate resistor: BJT base ~1 kΩ; MOSFET gate ~33 Ω&lt;/li&gt;
&lt;li&gt;Pull-down: 100 kΩ (MOSFET)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why this is a good “simulation”:&lt;/strong&gt;&lt;br&gt;
It mimics what a real MCU-controlled output stage does: logic controls a switch, and the external supply drives the coil.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 3: “3.3 V MCU simulates a 24 V high-side output with protections”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCU:&lt;/strong&gt; &lt;a href="https://www.ampheo.com/search/STM32G0" rel="noopener noreferrer"&gt;STM32G0&lt;/a&gt; series (3.3 V GPIO)&lt;/p&gt;

&lt;p&gt;High-side switch IC: &lt;a href="https://www.onzuu.com/search/BTS500" rel="noopener noreferrer"&gt;BTS500xx&lt;/a&gt; / &lt;a href="https://www.onzuu.com/search/VNQ" rel="noopener noreferrer"&gt;VNQxxx&lt;/a&gt;-style high-side switch families (automotive protected high-side switches)&lt;/p&gt;

&lt;p&gt;These parts typically include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;current limit&lt;/li&gt;
&lt;li&gt;thermal shutdown&lt;/li&gt;
&lt;li&gt;short-circuit protection&lt;/li&gt;
&lt;li&gt;diagnostic output (optional)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to test:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPIO drives the enable/input&lt;/li&gt;
&lt;li&gt;Put load between output and ground&lt;/li&gt;
&lt;li&gt;Use supply current limit + fuse for safety&lt;/li&gt;
&lt;li&gt;Scope the output during switching; watch inrush&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Exact suffix depends on your current rating/channel count; choose according to your “max current” target.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example 4: “MCU simulates high voltage (e.g., 200–400 V) switching”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MCU:&lt;/strong&gt; &lt;a href="https://www.ampheo.com/search/STM32F4" rel="noopener noreferrer"&gt;STM32F4&lt;/a&gt; series (timers for PWM)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Isolation + driver:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Digital isolator: ADuM1100 (or similar)&lt;/li&gt;
&lt;li&gt;Isolated gate driver: &lt;a href="https://www.onzuu.com/search/ACPL-332J" rel="noopener noreferrer"&gt;ACPL-332J&lt;/a&gt; (optocoupler driver) or transformer/isolated driver module&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Power switch:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MOSFET: choose 600 V class for 400 V bus (part depends heavily on current and switching frequency)&lt;/li&gt;
&lt;li&gt;Add RC snubber + TVS as needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Safety reality check:&lt;/strong&gt;&lt;br&gt;
At these voltages, simulation becomes a high-energy power electronics build. Use isolation, creepage/clearance, proper probing, and staged bring-up.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4) Measurement and “simulation credibility”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To claim you are simulating an MCU “max current / high voltage output,” you should measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load current (shunt + amplifier, or a Hall sensor)&lt;/li&gt;
&lt;li&gt;MOSFET temperature (IR camera / thermocouple)&lt;/li&gt;
&lt;li&gt;Switching waveform (VDS/VCE, gate voltage, ringing)&lt;/li&gt;
&lt;li&gt;Supply dips and transients&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Useful current-sense examples (real parts)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;High-side current monitor: &lt;a href="https://www.onzuu.com/search/INA219" rel="noopener noreferrer"&gt;INA219&lt;/a&gt; (simple I²C), &lt;a href="https://www.onzuu.com/search/INA226" rel="noopener noreferrer"&gt;INA226&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Hall sensor (isolated current): &lt;a href="https://www.ampheo.com/search/ACS712" rel="noopener noreferrer"&gt;ACS712&lt;/a&gt; / &lt;a href="https://www.ampheo.com/search/ACS758" rel="noopener noreferrer"&gt;ACS758&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5) A simple selection checklist (so you don’t smoke boards)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Define Vload (12/24/48/… V) and Iload (A).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pick topology:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;low-side MOSFET (default)&lt;/li&gt;
&lt;li&gt;high-side switch (if needed)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Choose switch ratings:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;VDS ≥ 2× supply (more if inductive/noisy)&lt;/li&gt;
&lt;li&gt;Id ≥ load current with thermal margin&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Add protections:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;flyback diode (inductive)&lt;/li&gt;
&lt;li&gt;fuse&lt;/li&gt;
&lt;li&gt;TVS&lt;/li&gt;
&lt;li&gt;current limit (bench supply or eFuse)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Validate with a dummy load, then real load.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>microcontroller</category>
      <category>simulate</category>
      <category>stm32f103c8t6</category>
      <category>atmega328p</category>
    </item>
    <item>
      <title>How to use FPGA to implement PID?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Wed, 14 Jan 2026 08:45:56 +0000</pubDate>
      <link>https://dev.to/carolineee/how-to-use-fpga-to-implement-pid-7kg</link>
      <guid>https://dev.to/carolineee/how-to-use-fpga-to-implement-pid-7kg</guid>
      <description>&lt;p&gt;Implementing a PID on an &lt;a href="https://www.ampheo.com/c/fpgas-field-programmable-gate-array" rel="noopener noreferrer"&gt;FPGA&lt;/a&gt; is very doable—and usually better than a &lt;a href="https://www.ampheo.com/c/microcontrollers" rel="noopener noreferrer"&gt;microcontroller&lt;/a&gt; when you need high sample rate, low jitter, and deterministic latency. The key is to implement a discrete-time PID using fixed-point math, with proper saturation/anti-windup, and a clean sample tick.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngqs2ulgazz6xz906dkk.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fngqs2ulgazz6xz906dkk.jpeg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is a practical, FPGA-friendly way to do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Pick a discrete PID form that’s FPGA-friendly&lt;/strong&gt;&lt;br&gt;
Standard (position) form&lt;br&gt;
​&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fednmygpxt5e4zjd4br47.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fednmygpxt5e4zjd4br47.png" alt=" " width="479" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Works, but the integral sum can grow large and you’ll spend effort managing overflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FPGA-friendly (incremental / velocity) form (recommended)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This form reduces accumulator range issues and is easy to pipeline:&lt;/p&gt;

&lt;p&gt;𝑢[𝑛]=𝑢[𝑛−1]+𝐴(𝑒[𝑛]−𝑒[𝑛−1])+𝐵𝑒[𝑛]+𝐶(𝑒[𝑛]−2𝑒[𝑛−1]+𝑒[𝑛−2])&lt;/p&gt;

&lt;p&gt;Where typically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;𝐴=𝐾𝑝&lt;/li&gt;
&lt;li&gt;𝐵=𝐾𝑖𝑇𝑠&lt;/li&gt;
&lt;li&gt;𝐶=𝐾𝑑/𝑇𝑠&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why it’s great on FPGA&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses only a few differences + multiplies + adds each sample&lt;/li&gt;
&lt;li&gt;One state register for output (u[n-1]) + small history (e[n-1], e[n-2])&lt;/li&gt;
&lt;li&gt;Easy saturation at the end&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2) Build the FPGA PID datapath (what blocks you implement)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At each sample tick:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Error&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;e = setpoint - measurement&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Differences&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;de = e - e1&lt;/li&gt;
&lt;li&gt;dde = e - 2*e1 + e2&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Multiply&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;p_term = A * de&lt;/li&gt;
&lt;li&gt;i_term = B * e&lt;/li&gt;
&lt;li&gt;d_term = C * dde&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Accumulate output&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;u = u_prev + p_term + i_term + d_term&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Saturation + anti-windup&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Clamp u to actuator limits&lt;/li&gt;
&lt;li&gt;If saturated, optionally stop/limit integral contribution (details below)&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Update history registers&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;e2 &amp;lt;= e1&lt;/li&gt;
&lt;li&gt;e1 &amp;lt;= e&lt;/li&gt;
&lt;li&gt;u_prev &amp;lt;= u_sat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3) Fixed-point design (the “make it work in hardware” part)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Choose a Q format&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Example starting point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Error e: signed 16-bit&lt;/li&gt;
&lt;li&gt;Coefficients A,B,C: signed 18-bit (fits nicely with DSP slices)&lt;/li&gt;
&lt;li&gt;Internal products: 34–36-bit&lt;/li&gt;
&lt;li&gt;Accumulator/output: 32–40-bit, then truncate/round to actuator width&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Typical formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Signals: Q1.15 (16-bit signed)&lt;/li&gt;
&lt;li&gt;Coeffs: Q3.14 or Q5.12 depending on your gain range&lt;/li&gt;
&lt;li&gt;Accumulator: keep extra headroom: Q8.24 or similar&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Scaling workflow (practical)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Decide actuator output range (e.g., PWM duty 0…65535)&lt;/li&gt;
&lt;li&gt;Decide measurement and setpoint scaling (&lt;a href="https://www.onzuu.com/category/analog-to-digital-converters" rel="noopener noreferrer"&gt;ADC&lt;/a&gt; counts? physical units scaled?)&lt;/li&gt;
&lt;li&gt;Pick Q formats so products don’t overflow at worst-case error&lt;/li&gt;
&lt;li&gt;Add:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;rounding when shifting back down&lt;/li&gt;
&lt;li&gt;saturation after add/accumulate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4) Sample tick and determinism&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Your PID should update at a fixed rate 𝑓𝑠=1/𝑇𝑠.&lt;/p&gt;

&lt;p&gt;Common FPGA approach:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A hardware timer/counter generates pid_tick every Ts&lt;/li&gt;
&lt;li&gt;On pid_tick, latch inputs (setpoint, measurement) and run the PID pipeline&lt;/li&gt;
&lt;li&gt;Pipeline latency might be a few FPGA clocks, but the update interval stays exact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tip: If your ADC sample rate is the master clock, use “ADC data valid” as pid_tick.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) Derivative filtering (important in real systems)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Raw derivative amplifies noise. A common FPGA-safe solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compute derivative on measurement instead of error, or&lt;/li&gt;
&lt;li&gt;Apply a 1st-order low-pass to derivative:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;𝑑𝑓[𝑛]=𝑑𝑓[𝑛−1]+𝛼(𝑑[𝑛]−𝑑𝑓[𝑛−1])&lt;/p&gt;

&lt;p&gt;That’s just an extra multiply + accumulator (very FPGA-friendly).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6) Anti-windup (don’t let the integrator explode)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even with incremental form, the “I contribution” can drive output into saturation and keep integrating.&lt;/p&gt;

&lt;p&gt;Simple anti-windup options:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option A: Conditional integration (easy)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only apply the I term when not saturated or when error would move output back toward range.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If u saturated high and e &amp;gt; 0 → skip I&lt;/li&gt;
&lt;li&gt;If u saturated low and e &amp;lt; 0 → skip I&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Option B: Back-calculation (more control)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Adjust integrator based on saturation difference:&lt;/p&gt;

&lt;p&gt;𝐼←𝐼+𝐾𝑎𝑤(𝑢𝑠𝑎𝑡−𝑢)&lt;/p&gt;

&lt;p&gt;(also &lt;a href="https://www.ampheoelec.de/c/fpgas-field-programmable-gate-array" rel="noopener noreferrer"&gt;FPGA&lt;/a&gt;-friendly, one extra multiply)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7) Resource mapping tips (&lt;a href="https://www.vemeko.com/product/#xilinx" rel="noopener noreferrer"&gt;Xilinx&lt;/a&gt;/&lt;a href="https://www.ampheo.com/manufacturer/intel" rel="noopener noreferrer"&gt;Intel FPGAs&lt;/a&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;a href="https://www.ampheo.com/c/dsp-digital-signal-processors" rel="noopener noreferrer"&gt;DSP&lt;/a&gt; slices for the multiplies (3 multiplies for P/I/D, plus optional derivative filter)&lt;/li&gt;
&lt;li&gt;Use pipelining to meet timing:

&lt;ul&gt;
&lt;li&gt;Stage 1: compute e,de,dde&lt;/li&gt;
&lt;li&gt;Stage 2: multiply&lt;/li&gt;
&lt;li&gt;Stage 3: sum + saturate&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;If you need many PID loops (multi-axis), you can:

&lt;ul&gt;
&lt;li&gt;Fully parallel: best performance, more DSP usage&lt;/li&gt;
&lt;li&gt;Time-multiplex: reuse multipliers across channels with scheduling (cheaper DSP)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;8) How PID connects to the outside world on FPGA&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Typical chain:&lt;/p&gt;

&lt;p&gt;ADC / &lt;a href="https://www.ampheo.com/c/sensors" rel="noopener noreferrer"&gt;sensor&lt;/a&gt; capture → scaling → PID → output scaling → PWM / DAC / motor driver&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/motors-actuators-solenoids-and-drivers" rel="noopener noreferrer"&gt;Motor&lt;/a&gt; control: PID output drives PWM duty or current reference&lt;/li&gt;
&lt;li&gt;Temperature control: PID output drives PWM to heater + SSR&lt;/li&gt;
&lt;li&gt;Position control: PID output drives torque/current loop setpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;9) Verification workflow (fast and reliable)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Validate your PID gains in Python/MATLAB (floating point)&lt;/li&gt;
&lt;li&gt;Quantize to fixed point (same Q formats)&lt;/li&gt;
&lt;li&gt;Simulate HDL with a testbench using recorded signals&lt;/li&gt;
&lt;li&gt;Hardware test with step response + logging (ILA/SignalTap)&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>fpga</category>
      <category>pid</category>
      <category>adc</category>
      <category>pwm</category>
    </item>
    <item>
      <title>What do I need to learn to build a robot with Nucleo-F401RE?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Tue, 13 Jan 2026 08:54:16 +0000</pubDate>
      <link>https://dev.to/carolineee/what-do-i-need-to-learn-to-build-a-robot-with-nucleo-f401re-4eg4</link>
      <guid>https://dev.to/carolineee/what-do-i-need-to-learn-to-build-a-robot-with-nucleo-f401re-4eg4</guid>
      <description>&lt;p&gt;The &lt;a href="https://www.onzuu.com/product/stmicroelectronics-nucleo-f401re-3236041" rel="noopener noreferrer"&gt;Nucleo-F401RE&lt;/a&gt; is perfect for a first “real” robot because it has ST-LINK built-in, plenty of timers for PWM + &lt;a href="https://www.onzuu.com/category/encoders" rel="noopener noreferrer"&gt;encoders&lt;/a&gt;, and Arduino-style headers for quick wiring.&lt;/p&gt;

&lt;p&gt;Below is a practical “learn &lt;a href="https://www.ampheo.com/search/STM32" rel="noopener noreferrer"&gt;STM32&lt;/a&gt; by building the robot” roadmap, with a solid hardware stack and the exact STM32 peripherals you’ll learn in the right order.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70ct4qohe0luohtj2hmj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70ct4qohe0luohtj2hmj.png" alt=" " width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1) Pick a simple robot architecture (do this first)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Start with a 2-wheel differential drive (2 DC gear &lt;a href="https://www.onzuu.com/category/motors-actuators-solenoids-and-drivers" rel="noopener noreferrer"&gt;motors&lt;/a&gt; + 1 caster). It’s the easiest to control and debug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended BOM (robot base)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Nucleo-F401RE&lt;/li&gt;
&lt;li&gt;2× DC gear motors (6–12V) + wheels&lt;/li&gt;
&lt;li&gt;1× motor driver board (dual H-bridge): TB6612FNG / &lt;a href="https://www.onzuu.com/search/DRV8833" rel="noopener noreferrer"&gt;DRV8833&lt;/a&gt; / &lt;a href="https://www.onzuu.com/product/stmicroelectronics-l298n-3217273" rel="noopener noreferrer"&gt;L298N&lt;/a&gt; (pick one)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/battery-products" rel="noopener noreferrer"&gt;Battery&lt;/a&gt;: 2S Li-ion/LiPo (7.4V) or 6×AA (simple)&lt;/li&gt;
&lt;li&gt;5V/3.3V regulation:

&lt;ul&gt;
&lt;li&gt;If using 2S battery: buck converter to 5V&lt;/li&gt;
&lt;li&gt;Nucleo can be powered by 5V on VIN/5V pin (board then makes 3.3V)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Wires + &lt;a href="https://www.onzuu.com/category/solderless-breadboards" rel="noopener noreferrer"&gt;breadboard&lt;/a&gt; or perfboard&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.ampheo.com/c/sensors" rel="noopener noreferrer"&gt;Sensors&lt;/a&gt; (add in phases)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wheel encoders (quadrature) highly recommended&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/inertial-measurement-units" rel="noopener noreferrer"&gt;IMU&lt;/a&gt; (I2C): e.g., &lt;a href="https://www.ampheo.com/product/mpu-6050-26900976" rel="noopener noreferrer"&gt;MPU-6050&lt;/a&gt;/ICM-series (any common I2C IMU)&lt;/li&gt;
&lt;li&gt;Distance sensor: ultrasonic (&lt;a href="https://www.ampheo.com/product/hc-sr04-26835950" rel="noopener noreferrer"&gt;HC-SR04&lt;/a&gt;) or ToF (I2C)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Debug tools (huge time saver)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cheap logic analyzer (for UART/I2C/SPI)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.onzuu.com/category/multimeters" rel="noopener noreferrer"&gt;Multimeter&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2) Power rules (most robot bugs are power bugs)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Never power motors from the Nucleo 5V pin.&lt;/li&gt;
&lt;li&gt;Power path should be:

&lt;ul&gt;
&lt;li&gt;Battery → Motor driver (VM)&lt;/li&gt;
&lt;li&gt;Battery → Buck → 5V → Nucleo (5V/VIN)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Common ground is mandatory: Battery GND = motor driver GND = Nucleo GND&lt;/li&gt;

&lt;li&gt;Add a bulk &lt;a href="https://www.onzuu.com/category/capacitors" rel="noopener noreferrer"&gt;capacitor&lt;/a&gt; near motor driver VM: 220–1000 µF helps with brownouts.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3) Learning path that maps directly to robot features&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Phase A — “It moves” (1–2 days)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: Drive both motors open-loop.&lt;br&gt;
You learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GPIO output (direction pins)&lt;/li&gt;
&lt;li&gt;Timer PWM (speed control)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Motor driver signals you’ll typically use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AIN1/AIN2 + PWMA&lt;/li&gt;
&lt;li&gt;BIN1/BIN2 + PWMB&lt;/li&gt;
&lt;li&gt;STBY/EN (enable)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CubeMX setup&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enable 2 PWM channels (e.g., TIM3 CH1/CH2)&lt;/li&gt;
&lt;li&gt;Configure 2–4 GPIOs for direction&lt;/li&gt;
&lt;li&gt;Start PWM and vary duty cycle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase B — “It moves straight” (2–5 days)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: Read encoders and do speed control so both wheels match.&lt;br&gt;
You learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Timer Encoder Interface mode (best)&lt;/li&gt;
&lt;li&gt;Interrupt basics (optional)&lt;/li&gt;
&lt;li&gt;PID speed loop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why encoders matter: without them, the robot drifts and turns randomly because motors aren’t identical.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase C — “It goes where you tell it” (1–2 weeks)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Goal: Drive distance/angle commands.&lt;br&gt;
You learn:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Differential drive kinematics&lt;/li&gt;
&lt;li&gt;Closed-loop control (speed + heading)&lt;/li&gt;
&lt;li&gt;IMU via I2C (optional but great)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Phase D — “It navigates” (ongoing)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Obstacle avoidance (distance sensor)&lt;/li&gt;
&lt;li&gt;Line following (IR array)&lt;/li&gt;
&lt;li&gt;Remote control (Bluetooth UART)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;4) Wiring example (typical dual H-bridge)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is generic and works for TB6612/DRV8833-type drivers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;STM32 → Motor Driver&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PWM_A → PWMA&lt;/li&gt;
&lt;li&gt;PWM_B → PWMB&lt;/li&gt;
&lt;li&gt;DIR_A1, DIR_A2 → AIN1, AIN2&lt;/li&gt;
&lt;li&gt;DIR_B1, DIR_B2 → BIN1, BIN2&lt;/li&gt;
&lt;li&gt;EN/STBY → STBY/EN&lt;/li&gt;
&lt;li&gt;GND → GND (must share)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Power&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Battery + → VM (motor supply)&lt;/li&gt;
&lt;li&gt;Battery – → GND&lt;/li&gt;
&lt;li&gt;Buck 5V → Nucleo 5V/VIN&lt;/li&gt;
&lt;li&gt;Buck GND → common GND&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Encoders → STM32&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Left encoder A/B → TIMx CH1/CH2 (encoder mode)&lt;/li&gt;
&lt;li&gt;Right encoder A/B → TIMy CH1/CH2&lt;/li&gt;
&lt;li&gt;Use pull-ups if encoder outputs are open collector.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tip: Nucleo-F401RE exposes many timer pins; choose pins that support PWM outputs and encoder channels, and confirm in the Nucleo pinout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5) CubeIDE/CubeMX peripheral “shopping list” for this robot&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You’ll end up using these a lot:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TIM PWM: 2 channels (left/right speed)&lt;/li&gt;
&lt;li&gt;TIM Encoder: 2 timers (left/right wheel)&lt;/li&gt;
&lt;li&gt;UART: debug prints + later Bluetooth control&lt;/li&gt;
&lt;li&gt;I2C: IMU / ToF sensor&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.onzuu.com/category/analog-to-digital-converters" rel="noopener noreferrer"&gt;ADC&lt;/a&gt;: battery voltage monitoring&lt;/li&gt;
&lt;li&gt;(Optional) FreeRTOS: only after you’re comfortable without it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;6) A proven firmware structure (simple, robust)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run a fixed-rate control loop (no RTOS needed at first):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1 kHz (every 1 ms): read encoders, compute wheel speed&lt;/li&gt;
&lt;li&gt;100–200 Hz: PID speed control update&lt;/li&gt;
&lt;li&gt;20–50 Hz: navigation logic (distance/heading/obstacle)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A clean module split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;motor.c (set PWM + direction)&lt;/li&gt;
&lt;li&gt;encoder.c (read counts, compute speed)&lt;/li&gt;
&lt;li&gt;control.c (PID)&lt;/li&gt;
&lt;li&gt;robot.c (drive commands: forward/turn)&lt;/li&gt;
&lt;li&gt;comms.c (UART CLI)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7) Your first “robot milestone plan” (no guessing, just build)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;PWM one motor forward/backward&lt;/li&gt;
&lt;li&gt;PWM both motors, manual speed commands over UART&lt;/li&gt;
&lt;li&gt;Read both encoders reliably&lt;/li&gt;
&lt;li&gt;Implement wheel speed PID (robot drives straight)&lt;/li&gt;
&lt;li&gt;Implement “drive X cm” and “turn Y degrees”&lt;/li&gt;
&lt;li&gt;Add &lt;a href="https://www.ampheoelec.de/c/sensors" rel="noopener noreferrer"&gt;sensor&lt;/a&gt;-based stopping (distance sensor)&lt;/li&gt;
&lt;li&gt;Add Bluetooth control (UART) or a simple command protocol&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;8) Quick parts choice advice (so you don’t get stuck)&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If your motors are small (≤1A each typical): TB6612FNG / DRV8833 class drivers are great.&lt;/li&gt;
&lt;li&gt;If motors are bigger: pick a higher-current driver and plan real heat dissipation.&lt;/li&gt;
&lt;li&gt;Get encoders early. They make the project way more predictable.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nucleof401re</category>
      <category>robot</category>
      <category>stm32</category>
      <category>sensors</category>
    </item>
    <item>
      <title>Which Raspberry Pi can take 24v?</title>
      <dc:creator>Hedy</dc:creator>
      <pubDate>Mon, 12 Jan 2026 09:01:51 +0000</pubDate>
      <link>https://dev.to/carolineee/which-raspberry-pi-can-take-24v-5bnm</link>
      <guid>https://dev.to/carolineee/which-raspberry-pi-can-take-24v-5bnm</guid>
      <description>&lt;p&gt;Most &lt;a href="https://www.ampheo.com/c/raspberry-pi/raspberry-pi-boards" rel="noopener noreferrer"&gt;Raspberry Pi&lt;/a&gt; “computer boards” do not accept 24 V directly. They are 5 V devices (powered via USB-C / micro-USB, or the 5 V pins on the GPIO header), so feeding 24 V into a normal Pi will damage it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The one common “Pi” setup that can take 24 V (with a big caveat)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Raspberry Pi Compute Module 4 + official CM4 IO Board&lt;/strong&gt;&lt;br&gt;
The CM4 IO Board can be powered via its DC barrel jack and Raspberry Pi’s docs note it supports up to 26 V if PCIe is unused—so 24 V is OK in that specific configuration.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy81mgiw0ijvk6wyx7htz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy81mgiw0ijvk6wyx7htz.png" alt=" " width="713" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you plan to use PCIe devices, Raspberry Pi emphasizes 12 V input for that use case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not 24 V&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compute Module 5 IO Board: requires an external +5 V USB-C PSU, not 24 V.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.ampheo.com/search/Raspberry%20Pi%205" rel="noopener noreferrer"&gt;Raspberry Pi 5&lt;/a&gt; / 4 / 3 / Zero / 400 / 500: powered from 5 V (Pi 5 typically via the official 5.1 V supply).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;If you have 24 V available, the normal solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use a 24 V → 5.1 V (or 5.0 V) &lt;a href="https://www.onzuu.com/category/external-internal-dc-dc-converters" rel="noopener noreferrer"&gt;DC-DC buck converter&lt;/a&gt; sized for your Pi:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.ampheoelec.de/search/Pi%204" rel="noopener noreferrer"&gt;Pi 4&lt;/a&gt; class: typically 5 V / 3 A supply guidance&lt;/li&gt;
&lt;li&gt;Pi 5 class: official supply is 5.1 V / 5 A&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then feed the Pi via USB-C/micro-USB (preferred) or via the 5 V GPIO pins (only if you understand you’re bypassing some protection).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Related note: PoE is ~48 V, not 24 V&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your “24 V” is coming from PoE-like wiring, avoid 24 V passive PoE—it’s not standards-compliant and can cause damage.&lt;br&gt;
Standards-based PoE/PoE+ is typically ~48 V and uses proper negotiation (e.g., PoE+ HAT).&lt;/p&gt;

</description>
      <category>raspberrypi</category>
      <category>raspberrypi5</category>
      <category>dcdcconverter</category>
      <category>pi4</category>
    </item>
  </channel>
</rss>
