Saurab Thakur

AI Data Annotator | LLM Fine-Tuning | Prompt Engineering

A detail-oriented AI Data Annotator with more than four years of experience in refining machine learning models through high-quality data labelling, evaluation, and LLM fine-tuning.

Work Experience

Jan 2023 – Present
AI Data Annotator & Ads Quality Rater
Welocalize

Evaluated over 500+ advertisements weekly, executed linguistic and contextual AI evaluations, and advised on cultural nuances for Bengali content.

Mar 2021 – Dec 2022
Image Annotator
OneForma

Annotated over 2,000 images with 99% accuracy. Specialised in foreign object detection to boost AI safety model accuracy.

Feb 2020 – Jan 2021
LLM Fine-Tuning Contributor
Appen Crowdgen

Enhanced multilingual LLMs by classifying and evaluating data points, improving model accuracy and consistency.

Technical Skills

Data Labelling & QA LLM Fine-Tuning Prompt Engineering NLP Object Detection Bias Detection Google Ads / SEM

Latest Articles

The Ultimate Animated Movie List: How Many Have You Actually Seen?

🎬 English Animated Feature Films

Welcome to the ultimate animated movie collection! Whether you're feeling nostalgic for a classic 2D adventure or trying to pick the perfect movie night watch for you and Pritikana, this searchable database has you covered. Browse through decades of animation, filter by your favorite studios, and explore hundreds of titles. Click on any movie to see its poster, rating, and plot!

How to Switch from Windows to LMDE (Linux Mint Debian Edition): A Complete Step-by-Step Guide for Windows Users

This guide is written for people who have been using Windows their whole life and want to try Linux Mint Debian Edition (LMDE) for the first time. LMDE looks and feels similar to Windows, so it is one of the best Linux distributions for beginners. This guide will walk you through every single step from downloading the ISO file to booting into your new Linux desktop for the first time. It also covers how to set up hibernation properly so your computer saves its state to disk just like Windows does.

What is LMDE?

LMDE stands for Linux Mint Debian Edition. It is a free operating system built on top of Debian Linux. Unlike the regular Linux Mint which is based on Ubuntu, LMDE is built directly on Debian, which makes it more stable and longer-lasting. It uses the Cinnamon desktop environment which looks very similar to Windows with a taskbar at the bottom, a start menu, and a file manager.

LMDE is a good choice if you want to stop using Windows but do not want to learn a completely new way of using a computer. Most things work the same way. You still have a desktop, icons, a browser, a file manager, and settings menus. The biggest difference is that it is free, has no ads, and does not spy on you.

What is Hibernation and Why Should You Set It Up?

Hibernation is a power saving feature. When you hibernate your computer, it saves everything in your RAM (your open programs, browser tabs, documents) to your hard disk and then completely shuts down. When you press the power button again, it restores everything exactly as you left it. This is different from Sleep or Suspend which keeps the RAM powered on. Hibernation uses zero power, so you can leave your computer for days and come back to exactly where you were.

Windows has hibernation built in and it works out of the box. On LMDE, hibernation works but you need to set it up yourself. This guide shows you exactly how to do that during installation so you do not have to fix it later.

What You Will Need Before Starting

You will need a USB flash drive with at least 4 GB of storage. Make sure there is nothing important on it because it will be completely wiped. You will need a working Windows computer to download the LMDE ISO file and create the bootable USB drive. You will need an internet connection. You will need the computer where you want to install LMDE. It should have at least 2 GB of RAM, at least 20 GB of free disk space, and a 64-bit processor. Most computers made after 2010 meet these requirements.

Write down how much RAM your computer has before you start. You can find this in Windows by right clicking on My Computer or This PC and clicking Properties. The RAM size is shown there. You will need this number when creating your swap partition for hibernation.

Step 1: Download the LMDE ISO File

Open your web browser in Windows and go to the official Linux Mint website at linuxmint.com. Click on the Download button in the top menu. You will see options for different editions. Look for the tab or section that says LMDE. At the time of writing this guide, the latest version is LMDE 6 Faye. Click on it.

You will see download mirrors listed. These are different servers around the world that host the same file. Pick one that is closest to your country for faster download speed. Click the download link and save the file. The file will have a name like lmde-6-cinnamon-64bit.iso and it is about 2 GB in size. Wait for the download to finish completely before going to the next step.

Step 2: Verify the ISO File (Optional but Recommended)

After downloading, Linux Mint provides a way to check that the file was not corrupted during download. On the download page there is a link to verify the integrity of your download. They provide a file called sha256sum.txt. You can open PowerShell in Windows by pressing the Windows key, typing PowerShell, and pressing Enter. Then type the following command replacing the filename with your actual downloaded file name:

Get-FileHash C:\Users\YourName\Downloads\lmde-6-cinnamon-64bit.iso -Algorithm SHA256

