Go Down

Topic: Agriculture Equipment, Ultra Sonic based auto height control (Read 2422 times) previous topic - next topic

Oct 13, 2012, 06:54 am Last Edit: Oct 13, 2012, 06:58 am by dirtyhandscleansoul Reason: 1
I am a young farmer with some electrical knowledge. The ag industry is predominantly made up of an older generation with minimal knowledge of technology. Anything ag related with an IC is ridiculously priced.

I'm going to try to explain this as if you have no knowledge of farming.

This is a sprayer:


This particular sprayer applies fertilizer, herbicides, etc to field crops. To do this properly the boom (arms) must be kept 20 inches off the ground. Keeping a 90 foot wide boom thats 40 feet behind me at a uniform height while traveling 7 mph over uneven ground is......shall we say tricky.

The boom is made of 3 individual sections, the left, center, and right sections. The center section is attached to the frame with a parallel linkage to adjust height. The left and right sections can be tilted up and down. All these functions are hydraulic and controlled by 12v solenoids which I operate from the cab with toggle switches.


I would like to automate the height control somehow. Commercial systems use an ultrasonic sensor on each section and tie this into the solenoids. The control box for these systems are basically an auto/manual switch and a toggle to adjust target height. These systems cost over $10,000. $10k for three ultrasonic sensors and some wiring.

I would like input as to whether it would be feasible to recreate one of these systems. The unit would have to work on both bare ground and fields with plants in them, react fast enough to lift over hills, not send the boom 10 feet into the air when passing over a tall weed, etc. Do you think its possible for a single person with basically no programming knowledge to be able to pull this off?


My basic dc electrical knowledge is strong. My arduino programming knowledge is basically turning a few leds on and off via infrared remote control. I'm really quite hopeless at anything outside of the tutorials.
I have a homebuilt cnc mill to take care of any fabrication issues.





Totally doable (of course, since there are $10k systems out there).  Think in the terms of an Unmaned Aerial (Or Ground) Vehicle:
http://www.diydrones.com/notes/ArduPilot

$200 bucks off the rack (Atmega2560), 6 axis monitoring of your sprayer tank, $40 bucks for the (2) Ultrasonic sensors for the booms, the only question is the current requirements for the solenoids (for the motor cotrollers).  High current electronic speed controllers?

Anyhow, a study on the PIDs for the Arduino will keep the sprayer from being the next mechanical bull attraction.  You might have a couple weeks without dirty hands putting this together  :smiley-eek:
http://www.spcomputing.com

Chagrin

I'd recommend contacting Maxbotix for recommendations and information on how an ultrasonic sensor would behave over bare ground / crops. You also need to take into account that you need a weatherproof sensor and the mesh style of cheaper sensors wouldn't like the dust and mist much.

PeterH

Is it necessary to control height relative to the soil, or height relative to the crops?

Is there an implied requirement to tolerate large amounts of dust, flying dirt and so on between the boom and the ground?
I only provide help via the forum - please do not contact me for private consultancy.

wwbrown

There are filtering methods that are designed to ignore some data points that are much different than the previous datapoints that would get around  the tall weed (a simple low pass to the more advanced Kalman) and to keep the boom from going above a certain level a simple heightmax can be set in the code so the boom does not exceed heightmax.

#5
Oct 13, 2012, 05:46 pm Last Edit: Oct 13, 2012, 05:49 pm by dirtyhandscleansoul Reason: 1

Is it necessary to control height relative to the soil, or height relative to the crops?

Is there an implied requirement to tolerate large amounts of dust, flying dirt and so on between the boom and the ground?


Height needs to be controlled relative to both the soil and plant canopy depending on application timing.

In corn there would be up to 6" tall plants in rows 30" apart. Since I drive between the rows I would mount the sensors between the corn rows and use the soil height function.

In soybeans and wheat this canopy would be quite thick with a light interception of at least 60% (up to 92% later in the growing season). I'm not sure how doable this is. The sensors either need to fully penetrate the canopy or read only the canopy. I have heard that one commercial system has a ground/canopy function and most growers leave it on ground and adjust accordingly.

There is no requirement to tolerate large amounts of dust or flying dirt. If its windy enough for dust then its too windy to spray (spray drift) and the boom does not disturb the soil.



There are filtering methods that are designed to ignore some data points that are much different than the previous datapoints that would get around  the tall weed (a simple low pass to the more advanced Kalman) and to keep the boom from going above a certain level a simple heightmax can be set in the code so the boom does not exceed heightmax.


