DIY Solar Powered Garden Watering System

Automating every day tasks are the best projects for so many reasons. You can find a real problem and take it as a challenge to automate it. In the end you will end up with plenty of new knowledge, practical experience with problem solving and more time for new projects because a new project will take care of the every day task. Simple and really rewarding project of this kind is an automated watering system add to that solar power and you have a perfect solution!

To learn more about the project, how I built it, problems I faced and how it works take a look at this video:


Here is a list of parts you will need to build a Pico watering system. You cna find all the files for both systems on my GitHub, links at the end of this page.

Raspberry Pi Pico
Solar panel and charger
Garden irrigation system
Water level sensor

Links above are affiliate so by using them you support my work at no extra cost. If you would like to support me in a different way you can check out my store or my Patreon:

Become a Patron!

Two systems

My plan was to build a watering system with a few sensors just for fun. While building it I started adding more and more sensors and ended up with a pretty sophisticated system. Also I wanted to make this project in a good old DIY fashion to make it easy for everyone to replicate. In the end I wasn’t quite happy with the system as it was too complicated, there was too many cables everywhere and it wasn’t simple enough to be elegant.


It’s important to mention that this first system was working great for 11 days and was perfectly watering my garden. Unfortunately the power consumption was pretty high because of many LEDs I had there so it would only work for a few more cloudy days before running out of battery. My DIY soil moisture sensors weren’t working reliably and after creating the plots all the sensors weren’t really needed anymore. All I needed was a simple watering system.

My DIY soil moisture sensor

It obviously wasn’t a waste of time because I learned a lot while making this first version of the system and I used that experience while making the second one. Also with the data collected over 11 days I made some cool looking plots. There is a vertical line every 86 milion milliseconds (that’s 24 hours) so we can see that we have data from almost full 11 days. It was collected during a heatwave in Poland (that was quite fortunate because the system was able to charge fully during the day to survive the night).

Ground and air temperature plots over 11 days of the test

Here we can see sudden drops in the data from ground moisture sensors, unfortunately it is caused by a voltage drop on the battery when turning on the pump. Based on these plots we can conclude that these sensors weren’t working properly. I hope to try to build my own capacitive moisture sensor soon.

Ground moisture data from DIY resistive sensors that unfortunately weren’t working properly
Sunlight data

Here we can see nice correlation between the plots above and below. It’s also visible that the solar charging system wasn’t big enough and wasn’t able to charge the battery on a cloudy day and it got discharged significantly. That’s why reducing power consumption in such systems is really important.

Voltage on a battery

For that reason I decided to start all over again and design a new simple system with only necessary components that consumes less current, is easier to build and more elegant. This time instead of using Arduino (Arduino is great and I still love it but sometimes it’s nice to experiment and try something new) I used Raspberry Pi Pico a microcontroller based board from Raspberry Pi based on RP2040 chip. It’s incredibly chip for what it can offer and is programmed in Python. It’s not the best choice for extreme low power solutions but I am using here a 12V 4Ah battery with a 10W solar panel so that’s not the most important factor for me. RP2040 chip itself is low cost compared to other solutions and what’s really important these days (July 2022) is available. Adding to that a 7805 voltage regulator, IRFZ44N MOSFETs, buttons and a few LEDs I designed a simple single sided PCB – single sided means easy to make at home. To make it I used a $200 CNC machine.

Machining a PCB on a $200 CNC machine with a really nice result
Final PCB for Pico watering system

There is two of everything on the PCB so you can run two separate systems for different parts of the garden (it’s not yet implemented in the program). With two buttons and 8 LEDs you can easily set number of watering cycles per day (between 1 and 4) and watering cycle time (you can choose from 2, 4, 6 and 8 minutes per cycle) of course that can be also adjusted in the program depending on what you need in your garden. Settign are stored in the flash memory of the Pico, it’s amazing that you can simply safe a file there as you would in a normal Python running on your computer!

Simple LED and buttons make can make a great user interface

Case was 3D printed with PETG on Ender3 and additionally closed in a 2l food container together with the battery to protect it. I also used cable gland to go with the cables through the container. In the end everything was attached to a a wooden pole and solar panel got pointed south for maximum efficiency. I used a 150l water reservoir that honestly after testing it for two weeks is a bit small and something closer to 300l would be great. Also a rain water collection system could help here significantly.