Compare the output hash with the hash listed on the Linux Mint website. If they match, your download is good. If they do not match, download the file again.

Step 3: Create a Bootable USB Drive Using Rufus

To install LMDE, you need to put the ISO file onto a USB drive in a special way that makes the computer boot from it. You cannot just copy the ISO file to the USB drive. You need a tool called Rufus to do this correctly.

Open your web browser and go to rufus.ie. Download the latest version of Rufus. It is a single small executable file and does not require installation. Double click it to open it.

Plug your USB flash drive into your computer. In Rufus, the Device dropdown at the top should automatically show your USB drive. Make sure it shows the correct USB drive and not one of your hard drives. If you have only one USB drive plugged in it will be correct.

Click the SELECT button next to the Boot selection field. Navigate to where you saved the LMDE ISO file and select it. Rufus will read the ISO and automatically set the correct settings. You do not need to change anything else. The Partition scheme should be set to GPT for modern computers made after 2012. If your computer is very old, use MBR instead. If you are unsure, use GPT.

Click the START button. A warning will appear saying all data on the USB drive will be destroyed. Click OK to confirm. Wait for Rufus to finish writing the ISO to the USB drive. This takes about five to ten minutes. When it says READY at the bottom with a green bar, your bootable USB is ready.

Step 4: Change BIOS Settings Before Installing

Before you can boot from the USB drive and install LMDE, you need to change some settings in your computer's BIOS or UEFI firmware. This is the software that runs before your operating system loads. You access it by pressing a key right when the computer starts up before Windows loads.

How to Enter BIOS

Restart your computer. As soon as the screen goes black and the computer starts rebooting, press the BIOS key repeatedly. Different computer manufacturers use different keys. For Dell computers press F2 or F12. For HP computers press F10 or Esc. For Lenovo computers press F1 or F2. For ASUS computers press F2 or Delete. For Acer computers press F2 or Delete. For MSI computers press Delete. If you are unsure, try pressing Delete, F2, F10, or F12 and see which one works. You need to be quick because the window to press the key is only about two seconds.

If you miss the window and Windows loads, just restart and try again. Once you see the BIOS screen, you can use the keyboard arrow keys to navigate since the mouse usually does not work in BIOS.

What to Change in BIOS

The first thing to find is the Secure Boot setting. Secure Boot is a Windows feature that prevents unauthorized software from loading at startup. It blocks Linux hibernation and can sometimes cause problems with Linux drivers. Look for it under the Security tab or the Boot tab in your BIOS. Set Secure Boot to Disabled. This is important. If you skip this step, hibernation will not work and you may face other issues during installation.

The second thing to look for is Boot Mode or UEFI Mode. If your computer was made after 2012, it should be in UEFI mode already. Leave it in UEFI mode. Only switch to Legacy or CSM mode if your computer is very old and does not support UEFI.

The third thing to change is the Boot Order or Boot Priority. You need to set the USB drive to be the first boot device so the computer boots from your USB drive instead of Windows. Find the Boot Order setting and move USB or Removable Devices to the top of the list. On some computers there is a separate Boot Override menu where you can just select the USB drive directly without permanently changing the boot order.

The fourth thing to check is Fast Boot or Fast Startup. This is different from Windows Fast Startup. In BIOS it is called Fast Boot and it skips some hardware initialization to boot faster. Disable Fast Boot in BIOS. If it is enabled, it may skip reading the USB drive and boot Windows instead.

After making all these changes, find the option to Save and Exit. It is usually F10 or there is a Save Changes and Exit option in the Exit tab. Press it and confirm. Your computer will restart with the new settings.

Step 5: Boot from the USB Drive

After saving BIOS settings and restarting with your USB drive plugged in, your computer should start reading the USB drive. You will see a boot menu with options. Select Start Linux Mint or Start LMDE and press Enter. The system will take a minute to load.

You will be taken to a live desktop. This is the full LMDE Cinnamon desktop running from your USB drive. Nothing is installed on your computer yet. You can explore and test things. When you are ready to install, double click the Install Linux Mint icon on the desktop.

Step 6: Begin the Installation

Double click the Install Linux Mint icon. The installer will open. First it will ask you to choose your language. Select your language and click Continue.

Next it will ask about your keyboard layout. Select the correct layout for your keyboard and click Continue.

Next it will ask about multimedia codecs. Check the box to install third party software for graphics and WiFi hardware and additional media formats. This makes sure video and audio work properly after installation. Click Continue.

Step 7: Choose Installation Type and Create Partitions

This is the most important step. The installer will ask about Installation type. You will see options. If you want to keep Windows alongside LMDE (dual boot), choose Install LMDE alongside Windows. If you want to completely replace Windows and use only LMDE, choose Erase disk and install LMDE. This guide focuses on the Something else option which lets you manually create partitions. Manual partitioning is required for setting up hibernation properly because you need to create a swap partition of the correct size.

