Touchless hand sanitiser dispenser
Hold your hand under it and a metal-gear servo presses the pump for you.
Shop by category
Shop all componentsA stepper motor turns in exact steps, so it makes a smooth, slow turntable. The shaft is too thin to carry a plate, so an EasyMech coupling hub locks onto the 5 mm shaft with grub screws and gives you a flange to screw a disc to. An A4988 driver in 1/16 microstep mode turns the motor 3,200 steps per revolution, an Arduino Uno sets the speed from a potentiometer, and a button reverses the direction.
Disconnect power before changing the motor wiring. The driver can be damaged if the motor is unplugged while powered.
Tick anything you already have and the total updates.
NEMA17 motor, 5 mm shaft
EasyMech NEMA17 coupling hub, 5 mm bore, big flange: carries the disc
Follow the colours: red is power, dark grey is ground, blue is a signal.
Needs a 12 V DC supply of at least 2 A for the motor. The Uno runs from USB.
turntable.inoVerify & upload in Electrolarkconst int STEP_PIN = 3, DIR_PIN = 4, BTN = 2, POT = A0;
bool dir = true;
unsigned long lastStep = 0;
bool lastBtn = HIGH;
void setup() {
pinMode(STEP_PIN, OUTPUT);
pinMode(DIR_PIN, OUTPUT);
pinMode(BTN, INPUT_PULLUP);
}
void loop() {
bool b = digitalRead(BTN);
if (lastBtn == HIGH && b == LOW) { dir = !dir; delay(30); }
lastBtn = b;
digitalWrite(DIR_PIN, dir);
// 1/16 microstep: 200 x 16 = 3200 steps per turn.
// The pot sets the gap between steps from 200 us (fast) to 3000 us (slow).
unsigned long gap = map(analogRead(POT), 0, 1023, 3000, 200);
unsigned long now = micros();
if (now - lastStep >= gap) {
lastStep = now;
digitalWrite(STEP_PIN, HIGH);
delayMicroseconds(4);
digitalWrite(STEP_PIN, LOW);
}
}
Two coil wires are crossed. Swap one coil pair, or measure the coils with a multimeter to pair them.
The grub screw is on the round part of the shaft. Turn it onto the flat and tighten again.
The hub is not square on the shaft or the disc holes are off centre. Loosen, rotate the hub a little and retighten.
Yes, with the NEMA23 hub, which has a 6.35 mm bore. Check your motor's shaft first and use a driver that can supply its current.
At the slowest setting about one turn takes around 10 seconds: 3,200 steps at 3 ms each. The fast end is roughly 15 times quicker.
Keep it light and balanced, such as a camera subject or small model. A heavy load puts side force on the shaft.
10 parts: Uno R3 Development Board (No Cable), Reprap Stepper Driver A4988, STEPPERONLINE E Series Nema 17 Bipolar 42Ncm 1.5A 42x42x38mm 4 Wires w/ 1m Cable & Connector-17HE15-1504S, EasyMech NEMA17 Motor Coupling Hub, 5mm ID (Big), 16mm Rotary Potentiometer (Linear), Tactile Push Button Switch, DC Barrel Jack Screw-Terminal Adapter, 12V 2A (24W) Wall Power Adapter - BIS Certified, Solderless Breadboard and Dupont Jumper Wires (40 pcs). Tools: Digital Multimeter. 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 6 steps.
No. This page has the complete, tested code (turntable.ino).
About ₹2,399 for the parts at the prices on this page, plus tools if you do not have them. Quantity price breaks lower the cost when you build several.
How a coupling hub fixes a disc to a stepper shaft; Microstepping on an A4988 driver; Setting driver current (Vref); Reading a potentiometer to set speed.
Disconnect power before changing the motor wiring. The driver can be damaged if the motor is unplugged while powered.
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.