Touchless hand sanitiser dispenser
Hold your hand under it and a metal-gear servo presses the pump for you.
Shop by category
Shop all componentsBigger CNC machines use NEMA 23 motors and external drivers like the DM556, which takes step and direction pulses through optocouplers and drives up to 5.6 A peak. The DIP switches set motor current and microsteps. The Uno uses the AccelStepper library to home against a limit switch, then shuttles between positions, the base of a camera slider, a sliding door or a CNC axis.
Motors can start suddenly: keep fingers, hair and loose clothes clear, and lift wheels off the bench while testing.
The 24 V supply board has exposed mains terminals: mount it in a closed, earthed box.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
24 V 4 A supply for the driver; USB for the Uno.
nema23_axis.inoVerify & upload in Electrolark#include <AccelStepper.h>
AccelStepper axis(AccelStepper::DRIVER, 2, 5); // STEP, DIR
const int LIMIT = 9;
const long STEPS_PER_MM = 1600 / 8; // 1600 steps/rev on an 8 mm lead screw
const float MAX_SPEED = 4000, ACCEL = 3000;
void home() {
axis.setMaxSpeed(800);
axis.move(-1000000);
while (digitalRead(LIMIT) == HIGH) axis.run();
axis.setCurrentPosition(0);
axis.runToNewPosition(STEPS_PER_MM * 5); // back off 5 mm
axis.setCurrentPosition(0);
}
void setup() {
pinMode(LIMIT, INPUT_PULLUP);
axis.setMinPulseWidth(5); // DM556 needs at least 2.5 µs
axis.setAcceleration(ACCEL);
home();
axis.setMaxSpeed(MAX_SPEED);
}
void loop() {
axis.runToNewPosition(STEPS_PER_MM * 200); // 200 mm
delay(500);
axis.runToNewPosition(STEPS_PER_MM * 20);
delay(500);
}
Coil pairs are mixed; swap B+ and A- and check pairs with a multimeter.
Swap one coil pair (A+ with A-) to reverse the motor.
Lower MAX_SPEED or raise the supply voltage; check the current DIP setting.
A NEMA 23 needs 2-4 A, far more than an A4988 or DRV8825 can supply.
Yes, connect STEP and DIR from a GRBL shield the same way.
They split each 1.8° step into smaller ones for smoother, quieter motion.
8 parts: Uno R3 CH340G ATmega328p Compatible Development Board, Arduino USB-A to USB-B Data Cable for UNO/MEGA, DM556 Digital Stepper Driver (NEMA23/24/34), JK57HS51-2804 NEMA23 Stepper Motor, 10.1 kg-cm Torque, KW4-3Z-3 AC 125V 5A Micro Limit Switch for 3D Printers, 24V 4A AC-DC Switching Power Supply Board, Solderless Breadboard and Dupont Jumper Wires (40 pcs). On this page you can tick the parts you already have and add only the rest to your cart.
It is a intermediate project and takes about 3 hours. The build on this page has 7 steps.
No. This page has the complete, tested code (nema23_axis.ino).
About ₹3,560 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Step/direction drivers and optocoupler inputs; Setting current and microsteps with DIP switches; Homing to a limit switch.
Motors can start suddenly: keep fingers, hair and loose clothes clear, and lift wheels off the bench while testing. The 24 V supply board has exposed mains terminals: mount it in a closed, earthed box.
Hold your hand under it and a metal-gear servo presses the pump for you.
Wave your hand and the lid lifts by itself, then closes after three seconds.
Your first motion project: turn the knob and the servo follows.
Dial in an exact servo angle, 2° per click, shown on screen.
Lessons are free to read. Maker (₹499/month) and Pro add quizzes, worked problems and certificates, paid with your Geekobot account. See plans
Learning project. Check every circuit and the datasheet of each part before you power it up.