Autonomous Agri-robot Control System

Controlling autonomous robots the size of a small tractor for planting, weeding and harvesting

Similar projects worth following
Having robots on farms will help negate the need for pesticides, chemicals and destruction of soil structure, giving us hope for the future of our planet. The machines need to be fully autonomous and features in the control system should include:

1. High accuracy, error correcting GPS/GNSS with RTK
2. Super fast multi-core micro processors for controlling multiple electric motors and enabling parallel processing. Linked via I2C
3. Cellular 2G/3G/4G data comms where WIFI is not practical
4. Object recognition and positioning for distinguishing plants from soil
5. Interweb database and user dashboard for everyday machine control
6. Screens, buzzers and LEDs for status report / debugging
7. Text to Voice and speakers for interaction with humans
8. LIDAR / ultra sonic sensors for detecting unexpected objects in pathway
9. All sub modules securely bolted on one PCB for reliable, hard wired, comms

At present, the system will concentrate on one simple task - weed prevention

License: Attribution-NonCommercial-ShareAlike 2.5 Generic (CC BY-NC-SA 2.5)

There's plenty of 'robot controllers' and such like out there in the electronics hardware world, but how many have all the modules you need bolted onto one PCB with seamless integration via SPI and I2C? And what if you want to expand the capabilities? Is there any spare 'headroom', for example spare analogue in pins or SPI pins? How many are based on just one CPU core with nasty latency issues?

A lot of this project revolves around the use of a very fast 3 core processor, the TC275. This is the gadget that holds the world record (16 Mar 2018) for solving the Rubik's cube in something like 0.3 seconds. 

Firstly, each core can communicate seamlessly with the others so, for example, core 0 could be controlling motors whilst core 1 sends and receives data to other modules such as the GPRS and TFT screens. The advantage is that core 0 can run at full speed and toggle digital output pins at very high speed (10 nano seconds), which is fast enough for most motors, particularly if servo 'gearing' is used.

If the code on core 0 is not too protracted, the core can run incredibly fast with lots of motors SMOOTHLY accelerating and decelerating. How many motors? I don't know exactly ...... Maybe as many as 20?

An agricultural robot has different requirements from the general run of the mill home vacuum romba. It requires super accurate GPS/GNSS - not just one unit, but two, enabling error correction between the two - one is static and the other roving. Next .... WIFI is a non starter so either cellular GPRS or satellite is required. Then there is debugging ..... We need loads of buzzers and LEDs - yes SERIOUSLY! These things are incredibly useful and obviously some kind of screen which is again incredibly useful for testing / commissioning ..... And what happens when the screen needs to refresh - it pauses the whole CPU core, so we need yet another core. We simply can not have enough cores and eventually the control system will have (about) 7 cores as we gradually upgrade the system within the dark corridors of GitHub.


Arduino Nano controls Adafruit SIM800 GPRS module

ino - 8.67 kB - 03/20/2018 at 09:00



The main MCU which is also 'Master' on the I2C bus. Controls motors and one TFT screen.

ino - 30.03 kB - 03/20/2018 at 08:43



This MCU currently hosts a magnetic compass and receives NMEA data from the Ublox network. It's connected to the TC275 MCU as a slave on I2C bus.

ino - 17.59 kB - 03/19/2018 at 13:26


text/plain - 5.72 kB - 03/19/2018 at 11:06


Ublox Base 24 hours .txt

Takes 24 hours to get an accurate location average.

plain - 5.86 kB - 03/19/2018 at 11:06


View all 8 files