Select Something else and click Continue.

Understanding Partitions

A partition is a section of your hard drive. Think of your hard drive like a big warehouse. Partitions are like rooms dividing the warehouse. Windows uses one or two rooms. LMDE will need its own rooms. For hibernation to work you need a special room called a swap partition that is used to store your RAM contents when the computer hibernates.

For a typical installation you will create three partitions. The first is the EFI partition for UEFI boot. The second is the root partition where LMDE is installed. The third is the swap partition for hibernation.

Creating the EFI Partition

In the partition table screen you will see your hard drives and any existing partitions. If you are installing on a fresh drive or replacing Windows entirely, click New Partition Table and confirm. This will create an empty partition table.

Click on the free space entry and then click the plus button at the bottom to create a new partition. Set the size to 512 MB. Set the type to Primary. Set the location to Beginning of this space. Set the Use as to EFI System Partition. Click OK.

Creating the Swap Partition

This is the critical step for hibernation. The swap partition must be at least as large as your RAM. If you have 8 GB of RAM, create a swap partition of at least 8 GB. For best results, make it 1.5 times your RAM size. If you have 8 GB RAM, make the swap 12 GB. If you have 16 GB RAM, make the swap 24 GB. This extra space ensures hibernation works even if the RAM is mostly full when you hibernate.

Click on the remaining free space and click the plus button. Set the size to your chosen swap size in megabytes. If you want 12 GB, type 12288. If you want 16 GB, type 16384. If you want 24 GB, type 24576. Set the type to Primary. Set the location to Beginning of this space. Set the Use as to swap area. Click OK.

Remember the partition name shown for this swap partition. It will be something like /dev/sda2 or /dev/nvme0n1p2. Write it down. You will need it later when configuring GRUB for hibernation.

Creating the Root Partition

Click on the remaining free space and click the plus button. Set the size to use all remaining space. Set the type to Primary. Set the location to Beginning of this space. Set the Use as to Ext4 journaling file system. Set the Mount point to /. This is the root of your Linux system, equivalent to the C: drive in Windows. Click OK.

Review your partition layout. You should see three partitions: one 512 MB EFI partition, one swap partition, and one large root partition. Make sure the correct drive is selected for installing the bootloader at the bottom of the screen. Click Install Now.

A confirmation dialog will appear showing what will be written to disk. Verify the changes look correct and click Continue.

Step 8: Complete the Installation

The installer will now ask about your timezone. Click on your location on the map or type your city name. Click Continue.

Next it will ask for your name, computer name, username, and password. Fill these in. Choose a strong password. You can also choose to encrypt your home folder here but leave that unchecked for simplicity if you are new to Linux. Click Continue.

The installation will now begin copying files. This takes about 10 to 20 minutes depending on your computer speed. You will see a progress bar and some slides showing LMDE features. Wait for it to finish.

When the installation is complete, a dialog will appear asking you to restart. Click Restart Now. When prompted, remove the USB drive and press Enter. Your computer will reboot into LMDE.

Step 9: First Boot into LMDE

After rebooting you will see the GRUB bootloader screen. If you installed LMDE alongside Windows you will see both options. Select LMDE and press Enter. If you only installed LMDE it will boot directly.

You will be taken to the login screen. Type your username and password and press Enter. You are now in LMDE for the first time.

You may see a Welcome Screen appear. It will ask you to run the System Update and install drivers. Click on Driver Manager and install any recommended drivers, especially for graphics and WiFi. Then click on Update Manager and install all available updates. Restart after updating if it asks you to.

Step 10: Configure GRUB for Hibernation

Now you need to tell GRUB the location of your swap partition so LMDE knows where to write the RAM contents when hibernating. Without this step, hibernation will appear to work but the computer will just do a normal shutdown and you will lose all your open work.

Find Your Swap Partition UUID

Open a terminal. You can do this by pressing Ctrl and Alt and T together, or by clicking the Menu button at the bottom left, going to System Tools, and clicking Terminal.

Type the following command and press Enter:

cat /etc/fstab | grep swap

You will see a line that looks something like this:

UUID=2f59a476-3912-434c-8362-fa7c1b797a70 none swap sw 0 0

The long string of numbers and letters after UUID= is your swap partition's unique identifier. Select it carefully by clicking and dragging with your mouse. Copy it by pressing Ctrl and C. Do not include the word UUID= itself, only the numbers and letters with dashes. This is the UUID you will use in the next step.

You can also run this command to see the swap partition name and confirm it is active:

swapon --show

This will show you the swap partition name like /dev/sda2 and confirm it is being used.

Edit the GRUB Configuration File

Now you need to edit the GRUB configuration file to add the resume parameter. Type the following command in the terminal:

sudo xed /etc/default/grub

