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?
Replies
Hi Matthew,
That sounds very good - but I still suggest you watch it like a hawk.
The fact is next to a train locomotive or ship, modern tractors represent about the most mass and horsepower of any movable thing we have.
Based on the theory of anything that can go wrong will go wrong (a very well tested theory), I'd say safety is seriously important for these things, they can turn lethal and major property destructive at the slightest provocation.
I have no doubt we will be seeing them on D9 Cat Dozers soon - what can possibly go wrong?
That said, I am all for it, automation in this arena is a major time and economic breakthrough and it is going to happen, danger or not.
I have opened a discussion on the developers web site to provide for the possibility of a time out interrupt signal (which will signal that the controller is no longer doing anything productive (crashed!).
Assuming the developers pick this up it would provide you with a reliable signal indicating the controller was not functioning as expected and you could use it to shut down your equipment.
The hardware to permit this is pretty much intrinsic to all microprocessors these days and I think that the only reason it hasn't been emphasized is that since we are talking about a flying vehicle (which depends on the controller to fly) knowing that it wasn't working anymore would simply have the same result as not knowing. - (Crash!)
I think the work you are doing is awesome and it is going to make the big companies heads spin to see how you have leapfrogged them for pennies with hobby grade equipment.
I am sure they were planning on this in two or three years for 20 or 30 times the money.
Up the system, damn the torpedoes and full speed ahead.
Best Regards,
Gary
"I have no doubt we will be seeing them on D9 Cat Dozers soon"
Cat's actually been in this game for some time now. D9? I think D11s are used as street sweepers for these fully autonomous trucks...
https://youtu.be/N_JsLOfm1aI
Sorry Matthew - not trying to spam your thread. The focus on safety is intense for these machines for obvious reasons. I think what you are doing with your resources is great. I hope you are able to develop a robust failsafe system so you can safely and confidently operate your system this fall.
So I bought this relay with remote from IC station. http://www.icstation.com/channel-wireless-remote-control-relay-modu... Top part of the picture is reciever upside down, second picture is reciever right side up and then the remote. It can be set to momentary or latching and it is easy to program the remotes to different recievers. I orderd 4 of them so everyone in the field can have one. That way anyone can shut down the tractor.
I set all the remotes to one reciever and wired it up as follows. The dual relay board is activated by my DX9 rc remote. If it goes out of range the brakes come on. The relay for the small remotes is wired up in series with the dual relay board so three relays would need to stick simultaneously for me not to be able to use the best emergency stopping method. Also it should be noted that the power from these relays operates an air solenoid that releases the brakes so if the power fails the brakes are spring return and will apply. I'm still thinking about the design of the bar switch combo to be mounted on the front of the tractor but those wires will get hooked up to lim Y on dual relay board.
The one thing about this setup that I can't decide on is how to hook it up. Should I hook the pwm leads into pixhawk with passthru from my rc remote? Then if pixhawk fails or is disarmed the brake is on, but I already have pixhawk controlling the shuttle shift, which starts and stops the tractor as well. Or I could hook it up directly to rc reciever and bypass pixhawk. Have I missed something obvious or fooled myself into thinking I have some redundancy that I don't really have? It works as expected when I installed it in the tractor.
Your lower case "f"all tricked me! I thought "wet fall" was some sort of Canadian farming term :-)
The BBB with a PXF is a good option (http://diydrones.com/group/pixhawk-fire-cape-user-group) - its also completely open source which I like. At the moment I would probably lean towards the Navio+ on a Raspberry PI2 as you have more spare CPU available with the PI2 compared to the BBB. You could also go companion computer with a Pixhawk and use a powerful ODroid or equivalent for even more computing power if required.
Thanks, Grant.
Next year I want to add vision for emergency stopping and also for unloading into the truck, should be a fun challenge! I saw a video of two rc planes doing a mock refueling in the air using some sort of vision system, compared to that what I need to do is a cake walk. I'm thinking that a beagle bone black with a fire cape will be the way to go in the future. What do you think?
Matthew, what's a wet fall and why does it cause problems?
Thanks, Grant.
Ideally, you want to have a system where no single point of failure can cause it to behave in a dangerous way, and in as many ways as possible protect yourself against two point failures as well, because those are surprisingly common. Even in the aircraft industry. I'm certainly not saying you should hold yourself to aviation standards, especially since you aren't producing a commercial product or anything. I think your brake trip mechanism is excellent, and things like the relays in series will serve you very well. I think you must also consider the situation where you are the point of failure, meaning that if its the end of a 15 hour day combining, and you've been having great success all day
long, you might not notice the tractor misbehaving soon enough, especially if the combine is starting to plug at the same time and you are focused on looking down at the header, or if your phone rings right then. Probably you would. I know farmers are excellent at looking every direction at once. Just thought I'd mention not every failure is a hardware failure. In the real world,rob ably more than half the accidents are human error of some sort.
On a slightly related note, a lot of human errors are caused by a misunderstanding of some sort, so I like how when you send the tractor away, you have to speed it up manually (also great job on the python in general- though I'm no authority on coding, it seems to work, which is the most important attribute IMO)
Perhaps to avoid misunderstandings( on anyone's part, not just yours) it would be a good thing if the tractor signalled its intent somehow, just a bit before actually performing a significant action? I'm not exactly sure how this would operate, but it would be kinda neat and at the very least could help with some debugging.
I'd also want to make it so if the combine stops, the tractor stops almost immediately, so that it doesn't decide to turn right and go around.
Finally(for now I think) what happens if the tractor gets stuck? I don't know what you're like there in Manitoba but my at my friends just south of Yorkton they get stuck combining a couple times a year, and that would probably be a real pain to have the tractor dig itself in. Maybe If the GPS reported speed drops below what you requested, halt? This is more a question for the devs though not you I think.