You can find all the files for this project on my GitHub:

Here is a link to the Pico watering system:

And here is a link to the WDCS (Watering and Data Collection System):

Feel free to ask any questions, share the video and contribute to the open source project!

Happy making and have a nice day!

3D Printed duct fan

This is a 3D printed duct fan that can be used with a 775 motor or a popular BLDC (for example 2212). It can obviously also be adapted to any other motor. It’s an open-source project so below you can find STL files and .F3D files of a project so that you can easily modify and adapt it to your needs.

Consider supporting my work:

Become a Patron!


Below you can download ZIP with all the STL and F3D files of the duct fan, fans, and air filter attachments that I designed. You can also find here the PDF with all of my measurements and plots. Feel free to print, modify and share with others.

Tests and measurments

In the beginning, there was just an idea for a simple duct fan but later I thought that I can optimize it and design a better fan. In order to do that I experimented a lot and measure the performance of each fan while noting everything in a spreadsheet. Later I made a lot of plots to show how each fun perform and you can see all of that here:

You can also find a PDF version of that in the ZIP above.

Here you have 6 most interesting plots where you can observe the difference between performance of each fan and how the measuring method influences the end result.

How to build a robot?

Robots are cool, I think we all agree on that. Right here I would like to give you a short introduction to all the topics that you will most likely face while building your first robot. In the beginning, I just wanted to say no worries, building simple robots is not hard at all, most of it doesn’t even require any soldering (sometimes you may need to solder cables to motors, but for simple robots that’s the only soldering required).

I also wanted to point out the difference between a robot and not a robot. Some tutorials refer to an RC car as a robot but in reality robot is a device that can work on it’s own. At the same time it’s not about fancy futuristic artificial intelligence or humanoid robots, it’s about simple tasks that are solved by the robot completely without human interaction. So a line follower or an obstacle avoiding robot are great examples of ROBOTS while a “robot” and a human with a remote next to it is not a robot.

Keep in mind that this is not a complete tutorial with code, schematic and DIY instruction. It’s meant as introduction to all the topics you should know about in order to even start and understand some of the robotics tutorials so that instead of mindlessly following those you understand what’s going on.

If you want to start easily with a kit, you can check out something like this with all the parts, chassis, motors, sensors, and Arduino. If you prefer to buy components individually check out the list below.

Here you can see a short one minute introduction video, and to learn more about all the topics continue reading:


Microcontroller is a brain of the robot, all the logic, conditions and calculations are performed in here. To simplify it we can say that microcontroller is just a very very simplified computer, the internal structure is more or less similar. There is no screen or keyboard, just a chip with pins. By writing the program you can read pin states set conditions (if statements for example) do some math and set output pins conditions or communicate with other modules, sensors etc.

There are a lot of different types of microcontrollers but if you are just starting you should take a look at Arduino UNO (which is actually more than just a microcontroller, it uses Atmega328 as a microcontroller but Arduino is rather an ecosystem and collection of development boards). Any Arduino board is very easy to start with and Arduino UNO is additionally quite affordable (Original boards start at 23 USD or you can buy a Chinese Arduino clone for 5 USD). With UNO you can build blinking LEDs, learn electronics and programming, simple robots, home automation, measuring devices and even CNC machines! If you need more pins (trust me if you are just starting you don’t need more pins) you can buy Arduino Mega.

NameStore 1Store 2
Original Arduino UNO
Clone Arduino UNO
Original Arduino Mega
Clone Arduino Mega

Of course Arduino is not the only way to go. You can read about programming STM microcontrollers, AVR, or lately released Raspberry Pi Pico (programmed with C++ or Python). There are some more advanced boards like Maix Sipeed with an integrated screen and camera programmed with Python. You can also take a look at single-board computers like Raspberry Pi 4B or BeagleBone Black. But all of those examples are probably not the best for beginners.


In order to build a robot (not an RC car) we need sensors. Sensors are devices that measure physical things and transform those readings into electrical signals so that we can read those with microcontroller. For example, to build object avoiding robot we need an ultrasonic sensor that will measure the distance between a robot and an obstacle. This distance or actually two-way time of travel of sound that is processed into the distance can further be processed to decide if the obstacle is close enough to stop the robot or turn. With 2 conditional statements (if(…){}) you can write a simple program for such a robot.