It will ask for your password. Type it and press Enter. The text editor will open with the GRUB configuration file.

Find the line that starts with GRUB_CMDLINE_LINUX_DEFAULT. It will look like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

You need to add the resume parameter to this line. Change it to look like this, replacing the UUID value with your actual UUID that you copied in the previous step:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=2f59a476-3912-434c-8362-fa7c1b797a70"

Make sure there is a space between splash and resume. Make sure the entire value is inside the double quotes. Do not add any extra spaces inside the UUID value. Double check that you have typed or pasted the UUID correctly. A single wrong character will break hibernation.

Save the file by pressing Ctrl and S. Close the text editor.

Update GRUB

After saving the file you need to tell GRUB to apply the changes. In the terminal type:

sudo update-grub

Press Enter and type your password if asked. You will see some output showing GRUB being updated. Wait for the command to finish. This usually takes about 10 to 30 seconds.

Update the initramfs

The initramfs is the small filesystem that loads before your main system during boot. It also needs to know about the swap partition for the resume process to work. Run this command:

sudo update-initramfs -u

Wait for this command to finish. Now reboot your computer:

sudo reboot

Step 11: Test Hibernation

After rebooting and logging back in, open a terminal and test hibernation with this command:

sudo systemctl hibernate

Your screen may flicker and then go black. The computer will write all RAM contents to the swap partition and shut down completely. All power indicator lights will turn off. The computer is now fully off.

Press the power button to turn the computer back on. GRUB will appear. Select LMDE. You will see a message during boot that says something like Resuming from /dev/sda2 or similar. After a short wait you will be brought back to exactly where you left off with all your programs and windows open exactly as they were.

If hibernation works correctly, congratulations. Your setup is complete and hibernation works just like Windows.

If it does not work and the computer just boots normally without restoring, double check the UUID in your GRUB file. Go back to the terminal and run cat /etc/fstab | grep swap again and compare the UUID very carefully with what is in /etc/default/grub. Even one wrong character will prevent hibernation from working.

Step 12: Enable Hibernate in the Shutdown Menu

By default, LMDE 6 Cinnamon shows the Hibernate option in the shutdown menu. When you click the power icon at the bottom right of the screen you should see options for Suspend, Hibernate, Restart, and Shut Down. If you do not see Hibernate in this menu, follow these steps to enable it.

Open the terminal and create a new policy file:

sudo mkdir -p /etc/polkit-1/localauthority/50-local.d

Then open a new file:

sudo xed /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

Type the following content exactly into this file:

[Re-enable hibernate by default in upower]

Identity=unix-user:*

Action=org.freedesktop.upower.hibernate

ResultActive=yes

[Re-enable hibernate by default in logind]

Identity=unix-user:*

Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions

ResultActive=yes

Save and close the file. Log out and log back in. The Hibernate option should now appear in the shutdown menu.

Step 13: Set Up Hibernate After Suspend (Optional)

This is an optional but very useful feature. It makes your computer first go to sleep (suspend) when you are not using it, and then after a set period of time it automatically hibernates to save power. This is useful if you are not sure whether you will come back to your computer in 30 minutes or 3 days.

Open the terminal and type:

sudo xed /etc/systemd/sleep.conf

Add or modify the following lines in this file:

[Sleep]

AllowHibernation=yes

HibernateDelaySec=3600

The HibernateDelaySec value is in seconds. 3600 means the computer will suspend first and then hibernate after one hour. Change this to any value you prefer. 1800 means 30 minutes, 7200 means 2 hours.

Save the file and restart for the changes to take effect.

You can also set this through the graphical interface. Go to Menu, then System Settings, then Power Management. Under the Extra Options tab you will find Enable Hibernate after suspend and you can choose the delay time there.

Troubleshooting Common Hibernation Problems

Hibernation Freezes the Computer

If the computer freezes instead of hibernating, the most common cause is that the resume parameter in GRUB is missing or has the wrong UUID. Open the terminal and run sudo cat /etc/default/grub and check the GRUB_CMDLINE_LINUX_DEFAULT line carefully. Also make sure you ran sudo update-grub after making changes.

Computer Boots Normally Instead of Resuming

If the computer shuts down and then boots fresh instead of resuming, the resume parameter is wrong. Check the UUID in /etc/default/grub against the UUID in /etc/fstab. They must match exactly.

Hibernation Fails with Permission Error

If you get a permission error when trying to hibernate, you may need to create the polkit policy file described in Step 12 above.

Secure Boot Error

If hibernation fails with an error about Secure Boot or kernel lockdown, go back to your BIOS and make sure Secure Boot is disabled. This was described in Step 4.

Swap Size is Too Small

If your computer has more RAM being used than the size of your swap partition, hibernation will fail. Make sure your swap partition is at least as large as your total installed RAM, and ideally 1.5 times larger.

