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 panel facing the sun directly collects more power than one fixed at an angle. Two light sensors on either side of a small divider see equal light when the panel faces the sun; if one gets brighter, the panel turns towards it. Hiwonder's LD series digital servos have metal gears and high torque, enough to hold a small panel steady in wind. The Nano compares the two LDR readings and nudges the servo one degree at a time.
Keep larger panels on a proper mount; this is for small panels only.
Tick anything you already have and the total updates.
LDR light sensor modules
Follow the colours: red is power, dark grey is ground, blue is a signal.
12 V adapter stepped down to 5 V for the servo.
solar_tracker.inoVerify & upload in Electrolark#include <Servo.h>
Servo s;
int angle = 90;
const int DEADBAND = 30, MIN_A = 20, MAX_A = 160;
void setup() { s.attach(9); s.write(angle); }
void loop() {
int east = analogRead(A0), west = analogRead(A1);
int diff = east - west; // check which way your modules read
if (diff > DEADBAND && angle > MIN_A) angle--;
if (diff < -DEADBAND && angle < MAX_A) angle++;
s.write(angle);
delay(east + west < 200 ? 60000 : 500); // rest at night
}
Your LDR modules read the other way; swap A0 and A1.
Raise DEADBAND or make the divider taller.
The panel is unbalanced; centre its weight over the shaft.
A single-axis tracker often gives 20-30% more than a fixed panel.
Digital servos hold position more firmly, which matters in wind.
Yes, with a battery and charger; the servo moves only a few times an hour.
8 parts: Hiwonder Digital Servo (LD, LDX and LFD Series), 2 × Generic Photosensitive Resistor Sensor Module for Arduino – Light Dependent Resistor (LDR), Small Solar Panel, Generic Nano CH340 Development Board (Soldered), Step-Down Converter to 5V USB / 5V 3A, 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 (solar_tracker.ino).
Differential light sensing; Closed-loop tracking with a dead band; Choosing a servo by torque.
Keep larger panels on a proper mount; this is for small panels only.
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.