I'm not sure if heightmax can be used on the left and right sections as they need to tilt to max for contoured terrain. Heightmax would also need feedback positioning which as far as I know commercial systems don't use. Filtering with some kind of sensitivity adjustment sounds like the way to go.




Totally doable (of course, since there are $10k systems out there).  Think in the terms of an Unmaned Aerial (Or Ground) Vehicle:
http://www.diydrones.com/notes/ArduPilot

$200 bucks off the rack (Atmega2560), 6 axis monitoring of your sprayer tank, $40 bucks for the (2) Ultrasonic sensors for the booms, the only question is the current requirements for the solenoids (for the motor cotrollers).  High current electronic speed controllers?

Anyhow, a study on the PIDs for the Arduino will keep the sprayer from being the next mechanical bull attraction.  You might have a couple weeks without dirty hands putting this together  :smiley-eek:


What is the purpose of the 6 axis monitoring?
I think I would need 3 sensors, one each for the left and right section and one for the center section. The center section sticks out so far behind the wheels that the entire boom needs to move up and down when starting hills.
The solenoids are on/off. There are two pins for each axis. Pull up pin 1 for up, pull up pin 2 for down. Just need a MOSFET and diode/capacitor (back EMF) on each output pin of the microcontroller. The hardware for this entire build would be ridiculously low.
How large of an area does an ultrasonic sensor read?

Chagrin

The 6 axis monitoring (3 axis gyro + 3 axis accelerometer) would be used to watch the motion of the tractor. As an example, if the tractor started driving up a steep hill you would be able to sense that pitching up of the tractor and make immediate adjustments to the boom independent of what the ultrasonic sensors are detecting. I'd suggest sticking with just the ultrasonic sensors to start with, though.

PeterH


The sensors either need to fully penetrate the canopy or read only the canopy.


That seems to be the critical problem. I guess the typical ultrasonic sensors are waiting for an echo that is strong enough to exceed some threshold. If you can get an ultrasonic sensor that has a narrow beam, and look for the longest distance over a short interval, that should give you a height above ground signal. If you're trying to detect height over crops you need to look for the shortest height over the interval and it might help to have a sensor with a wider beam. (If you intend to support both modes then I guess the sensor width will be fixed.)
I only provide help via the forum - please do not contact me for private consultancy.

Aqualize

This sounds interesting!

I have a few thoughts about this:
1. Collect data. You should test feasibility by buying a few components to start with. One ultrasonic, arduino board and the rest that is needed to connect them. Next you mount the ultrasonic sensor on a adjustable frame on a bicycle. You should have the arduino collect data for later processing. Mount it at the same height as when it would be mounted on the sprayer arm. Next start the collector and walk with the bike, or get up and drive steadily at 7 mph. You should do this out in the field. Go back and download it to a PC. Now repeat the processes but this second time you mount it at an height which you consider to high above the ground for the sprayer arm, and the third time mount it a bit too low.
Next you and/or some companion needs to take this numbers and process it though a filter and see if a steady value, it shouldn't flux to much so it approaches the barrier to the other two sample data at the wrong heights.
If possible (depending on season) try to replicate this in the growing crops.

If it works, congratulations! Otherwise you might need better (and more expensive) ultrasonic sensor. If turns out that you can't do this project, well then you haven't bought all the equipment for a system which wouldn't work. And you haven't spent time mounting it on the sprayer and the control of the hydraulic valves.

2. Equipping the sprayer. I don't think you need a 6-axis sensor. Perhaps you don't have hilly field and probably not so sharp shifts in gradient. And if it would be really necessary it can be added later. But I think you should equip the sprayer with 4 ultrasonic sensors. One at each end (or close to the end) of the outer sections and 2 at the middle section's leftmost and rightmost location (at the joint to the outer section. This allows you to take the mean value for each section. And perhaps weight it a bit so the sensor data from the outer sensors is a bit more important when determining the height above ground for the outer sections.



You asked if you could do it based on your programming skills. I think you need to learn a little bit more and perhaps have some help.

dfroerer

Are you still working on your project?

I have a little bit of farm back ground.  I think you will probably need numerical or electronic filtering.  You also might want to have a way of calibrating each time you start based on field conditions etc.   You might want several sensor on each arm also as a way of filtering or averaging your data.

Go Up