Basic Differences Between Windows and LMDE

The taskbar in LMDE is at the bottom of the screen just like Windows. The Menu button at the bottom left is like the Start button in Windows. You can search for applications by clicking the Menu and typing the application name.

To install new programs, open the Menu and search for Software Manager. This is like an app store for LMDE. You can search for any application and install it with one click. Common applications like Firefox, LibreOffice, VLC, and GIMP are all available here for free.

You do not need antivirus software on LMDE. Linux systems are much less targeted by viruses and malware compared to Windows. The permission system in Linux also makes it much harder for malicious software to cause damage.

Windows uses drive letters like C: and D:. Linux does not use drive letters. Everything is organized under a single root folder called /. Your personal files are in /home/yourusername/ which is equivalent to C:\Users\YourName\ in Windows.

To update LMDE, open the Update Manager from the taskbar or from the Menu. You will see a list of available updates. Click Install Updates to apply them. Unlike Windows, LMDE rarely requires a restart after updates, and when it does, it gives you the choice to restart when you are ready.

Conclusion

You have successfully installed LMDE on your computer and set up hibernation to work properly. Your computer can now hibernate exactly like Windows, saving all your work to disk and restoring it when you press the power button. The key steps for hibernation were: creating a swap partition at least as large as your RAM during installation, finding the UUID of that swap partition, adding the resume=UUID parameter to the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub, running sudo update-grub, and running sudo update-initramfs -u.

LMDE is a very stable and user friendly operating system. Once you get used to it you will find it works very reliably, starts up quickly, and never nags you with ads or forced updates. Enjoy your new Linux system.

DIY Smart UPS Supervisor with ESP32 (No Solder, Breadboard Project) πŸš€

Hello Maker friends! πŸ‘‹ Tired of sudden blackouts wrecking your PC, NAS or home lab? πŸ’»πŸ’₯ Let’s build a smart UPS (Uninterruptible Power Supply) using a cheap ESP32 dev board and common parts, no soldering or expensive tools required! We’ll make an intelligent dual-battery backup that switches automatically, sends you alerts, and even hosts a web dashboard—all on a solderless breadboard. It’s like pro-level DIY power management: advanced, hackable, and budget-friendly! πŸ”‹πŸ› ️


By the end of this guide you’ll have an industrial-grade power supervisor for your home projects. It handles two batteries (Lead-Acid + LiFePO4), monitors voltages, talks to your PC/NAS, and finally “cuts the cord” to save the batteries. We’ll walk through every step with diagrams, tips, and example code. Let’s get started! πŸŽ‰


1. What Will You Get? 🌟

After assembly, your UPS becomes truly smart and reliable. Here are the killer features of our build:

  • πŸ”‹ Dual Battery Engine: Uses your old Lead-Acid battery first (saving energy costs) and seamlessly switches to a backup LiFePO4 pack when the SLA runs low, without rebooting your PC/NAS. This extends overall runtime and battery life.
  • πŸ’» Smart Computer Shutdown: The ESP32 connects to your home Wi-Fi and communicates with your PC/NAS. When batteries run out, it tells them to hibernate or shut down safely over the network—avoiding data loss.
  • ⚡️ Zero Power Waste (Latching Relay): We use a special 5V latching relay so that when the system cuts power, the coil draws no current at all. In other words, once it turns off, the battery is fully isolated (0Β΅A drain).
  • πŸ“± Telegram Alerts: Get instant push notifications on your phone! Using the Telegram Bot API, your ESP32 will message you “⚠️ Power Outage Detected” or “πŸ”‹ Battery Low” so you can monitor remotely.
  • 🌐 Web Dashboard: The ESP32 even hosts a tiny webserver. Open it on your phone browser to see real-time battery voltages, mains status, and system health (no extra computer needed).

Think of it as affordable home automation for your power backup. Many big UPS solutions lack dual-battery switching or IoT alerts, but we’ll achieve that with just a ~Rs.1000 ESP32 and a breadboard! (No PCB making or soldering – just plug in components.)


2. Hardware & Shopping List πŸ›’

Here’s everything you need. These are common parts you can grab online (Amazon, Robu, eBay) or at any electronics market. We’ll assemble it on a solderless breadboard, so no soldering irons or PCB costs needed!

