(People really appreciated our last video-as-an-article so we’ll keep the trend going. To watch the video instead, click the thumbnail below.)
Hello everyone and welcome to Twisted Fields, our research farm in San Gregorio California. We are developing Acorn, our open source precision farming rover. We believe that robots like this can help produce healthier food for all, reduce our reliance on harmful agricultural poisons, and fight climate change through regenerative agriculture.
Today I want to share an update on the work we have been doing since our last video.
In 2021 we launched our project publicly. We open sourced all of our software as well as our mechanical and electrical design files, we created a user forum at community.twistedfields.com where anyone can sign up for free and talk with others about the project, and we released two videos showing off our robot and taking a closer look at what makes it work. We also have companion blog posts for the project announcement and the technical overview.
In this post I will talk about three improvements we have made to our system since the last video.
We’ve added an emergency braking system that prevents a dangerous runaway scenario even under total power loss, we’ve built a simulation mode that makes it possible to run our software on any normal computer without the need for robot hardware, and we’ve expanded the navigation code to support complex multi-part navigation paths.
Before we dive in to that, I want to share a bit about where we are headed with this project, and how you can help.
I’ve written on our research blog about the long term goals of this project. We want to make a general purpose farming robot that is completely open source. The vehicle as it exists today is only part of the overall system. The vehicle has a large open work bay in the center, and we will be designing tools and a computer vision system for that work bay to automatically prepare soil, plant seeds, kill unwelcome plants, and even harvest.
That is a big project - one that no single organization can solve. And so we are taking a community oriented approach to engineering development. We will continue to produce open source designs and software, and when we have a stable hardware version we will sell kits and encourage others to build their own versions or add on to our work. Anyone can start their own business making and selling these machines, and everyone involved will have an incentive to work together and share what we have produced.
By doing things this way, we will have people from all over the world working together on the very difficult problems in front of us. To support our work, we will be asking for regular monthly donations from our followers to keep the project healthy and totally open source. I was inspired by the way that 3D printer development accelerated after the patents expired, and groups of people all over the world contributed on open source designs. Ten years after the patent expired the price of 3D printers dropped from twenty five thousand dollars to a few hundred dollars, available anywhere in the world. Community innovation made 3D printers 100 times cheaper in ten years. And I think we could do that with farming robots too.
In our next video I will explain this in more detail and make the official funding ask, but I would be remiss if I did not mention that we already have the funding page set up. We partnered with the Open Collective Foundation to accept tax deductible donations on our behalf. If you already know you want to support us then see this link for our Open Collective page. Donations will directly support the Acorn project.
And with that out of the way, let’s take a look at the latest changes on Acorn!
First let’s talk about the emergency braking system.
The very first prototypes of Acorn used a chain drive system to a gear motor above the wheel. This worked well for initial development but would constantly clog with grass and mud. So in late 2020 we replaced the chain drive system with hub motors. The hub motors are internally geared so we still have a lot of torque, and they are sealed so they throw the mud right off.
They work great! One thing the chain drive offered though was rolling resistance when unpowered. The hub motors have no built in rolling resistance, which meant that if we drove that version on a hill, there was a risk that any motor fault or power loss could lead to the robot rolling uncontrolled downhill. This presented a serious risk to other people and could destroy our valuable machine. And so we designed a fail safe braking system that prevents catastrophic runaway.
One concern about brakes is mechanical complexity and cost. If we had to add more components to the machine it would mean more parts to buy and more parts to break. But we were able to add our emergency braking system without any mechanical changes.
These motors are called brushless motors. They have three sets of coils that react against permanent magnets to produce rotation. And they have an interesting property. If you force rotation in to the motor, it becomes a generator. Our solution shorts the motor leads together, and the motor behaves like a generator with a high load; it slows down. We added two relays on a circuit board attached to the motor controller. The relays are called “normally closed” relays, meaning that they are spring loaded and make a closed circuit unless powered open to break the circuit.
So we connect two relays between the three motor leads, and drive those from an output of the motor controller. We modified the motor controller firmware so that it opens the relays only if it has good control of the motors. If someone hits the emergency stop, there is a motor fault, or the vehicle loses power, the relays close and short all three motor leads together. There are two relays per vehicle corner and four corners, so 8 relays total. This means that even if a relay fails it will still be safe.
Let’s take a look at a test. Here I will drive the vehicle down a hill at speed and then hit the emergency stop.
(direct time-stamped link to the test on youtube here)
So, it doesn’t stop completely in this mode, but what it does do is prevent a catastrophic runaway. In this case it did temporarily stop. It’s still capable of rolling, and we’ve got more to do to completely stop it. One of the things we can do is toe-in all the wheels when we want to stop it on a hill, and we may add a mechanical brake, but for the meantime, this improvement means we can do all of our testing on these hills, and we can be sure this is not going to become an unsafe runaway. We may find it parked against a fence every now and then, but that’s a huge improvement over what it was before.
This ability to drive on hills is critical for testing our next feature, advanced path following.
Since the beginning of development, Acorn has had simple path following. The vehicle is GPS guided, using an RTK GPS system with accuracy of a few centimeters. We created the ability to record GPS paths while a driver drives the vehicle under remote control. We then saved those paths into a database, to be recalled later. We could select one GPS path at a time, load it on to the vehicle, and have it follow the path back and forth repeatedly.
This was wonderful for long term testing of our mechanical systems. One year ago we completed a continuous operation test, with 7 days in a row where Acorn would wake up at 8AM, drive back and forth all day long until sunset, go to sleep, and then repeat the next day for 7 days straight. This proved that the new drive system we had just installed wouldn’t get clogged with mud. And we found that Acorn was able to drive 20 kilometers per day, even on the shortest day of the year.
But any farm that needs our robot is going to have multiple farm rows, and roads connecting them. Long term, Acorn needs to be able to figure out where it is going all on its own. A farmer might specify what task Acorn needs to complete, and the software will generate all the commands for the vehicle to follow. One piece of that system is the new navigation code. In addition to the old behavior, where Acorn follows a single row back and forth, it can now recieve a motion program with many paths together in a list. Each path can have custom parameters. So for example the vehicle may need to drive down a farm road, moving at high speed and low precision, until it gets up to a plot of farm rows. Then it might align itself with the first row, possibly lower a tool from the tool bay, carefully follow the row at low speed while operating the tool, then raise the tool, perform a sharp U turn to the next row, and repeat until all the rows have been worked on. Then it might get back onto the road and head back to home base to get a new tool.
Our code now allows Acorn to automatically follow this type of complex navigation path. To test and demonstrate this, we allocated some virtual rows in our field and programmed Acorn to follow them one after the other, then drive up along the outside of the rows to the start point to repeat.
(direct time-stamped link to the footage on youtube here)
A fun note about this: these rows perfectly follow the countours of the hill. We drove acorn around the field to collect GPS height information and wrote a program to extract the hill contour from the data. Then we generated new rows that follow the countour. Eventually we will use acorn to actually physically form the new rows based on these calculated positions. Level rows conserve water and reduce soil erosion.
There are some visible artifacts in the motion including a sideways skew when path following on a slope. This is due to the current GPS system which has some limitations. We are actively testing an improved GPS system with a built in IMU and 100HZ sensor fused output. That is going to allow us to accurately GPS stamp images from our crop vision system in addition to solving this path following issue. We’re just building this system one piece at a time! Now that it is capable of following these complex paths we have more to debug, as always.
With the new braking system and this complex path following capability, we can now test autonomous driving all over our farm.
Now the last feature I will mention today was instrumental in making these new navigation changes.
It is now possible to run our entire software stack in simulation on any normal computer. This includes navigation, where the virtual robot will navigate itself along paths in the web page control view. I used this simulation mode to write the navigation software and test the changes before ever running it on the real machine. This is great because buggy code on a real robot can lead to a lot of trouble, while in simulation you can just hit the reset button and try again. It is MUCH easier to write new code at my desk, rather than sitting in the dirt with my laptop!
For our technical viewers, all of the code runs in docker. You can clone the code from our github page and run a single command to build and deploy the simulated robot containers. This means it is now possible for curious developers to run our code and submit their own improvements. We already have one prolific contributor on github who has done some code cleanup and refactoring and has begun writing new features! So if you’re a software developer visit github.com/Twisted-Fields and click on the acorn-precision-farming-rover repo to see out code. Instructions for simulation are in the simulation.md file, as well as on our user forum.
Alright and that’s it for today’s update. We plan to increase our video releases for 2022 and publish updates on a more regular basis, so do subscribe to our YouTube channel to stay up to date.
We will launch our funding campaign officially next video, but if you already know you’d like to support us, head on over to our Open Collective page and make your contribution today!
I’ve also been working on a new revision of all of the electronics for Acorn, which will be detailed in the video after next.
If you want to talk with others about the project, please see our free community forum at community.twistedfields.com. Our small community is growing. We have some wonderful contributors so far who can respond to questions, and I check in every once in a while to respond when I can.
Remember that this project is meant for everyone and we want to know what you think. We’d love to see your comment below.
And now that we are beginning fundraising, we want to start thanking our donors. So a big thank you to Daniel Theobald for funding the engineering and providing the farm.
Thank you so much for following our work!
Taylor Alexander (they/them)
P.S. - Don’t miss the outro of our video with cute footage of our goats!