Servos to control tilt and pan of a water jet to water a garden

Thread Starter

TXDJ

Joined Jul 11, 2020
19
I have a small garden (about 5 meters x 5 meters) which I struggle to remind my self to water, also I have 2 toddlers who enjoy playing with water on the garden.

One of the sides of the perimeter of the garden has a wall (about 1 meter high), the idea is to have a device fixed on top of this wall from which you can control the tilt and pan of a water jet. By adjusting the tilt and pan, the target of the stream of water changes and thus you can water the whole garden from this fixed position.

I can build the mechanics to control the tilt and pan of a water jet, but I need help with the electronics to drive 2 servos to move in a somewhat coordinated pattern within the perimeter of the garden.

To make it fun for the kids, I’m thinking the water stream to follow a straight pattern until it hits the perimeter of the garden and bounces back on random direction until it hits the perimeter again (similar approach to the pattern a basic Roomba follows to vacuum the floor).

Any help and pointers are appreciated.
Many thanks,
Thomas
 

Thread Starter

TXDJ

Joined Jul 11, 2020
19
Nope, I can not code. If that makes my roomba like pattern wishful thinking, I am happy to pivot to a more boring but efficient (and I presume more simple) row and columns kind of pattern.
 

MrChips

Joined Oct 2, 2009
30,821
Have a look at how automotive windshield wiper motors work. Two of those should do the job.

Also look at oscillating house fans. They have dual motions.
 

MrSalts

Joined Apr 2, 2020
2,767
Have a look at how automotive windshield wiper motors work. Two of those should do the job.

Also look at oscillating house fans. They have dual motions.
I think two windshield wiper motors running the x- and y-axes of a gimbal would keep retracing the same, simple diagonal line.
 

AlbertHall

Joined Jun 4, 2014
12,347
I think two windshield wiper motors running the x- and y-axes of a gimbal would keep retracing the same, simple diagonal line.
That would be true if the motors run at exactly the same speed. In practice this would not be the case. Any difference in speed would result in a more or less slowly changing pattern.
 

Ya’akov

Joined Jan 27, 2019
9,170
Nope, I can not code. If that makes my roomba like pattern wishful thinking, I am happy to pivot to a more boring but efficient (and I presume more simple) row and columns kind of pattern.
Hello. I think you should consider how difficult any version of this would be without an MCU. I am not trtying to discourage you from the project, on the contrary, I am trying to encourage you to learn the basics you need to complete it.

I know the idea of learning what appears to be an entire universe of new stuff can be daunting. But, in this case, several things are on your side. First is the ubiquity of application oriented resources for the Arduino platform. It is very possible to ignore almost everything expect what you need and put together sometching “custom” from those available pieces.

It is almost certain a you will find an 80% solution already, possible from something intended to do what appears to be unrelated. Yes, you will have to learn the stuff that enables this application oriented use but that’s the second thing, the availability of introdutory learning materials in a wide range of speeds and styles. You can learn this and in less time than you‘d guess from the apparent complexity.

Thrid, you have AAC. There are many active people here ready to help out if you get stuck in either learning or building. And, not on;y AAC but many interactive help resources, particularly forums dedicated to Arduino topic. (As an aside, I think that AAC is probably the most balanced source of help with so much experience and a generally good attitude towards neophytes.)

The reason this is so imopoirtant to your project is that with MCU controlled hardware, once you sort out the mechanical bits everything else is just code. This means you can change the behavior of you project without rewiring or kludging physical components and, as you have experience with actual use, you can refine the behavior or even make it something totally different and unexpected—and you can do this over and over and revert if you want without ever touching a soildering iron.

If you do add phyical circuitry you can even include sensors to the system is not an open loop, and have it interact with the environment doing things like watering only when the water is needed, to stop in the rain, etc. But none of those things need to be included in the original project, they can easily be added later and incorporated.

So, the bottom line is that with a relatively small investment of time, experience suggests that 20 hours is enough to become productive and 80 hours can make you 80% self sufficient, you can do this the right way. Avoiding an MCU in this case is doing something far less well because of something that oyu don’t have to avpid.

And, we are here to help when you need it. If it sounds like something you would lie to pursue, I/we can get you started learning, which will require a small investment in hardware and time, and if oyu don’t find it working for you, very little lost, but if it goes as my experience suggests, a new world of possibilities including this project being just what you want.
 

MrChips

Joined Oct 2, 2009
30,821
I think two windshield wiper motors running the x- and y-axes of a gimbal would keep retracing the same, simple diagonal line.
Think about how a video monitor or TV set is able to scan a frame on the screen. There are two oscillators running at two different frequencies generating horizontal and vertical scan signals.
 

djsfantasi

Joined Apr 11, 2010
9,163
What Ya’akov said. (He beat me to it) My question if you could code was a lead in to exactly Ya’akov’s points.

Your initial requirements immediately brought to mind a microprocessor. An electromechanical solution just isn’t as flexible as one based on a microprocessor.

Using the Arduino as an example. The official Arduino site includes a reference page that teaches how to use every command in the Arduino programming language, with examples! Plus, each feature of the platform has sample programs included in the editor or development environment (IDE). Reading these programs is a good way to learn the language if you learn that way.

There is an Arduino forum, too. However, the members there aren’t as forgiving as AAC.

Plus, there are many add-on devices available. They are called shields in the Arduino environment. Each shield comes with a sample program that shows you how to use it. So you can learn that way for shields as well. Controlling multiple RC servos, motors, and LEDs, playing sounds/music, connecting to the Internet, data logging, keeping accurate time, checking switches and potentiometers… are all things I have done with shields.

Once you invest in learning how to code, a whole world of possibilities open up. There is a never ending discussion here about the appropriateness of using a microprocessor. Many people beliefs that a discreet electronic solution is better. But, it’s not for everyone. And you still have to learn some basic electronics to interface with the real world. I was a professional programmer, so this approach was the obvious one for me.

Random movements of the water spray could only be done with a microprocessor, like the Arduino. Once you obtain a certain level of proficiency in coding, you could even store a pattern on a micro SD card and change the pattern without even changing the code!
 

MrSalts

Joined Apr 2, 2020
2,767
Maybe you can offer the OP a control circuit as he asked. Because, if you think about it, really think about it, the OP requested info on a control system and your first post did not suggest any speed control, just suggested two wiper motors.

Also, if you propose something as simple as a fixed x-speed control and a fixed y-speed control like an electron beam of a CRT, you have ignored gravity influence on the sprinkler (not too important on an electron beam of a CRT). With the source on the edge of the property, the far edge of the garden would be quite dispersed and weakly watered while the near edge would be flooded. The whole point of the post was a request for a "control system". The microcontroller is the right approach.
 

MisterBill2

Joined Jan 23, 2018
18,576
The really simple scheme will be to get a spray head, or more likely several, that will cover the whole garden. Not the slick scanner/sweeper sort.
But if you are able to build a mechanical setup that can direct a spray, two motors with a simple speed control for the motors will be all that is needed. A switch to detect the ends of a sweep and now you can use a computerised system to run one axis sweeping and after a number of sweeps, advance the other sweeper a bit and reset the sweeps counter.. Any actual code would just be counters and "IF/Then" statements. You can also do that with a cheap PLC and the system will be reliable.
 
Top