Automatic plant watering device
Each of us has long been accustomed to using all kinds of gadgets that make life easier: mobile phones, all kinds of smart phones and tablets, etc... In this article we will replace your usual watering can with a technological device for watering flowers, which will take care of your favorite indoor plant even if you went on vacation.
The device is assembled on the basis of an affordable ATMEGA 8 L microcontroller in a cheap TQFP32 package and a motor from a computer hard drive (HDD), which can be taken from an old computer hard drive. The diagram contains a minimum number of parts and can be supplemented with arbitrary functionality. It is powered by two 18650 Li-ion batteries with a voltage of 3.7 Volts connected in series.
Watering is carried out in fixed portions every 24 hours.
The only button is a work test; after pressing it, subsequent waterings will be carried out exactly at the same time, accurate to the second. (I just turned it on on vacation, no settings, so it can be offered as a gift option, without unnecessary instructions).
Design Features:
The design consists of a pump (pump) immersed in a vase with a tube for watering and a small electronics unit mounted on the same vase with water.
We will need a CD, a 1.5 liter plastic milk bottle (with a wide neck, internal diameter 33 mm), super glue, a four-core wire (I took a damaged wire from charging an iPhone), three screws, washers and three nuts and a piece of flexible tube.
We cut off the neck of the bottle with a hacksaw exactly along the edge of the “skirt” and level the resulting cut with sandpaper, a file or a block.
In this way we prepare the so-called working chamber of the pump.
Next we need a CD disk, its internal hole is exactly the same size as the motor, we will make an impeller from the disk.
The disc can be easily cut with scissors, and it is good if it is slightly heated in hot water to prevent cracking of the cut edge.
We take the sawn-off part from the bottle - our working chamber - and apply it exactly to the center of the disk with the part where the screw cap was.Draw a circle with a marker and cut it out with regular scissors. The resulting disk will not be perfectly smooth, but it can be corrected with sandpaper, the main thing is that the disk can fit inside the working chamber with a minimum gap.
It turned out to be a ring of the future impeller.
Now we need to make the blades for the “propeller”. To do this you will need half a disk. Draw a 7mm wide strip with a marker and cut it off with scissors.
We sand and level it.
Next, cut into six equal parts of 13 mm each, and bend them with pliers on both sides
The further procedure will require maximum care; you need to glue the blades one by one with super glue at an equal distance.
Please note that the blades are curved so that they do not rake water into the chamber opening, but, on the contrary, seem to throw it from the center to the hole at the edge. The motor will only rotate counterclockwise. You can lightly fix it with a drop, level it with tweezers and after drying a little, add glue to the missing parts.
Try to avoid toxic fumes from second glue. After which you can dry it and varnish it. I only had nail polish on hand, which is quite durable.
Then you will need a piece of flexible hose, for example I took a piece from a construction liquid level.
Drilling an even hole in the threaded surface of the neck is not so easy, I first had to practice on a couple of bottles, in the end I melted it evenly with a soldering iron and smoothly cleaned it from the inside so that the blade did not touch the irregularities.
We insert a piece of hose cut at a slight angle with force into the neck hole and fix it with transparent moment-type glue. The tube and chamber opening must be of sufficient diameter, about 8 mm.It is advisable to insert the tube not at a right angle to the body, but taking into account the fact that the flow will rotate counterclockwise.
It is not advisable to use super glue to attach the tube, because... When it dries, it greatly damages the surface of the plastic and the body becomes cloudy, losing transparency. A transparent sealant or gel-based adhesive works great here.
Now all that remains is to assemble the pump, attach the chamber to the motor, center it to ensure free rotation of the blades inside, secure it with screws, seal the cracks with transparent sealant and glue a transparent cover with a 14 mm hole in the middle on top.
Let me remind you that the impeller will rotate strictly counterclockwise, this is important. Next, solder the four-core wire to the motor and cover the soldering with varnish, solder the blue smd Light-emitting diode to one of the windings (through a 1 kOhm resistor), the anode to the common. Now, when working, it flickers under water.
A few words about hard drive engines.
Some types of such motors, when spinning the rotor by hand, continue to rotate in one direction noticeably with better glide than in the other. That is, if you try to rotate clockwise, the rotor will stop almost immediately. Such devices have a different bearing design and these engines are probably better suited for our purposes. Although both types have been working in water for a long time and are doing great.
The windings are checked like this. The motor must have four contacts. We need to find one of the extreme contacts which is the middle point. This pin will be connected to the power positive, the rest of it in order - first, second, third - will be connected to mosfets. Using a tester, we measure the resistance between all adjacent contacts.One of the outer contacts will show less resistance.
This is general, it is on the positive bus. It is highly advisable to fix the wire on the motor housing; to do this, you can drill a couple of millimeter holes and press this cable with a copper bracket. When the pump is ready, a curved hose with an internal diameter of at least 8 mm is placed on its nozzle. and 20 cm long through which watering will be carried out. Now you can make a printed circuit board and solder the device.
The board is made from single-sided fiberglass using the LUT method.
Please note that the picture of the trace and layout of the printed circuit board is not mirrored to make it easier to check during installation. When printing the LUT, you need to turn it mirrored, or use the SprintLayout file located in the archive.
The board can also be painted with nail polish in this way:
The rod of the ballpoint pen heats up (a little!) over the flame of the lighter, turning it evenly and pulling it out evenly. Next, the thin end is cut off with a blade. This produces a conical tube with a very small outlet opening. It can be inserted inside a 1.5 cc syringe, and using regular nail polish, you can draw traces of printed conductors on the board.
After drying, the board is dipped into the etching solution. This can be a mixture of copper sulfate with salt 1:3, and water. The solution is prepared as concentrated as possible. Heating is required, for example, over a candle flame. The process is accelerated with constant stirring. Copper sulfate is sold at any agricultural store.
The microcontroller is powered using a parametric voltage stabilizer assembled on elements D1, R7, Q1.
The resistor value is chosen in such a way that the stabilizer’s own consumption is as low as possible. Much lower than the so-called “Krenka”.
This schematic solution made it possible to reduce consumption to 0.3 mA.
This is very important, because the duration of operation of our design without recharging the batteries depends on it.
Transistor Q1 - npn is not critical.
Zener diode for stabilization voltage 5.1 V. You can use it from a mobile phone charger. Quartz resonator - 32.768 kHz. Regular watch quartz. From quartz watches. MOSFETs soldered from the motherboard of an old computer are used as keys in the circuit. Light-emitting diode SMD. Can be made from LED strip.
Speaker - any suitable size. You can use a speaker from a mobile phone.
Installation of the circuit should begin with a voltage stabilizer, and then measure the voltage at its output (capacitors C2 and C3). It should be 5 Volts. Then you can solder in the microcontroller and everything else.
In the circuit, the unused and wired pins of the microcontroller ports PB0, PB1, PD6 can be used to connect peripherals.
The microcontroller program algorithm is constructed as follows.
The controller is configured to operate in asynchronous mode. Interrupts occur once per second, at which time the program calculates the time, flashes the LED briefly (every 10 seconds) and immediately goes into sleep mode to save power consumption. If the hour counter goes to zero (immediately after a reset button or after 24 hours), the controller supply voltage is measured four times and compared with the internal reference voltage.If the voltage is below the permissible level, the circuit emits periodic sound signals indicating that the battery is low; after fifteen signals, the controller is set to power down mode and goes into sleep mode until the batteries are recharged again.
If the voltage is above the threshold value, a sound signal sounds and lights up. Light-emitting diode. Next, the initial position of the motor rotor is set and short-term pulses are successively applied to the motor windings. The duration of the pulses and the pauses between them gradually decrease, thus increasing the motor speed and further constantly rotating the blade, thereby ensuring an accurate portion of watering. Light-emitting diode at the same time it flashes synchronously.
At the end of watering, the circuit again goes into standby mode to calculate the time. It is in this mode most of the time, this achieves high energy efficiency (about 0.3 mA).
While the main program is running, the controller is clocked by an internal oscillator with a frequency of 8 MHz, and in sleep mode, an external clock quartz allows you to accurately read the time.
Brief outbreaks LED every 10 seconds they signal about the operation of the device. From the start of the seconds resetting, it will flash for 30 minutes and then stop flashing for 12 hours and resume after another 12 hours. Thus, if you set watering at 00 o’clock, then flickering will not occur at night, but only from 12 o’clock in the afternoon.
Archive with materials for the article. Available for download only to registered users.
Video of the device working:
The device is assembled on the basis of an affordable ATMEGA 8 L microcontroller in a cheap TQFP32 package and a motor from a computer hard drive (HDD), which can be taken from an old computer hard drive. The diagram contains a minimum number of parts and can be supplemented with arbitrary functionality. It is powered by two 18650 Li-ion batteries with a voltage of 3.7 Volts connected in series.
Watering is carried out in fixed portions every 24 hours.
The only button is a work test; after pressing it, subsequent waterings will be carried out exactly at the same time, accurate to the second. (I just turned it on on vacation, no settings, so it can be offered as a gift option, without unnecessary instructions).
Design Features:
- Battery operation for several months (low power consumption);
- very precise watering dosages and precise time intervals between waterings;
- non-criticality of the circuit to details and their availability;
- the absence of moving live parts in the motor, and as a result - durability and reliability when working in water;
- very low noise level when the engine is running;
- does not require any settings (watering once a day) with sound and light accompaniment;
- protection against deep battery discharge with audible warning about the need to charge;
- Automatic shutdown of light indication at night.
The design consists of a pump (pump) immersed in a vase with a tube for watering and a small electronics unit mounted on the same vase with water.
So, first, let's start making the pump.
We will need a CD, a 1.5 liter plastic milk bottle (with a wide neck, internal diameter 33 mm), super glue, a four-core wire (I took a damaged wire from charging an iPhone), three screws, washers and three nuts and a piece of flexible tube.
We cut off the neck of the bottle with a hacksaw exactly along the edge of the “skirt” and level the resulting cut with sandpaper, a file or a block.
In this way we prepare the so-called working chamber of the pump.
Next we need a CD disk, its internal hole is exactly the same size as the motor, we will make an impeller from the disk.
The disc can be easily cut with scissors, and it is good if it is slightly heated in hot water to prevent cracking of the cut edge.
We take the sawn-off part from the bottle - our working chamber - and apply it exactly to the center of the disk with the part where the screw cap was.Draw a circle with a marker and cut it out with regular scissors. The resulting disk will not be perfectly smooth, but it can be corrected with sandpaper, the main thing is that the disk can fit inside the working chamber with a minimum gap.
It turned out to be a ring of the future impeller.
Now we need to make the blades for the “propeller”. To do this you will need half a disk. Draw a 7mm wide strip with a marker and cut it off with scissors.
We sand and level it.
Next, cut into six equal parts of 13 mm each, and bend them with pliers on both sides
The further procedure will require maximum care; you need to glue the blades one by one with super glue at an equal distance.
Please note that the blades are curved so that they do not rake water into the chamber opening, but, on the contrary, seem to throw it from the center to the hole at the edge. The motor will only rotate counterclockwise. You can lightly fix it with a drop, level it with tweezers and after drying a little, add glue to the missing parts.
Try to avoid toxic fumes from second glue. After which you can dry it and varnish it. I only had nail polish on hand, which is quite durable.
Then you will need a piece of flexible hose, for example I took a piece from a construction liquid level.
Drilling an even hole in the threaded surface of the neck is not so easy, I first had to practice on a couple of bottles, in the end I melted it evenly with a soldering iron and smoothly cleaned it from the inside so that the blade did not touch the irregularities.
We insert a piece of hose cut at a slight angle with force into the neck hole and fix it with transparent moment-type glue. The tube and chamber opening must be of sufficient diameter, about 8 mm.It is advisable to insert the tube not at a right angle to the body, but taking into account the fact that the flow will rotate counterclockwise.
It is not advisable to use super glue to attach the tube, because... When it dries, it greatly damages the surface of the plastic and the body becomes cloudy, losing transparency. A transparent sealant or gel-based adhesive works great here.
Now all that remains is to assemble the pump, attach the chamber to the motor, center it to ensure free rotation of the blades inside, secure it with screws, seal the cracks with transparent sealant and glue a transparent cover with a 14 mm hole in the middle on top.
Let me remind you that the impeller will rotate strictly counterclockwise, this is important. Next, solder the four-core wire to the motor and cover the soldering with varnish, solder the blue smd Light-emitting diode to one of the windings (through a 1 kOhm resistor), the anode to the common. Now, when working, it flickers under water.
A few words about hard drive engines.
Some types of such motors, when spinning the rotor by hand, continue to rotate in one direction noticeably with better glide than in the other. That is, if you try to rotate clockwise, the rotor will stop almost immediately. Such devices have a different bearing design and these engines are probably better suited for our purposes. Although both types have been working in water for a long time and are doing great.
The windings are checked like this. The motor must have four contacts. We need to find one of the extreme contacts which is the middle point. This pin will be connected to the power positive, the rest of it in order - first, second, third - will be connected to mosfets. Using a tester, we measure the resistance between all adjacent contacts.One of the outer contacts will show less resistance.
This is general, it is on the positive bus. It is highly advisable to fix the wire on the motor housing; to do this, you can drill a couple of millimeter holes and press this cable with a copper bracket. When the pump is ready, a curved hose with an internal diameter of at least 8 mm is placed on its nozzle. and 20 cm long through which watering will be carried out. Now you can make a printed circuit board and solder the device.
The board is made from single-sided fiberglass using the LUT method.
Please note that the picture of the trace and layout of the printed circuit board is not mirrored to make it easier to check during installation. When printing the LUT, you need to turn it mirrored, or use the SprintLayout file located in the archive.
The board can also be painted with nail polish in this way:
The rod of the ballpoint pen heats up (a little!) over the flame of the lighter, turning it evenly and pulling it out evenly. Next, the thin end is cut off with a blade. This produces a conical tube with a very small outlet opening. It can be inserted inside a 1.5 cc syringe, and using regular nail polish, you can draw traces of printed conductors on the board.
After drying, the board is dipped into the etching solution. This can be a mixture of copper sulfate with salt 1:3, and water. The solution is prepared as concentrated as possible. Heating is required, for example, over a candle flame. The process is accelerated with constant stirring. Copper sulfate is sold at any agricultural store.
The microcontroller is powered using a parametric voltage stabilizer assembled on elements D1, R7, Q1.
The resistor value is chosen in such a way that the stabilizer’s own consumption is as low as possible. Much lower than the so-called “Krenka”.
This schematic solution made it possible to reduce consumption to 0.3 mA.
This is very important, because the duration of operation of our design without recharging the batteries depends on it.
Transistor Q1 - npn is not critical.
Zener diode for stabilization voltage 5.1 V. You can use it from a mobile phone charger. Quartz resonator - 32.768 kHz. Regular watch quartz. From quartz watches. MOSFETs soldered from the motherboard of an old computer are used as keys in the circuit. Light-emitting diode SMD. Can be made from LED strip.
Speaker - any suitable size. You can use a speaker from a mobile phone.
Installation of the circuit should begin with a voltage stabilizer, and then measure the voltage at its output (capacitors C2 and C3). It should be 5 Volts. Then you can solder in the microcontroller and everything else.
In the circuit, the unused and wired pins of the microcontroller ports PB0, PB1, PD6 can be used to connect peripherals.
The microcontroller program algorithm is constructed as follows.
The controller is configured to operate in asynchronous mode. Interrupts occur once per second, at which time the program calculates the time, flashes the LED briefly (every 10 seconds) and immediately goes into sleep mode to save power consumption. If the hour counter goes to zero (immediately after a reset button or after 24 hours), the controller supply voltage is measured four times and compared with the internal reference voltage.If the voltage is below the permissible level, the circuit emits periodic sound signals indicating that the battery is low; after fifteen signals, the controller is set to power down mode and goes into sleep mode until the batteries are recharged again.
If the voltage is above the threshold value, a sound signal sounds and lights up. Light-emitting diode. Next, the initial position of the motor rotor is set and short-term pulses are successively applied to the motor windings. The duration of the pulses and the pauses between them gradually decrease, thus increasing the motor speed and further constantly rotating the blade, thereby ensuring an accurate portion of watering. Light-emitting diode at the same time it flashes synchronously.
At the end of watering, the circuit again goes into standby mode to calculate the time. It is in this mode most of the time, this achieves high energy efficiency (about 0.3 mA).
While the main program is running, the controller is clocked by an internal oscillator with a frequency of 8 MHz, and in sleep mode, an external clock quartz allows you to accurately read the time.
Brief outbreaks LED every 10 seconds they signal about the operation of the device. From the start of the seconds resetting, it will flash for 30 minutes and then stop flashing for 12 hours and resume after another 12 hours. Thus, if you set watering at 00 o’clock, then flickering will not occur at night, but only from 12 o’clock in the afternoon.
Firmware file Dviglo_mega_avr_V.hex
When flashing the firmware, you need to configure the source files in the VR Studio program to work from the internal RC oscillator 8 MHz Dviglo_mega_avr_V.rar
If you have an Arduino board, you will not need a programmer.(detailed instructions)
The files are in the proshivka_arduinoi folder.
When flashing the firmware, you need to configure the source files in the VR Studio program to work from the internal RC oscillator 8 MHz Dviglo_mega_avr_V.rar
If you have an Arduino board, you will not need a programmer.(detailed instructions)
The files are in the proshivka_arduinoi folder.
Archive with materials for the article. Available for download only to registered users.
Attention! You do not have permission to view hidden text.
Video of the device working:
Similar master classes
Particularly interesting
Cable antenna for digital TV in 5 minutes
A selection of simple and effective schemes.
Three-phase voltage from single-phase in 5 minutes
Starting a three-phase motor from a single-phase network without a capacitor
Eternal flashlight without batteries
How to make an inexpensive but very powerful LED lamp
Comments (4)