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#...) 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#...  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?

Views: 28496

Replies to This Discussion

Yes the truck driver has to empty the cart manually.  Id love to be able to automate that in the future as well, that would be seriously cool!

For sure! Got a full 14hr day in yesterday.  If one of the components quits on me I will be really disappointed b/c it will take a while to get parts and its proving to be incredibly useful. I really should have ordered a second set of everything.

So harvest is going really well. If the weather is as nice as the forecast says it is going to be next week I should get close to half done. The biggest problem with the whole automated tractor thing is keeping the tractor running.  It sprung a fairly massive engine oil leak which I thankfully caught in time but was a pretty messy job to fix and it ran low on coolant and overheated on me.  I don't think a driver would have caught the engine oil leak any sooner but the engine getting warm would've been noticed right away.  So I created a very extensive checklist that now has to be filled out every morning before we start hopefully we can avoid blowing up the engine.  I just need it to work this year, next year I will make it so I can monitor temperature and oil pressure, ect from the combine.  Last night I finished in the dark on the far corner of a field and then I asked the tractor to go back to my yard (750m away) and I was sure it went the wrong direction but I followed it back and sure enough ended up right where I told it to go.  I guess I would have been lost out there for a while without it.

Hello Matthew!

It is amazing work that you have made! Wonderful!

I understood that you would like to development it even further. I would like to share information and experience with you (and others of course). Would you like to make work together in this project and share information? Is it okay for you?

If yes, please continue reading. Otherwise this is too long message and lot of detail information needed from you.

I would like to know more details about devices and electrical connections that you have used. Like

Power supply

  • Where you take this?
  • How many fuses you use?
  • From Tractor fuses

Steering Feedback sensor. What sensor you used? Type, model?

  • How did you connect this? Drawing available?
  • I planned use linear potentiometer that give front axle position feedback to the Jrk 12v12 USB Motor Controller with Feedback (see attached pdf document page 15.1)

Steering, You said that you use tractor proportional valve for this and you shared link to the board where was two relays with PWM output.

  • Could you please, open this little bit more and share drawings from connections?

Throttle control, what you use here? (in the video I saw it is actuator, could you please, share connections?)

  • Do you use actuator? I saw link from RC controlled actuator.
  • Could you please give me type and model?
  • Could you please share pictures and drawings from connections?
  • How you installed this in mechanically? In the cabin or outside?

Brake actuator

  • I see the video
  • Could you please share pictures and drawings from connections?

Gears, Do you have automatic transmission in you tractor?

  • Because, I saw in you Python GUI that there were different speeds and MAX with buttons.
  • If not, could you please share pictures and drawings from connections?

I read that you use buttons or similar for avoiding collision with objects. Do you still use those or how you protect from collision example with trees?

GPS, What module you use today?

Could you please share screenshots from settings (if they are different than previous pictures that you shared)?

Could you please share your code, so maybe I can use it and modify it for my purpose?

What softwares you use in ground station? I mean example Mavlink, Droidplanner etc? Architecture?

I have planned to make similar project but to the peat bog environment (Please, see thelink for video from that environment ). That environment is much challenging than what is open field without ditches and canals. Peat bog is divided for tens or even hundreds different strips (? is it right word?) that goes to different directions depends of area. Both side of strip has ditch and very often also both ends has canals. 

Strip width is about 12 meter (40ft) and width of the strip in the end of strip to the next strip is about 6m (20ft). That mean challenging turns. On the strip need to drive middle because of peat pile or/and soft ground. You need to also know that there are several ways to harvest the peat and now I’m talking about milled peat.

Also ground give some challenges. Like you know dry peat is easily flammable (need only spark) and hard to get flame out. Here and there are also ground where you can see stones and dust and dirt (mineral ground). Those are places where you should slow down and even lift up example turner (turn peat to dry, pull behind of the tractor) to avoid sparks that comes when metal hit to stones.  

Also wetting soil and soft ground give some challenges because tractor can get stuck.  Dust give challenging when you load out, for devices and visibility (can’t use reliably example lidar sensor for safety ). Please the link for video so you will get idea

Here are two main tasks that I have thinking to use in first and second states. Turning (please, see the link for video), it means turn the peat that lying on the strip after milled (is it right word?). Milled peat need to turn about 3 times.

