user-img

Himanshu Dada

  • 2 Projects
  • 0 Followers
  • Jul 23,2026
+ Follow

Smart Touchless Soap Dispenser Controller with Custom PCB

This project is a compact embedded controller designed for an automatic touchless soap dispenser. The PCB is built around the nRF52840, providing Bluetooth Low Energy (BLE) connectivity for remote control, configuration, firmware updates, and communication with external BLE devices.

Smart Touchless Soap Dispenser Controller with Custom PCB
 
  • thumbnail-img
 

Hardware Components

  • Crowtail- Bluetooth Low Energy Module

    X 1 fenxiang
  • CrowPanel 2.8"-ESP32 HMI 320x240 Display SPI TFT LCD Touch Scree

    X 1 fenxiang
  • IR sensor

    X 1

Story

The Problem: The "Wave" Wasn't Working

A US-based hygiene product company came to us with a frustrating problem. Their existing touchless soap dispenser had a 30% failure rate within the first six months. The IR sensors were flaky, the pump timing was inconsistent, and battery life was a joke—users were swapping out C-cells every three weeks.

 

They needed a reliable, contactless solution for high-traffic commercial bathrooms (airports, malls, hospitals). The off-the-shelf modules they were using just weren't cutting it. They needed a custom PCB and firmware that could handle real-world abuse. They needed to hire an embedded developer who understood the difference between a prototype and a production-ready device.

 

Why Our Engineers Said "No" to the Generic Approach

The client’s original design used a generic IR proximity sensor module and a basic MOSFET driver for the pump. It worked... sometimes. The problem was optical interference from ambient light and inconsistent motor control.

 

Our team took a different route. We designed a custom PCB around the nRF52832—a Bluetooth 5.0 SoC from Nordic Semiconductor. Why? Because we needed more than just a timer. We needed:

 

- Adaptive sensing: The IR LED driver had to be tuned to ignore sunlight and fluorescent flicker.

- Low-power BLE: For facility managers to monitor soap levels and battery status via an app.

- Precise motor control: A 10ms timing error means a dollop of soap on the counter instead of in the hand.

 

We didn’t use a pre-built IR module. We designed the optical front-end from scratch using a Vishay VCNL4040 proximity sensor (I²C interface) and a custom lens aperture. This gave us a consistent 5cm detection zone, regardless of surface color or lighting conditions.

 

The PCB Design: KiCad, 4-Layer, and a Lot of Head Scratching

We laid out the board in KiCad as a 4-layer stack-up. Here’s where it got specific:

 

- Layer 1 (Top): nRF52832, VCNL4040, and the pump driver (a DMOS microstepping driver for the peristaltic pump).

- Layer 2 (Ground): Solid copper pour. No split planes. This was critical for EMC.

- Layer 3 (Power): 3.3V and 5V rails. We used a TPS63020 buck-boost converter to handle the voltage drop from 4x AA batteries (down to 3.0V) while still driving the pump.

- Layer 4 (Bottom): Battery contacts, programming header, and a few passive components.

 

The tricky part? The pump motor draws 500mA for 200ms. That inrush current can brown out the BLE radio if the layout isn’t clean. We added a 220µF tantalum capacitor right next to the pump driver, and a ferrite bead on the motor power line to keep the noise off the digital side.

 

Firmware: Zephyr RTOS, Not a Bare-Metal Loop

We wrote the firmware using Zephyr RTOS. This wasn’t a hobby project. We needed:

 

- BLE GATT services for battery level, soap remaining, and pump cycles.

- A state machine for the dispense logic (idle -> sense -> dispense -> cooldown).

- Low-power modes: The nRF52 spends 99.9% of its life in deep sleep (SYSTEM_OFF mode), drawing 2µA. The VCNL4040 wakes it up via a GPIO interrupt when something gets within 5cm.

 

The pump timing was fine-tuned in our lab. We ran 10,000 cycles to ensure the motor didn’t overheat and the soap volume stayed within ±5% tolerance. We also added a "stall detection" feature—if the pump motor draws more than 600mA, the firmware assumes the soap is empty and alerts the BLE app.

 

The Result: A Dispenser That Just Works

 

We shipped 500 fully assembled prototypes to the client for field testing. The numbers:

 

- Battery life: 8+ months on 4x AA alkaline cells (vs. 3 weeks on the old design).

- Failure rate: <0.5% in the first 3 months (vs. 30%).

- Dispense accuracy: ±3% volume consistency across 10,000 cycles.

 

The client was able to launch their commercial product line with confidence. They didn’t have to worry about angry facility managers or leaking soap dispensers.

 

Why You Should Hire an Embedded Developer Who Builds for Production

 

This project worked because we didn’t just code a quick Arduino sketch and call it a day. We designed a custom PCB, wrote production-grade firmware in an RTOS, and built a 3D-printed enclosure for the electronics that allowed for easy battery swaps and pump replacement.

 

If you’re building a connected product—whether it’s a soap dispenser, a smart lock, or an industrial sensor—you need more than a prototype. You need a team that understands:

 

- PCB design for motor loads and RF coexistence. (BLE + a 500mA pump is non-trivial.)

- Firmware that handles edge cases. (What happens when someone waves their hand for 10 seconds? Our firmware ignores it after 2 seconds to prevent soap waste.)

- Full prototype shipping. We sent the client a complete, working unit with the PCB, enclosure, and firmware pre-loaded. They just had to plug in the batteries.

 

We’re DigitalMonk. Our engineers have designed boards for medical devices, industrial controllers, and consumer electronics. We ship from India, the US, and the UK. If you need to hire embedded developer or hire IoT developer who can take your idea from KiCad to production, our team is ready.

 

The Takeaway

 

Don’t let a bad sensor or a noisy motor ruin your product. The right PCB design and firmware can turn a frustrating, failure-prone device into something that just works—for years. We proved it with a soap dispenser. We can prove it with your product, too.

 

Contact us to talk about your next project. We’ll tell you the hard truth about your design—and then we’ll build the right one.

 

Schematic and Layout
  • schemetic

    ChatGPT_Image_Jul_23_2026_12_30_36_PM_20684665006a61bc32126cc.png
    Download(0)

Smart Touchless Soap Dispenser Controller with Custom PCB

This project is a compact embedded controller designed for an automatic touchless soap dispenser. The PCB is built around the nRF52840, providing Bluetooth Low Energy (BLE) connectivity for remote control, configuration, firmware updates, and communication with external BLE devices.

10
 
0
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 0 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Country: Shipping Way:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Guaranteed Purchase: Full techsupport