Another popular sensor for simple robots is a line sensor that can be used to build a line follower, that is a robot that follows the black line. By using three of those sensors at the front of the robot you can write a simple program that will drive forward when the line is detected by the sensor in the middle, if the line is detected by the right sensor it should turn right, and if the left sensor detects line you need to turn left. This is a simple example of a not really efficient program for a line follower but it works really well 🙂

There are other types of sensors, there is a sensor to measure everything you can think of air quality, pressure, soil pH sensor, LIDARs, movements sensors etc. Once you get more familiar with basic sensors you can start playing with those a bit more advanced. Ultrasonic sensor and line sensor are probably the easiest to start with and pretty straight forward to use.

NameStore 1Store 2
Line Sensor
Ultrasonic Sensor
Sensor Kit


There is many options when it comes to motors for robotics but because this is an introduction I will focus only on simple and cheap motors. You should pay attention to the rated voltage and current of the motors. Usually, you should look for motors with voltage of about 5 to 12V. There should be a way to mount wheels or you will have to look for a DIY solution. In order to increase the torque and lower the RPM motor should have a built-in gearbox. To start I recommend those plastic yellow motors, those are not great and you wouldn’t build the most amazing robot ever with those but to start those are great!

NameStore 1Store 2
Yellow Motors
Small Motors
Bigger Motors

Motor driver (H Bridge)

There is no way to drive a motor directly with an Arduino, don’t even try because you will break it. In order to control the motors we need a motor driver also called H bridge. Again there is a lot of options and most of them are very similar. Main differences are max voltage and current that can be handled by a driver or some additional features. Some simple and popular drivers are listed below.

NameStore 1Store 2

Cables, Breadboards

Obviously, you will need some cables and a breadboard to connect everything together. They’re nothing complicated, buy some female-female, female-male, male-male cables. When it comes to breadboard use a bigger one for bigger projects and a smaller one for smaller projects, usually power rails on the sides are very useful.

NameStore 1Store 2


In order to attach everything together, you will need a chassis. You can buy a set with chassis, motors and wheels or you can try to find your own DIY solution and make a chassis out of plastic or even cardboard (that’s how I built my first robot).

NameStore 1Store 2
Chassis 1
Chassis 2


The battery is always a really problematic part of building robots. The most common choice is a LiPo battery but it’s a little bit dangerous, you have to take care of it and be careful because discharging the cells under 3.2V may damage the battery. Those batteries are sold as 1S, 2S, 3S and so on which means one, two or three cells because each cell has a nominal voltage of 3.7V a two-cell battery has a nominal voltage of 7.4V (and a max voltage of 8.4V). Batteries vary with capacity, the bigger the capacity the longer you can power the robot. There is also max current that can be drawn from a battery this is labeled as for example 10C and it means that capacity multiplied by 10 will give the max amperage that you can draw from a battery.

Another (probably safer) way to go is to use protected 18650 batteries. It’s also more complicated because you need to create a battery pack on your own and combine a few of those batteries in parallel or in series. Professionally those batteries are spot welded together but you can just easily use a battery box to keep them together.

I don’t recommend going with AA or AAA batteries as you will need to recharge or replace those very often (it’s not good for the climate and your wallet) and the max current of those isn’t enough for some motors.

NameStore 1Store 2
2S LiPo
3S LiPo
4S LiPo
18650 Battery
18650 Box


A lot of people are scarred by programming, I am not really sure why. Programming is easy, you don’t need math to create simple robots! If you have any experience with C++ or similar programming languages you can start programming Arduino right now. If you don’t no worries, there is a lot of great tutorials and examples online. Once you start and try to write your own programs you will realize that it’s not that hard.

You can find some cool tutorials on official arduino website:

Or just type “Arduino tutorial” into YouTube and you will find thousands if videos on this topic!

I hope this article helped you a bit with your robotics journey! If so don’t forget to share with friends and share you progress on Instagram by tagging me: @nikodembartnik and @indystry

Have a nice day!

Arduino Based Air Quality Monitor

The air quality is a pretty big problem in my city. We have a monitoring station but it’s quite far from where I live so I decided to build myself a local, simple and nice-looking air quality monitor. You can learn more about the whole project and how I made it in this video:

Below you can find all the files and code for the project. And here are the parts that I used:

Arduino Nano
Air Quality Sensor
NeoPixel Ring


#include <Adafruit_NeoPixel.h>
#include <SoftwareSerial.h>