View all 27 components

  • Seamless Waypoint Satelite Navigation

    TegwynTwmffat☠5 days ago 0 comments

    Project milestone is reached!

  • Our Code is Easy to Understand!

    TegwynTwmffat☠05/14/2018 at 08:45 0 comments

    When I myself write code I end up with a long series of lines which contain lots of different subsections for reading different sensors or getting data from different sources. Having somebody on the team who actually knows how to write code properly can also enable it to be more easily understood. What's the point of being open source if what you've created is a mess or very difficult to de-cypher?

    The navigational hub - a Mega 2560 - has now been coded with all the main subsections split up into different headings as shown below:

    Even I can now understand it! Check it out on GitHub :

  • Improved Navigation Code Tested on Machine

    TegwynTwmffat☠05/11/2018 at 10:34 0 comments

  • PCB Simplified

    TegwynTwmffat☠05/11/2018 at 07:37 0 comments

    Now, according to the data flow in the previous log, the complexity of the control system has been reduced and the Mega MCU is now in charge of all the navigation and works autonomously, just sending all the data to the TC275 for actuating motors and displaying / broadcasting the data and waypoint state. The PCB has been modified so that the FONA GPRS module is closer to the Mega for good serial comms:

    Behind the scenes, SlashDev has been consolidating the code so that it works much more smoothly and data travels seamlessly between the modules. Check it out on GitHub!

  • We now have torque sensing!

    TegwynTwmffat☠05/09/2018 at 16:26 0 comments

    Managed to integrate this gadget into the control system to get control of the machine via torque rather than position:

  • Testing the Module

    TegwynTwmffat☠05/02/2018 at 17:32 0 comments

    We've already done a number of tests of this module over on the WEEDINATOR project, including navigation by object recognition and navigation by GNSS via waypoints downloaded from an online database through a cell phone GPRS connection.

    The next test is to manually operate the actual weeding mechanism and for this we've had to plant up some test beds with actual live vegetable seedlings:

    Soon the CNC mechanism will be automatic with movement of a rotating claw hard coded into the TC275. Hopefully, damage to the vegetables will be minimised by using some kind of object recognition to map out the grid of plants as a 2 dimensional array. If the Pixie is not up to the job, a NVidia Jetson TX2 will do the job.

  • Data Flow

    TegwynTwmffat☠05/01/2018 at 08:54 0 comments

    We've been doing a lot of work on this project behind the scenes on GitHub - upgrading the code with better parsing routines that no longer use strings. One of the aims is to reduce the complexity of the control system and as a result, increase it's reliability.

    Very soon, the Nano MCU that receives the FONA data will be removed and data will be collected by the Mega instead. It may be that the machine needs to physically stop to avoid interrupting the GNSS data stream but probably not! Worst case scenario is that the machine stops and downloads the next 10 or 20 waypoints.

  • PCB Design

    TegwynTwmffat☠03/16/2018 at 09:23 0 comments

    The design is 2 layer, with top layer tracks in red and bottom layer in blue. Board outline is green and copper pour is red. At the bottom is mounting for 2 MCUs with the same footprint as an Arduino Mega / Due. At present, bottom right is inhabited by a TC275 - a 3 core MCU which runs at 200 MHz - perfect for controlling a relatively large number of motors.

    Top left is a weird looking shape that houses the GPS module - a Ublox C94 Rover, which bolts onto the under side of the PCB. Bolting onto the top side is the SIM800 cellular module, a digital compass (bottom left) and some TFT screens (middle). There's also mountings for a couple of Arduino Nanos, a text to speech module and a 35W audio amplifier.

View all 8 project logs

  • 1
    Surface Mount Soldering

    First thing is to solder all the 1206 components - resistors, LEDs and capacitors. No stencil is required - just a small amount of solder paste and a reflow heat gun. Fear not - soldering this size SMT is easy!

    Sometimes it's difficult to spot the polarity of the LEDs so it's a good idea to have a flying 5v power supply to check that the LEDs work before applying the final heat. Lay the LED in the solder on the pads and test they work. 

    The green LEDs require a higher resistor than the others so 2k is used with these and 1k with the others. 

    The 0 ohm resistors can be left off  - they give options to connect the SIM800 to the MEGA 2560 instead of a NANO. The 2560 tends to be more stable in operation.

  • 2
    Mount the Buzzers, switches, regulators, screw terminals

    These items are very robust, so need to be soldered next. Screw connectors are very useful where there is any vibration in the machine as they are pretty solid. Otherwise there are female connectors for flying leads on the stackable pins on the MCUs. The buzzers require 100 ohm resistors to protect the MCU from supplying too much current and burning out the pin circuit.

    There are some random locations for ground and 5v screw terminals which are very useful. The 12V screw terminals are all 5.08 mm pitch.

    NB. The Ublox Rover module can be connected to the PCB 12v supply or to a 10 to 30 VDC battery which is useful for keeping it 'live'.

  • 3
    Wire on the SIM800 battery

    The SIM800 wont work without a battery and it is wired onto the underside of the PCB, but not connected to the PCB ie not soldered, just tied on. There are special holes in the PCB for this.

View all 12 instructions

Enjoy this project?



Domen wrote 6 days ago point

Hi, great project!

Which motors are you using for movement and which for the steering? Could you please provide pricing and where to buy from?

Best regards

  Are you sure? yes | no

TegwynTwmffat☠ wrote 6 days ago point

Drive: NEMA32 0.75KW 220V High Speed CNC Servo Control 2.4NM 2500line AC Servo Motor and Driver

  Are you sure? yes | no

TegwynTwmffat☠ wrote 6 days ago point

Steering: 2 Phase Closed Loop Stepper System NEMA34 12NM High Torque CNC Stepper Motor Control kits

  Are you sure? yes | no

merck.ding wrote 03/20/2018 at 06:57 point

This is a very good idea and I am very much looking forward to you completing it.

  Are you sure? yes | no

TegwynTwmffat☠ wrote 03/20/2018 at 08:35 point

Thanks for the encouragement!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates