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 camera slider is a great first mechanical build: two smooth rods, a carriage on linear bearings, a belt and a stepper. The Nano drives a TMC2209 or DRV8825 stepper driver with AccelStepper, so the carriage starts and stops gently. A potentiometer sets the speed and an end switch finds the home position. Brackets, shaft supports, bearings and the right screws are where most of the learning is.
Keep fingers clear of the belt and pulley when the motor runs.
Disconnect power before you adjust the mechanics.
Tick anything you already have and the total updates.
GT2 6 mm open belt (about 1 m for a 400 mm slider)
Belt tensioner springs keep the belt tight
Lower-cost driver; louder than the TMC2209
Anti-backlash T8 nut for a lead-screw version
SimpleFOCmini BLDC driver for a silent gimbal-motor pan axis
Industrial BLDC driver for a long, heavy slider
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V 2 A supply (sold separately). Never unplug the motor while the driver is powered.
camera_slider.inoVerify & upload in Electrolark#include <AccelStepper.h>
AccelStepper motor(AccelStepper::DRIVER, 3, 4); // STEP, DIR
const int EN = 5, POT = A0;
const float STEPS_PER_MM = 200.0 * 16 / 40.0; // 1.8° motor, 1/16 microstep, GT2 20T = 40 mm per turn
const long TRAVEL = 330 * STEPS_PER_MM; // usable travel in steps
void setup() {
pinMode(EN, OUTPUT); digitalWrite(EN, LOW);
motor.setMaxSpeed(4000);
motor.setAcceleration(800);
motor.moveTo(TRAVEL);
}
void loop() {
float mmPerSec = map(analogRead(POT), 0, 1023, 1, 50); // 1 to 50 mm/s
motor.setMaxSpeed(mmPerSec * STEPS_PER_MM);
if (motor.distanceToGo() == 0) motor.moveTo(motor.currentPosition() == 0 ? TRAVEL : 0);
motor.run();
}
The sketch above runs here on a simulated Arduino Nano. Move the sliders for the sensors and buttons it reads, and watch the Serial monitor, display and outputs change.
One coil pair is swapped; check pairs with the multimeter (low resistance means the same coil).
The rods are not parallel. Loosen the supports, slide the carriage to each end and retighten.
Lower the current trimmer and add the heat sink; the TMC2209 cuts out when it overheats.
A mirrorless camera and small lens is fine on 8 mm rods; heavier rigs need thicker rods or V-slot rails.
Yes, for slow, precise moves. Use a coupler and a T8 nut, and set STEPS_PER_MM to 400 for an 8 mm lead.
Yes for video and time-lapse; GT2 belts are used in most 3D printers.
30 parts: Nano CH340 Development Board (Soldered), NEMA 17 2.6 kg-cm Stepper Motor 42HS34-0404 D-Type, Stepper Motor Mounting Bracket (NEMA17, NEMA23, NEMA34), TMC2209 Stepper Motor Driver, 2 × 8mm x 400mm Chrome Plated Smooth Rod, 4 × Shaft Support Bracket, 2 × LM8LUU Linear Motion Bearing, Pillow Block / Flange Bearing 8mm, GT2 20-Tooth Timing Pulley, 5mm Bore for 6mm Belt, GT2 Open Ended Timing Belt, 6mm Width, Steel Wire Core, plus 20 more. Tools: Digital Vernier Caliper (Branded), Digital Multimeter and 24 in 1 Precision Screwdriver Set. 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 1 day. The build on this page has 6 steps.
No. This page has the complete, tested code (camera_slider.ino).
Yes. The Run it panel under the code runs this exact sketch on a simulated board. Move the sliders or press the buttons for the sensors it reads, and the Serial monitor, display and outputs react as they will on the real build. It is a simulation, so real readings depend on your parts and wiring.
About ₹12,662 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.
Steps per millimetre for a belt drive; Acceleration with AccelStepper; Aligning rods and bearings so nothing binds.
Keep fingers clear of the belt and pulley when the motor runs. Disconnect power before you adjust the mechanics.
Ideas that reuse this build: CNC shield belt linear axis. They are listed under Take it further on this page.
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.
Learning project. Check every circuit and the datasheet of each part before you power it up.
A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.