Creators
Earth Bondhon Author
Earth Bondhon
CalculatorToolsProjectExpert
Reviewers
Małgorzata Koperska, MD Steven Wooding
Last updated: November 29, 2025

LM358 1s–2s Battery Charger Circuit DIY Guide

🇺🇸
English
Default
🇪🇸
Español
Spanish
🇫🇷
Français
French
🇩🇪
Deutsch
German

*Please note: These are affiliate links. I may make a commission if you buy the components through these links. I would appreciate your support in this way!

LM358 1s-2s Battery Charger Circuit

Build a safe and intelligent LM358 1s–2s battery charger circuit for 18650 Li-ion cells. Step-by-step guide, wiring diagram, working principle, and DIY instruct...

What is an LM358 1s–2s Battery Charger Circuit?

The battery charger circuit shown in the LM358 circuit board has an LM358 op-amp as a voltage comparator to control the charging. The circuit automatically switches between constant current (CC) and constant voltage (CV) mode, and it is charged effectively. It has the ability to accommodate 1s (single cell 18650) and 2s (two cell configuration in series) battery configurations with easy battery protection and monitoring capabilities.

DIY electronic door lock

A password door lock circuit is a secure electronic system that can only allow access once the correct password is typed in by using a keypad. This circuit is best suited in home security, lockers, offices or any restricted region. A locking system that uses the use of a keypad in conjunction with logic processing and relay switching can be used to control the opening and closing of a door without any keys.

In this guide, you will be taught how to make a password door lock circuit, components, circuit diagram, how it works, step-by-step assembly, and instructions on how to test it. The project under discussion is a basic DIY electronic lock, which is available to all beginners in electronics and those with interests in electronics, as it offers a practical introduction to digital logic, the functioning of relays, and the design of security systems.

Why Use a Password Door Lock?

  • Enhances home or office security
  • Eliminates lost or duplicated keys
  • Allows multiple authorized users
  • Can be built with low-cost components
  • Suitable for DIY electronics projects

Components Required

Component Specification
4x4 Keypad Matrix keypad for password input
Microcontroller / IC CMOS IC like CD4017 or optional Arduino
Relay 12V relay to control lock
NPN Transistor e.g., BC547 for relay driver
Diode 1N4007 for back EMF protection
Resistors 10kΩ, 220Ω
Capacitors 100nF for debounce
Buzzer or LED Optional feedback indicator
DC Power Supply 12V for relay and circuit
Wires & Breadboard/PCB For assembly

Working Principle of Password Door Lock Circuit

Keypad Input

User enters a numeric code using 4x4 keypad. Each button press generates a logic signal.

Logic Processing

IC or microcontroller checks the input sequence. Correct password triggers relay activation. Wrong password may activate buzzer or block input.

Relay Switching

Relay acts as electromechanical switch. Controls door lock or solenoid. Isolates low-voltage control circuit from high-power lock mechanism.

Password Door Lock Circuit Diagram

  • Connect keypad rows and columns to IC input pins
  • Connect IC output to transistor for relay control
  • Add diode across relay coil for protection
  • Connect relay contacts to door lock or solenoid
  • Optional: Add buzzer/LED for feedback

Step-by-Step Construction Guide

  • Place IC and components on breadboard
  • Connect keypad rows/columns to IC
  • Wire transistor and relay for door control
  • Connect buzzer or LED for feedback
  • Apply 12V DC supply
  • Enter test password
  • Observe relay activating door lock
  • Adjust wiring or password logic as needed
  • Transfer to PCB for permanent installation
  • Mount relay and lock mechanism securely

Testing and Calibration Instructions

  • Power the circuit with 12V DC
  • Enter correct password → relay activates → door unlocks
  • Enter wrong password → buzzer or LED activates (optional)
  • Check multiple attempts to ensure reliable operation
  • Adjust debounce capacitor if multiple key presses are registered incorrectly

Advantages of Password Door Lock Circuit

  • High security without keys
  • Customizable password length
  • Low-cost DIY solution
  • Simple assembly for beginners
  • Can integrate with other home automation circuits

Tips for Best Performance

  • Use debouncing capacitors for reliable keypress detection
  • Ensure transistor and relay ratings match lock requirements
  • Protect circuit with fuses if powering larger solenoids
  • Mount keypad securely to avoid tampering
  • Keep backup power supply for uninterrupted operation

Safety Precautions

  • Ensure relay voltage rating matches lock mechanism
  • Avoid short circuits on keypad or IC pins
  • Do not operate lock mechanism without testing
  • Keep hands clear of mechanical lock while powered

Troubleshooting Common Issues

Relay Not Activating

Check transistor connection and base resistor. Verify password sequence.

Wrong Password Unlocks Door

Check keypad wiring. Verify logic IC or microcontroller code.

Circuit Not Powering

Check 12V supply. Verify IC orientation and wiring.

Frequently Asked Questions - LM358 1s-2s Battery Charger Circuit:

What is an LM358 1s–2s battery charger?

A battery charger circuit using LM358 op-amp for safe CC/CV charging of 1s or 2s 18650 cells.

Which MOSFET is suitable?

IRFZ44N or equivalent N-channel power MOSFET.

Can it charge single and dual cells?

Yes, it supports 1s and 2s Li-ion battery configurations.

How does CC/CV charging work?

Circuit charges with constant current until target voltage, then maintains constant voltage while current reduces.

Does it prevent overcharging?

Yes, LM358 monitoring and MOSFET control prevent overcharging.

Is it suitable for beginners?

Yes, with careful wiring and component selection.

Can it indicate charging status?

Yes, LEDs can be added to show charging or fully charged status.

What input voltage is needed?

Typically 5V–12V DC depending on design and battery count.

Can it charge damaged batteries?

No, damaged or swollen batteries should never be charged.

Is it safe for long-term use?

Yes, with proper heat dissipation and safety precautions.

Comments

Please login to comment.

Earth Bondhon

Earth Bondhon

Calculator Tools Project

Md. Jony Islam is a highly skilled professional with expertise in electronics, electrical, mechanical, and civil engineering, as well as finance. Specializing intransformer service and maintenance for 33/11kV substations, he ensures reliable and efficient electrical systems. His mechanical engineering skills drive innovative designs, while his financial acumen supports effective project budgeting. With a strong foundation in civil engineering, he contributes to robust infrastructure development. Md. Jony Islam's multidisciplinary approach ensures efficiency, quality, and reliability across all projects.