Main Components (the big stuff):

  • ESP32 DevKit V1: The brain of our project. This low-cost Wi-Fi microcontroller board has plenty of GPIOs (up to 30+) and built-in Wi-Fi/Bluetooth. We need these extra pins, so we prefer ESP32 over smaller ESP8266 boards.
  • 5V Relay Module (1-Channel): A standard 5V relay to choose which battery is feeding the UPS. When off, it connects the lead-acid; when on, it switches to the LiFePO4.
  • 5V Latching Relay: A special relay that “latches” on or off. Unlike normal relays, it doesn’t consume power to hold its state. Perfect for acting as a final power cut switch – zero power when idle.
  • Voltage Sensor Module (×2): These little modules (often 0–25V range) are simply two resistors and an op-amp that scale down battery voltage to the 0–3.3V range of the ESP32’s ADC. We need two modules, one per battery.
  • 5V USB AC Adapter (old phone charger): We’ll use this as a mains sensor. When plugged into wall power, it outputs 5V which our ESP32 reads; when power fails, that 5V goes away (without touching 220V directly).
  • PCF8563 RTC Module (Optional): A Real-Time Clock chip with backup battery (coin cell). This keeps time accurately even if Wi-Fi is down, so logs/timestamps stay correct after outages.
  • Micro SD Card Module (Optional): For logging data or saving settings. Handy for long-term monitoring or debug.

Small Components (support parts):

  • BC547 Transistors (×2): Small NPN transistors to drive the latching relay coils. (Think of them as relay drivers/switches controlled by the ESP32 GPIOs.)
  • 1N4007 Diodes (×4): General-purpose diodes for protecting against voltage spikes when driving relays or to combine signals safely (flyback diodes).
  • 1N5822 Diodes (×2): Heavy-duty Schottky diodes (10A rating) in the battery lines. These prevent the two batteries from charging each other when one is higher voltage.
  • Resistors: We need a pair of 10kΞ© (for the AC detection divider), and a couple of 1kΞ© (for transistor bases).
  • Breadboard & Jumper Wires: A standard full-size solderless breadboard is perfect. It lets you wire everything cleanly without solder. (You can eventually solder for permanence, but you asked for no-solder DIY!)
Solderless breadboard prototype
Figure: A solderless breadboard prototype. We can jam an ESP32, relays, sensors, transistors, etc. onto it – no soldering needed.

3. Step-by-Step Wiring Guide πŸ”§

Safety First! We’re dealing with battery power and mains-adjacent circuits. Always double-check wiring, and isolate power when adjusting connections. Use fuses on battery lines if possible. Never connect 220VAC to the ESP32 pins – we’re only sensing AC via that USB adapter trick.

Step A: AC Mains Detection (Grid Sensing) πŸ”Œ

We want to know when house power goes out. Instead of tapping directly into 230VAC, we’ll use a simple hack: a 5V wall-wart/charger.

  1. Wall Adapter Setup: Plug the USB charger into a normal wall outlet, not the UPS output. That adapter outputs +5V when mains is on.
  2. Cut the USB Cable: Expose the red (+5V) and black (GND) wires. These wires now reflect whether the grid is live.
  3. Voltage Divider: To safely read 5V with the ESP32, make a divider: connect two 10kΞ© resistors in series between +5V (red) and GND (black). This creates a midpoint at ~2.5V.
  4. ESP32 Input: Connect the midpoint of the resistors to ESP32 GPIO 34 (ADC input). Also connect GND to ESP32 GND.
  5. Logic: When the adapter is powered, GPIO34 reads ~2.5V (ADC HIGH). When mains fails, +5V goes to 0V, so GPIO34 sees 0V (ADC LOW). In software, treat GPIO34 = HIGH → grid is ON, and LOW → grid is OFF.

This way, the ESP32 indirectly senses AC mains with no direct AC wiring. All voltages are low and safe.

Step B: Connecting the Two Batteries πŸ”‹πŸ”‹

We have two 12V batteries: the older Lead-Acid and the backup LiFePO4. We need to monitor both voltages.

  1. Lead-Acid Battery Sensor: Connect the positive terminal (+) of the lead-acid battery to the input of the first voltage sensor module. The sensor will output a scaled 0–3.3V signal (assuming it’s designed for up to ~25V). Feed the sensor’s output pin (often labeled “S”) to ESP32 GPIO 33 (an ADC pin).
  2. LiFePO4 Battery Sensor: Similarly, connect the LiFePO4 positive to the second sensor, and its “S” output to ESP32 GPIO 32.
  3. Common Ground: IMPORTANT: Tie both battery negatives together to ESP32 GND. This common ground lets the ESP32 measure each battery relative to ground.

Each sensor module typically has a calibration adjustment; you should calibrate them later in software (see “Testing” section). Having two separate sensors and ADC pins lets the ESP32 continually compare voltages. LiFePO4 cells usually go up to ~14.6V when full, and lead-acid to ~13V, both under 25V input range of the sensors.

Step C: Battery Selection Relay (Switching Logic) πŸ”„