#define LED_PIN 6 
#define SLEEP_PIN 5
#define MAX_PM1_LEVEL 50
#define MAX_PM25_LEVEL 30
#define MAX_PM10_LEVEL 40
#define NUMPIXELS 24 
Adafruit_NeoPixel pixels(NUMPIXELS, LED_PIN, NEO_GRB + NEO_KHZ800);

// 0 - green, 1 - blue, 2- orange, 3 - red
int last_color = 5;

#define LENG 31   //0x42 + 31 bytes equal to 32 bytes
unsigned char buf[LENG];

SoftwareSerial SoftSerial(10, 11); // RX, TX

void setup() {
  pinMode(5, OUTPUT);

void loop() {

digitalWrite(SLEEP_PIN, HIGH);
delay(1000L * 60L);
int pm01_level = 0;
int pm25_level = 0;
int pm10_level = 0;

int air_quality[3];


pm01_level = air_quality[0];
pm25_level = air_quality[1];
pm10_level = air_quality[2];

if(pm01_level < MAX_PM1_LEVEL && pm25_level < MAX_PM25_LEVEL && pm10_level < MAX_PM10_LEVEL){
  if(last_color != 0){
  last_color = 0;
}else if((pm01_level > MAX_PM1_LEVEL && pm25_level < MAX_PM25_LEVEL && pm10_level < MAX_PM10_LEVEL) || (pm01_level < MAX_PM1_LEVEL && pm25_level > MAX_PM25_LEVEL && pm10_level < MAX_PM10_LEVEL) || (pm01_level < MAX_PM1_LEVEL && pm25_level < MAX_PM25_LEVEL && pm10_level > MAX_PM10_LEVEL)){
  if(last_color != 1){
  last_color = 1;
}else if((pm01_level > MAX_PM1_LEVEL && pm25_level > MAX_PM25_LEVEL && pm10_level < MAX_PM10_LEVEL) || (pm01_level > MAX_PM1_LEVEL && pm25_level < MAX_PM25_LEVEL && pm10_level > MAX_PM10_LEVEL) || (pm01_level < MAX_PM1_LEVEL && pm25_level > MAX_PM25_LEVEL && pm10_level > MAX_PM10_LEVEL)){
  if(last_color != 2){
  last_color = 2;
}else if(pm01_level > MAX_PM1_LEVEL && pm25_level > MAX_PM25_LEVEL && pm10_level > MAX_PM10_LEVEL){
  if(last_color != 3){
  last_color = 3;
Serial.print("PM01: ");
Serial.print("PM2.5: ");
Serial.print("PM10: ");

digitalWrite(SLEEP_PIN, LOW);
delay(1000L * 60L * 3L);


void SetColor(int r, int g, int b){
  for(int a = 255; a > 0; a--){
  for(int i = 0; i < NUMPIXELS; i++) { 
    pixels.setPixelColor(i, pixels.Color(r, g, b));;   


void CheckAirQuality(int* air_quality){
  if(SoftSerial.find(0x42)){    //start to read when detect 0x42

    if(buf[0] == 0x4d){
        air_quality[0] = transmitPM01(buf); //count PM1.0 value of the air detector module
        air_quality[1] = transmitPM2_5(buf);//count PM2.5 value of the air detector module
        air_quality[2] = transmitPM10(buf); //count PM10 value of the air detector module

char checkValue(unsigned char *thebuf, char leng)
  char receiveflag=0;
  int receiveSum=0;

  for(int i=0; i<(leng-2); i++){
  receiveSum=receiveSum + 0x42;

  if(receiveSum == ((thebuf[leng-2]<<8)+thebuf[leng-1]))  //check the serial data
    receiveSum = 0;
    receiveflag = 1;
  return receiveflag;

int transmitPM01(unsigned char *thebuf)
  int PM01Val;
  PM01Val=((thebuf[3]<<8) + thebuf[4]); //count PM1.0 value of the air detector module
  return PM01Val;

//transmit PM Value to PC
int transmitPM2_5(unsigned char *thebuf)
  int PM2_5Val;
  PM2_5Val=((thebuf[5]<<8) + thebuf[6]);//count PM2.5 value of the air detector module
  return PM2_5Val;

//transmit PM Value to PC
int transmitPM10(unsigned char *thebuf)
  int PM10Val;
  PM10Val=((thebuf[7]<<8) + thebuf[8]); //count PM10 value of the air detector module
  return PM10Val;

It’s hard to create a nice schematic for this project as there is no Fritzing library for PM2.5 sensor, and I have no idea how to create one 🙂 That’s why below you can find a text only explanation on connection, definitely not a perfect option but at the same time better than nothing:

Air Sensor RXPIN 10
Air Sensor TXPIN 11
Air Sensor 5V5V
Air Sensor GNDGND
Air Sensor SLEEPPIN 5
LED Ring 5V3.3V

As you can see in the table above I connected LED ring 5V to the 3.3V on the Arduino, that’s because there is only one 5V pin on Arduino Nano and it has to be used for Air quality sensor because it doesn’t work with 3.3V.

Thanks a lot for reading and happy making! I hope my air quality sensor will serve you well! And don’t forget to check out my other projects:

Object Tracking Robot – FollowBot V2

This is a second version of original FollowBot made in 2015. This one uses Maix Sipeed board with a camera and LCD screen. With 2 micro servo motors I made a small pan-tilt mechanism. Here you can read some more about how I made this project.

I decided to use new Maix Sipeed board, it’s quite powerful, has build in camera and you can program that in python so I though it should be quite easy to make such project with this board. I was right. If you have at least a little bit of experience with Python and electronics you can do some really cool stuff.

Firstly I had to develop a simple program for tracking red objects. I started by using blob detection algorithm. Basically it searches for all red blobs on the image and store that in a table. Then I had to find the biggest blob as that’s most likely what I want to track (simple for loop with one if statement and one variable can do it). And that’s it, within 40 lines of code you can detect simple single color objects. You can read more about that and find some examples here:


Maix Sipeed
Robot Chassis
Motor Driver

There is no servo library for this board so that’s a downside because you need to figure out on your own how to control a servo (later I noticed that there is a servo example on github linked above). Servo is controlled with 50Hz PWM signal, high signal should be between 1 ms – 2 ms so that’s a duty of 5-10% (5% * 1/50s = 1 ms, 10%*1/50s = 2 ms). With a timer I was able to set up such PWM signal, a simple servo example can be found in all of the files (you can download them at the bottom of the page).

I also designed my own minimal pan and tilt mechanism in Fusion360. STL files are also at the bottom of this page.

I made my own functions to control DC motor driver but that was obviously very easy. Here is how I connected the motor driver and servos to the board.


Maix SipeedDC Motor Driver/Servo
PIN 0Pan Servo Signal
PIN 1Tilt Servo Signal
PIN 9Motor Driver ENA
PIN 10Motor Driver IN1
PIN 11Motor Driver IN2
PIN 12Motor Driver IN3
PIN 13Motor Driver IN4
PIN 14Motor Driver ENB
GNDMotor Driver and Servo GND
5VMotor Driver and Servo 5V

After that I simply connected all small programs that I wrote and put everything on my robot chassis. And it was time for the final test that you can see on the video below.

Here you can find a ZIP archive with all the files including my small subprograms, main and all STL files that you can print. Feel free to edit those and customize this project to make it work for you. Don’t forget to share your work with others and link to my project 🙂

Thanks for reading this short project description, it’s definitely not a full tutorial but I hope it will be helpful for some of you!

How to build 3D printed Dremel CNC?

Try typing Dremel CNC to Google or Youtube, the internet is filled with my videos and tutorials about building 3D printed Dremel CNC. I kind of feel just like repeating over and over the same content and that is creatively hard for me because I like creating new stuff the most and not focusing on past projects.

At the same time, I understand that a lot of people want to build DIY Dremel CNC because it’s simple, cheap, and inexpensive, totally understandable! A CNC machine that can be easily 3D printed and assembled with easy to buy components, that was the goal of this project, and looking at reviews of hundreds of makers all around the world I think the project turned out perfectly! I am more than happy that such a simple idea of mine can help so many makers, businesses and people. As you may know, I am working on a new bigger CNC machine called IndyMill, that’s why I created this website to share all the info about this machine, release files, and maybe even create a small business out of that! But I don’t want to forget about Dremel CNC and I know there is still a lot of people that want to build it but don’t know where to start. That’s why I made this post, actually, the first one on, I hope to make some more in the near future 🙂 Let’s start!

Continue reading “How to build 3D printed Dremel CNC?”