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

  • So I have spent the last week continuing my work on the tractor. I was hoping that I could control the tractor through the CANBUS but I now believe this to be very difficult.  The main reason is that most of the data on the CANBUS is sent periodically so just sending the code to put the tractor in gear does nothing.  You can do some things using ISOBUS but even those have certain restrictions built in.  I thought each switch on my tractor would have its own canbus id so if i cut the power to that switch I would be able to send false data onto the bus to spoof it but it looks like many swithches run some simple binary wires into an ecm which is one node on the bus so taking over one operation at a time is harder and more complicated than I thought.  It is quite simple to read the engine rpm, oil pressure, coolant temp, and fuel level using an arduino and canbus Shield.  I just need to send the information to pixhawk and then transmit that over mavlink to my app and I will be able to monitor the tractors health.

    I really want rid of the actuators in the cab so I took apart my steering column to get access to the switch that puts the tractor in and out of gear. It has 8 wires on it that are either a 1(5volts) or 0(ground) depending on the location of the switch.  I only needed to change 4 of those wires to put it from neutral to forward, so I ran those wires through an ardiuno which passes the signal through unless the pixhawk is trying to put the tractor in gear in which case the tractor goes into gear without moving the lever. So basically the tractor will look and act totally stock except under the right set of conditions the pixhawk will have control.  Still working out exactly what the right set of conditions will be but this looks like a promising avenue.  I will do something similar with the other tractor controls. This should greatly increase the reliability of the whole system as there will be less moving parts.

    • AWESOME!!!

    • Just to say thank you for continuing to share.  I'm in Texas trying to steer my 50 hp JD with a home brew steering control solution since my model only has basic power steering and will be using the JRK21V3 and Arduino with the Pixhawk.  I've done the RC car thing so for me now the next phase is "upscaling" the solution.  I also saw you shared your Python code.  Although that is down the path for me I wanted to say your are helping inspire people.  The attached photo is only to get some dimensions worked out. 3702602019?profile=original

    • That's awesome keep us posted as you progress!

  • Ok so I finally got my grain cart control software up on GitHub. https://github.com/mattdreimer/AutonomousGrainCart 

    There are some notable issues with it.

    1. It is still version 1 of droneapi so must be launched from mavproxy

    2. It is a gui but does not take into account different screen resolutions so it may look very bad if you don't have the same screen resolution I do.

    3.There are likely many things I did wrong from a general programming standpoint b/c I am a beginner. It does work though.  Feel free to make corrections

    mattdreimer/AutonomousGrainCart
    Software for interacting with a tractor that has been set up with a pixhawk to make it autonomus. - mattdreimer/AutonomousGrainCart
    • Developer

      That is fantastic Matthew.  Very well done indeed to get all the code up on github!

      Thanks, Grant.

  • Well I finished harvest this week. Used the autonomous tractor the entire time more than 500 unload cycles completed. Big thanks to the entire community. My farm will never be the same. We will not be going back to having a person do this particular task. I still have some busy season left before the snow flies but I have a good jump on things because of the huge amount of labor I was able to redeploy.
    • Developer

      Fantastic Matthew - glad it worked so well and you didn't have any failures!  With that amount of testing it has proven very reliable.

      Thanks, Grant.

    • Congratulations Matthew, great job.:D

  • This reply was deleted.
    • Developer

      A sonar on the front (or 2) will enable the vehicle to detect the object and it will make a decision regarding going left or right around it.  However, it wasn't designed for large vehicles with slow turn rates and the effect range of the sonar (7m to 10m) probably isn't far enough for your purposes.  We would need to test.

      The other alternative is LiDAR which goes much farther but again you would need to test.

      At the moment there is no way to specify an object in the driving area and tell the Rover to avoid it.  Rover doesn't currently support geo-fence's but its on my list.

      Thanks, Grant.

This reply was deleted.