Project tutorial
Waternator 293

Waternator 293 © GPL3+

The Waternator 293 is a simple device that regulates the water level in your Christmas tree base.

  • 8 respects

Components and supplies

Ph abx00005 iso (1) bavevgguw1
Arduino 101
Ard wifi101
Arduino Wifi Shield 101
Adafruit ProtoSheild R3
This isn't strictly necessary, but offers an excellent platform to build your project. If you choose replace this with a custom board, or your own idea, don't forget to add .1µF caps to your 5v circuit.
Vertical Float Switch
Any vertical float switch should work.
Horizontal Float Switch
Any horizontal float switch should work.
12" eTape Liquid Level Sensor with Plastic Casing
This device isn't the most accurate but works well for our purposes and can be made more consistent and accurate in code.
Adafruit Peristaltic Pump
This pump is a little on the slow side but it's food safe. If you're not using it for human, animal, or plant consumption and need a higher flow rate you could find a different pump.
Adafruit industries ada1536 image
Used for alerting of an an error. Could be left off.
Texas Instruments L293D Dual H-Bridge Motor Driver
DC motor control chip, allows us to control motor speed and direction.
Mfr 25frf52 10k sml
Resistor 10k ohm
Get them from wherever. 1/4w is fine.
Mfr 25fbf52 4k75 sml
Resistor 4.75k ohm
Get them from wherever. 1/4w is fine.
30pF Ceramic non-polarized capacitor
Any 30pF, non-polarized, ceramic cap should do it. This capacitor does need to be able to connect across the motor leads to filter out high frequency noise. Most small capacitors don't have long enough leads to do this. I found this one online that should.
16-pin IC Socket
2-Pin Terminal Block
Make sure the pitch is correct (.1") to go on a perfboard.
7-pin Terminal Block
Make sure the pitch is correct (.1") to go on a perfboard.
Adafruit 19.5" Servo Extension Cable
This is to extend the cable on the eTape liquid level sensor. These come in various sizes...get whatever on you need to make it long enough for your application or make your own.
Adafruit 12V 1A Power Supply
Kemet c320c104k5r5ta image
Capacitor 100 nF
Don't forget to buy an extra if you're not using the Protoshield. 12v capable.
Panasonic eca1hm2r2
Capacitor 10 µF
I used a Tantalum Capacitor not a Electrolytic. That said I think this capacitor could be left out of the circuit. It was added while diagnosing some issues. I later added a 47µF electrolytic cap that should be able to to low frequency filtering. 12v capable.
Panasonic eca2am470 image
Capacitor 47 µF
12v capable.
Panasonic eca2am101
Capacitor 100 µF
Just needs to handle 6.5V (fluctuating 5v)
Project Enclosure
This case fits everything perfectly. The one thing I didn't add to this project was a panel mount USB. If you want to add one this case might be a little small.
.12" Cable Gland
This gland is very snug, a larger one might not hurt. The sensor cables simply pass through this. It's waterproofness is not needed.
Panel Mount 2.1mm DC barrel jack
USB-B Panel Mount
I didn't add this to my project but would highly recommend. Once everything was wired in it was troublesome to get the USB plugged in. Please note: the project enclosure specified for this project is a very snug fit. I'm not sure that you could get this USB pass-through mounted in this enclosure. I would recommend finding a larger enclosure.
Motor Mount Screws (#4 3/8" Metal Screws)
22 Gauge Solid Core Wire (various colors)
Adafruit has a good option.
Shrink Wrap (various sizes)
I mostly used smaller 1/8" diameter to protect the DC 12V input leads and the motor leads.
Silicon Tubing
I wanted to make the pump output line longer. Local hardware store might have something. Something soft is good. Doesn't matter what if liquid is not being consumed.
Adhesive Velcro 2"x4"
I used a little Velcro to attach the project enclosure to the side of the source reservoir.

Necessary tools and machines

09507 01
Soldering iron (generic)
1/16" Drill Bit
For tapping the motor mount screws.
1/4" Drill Bit
Hole for tubing to enter source reservoir.
1/2" Drill Bit
Vertical float sensor, cable gland, and DC jack holes.
3/4" Drill Bit
For horizontal float sensor. 13/16" might be better but is less common.
1" Drill Bit
Motor mount hole. This is slightly small and you need to use something like a Dremel or sandpaper to make it larger. Alternatively you could try and find a 17/16" drill bit.
Dremel Tool
The 1" hole for the motor mount isn't quite big enough. I used a Dremel tool with a sand paper tool to make it about 1/16" larger. You could use sandpaper, a file, or the correct size drill bit.

Apps and online services

Blynk logo new svawbywyip
Used for smartphone control and monitoring interface
Ide web
Arduino IDE

About this project


The Waternator 293 is a simple device that regulates liquid level in a container. Using an Arduino 101, sensors, reservoir, pump, and a mobile app you can take the guess work out of knowing if the water level is low. Once set up, tuck reservoir container away and let the system do all the work. With the supplied app you can set minimum and maximum liquid levels, get push notification alerts, and you can see if the main reservoir needs refilling.

Applications include, but are not limited to:

  • Christmas tree base
  • Fishtanks
  • Punchbowls
  • Cat/Dog water bowls
  • Hydroponics

Circuit Assembly

First thing to assemble is Adafruit's protoshield. They have an excellent assembly guide here. I used the non-stacking headers for assembly, which made testing and diagnostics a little harder, but saved space. You can do either.

Next, let's get our components onto the protoshield. I would recommend laying out your components first and then cut and bend wire to make all the connections. This allows you to find the best placement and routing before you solder anything.

I highly recommend using both sides of the board to run wires and mount components. You can also use the long leads of capacitors and resistors to make connections instead of cutting them off. For items with short leads like the buzzer and pin blocks, it’s easiest to connect to them by soldering the wire directly to the lead as shown in fig. 1.

Here are the pins I used for each of my connections, I highly recommend you use these pins (You are welcome to modify my IO pin usage; you will have to modify the code and avoid using pins used by the WiFi 101 shield.) See the circuit schematic for complete wiring information.

  • L293 IC pin 1 -> Digital 3
  • L293 IC pin 2 -> Digital 4
  • L293 IC pin 7 -> Digital 8
  • eTape signal -> Analog 0
  • Lower horizontal float sensor -> Digital 9
  • High vertical float Sensor -> Digital 2
  • Buzzer pin -> Digital 15 (same as Analog 1)

Once you are satisfied with your wire and component layout, take some photos for your own reference. Remove everything and, starting with the components, start soldering everything onto the board.

Finally, for this soldering process, here are some tips on the various components:

  • IC-L293D - It is hard to re-solder an IC or IC socket. I accidentally mounted my IC socket backwards. You can always just put the IC in "the wrong way" but it is confusing. Make sure you know which direction you are mounting the IC socket.
  • Terminal Headers - These little things twist in the perf-board a bit, or get tilted, or not seated against the board all the way when soldering. I would recommend just getting one leg soldered without worrying about getting the header perfectly positioned. Once it is attached you can reheat the solder on the one pin and get it positioned exactly as you would like.
  • Wires - My hands tend to shake when I solder. I have to be extra carful when I start getting lots of stuff on the board to not accidentally melt the jacket on a nearby wire. Basically, be careful.
  • eTape Wiring - The eTape wiring harness is wired backwards. The red wire is ground, the black wire is V+, and the white wire is (correctly) the output to the analog input. I "fixed" this by soldering the terminal pins backwards for ground and V+. This way I did not have to switch the wires on the sensor when I attached it to the terminal block. Do what makes sense to you.

That is it! Hopefully you have a complete protoshield with all the components correctly wired. Here are photos of what my protoshield looks like with everything wired up. I did not have all the stacking headers so that aspect is missing in these photos, I instead directly soldered the motor and power supply leads. Once you stack it onto the Arduino 101 and WiFi 101 shields you will be ready to go.

eTape Calibration:

Your eTape sensor needs calibration. Everything I found online gives the right process for calibration, but used the numbers in an equation solving for volume, not for height of water like the eTape is used for in our situation. In the Github for this project there is a calibration sketch for the eTape that will send the resistance read and the calculated depth to the serial monitor. In that sketch are instructions on how to calibrate the device. Follow them and update the variables in code to the correct value, then reload the sketch with the modified variables and you should now have an accurate depth measurement. The three variables to update are:


Once you have your 3 calibration numbers you can save these to use later in the final sketch.

Note: The first 2.54 cm (1 in.) is unresponsive on the eTape. You can see this in the spec sheet. Ignoring this issue means inaccuracy in measurements because the slope of the line is incorrect. I fixed this issue in the math and by always displaying the calculated water level. What this means in reality is even if your destination container is empty the app will say there is ~2.54cm of water. Just know it will never read below ~2.54cm. If anyone thinks of a clever way to get around this issue, please submit a ticket on the Github project.

Project Assembly

Now that we have a circuit assembled and the needed calibration information, we can move to assembling all the parts together. We have a project enclosure for the electronics and we have the source container to hold liquid. We chose a "Snapware" container for our source container. Depending on your use case and the volume of water you are moving you might want a larger or smaller container. The lid on this container made it easy to refill and had room for the sensor.

Let's start by preparing the project enclosure. This enclosure fits everything quite snuggly, so measure out everything before drilling holes or you may mount something in an “unfortunate" location. You have 3-4 holes to drill in the project enclosure:

  • Panel mount DC jack - 1/2 in.
  • Cable gland - 1/2 in.
  • Peristaltic pump - 1 in. + Dremel or 17/16 in.
  • OPTIONAL: USB-B port - I would recommend a Dremel or multiple drill holes + a Dremel.

Once everything is drilled and Dremeled you can mount your components. For the peristaltic pump you will need to drill 1/16 in. pilot holes for the mounting screws.

Next, let's turn to the source container. There are 3 holes we will need to drill here:

  • Vertical float switch - 1/2 in.
  • Pump hose - 1/8 in.
  • Horizontal float switch - 13/16 in. (3/4 in. works but is a little snug)

The vertical float switch mounts to the top of your container, so the project knows when it is full. It can be anywhere on the lid (you could replace this with another horizontal float switch and mount it near the top if you want to keep you lid clear). The pump hose hole should be near where you project enclosure will be mounted and will not seal so should be on the lid (if you made the vertical float a horizontal float and moved it to the side you could put this hole above that switch).

The horizontal float which is mounted at the bottom of the container and is used to notify you when your source container is low on water. The exact location does not matter, just know the lower it is the less warning you have that it is low on water. If you later realize you want less notification, you can always rotate the switch 180 deg. Meaning the switch closes when the water rises instead of opening when the water rises. If you make this change you will have to modify the code to adjust for the inversion of the switch states.

Once the holes are drilled mount your switches!

Finally, we will attach the project enclosure to the source container and wire the sensors, power input, and pump to our project.

  • Using sticky velcro attach the project enclosure to the side of the source container.
  • Solder leads to the DC jack and cover leads with shrink wrap.
  • Solder leads and the 30pF capacitor to the pump and protect with shrink wrap.
  • Run the sensor cables through the cable gland and cut to an appropriate length. You will need to cut off the correct end of the servo extension cable in order to get it through the gland and connected to the terminal block. I would recommend tinning the ends of these wires as it will strengthen the connection and make it easier to connect them to the terminal blocks.
  • Put your Arduino shield stack into the project enclosure and attach the sensor leads, the power leads, and the motor leads to the correct terminals.


First things first you will want to get a copy of the Blynk App on your phone.

  • Create a Blynk account

Once you have gotten the project cloned onto your Blynk account (you will probably need to buy some "energy”), you can send yourself the auth code from the project settings.

Next, we will update the code to work for your Blynk project. Access your WiFi, and enter the calibration info from earlier. There are 3 places you need to edit.

For the auth code find the line that that looks like the code bellow and replace 'authcode' with your code.

char auth[] = "AUTHCODE";

For the WiFi credentials, find the section that looks like the code below and enter your SSID and Password. NOTE: This code is for WPA/WPA2. If you use WEP you are living in the 90s and need to update your WiFi security. Blynk supports WEP, but it is up to you to figure it out. If you have no password leave it blank.

char ssid[] = "SSID";
char pass[] = "PASSWORD";

For the calibration data find the section that looks like below (it is the same code as from the calibration sketch), and edit the variables to match your calibration data.

//Water Sensor Calibration 
 #define SERIES_RESISTOR    2000
/* The following are calibration values you can fill in to compute the depth of measured liquid. 
* To find these values first start with no liquid present and record the resistance as the 
* ZERO_DEPTH_RESISTANCE value.  Next fill the container with a known depth of liquid and record 
* the sensor resistance (in ohms) as the CALIBRATION_RESISTANCE value, and the depth (which you've 
* measured ahead of time) as CALIBRATION_DEPTH. 
 #define ZERO_DEPTH_RESISTANCE   2047.00    // Resistance value (in ohms) when no liquid is present. 
 #define CALIBRATION_RESISTANCE    732.00    // Resistance value (in ohms) when liquid is at max line. 
 #define CALIBRATION_DEPTH        25.3    // Depth (in any units) of liquid as measured by the eTape. I would recommend submerging at least half the eTape but theoretically any depth should work. 

You can now upload your sketch and you should have a working project! There are many variables you could alter in this project to fine tune it to your needs; I will point out some basics below.

15. #define BLYNK_PRINT Serial 
16. //#define BLYNK_DEBUG 
17. #define SERIALDEBUG 
19. //BLYNK can connect using Wifi or BLE. BLE is in beta and unreliably connects and will randomly drop the connection. 
20. //Uncomment the one you wish to use, but not both.  
21. #define BLYNK_WIFI //Use WIFI 
22. //#define BLYNK_BLE //Use BLE 
  • Line 15 - This must be the first line of code in your project (it is a Blynk quirk). This allows Blynk to output basic info about connectivity. Comment this out to save space and processing power.
  • Line 16 - Uncomment this along with line 15 if you need advanced Blynk debugging.
  • Line 17 - Comment this out if you want no serial connectivity. Once your project is up and running, it will keep it from even compiling serial code info onto the Arduino, and save you some space and processing power.
  • Line 21 & 22 - You can choose to use Bluetooth (Bluetooth is extremely buggy at this point in time and does not allow "cloud" connectivity) or WiFi (Reliable and allows you to monitor from anywhere on your smart phone). Uncomment whichever line is appropriate for the connection you want to use. The compiler will throw an error if you uncomment both.

Finally, you will need to install the Simple Timer and Time libraries to your IDE. The versions used on this project can be found in the Github repo. You can find instructions on installing custom ZIP libraries to the Arduino IDE here.

Final Steps

Once you are happy with the code and you've tested the functionality you can put on the cover for the project enclosure and revel in the glory of your skills.


We hope you enjoyed our project! It has been a huge learning curve for us, but we have strived to design a product that is useful and easy to use. If you have any questions or need help on the project you can contact us over at Github or here on


Code Repository
Here's the code repository for the project.


Circuit Schematic
This is the complete circuit. The only thing this circuit doesn't show is the Arduino WiFi 101 shield or the protoshield (it does show the LED and Capacitors we used on the protoshield). NOTE: There is a copy of this diagram in the Github Repo. If there are variations the github copy should be considered correct.
Water refill final schem w0ay9wehjx


Add projectSign up / Login