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 12 V linear actuator turns motor rotation into a straight push with built-in end-stop switches, so it stops by itself at each end. A Cytron MD10C drives it forwards or backwards from one PWM and one DIR pin. A DHT22 measures the air; the Nano opens above 32 °C and closes below 28 °C, so the vent does not chatter around one value.
Motors can start suddenly: keep fingers, hair and loose clothes clear, and lift wheels off the bench while testing.
Tick anything you already have and the total updates.
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V 2 A adapter for the actuator and driver; the Nano runs from the same 12 V on VIN.
greenhouse_vent.inoVerify & upload in Electrolark#include <DHT.h>
DHT dht(2, DHT22);
const int PWM = 9, DIR = 8;
const float OPEN_AT = 32.0, CLOSE_AT = 28.0;
const unsigned long STROKE_MS = 20000; // longer than a full stroke; the end switches stop the actuator
bool isOpen = false;
void move(bool open) {
digitalWrite(DIR, open ? HIGH : LOW);
analogWrite(PWM, 255);
delay(STROKE_MS);
analogWrite(PWM, 0);
isOpen = open;
}
void setup() {
pinMode(DIR, OUTPUT);
dht.begin();
move(false); // start closed
}
void loop() {
float t = dht.readTemperature();
if (!isnan(t)) {
if (!isOpen && t > OPEN_AT) move(true);
if (isOpen && t < CLOSE_AT) move(false);
}
delay(30000);
}
Swap the actuator wires at MA/MB.
Increase STROKE_MS or check the 12 V supply; actuators draw more under load.
Widen the gap between OPEN_AT and CLOSE_AT.
Add a rain sensor and close the vent whenever it is wet.
Yes, with a 12 V battery and solar charge controller.
Linear actuators are self-locking, so the vent stays where it stopped.
7 parts: Generic Nano CH340 Development Board (Soldered), Cytron MD10C 10A Single DC Motor Driver, Electric Linear Actuator 12V, DHT22 AM2302 Digital Temperature & Humidity Sensor, DC Power Adapter (5.5x2.1mm), 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 6 steps.
No. This page has the complete, tested code (greenhouse_vent.ino).
About ₹4,064 for the parts at the prices on this page. Quantity price breaks lower the cost when you build several.
Driving a linear actuator in both directions; Hysteresis in control loops; Using built-in limit switches.
Motors can start suddenly: keep fingers, hair and loose clothes clear, and lift wheels off the bench while testing.
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.