Now we wire the 5V single-channel relay that decides which battery powers the UPS output.

  1. Relay Module Connection: Wire the relay module’s VCC to 5V and GND to ground. Connect its control (IN) pin to ESP32 GPIO 13. This pin will drive the relay ON/OFF.
  2. Batteries to Relay: Using the relay terminals:
    • Connect Lead-Acid + through a 1N5822 diode (to prevent backflow) to the NC (Normally Closed) terminal.
    • Connect LiFePO4 + through another 1N5822 diode to the NO (Normally Open) terminal.
    • Connect the COM (Common) terminal to the UPS input (the device you want to power, e.g. a DC-UPS line or DC-AC inverter input).

The diodes ensure that if the relay accidentally shorted, one battery cannot charge the other.

Operation Logic By default (relay off), the NC contact is connected, so the lead-acid battery feeds power. When the ESP32 energizes GPIO13, the relay switches to NO, connecting the LiFePO4. We will drive this automatically: e.g. use lead-acid until voltage drops under a threshold, then trigger GPIO13 HIGH to swap to the backup. This gives us an automatic battery handover. The transition is instantaneous (no reboot), and the UPS never sees a power cut – it just changes source.

Step D: The “Kill Switch” (Latching Relay) πŸ”ͺ⚡

Finally, the latching relay is our ultimate kill-switch. When batteries are critically low (or timed out), the ESP32 will cut the power completely.

Why Latching? A latching relay has two coils (Set/Reset) and keeps its last state without power. This means once it turns OFF, it draws no current from the battery – ideal for true power-off.

Driving the Latch: The ESP32 GPIO pins cannot directly drive these coils (they need higher current or separate polarity pulses). So we build a small H-bridge using:

  • Two BC547 transistors: each controlling one coil (Set or Reset).
  • Four 1N4007 diodes: for steering current and back-EMF protection.
  • A few resistors: like 1kΞ© on transistor bases.

Wiring the H-Bridge: Without going into every detail here, the key is:

  • GPIO 26 connects (via 1kΞ©) to the base of Transistor #1 (to Set the relay ON).
  • GPIO 27 connects (via 1kΞ©) to the base of Transistor #2 (to Reset the relay OFF).

The transistors and diodes are arranged so that a short 50ms pulse on GPIO26 sends current through the set coil, latching the relay ON, and similarly GPIO27 pulses the reset coil to cut power.

Operation: In software, when it’s time to shut down the output completely (e.g. after the shutdown procedures are done), we send a 50ms HIGH pulse on GPIO 27. This trips the latching relay to OFF and physically disconnects the UPS output. The EPS32 and relays are then truly off, preventing any battery drain.

Pro Tip! You can prototype this latching circuit on a breadboard too. Make sure to connect the latching relay’s common output to the UPS output line, and its contacts in the battery feed line. Once “killed,” no current flows anywhere – batteries are safe!

4. Software: Coding & Flashing the ESP32 πŸ’»

With the hardware wired up, we turn to the code. We’ll program the ESP32 (using Arduino or PlatformIO) to monitor everything and take actions.

Environment: Install Visual Studio Code with the PlatformIO extension (free). This lets you manage ESP32 projects easily.

Libraries: We’ll use Arduino core libraries. For Telegram, install the Universal Telegram Bot library and ArduinoJson (via PlatformIO/Arduino Library manager).

Core Code Logic:

  • Initialize Wi-Fi (WiFi.begin("SSID","PASSWORD");) and wait for connection.
  • Read ADC values: e.g. analogRead(33) and analogRead(32), then convert to real voltage. If you use the default 0–25V sensor, multiply by ~6.6 ((raw/4095.0)*6.6).
  • Check the grid sensor pin (GPIO34) for AC status.
  • Switch relay (GPIO13) between batteries based on voltage thresholds.
  • Monitor if battery is low: if below critical level, send a shutdown signal to connected PCs (over network) and after confirming shutdown, trigger the latching relay.
  • Use an HTTP server or AsyncWebServer to serve a simple webpage that shows status (battery volts, grid on/off).
  • Send Telegram messages with bot.sendMessage(chat_id, "Battery Low!", ""); when events occur.

Example Code Snippets:

Wi-Fi Connect:

#include <WiFi.h>
void setup() {
  Serial.begin(115200);
  WiFi.begin("YourSSID", "YourWiFiPassword");
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("Connected to Wi-Fi");
}

Read Battery Voltages:

int rawLA = analogRead(33);       // Lead-Acid sensor
int rawLi = analogRead(32);       // LiFePO4 sensor
float vLA = (rawLA / 4095.0) * 6.6;    // adjust scale (calibrate as needed)
float vLi = (rawLi / 4095.0) * 6.6;
Serial.printf("Voltages: LA=%.2fV, Li=%.2fV\n", vLA, vLi);

Telegram Alert (using UniversalTelegramBot):

#include <UniversalTelegramBot.h>
WiFiClientSecure netClient;
UniversalTelegramBot bot("BOT_TOKEN_HERE", netClient);
String chat_id = "YourChatID"; // get this from @myidbot on Telegram
...
if (vLA < 11.5 && !sentLowAlert) {
  bot.sendMessage(chat_id, "⚠️ Lead-Acid Battery Low!", "");
  sentLowAlert = true;
}

