Apm Rover in tractor setup.

I want to use pixhawk with the apm rover firmware to operate an agricultural tractor. I need to set up my tractor as an rc vehicle.  My plan is as follows: any feedback I can get is appreciated.  I plan to order the parts in the next couple days but if there is something I've overlooked or my plan has no chance of success let me know.

Throttle control: Linear servo (https://www.servocity.com/html/25_lbs__thrust_linear_actuator.html#.VVOUCJNyP5U) I don't see too many problems here.

GPS: I plan to use the gps already installed in the tractor.  I am planning on buying a pololu 23201a to convert the serial nmea to something I can input to the pixhawk.

Steering: This is what I'm most worried about.  The tractor has an electric over hydraulic steering valve, so basically provide 12v to right side tractor turns right, provide 12v to left side tractor turns left. I am planning to put in a dual 12v relay controlled by pwm signals for the steering https://www.servocity.com/html/electronic_pwm_controlled_dual.html#.VVTFmZNyP5U  Anybody have a gut feel on whether this will work or not?  The problem is the steering output from pixhawk needs to reach a certain threshold before steering valve will operate this is quite a bit differnt than how it is set up on my rc car where each pwm value corresponds to a specific steering angle.

Clutch: Much testing has to be done with a person in the cab to operate the clutch and some sort of ignition failsafe installed before I get the tractor to be totally autonomous but I would like to start thinking about the clutch, and start testing some setups with a person in the cab.  I could get a linear actuator that releases the clutch when throttle pwm reaches some predefined threshold? But I would really like a system that if the power is cut or signal is lost clutch is automatically depressed which will stop the vehicle. I could set the clutch up to be always depressed and use a linear actuator to engage it. Connect the actuator to the clutch with an electric solenoid so if power is lost actuator releases and clutch disengages. Anyone else have some good ideas?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

    • Your helping me a lot by just posting your thoughts. I really like your idea of having the tractor signal it's intent somehow.

      I haven't worked with open cv but it's on my list. Identifying cows by their spots sounds really cool, let's talk some more about that over the winter. My guess is that it will be easier to identify cows than follow a window of hay because of the color contrast but I have no idea really.
    • I saw earlier in the thread that you guys were talking about a servo controlling the steering by moving the wheel, and I can see how useful this could be (for example on our older tractors  which don't have very convenient steering systems to interface with) and I have come up with a potential-ish solution. You know those auto-steer systems that have a stepper motor and a friction wheel that spins the steering wheel? you could have the pixhawk send servo signals to a microcontroller, which would take feedback from a potentiometer on the axle, and spin the stepper motor to move the steering wheel. That would get around the problem of drift because the microcontroller would be constantly monitoring your steering angle, just like the driver normally does.

      Do you have auto steer in the combine Matthew? Perhaps a simple DIY auto steer is in order too? Spend all fall lounging in the combine browsing twitter :p

      Can you give me the model number and approx price on the  GPS receiver? I might even try and do up my own auto steer so the hired guy can spray. - Right now we have no GPS at all. Everyone around here uses Deere systems or nothing, but I know deere parts tend to be not cheap.

      Also I read somewhere that pixhawk had support for RTKLIB, but I haven't heard yet of it up and running on anyone's system yet. Seems like you're a prime candidate. Things could be way way more accurate

    • I started on the case tractor by just steering right left using an electric over hydraulic valve (already on the tractor). You can get the valve and all the hoses and fittings from outback guidance for $1000. At first it had no feedback other than the heading of the tractor off the pixhawk compass, and gps receiver. It wasn't great, but it wasn't a disaster. As soon as I added a steering angle sensor it was awesome. It should work just as good with the steering wheel system as long as you get wheel angle feedback as you suggested, those are more expensive than the hydraulic valve though. You can probably find a cheap used one of either type. I'm using the gps receiver off the combine (trimble) and same for the tractor but it's a deere product (overpriced for sure).

      I have autosteer in the combine.

      I've found that the little gps receiver for pixhawk is not quite as good as the receivers from a company like outback or trimble. But if you have nothing in your sprayer it would be good enough to let the hired man spray. It would be pretty simple to create a little lightbar app that you could run on a small Linux box and not a big leap to get it to autosteer after that. I would recommend getting a used outback system at an auction sale you can probably get it cheap ($50-$500), at least around here. That way you get the good gps receiver.‎ I've been using outback guidance for the last 12 years and it is bulletproof. Way way better than the deere stuff in terms of reliability. I might even have an older outback system around here. I'll send you an email if I find it.
  • MR60

    This is genius indeed.

    Matthew, can you describe your software architecture showing how you used mavproxy to control your tractir though a graphical user interface on the surface pro ? I did not know you could build a user interface on top of mavproxy, how does it work ?

    • I tried to simplify my code to the point where it still does something but hopefully isn't too huge to follow along with. I used pygame to create the gui but tinkter or any other python module you are comfortable with should work. If you uncomment the three lines I point out and connect over mavproxy then when you push the guided button your copter, plane, or rover should start following at the prescribed offsets, pushing controlled stop should stop it but I have not tested this so it should only be used as an example. Once I figure out github I'll try and post my complete app there.

      Just hit run (shortcut F5 on my computer) to get a screen up with some buttons.  Unless you have a gps connected to your laptop the terminal should print "no gps connected" every 1/2 second. You'll need to uncomment some lines and load it up through mavproxy as a droneapi module to use it. see attached file.

      I hope this helps.  I know there is some ugly things in this code but it works for me.  I'm a real beginner so please don't assume what I've done is standard coding practice.

      GuiExample.py

    • MR60

      Thx for posting your example python program. If I launch mavproxy and then start your script as a module, will the GUI start? Because !mavproxy seems to work as a command line interface only ?

    • Be very careful if you have something hooked up to rc8 because this code will override all other commands on that channel. So it could turn motors, move cameras, or gimbals and break something unexpectedly. I included it because I thought it was useful to show in the example.

      If you uncomment the three lines i pointed out. Then start mavproxy.

      Then type "module load droneapi.module.api" press enter

      Then type "api start GuiExample.py"

    • MR60

      Thx, will try

  • :O  Just impressive Matthew, you are a genious!!

    You read this brillant news? http://diydrones.com/profiles/blogs/swiftnav-piksi-rtk-high-accurac... . Look's very interesting for APM Tractor. I follow your progress.

    • Thanks Cala! It really is all the hard work others have done that makes this possible.  My contribution to the grain cart is really only the install in the tractor and a way to interface with it that makes sense in the field.  The rest has all been done by the community, ie the rover code, the pixhawk hardware, mavlink, mavproxy, and droneapi, and all the documentation that goes along with those things.

      That's great news! May not be long and we can have affordable RTK in our equipment.  The cost right now is kind've insane.

This reply was deleted.