When peat is dry enough, the lying peat will move to middle of strip into pile that goes along strip. Need to do this about 5 times so the pile is big enough for loading. That is similar work like you make. Tractor where you load peat just drive in the next strip (very often this way, but not always (please, see link for video from youtube). 

I have planned that need to have two ground stations where you can control. In the loading the Loader will control tractor. When you drive tractor to the stack (It called stack where you unload all dry peat from strips. There can me more than one stack on the peat bog area) to unload tractor and back to the loading driver from another tractor will control it. This driver can take manual or remote control (RC) to unload it to the pile. Maybe this way it is possible control more than one tractor simultaneously (in future).

P.S Step motor for steering is not so good as gear motor because step motor can lose its home position example after power off. With gear motor you don’t need to take care of it. Feedback is enough. (For vehicles where is no proportional valve available for steering)

Please, see some drawing and links to the devices that I planned to use attached.


I'm happy to help.  I am right in the middle of harvest so the bulk of my answers will have to wait till I finish or have some rain days.  One suggestion I have is to work on one tiny area of the project at at time and try and learn and figure out everything you can about that one aspect and then move on to the next part.  No doubt you will change your plans as you go so don't buy everything on your list all at once.

I learned a lot about pixhawk by working with linear actuators but if you are putting this is semi modern equipment finding a way to hook it all into the electronics of the machine is the way to go.  I plan to work on this area over my winter season so I don't have a lot of tips for this yet.

And always keep safety in mind.  Big machines driving themselves around is no joke!

Ps. loved the videos you posted I've never seen that before looks really cool.  What part of the world are you in I'd love to see that in person one day.

Thank you for your quick answer. That was the plan. Move step-by-step. Those lists just give me some kind of guideline.

I'm from Finland, Northern Europe. There should be also peat production somewhere in Northern America maybe also in Canada.

I will wait when you have "free" time to collect information, make drawings and files to share.

Please, check also this from John Deere project that has made with big money. Please, look at the link.

This is on my Christmas wish list now.  This project was so cool that I had to join the forum just to contribute my $.02.

As an alternative to your emergency stop button bar have you investigated proximity sensors?  We had a remote trench packer here at the farm for a while and they had a proximity sensor on it that would lock out all movement if anyone was within range of the sensors.  I am pretty sure that it would be ultrasonic but maybe there is some other device.  My thoughts would be to have a long range sensor looking to the immediate front of the tractor it would have to be set so that if the tractor is going full speed and it picks up a signal there is enough time for the control system to hit the brakes.  this might also be useful on the sides if someone wonders up to it without thinking about it, but you could have that set much less like 4 ft or so.  the side proximity sensor might also help you avoid running the grain cart into the combine with you having to pay attention to it all the time.  You also might consider having a secondary proximity sensor on the front that is set much closer and it would act as a failsafe and should be completely separate from your pixhawk controller, if it picks up anything it assumes that the pixhawk is not working and dynamites the system.

A possible test would be to setup a stack of 5 gallon oil pails as a human analog and drive the tractor towards it to see if it will pick up the pails and stop in time.

Sorry for the novel on my first post, but this is a really cool project!!

Ha ha no worries about the essay. I've written some good ones myself. I actually scrapped the stop bar and plan to work on some kind of vision system over the winter. I really like your idea for testing it. I could draw faces on the drums and maybe dress them up could be a ton of fun.

You are right about needing the safety systems running separate from the pixhawk, it creates redundancy.

Thanks for the input. Keep posting as you have ideas.

Hi Robin,

please, look at my PDF file attached previous message and page number 10. There are two options for range sensors and link to webpage too. They are cheapest what I could find in this sector. Unfortunately I can't use those in my application because of dust.

But, I think main problem with those is that you need controller to analyze and calculate signal. I asked them to do such a board, but they said that if I order more than 10 units then they will do it. I wanted board where I can connect and use like relay. It takes too much work to do it.

Hi Robin, 

I had old information. Please lookthis (SF01) and this (SF03) link.

You can use a Rangefinder (sonar or laser) currently with a Pixhawk.  You can configure how close you need to get in order to take action - parameters are:


At this stage the action is to navigate around the obstacle but we could enhance that code to be configured to do a number of things (HOLD, go left, go right, auto navigate around, reverse, go to way point) if there is enough interest and people would use it.

Thanks, Grant

Hi Grant,

you are one of developer I assume. I would like to have that part of settings like I could set example three steps how rover/tractor slow down. When Object or person is 30ft speed decrease 30%, person is 15ft speed decrease 60% and when person is 10ft from vehocle it will stop. Maybe also possibility add how long vehicle need to wait until it can continue.

Safety will need to make separate way from this. It is something else.

Best regards


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service