Automatic Shutdown & Latch Control:

const int RELAY_PIN = 13;       // battery switch relay
const int LATCH_SET = 26;
const int LATCH_RESET = 27;

void switchToLiFe() {
  digitalWrite(RELAY_PIN, HIGH);  // switch relay to LiFePO4
}
void killPower() {
  // Pulse the reset coil to turn everything off
  digitalWrite(LATCH_RESET, HIGH);
  delay(50);
  digitalWrite(LATCH_RESET, LOW);
}
...
if (batteryCriticallyLow) {
  // signal host computers to hibernate (code not shown here)
  killPower();  // cut power after shutdown
}

Customize these snippets as needed. The full code will include Wi-Fi setup, web server initialization (e.g. using AsyncTCP/WebServer libraries), reading all inputs in loop(), handling relay control logic, and the GPIO pin modes (pinMode(...)). After coding, use “Upload” in PlatformIO to flash the ESP32 via USB.


5. Testing, Calibration & Final Checks ✅

Before plugging in your expensive PC, do dry-run tests with something simple (like a 12V bulb or DC fan) and a multimeter.

  • Basic Power-On: With wall power present, the bulb should light (Lead-Acid feeding). Check the web dashboard shows ~12V on the LA battery.
  • Grid Sense Test: Unplug the 5V adapter from the wall – the ESP32 should detect power loss (GPIO34 drops) and (if coded) send a Telegram alert.
  • Battery Switch Test: Manually lower the LA battery voltage (or simulate in code) to test the auto-switch. On switching, the bulb should stay lit (now powered by LiFePO4).
  • Voltage Calibration: Compare the ESP32’s voltage readings (printed in Serial or on webpage) with a multimeter. If they differ, adjust your code’s scale factor or sensor trim pot until they match. Many sensor modules are a bit off by ~10%, so calibrate once and fix it in software.
  • Shutdown Sequence: Let the battery run to critical level. Your code should initiate safe shutdown commands (if you integrated that) and then kill the power (the bulb should go OFF when latching relay triggers). Ensure no current flows after – the ESP should be completely off.
Calibration Tip! You might see the ADC is not perfectly linear. It’s okay to apply a small multiplier offset. Measure a known 12.0V and adjust code: e.g. if ESP reads 11.5V, multiply by 12.0/11.5. Once everything behaves correctly with the dummy load, remove power, hook up your real UPS input or inverter to the common output, reconnect the batteries through the relay, and then try with your actual devices. Monitor closely the first few times.

Congratulations! πŸŽ‰ You’ve built a cheap, solderless smart UPS. It will use your old lead-acid first (saving cost) and seamlessly fall back to a robust LiFePO4 (for longevity). The ESP32 brain handles shutdown and alerts, and the latching relay protects your batteries from needless drain. Feel free to customize further: add LCD display, use MQTT instead of Telegram, or integrate with home assistant. The sky’s the limit with ESP32!


6. Why This Rocks (and SEO Focus) 🌈

  • Cheap & Breadboard-Friendly: All components (< $30) and a breadboard, no PCBs or soldering needed. Perfect for quick prototyping or hobbyists.
  • DIY Home Lab: Protect your PC/NAS without buying an expensive industrial UPS. This home automation hack uses a cheap ESP32 to do something powerful: IoT-grade power monitoring and control.
  • Open-Ended Project: You learned to interface ADC, relays, Wi-Fi, Telegram – skills you can reuse. The ESP32 is a Swiss Army knife for DIY electronics!
  • Energy Efficient: Latching relays and sleep modes mean the supervisor itself barely draws power between events, so it won’t kill your batteries.
  • Community Tools: We even referenced open tools and libraries (Telegram Bot, AsyncWebServer) to speed up development.

Big takeaway: With a small breadboard and minimal parts, you can build something very sophisticated. An ESP32 can handle power control, network communication, user interface, and logic – no expensive PLC or lab tools required. This project shows the huge potential of cheap IoT boards: real-time automation with custom features, done by us, the makers. πŸ˜ŽπŸ”§

Have fun building, and stay tuned to the ESP32 hackery! If your friends laugh that you built your own UPS, just say, “It’s ESP32 magic” πŸ˜‰.

The Ultimate Guide to Modern Animation (2021-2025)! πŸ¦‹

The Ultimate Guide to Modern Animation (2021-2025)

Welcome to the final and most current chapter of our epic animated movie rewind! We're now exploring the incredible films of the 2020s, an era defined by stunning stylistic diversity, the dominance of streaming platforms, and the emotional, heartfelt stories that connect us all. This post is your ultimate, complete guide to the animated movies from 2021 to 2025.