Automatic spray bottle

Annoying friends, keeping cats away from certain places or just moistening an ideal solution for planting – the DIY spray bottle in full automatic can do that.

A nice way to play with Arduino and pack it in a funny yet functional setting. If you don't have an Arduino, there's a second option that's easily built from everyday parts available in the supermarket.

In both cases, the function of spraying is triggered by motion detectors. And how do we show you now.

Arduino-based spray bottle

Raid Auto Trigger
PIR Motion Sensor
NPN transistor
Wire cutters and wires

The structure
You can see how you switch the few parts and connect them together on this schematic illustration:

After the setup, it may be possible to equip Arduino with the desired program.
The programming sequence is as follows:

const int pirPower = 13;
const int pirIn = 12;
int motorPin1 = 3;
void setup()
pinMode(pirPower, OUTPUT);
pinMode(pirIn, INPUT);
pinMode(motorPin1, OUTPUT);
digitalWrite(motorPin1, LOW);
digitalWrite(pirPower, HIGH); }
void loop()
int value= digitalRead(pirIn);
if (value == HIGH)" digitalWrite(motorPin1, HIGH);
delay(500); digitalWrite(motorPin1, LOW); }

Advantages of construction with Arduino and a motion detector

Thanks to the sensitive motion detector, the signals are transmitted immediately by occurring movements and the spray pulse takes place very quickly. Especially if you want to educate your pet to avoid certain places by using the spraying device to achieve a harmless but effective deterrent, this construction is suitable to hit the target safely.

Construction with commercially available means without Arduino

Raid Auto Trigger
Glade Sense & Spray (you get almost everywhere, the fragrance doesn't matter, it's all about the inside of the sprayer)
One bottle in travel size (500ml)
Wire cutter and wire

The structure

Actually, the construction is quite simple. For this purpose, the air freshener is taken apart first and then the automatic sprayer. Now the two are simply connected.
It can already be used.

Advantages of construction without Arduino
This building is hardly suitable for hitting something in motion. The glade's sensor only detects light and shadow, and the signal for spraying is also time-delayed (few want to be hit by a cloud of room scent).
However, this construct is ideal if you no longer want to worry about the cleaning and humidification of your plants.
Installed in a suitable place, this simple technique is sufficient to fog the plants with water at regular intervals.

Have fun trying out – no matter what variant, both bring their advantages and their fun.

For arduinoProjects for beginnersSensors

1 comment




ich würde die Konstruktion mit meinem Dad gerne bauen, aber mir fehlt ein wenig an Info.
Den elektrischen Teil um den Bewegungsmelder zusammenzustellen haben wir verstanden und ist umsetzbar. Wie sieht es aber aus bezüglich der Wasserflasche und dem gewünschten Sprühstoß? Dazu finde ich keine Beschreibung. Kannst du mir da noch genauere Infos geben=)?


Leave a comment

All comments are moderated before being published

Recommended blog posts

  1. Install ESP32 now from the board manager
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA - Over the Air - ESP programming via WLAN