Close
0%
0%

WEEDINATOR 2018

The WEEDINATOR project continues .... The inevitability of robots working on farms draws ever nearer ....

Public Chat
Similar projects worth following
In the world of professional agriculture, a lot of focus has been put on large, incredibly expensive machines that work in huge open fields where just one crop is grown. Whilst this is incredibly efficient and produces very cheap food, it's not good for pretty much everything else!
There does exist a substantial backlash against this farming model where small farmers grow 'organic' vegetables on small farms with respect to the environment and indigenous wildlife.
Although robots have a bad rep for stealing our jobs, there are some jobs that most people just don't want to do. Not only are these tasks boring, but they can often tip the wage scales over the minimum threshold and make small farms financially unviable.
Here I introduce the Weedinator - an autonomous agricultural electric tractor that can be used on small farms to cultivate, till and weed seed beds. It will travel up and down 56 inch wide beds, several times a day if necessary.

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

2018 sees the project moving forwards with the addition of a side project managed by Jonno which uses a skid steer system and higher powered drive motors. It will use the same control system as the WEEDINATOR.

This year we've also got more people on the team, including Tristan Lea, a successful open source entrepreneur, who apart from having superb technical skills, has actual open source business experience.

Also, the WEEDINATOR will be exhibited around the UK, including the Liverpool MakeFest, 30th June 2018 https://lpoolmakefest.org/, the Electromagnetic Field, August 31 - September 2nd 2018 and (hopefully) FarmHack UK 2018 4 October - 7 October 2018.

Project challenges:

  • Designing steering geometry that does not impinge on the planted crop - I did not want to use skid steer so a more complicated steering system is required with full 'differential' where speeds of steering and drive motors individually change according to steering and drive parameters eg forwards, backwards, clockwise etc.
  • Selecting suitable motors and gearboxes - Cost is a major factor and the minimum requirement was that there should be optical encoders for monitoring 'steps' and speed. Other similar skid steer designs would use 24v truck windscreen wiper motors but these were thought to be too basic.
  • Preventing abrasion and jamming of the CNC mechanism due to soil and dust - gaiters, rubber boots, wipers, delrin bearings ..... the list of solutions goes on!
  • Selecting suitable power supply for motors - The obvious solution is batteries but lightweight lithium batteries are extremely expensive and are only good for a limited number of re-charges.
  • Autonomous navigation - the nav system needs to be accurate to at least +-25mm to get accurate positioning on the crop beds. Think 'error correction'!
  • Object recognition - The machine needs at least some basic OR. The weeding process is preventative so there's no need to distinguish weeds from crop. It's more about telling the difference between brown soil and green plants so the cameras are more likely to see green blobs on brown background. Objects can also be placed on the soil to aid navigation, enhancing the accuracy. But what about bright glaring sunshine?
  • Cost - The machine needs to be built within a sensible budget so that in stands a chance of being commercially viable. The mechanical design needs to be as simple as possible with appropriate compromises with functionality. How close to the crop can the drive gearboxes be? How big is the crop going to be? Most weeding needs to be done when the crop is more vulnerable at the early stages. How 'ideal' does the steering need to be? The steering bearing does not necessarily have to be in the middle of the wheel - it can be offset to one side and changing the relative speeds of the drive wheels can aid the steering motors.
  • Multi-purposing CNC - How to design the machine in such a way as to allow different implements to be changed over from one another in less than 5 minutes? For example, the weeding apparatus should be a bolt on assembly rather than bolted on individual components.
  • Collision avoidance - Many new cars on the road (2018) have collision avoidance modules which prevent people being run over and the car hitting other obstacles. Can such systems be easily created or bought cheaply?

ProTune software manual ACSV2sm_V0.0.0.pdf

Leadshine 400W servo motors for CNC mechanism.

Adobe Portable Document Format - 2.87 MB - 08/14/2018 at 09:13

Preview
Download

ACM_Datasheet.pdf

Leadshine 400W servo motors for CNC mechanism.

Adobe Portable Document Format - 2.63 MB - 08/14/2018 at 09:13

Preview
Download

ACS806m.pdf

Leadshine 400W servo motors for CNC mechanism.

Adobe Portable Document Format - 1.98 MB - 08/14/2018 at 09:12

Preview
Download

ACS806sm.pdf

Leadshine 400W servo motors for CNC mechanism.

Adobe Portable Document Format - 565.69 kB - 08/14/2018 at 09:12

Preview
Download

Adobe Portable Document Format - 2.49 MB - 08/14/2018 at 08:40

Preview
Download

View all 22 files

View all 20 components

  • Exploring Inductance sensor + Wire Navigation

    Tegwyn☠Twmffat2 days ago 0 comments

    Commonly used to guide automatic lawn mowers, a cable carrying an AC frequency could also possibly guide the WEEDINATOR. This would have a few advantages over using a camera as there would be no problem in very bright sunlight and it would not matter if the cable became slightly covered with soil.

    To get started, I bought an incredibly cheap $9 kit from Robotshop  and put together a test rig with an oscilloscope from RS supplies:

    For the price of the kit, the results were pretty good, but I soon realised that I'd need something a bit better for guiding this machine. 

    On the frequency generator board there is a variable resistor that changes the output frequency to match the receiver board and the 'ideal' calculated frequency is 33.932 kHz., but my receiver worked best at 36 kHz:


    I wondered why I was getting much better sensitivity on the red channel than the blue and at first suspected the paralleled inductor / capacitor combinations. To test this, I moved the inductors relative to the transmitting wire to balance out the response and adjusted the frequency on the generator board backwards and forwards from a centre of 36 kHz as shown below:
    The difference between the two channels did not change that much, so the LC bandpass filters actually seem to be quite well matched. Since the oscilloscope probes are on the inductors, the problem must be resistance in the inductors or the cables / soldered joints connecting them? Maybe a faulty inductor?

  • Drive Motor Upgrade - Ampflow A28-400-F48 with VEX Victor BB Driver

    Tegwyn☠Twmffat08/04/2018 at 16:45 7 comments

    A while back, I made myself a promise that as soon as enough USD had accumulated in my PayPal account I would upgrade the drive motors. So, using the $2000 odd seed funding from the Hackaday prize and some advertising income from one of my other websites, I made the plunge and ordered those crazy expensive Ampflow motors shown in a previous log. The motors are used by large combat robots for TV shows and don't have optical encoders and positioning control, which, I think, will be an advantage as I have already proven that I can balance the torques on the left and right drive motors using current sensors. The motors themselves (A28-400-F48) are brushed, high torque, high current DC devices with expensive neodymium magnets and a staggering 9.1 Hp at 200 amps for help with manoeuvring over rough ground. They are fan cooled, but will they get hot? Will the VEX Victor BB controller box get hot? Will the motor mounting bolts shear? ….. It's all very risky, but we all got to take risks when the odds are ok and we can afford, both financially and emotionally, to lose.

    Firstly, the motors need to have adapter plates made and adapter collars for the shafts to fit the drive gearboxes. These are currently being manufactured so will be shown in the next log.
    Next, the motors and drivers boxes are set up on a bench and tested using the proprietary VEX software with a Prolific USB to serial cable. Once I'd got a genuine cable from a reputable supplier, the software ran very easily and I was able to make the motors run in no time. 
    I was a bit concerned about how to control the motors using an MCU, but Alex at VEX's technical support soon put me on the right track. The signal that the Victor BB requires is not a straightforward PWM, but rather an 'asynchronous' PWM where the LOW part of the waveform must be 20ms long. The duration of the HIGH's gives the motor speed and a HIGH of duration 1.0 ms gives full speed forwards, 2.0 ms gives full speed backwards and 1.48 gives neutral ….. Simples!
    The VEX Victor BB driver box is wired to an Arduino Uno for testing and the wiring is as below:

    It would be possible to code the Arduino with two delay() functions:

    digitalWrite(13,LOW);
    delayMicroseconds(20000);
    digitalWrite(13,HIGH);
    delayMicroseconds(1400);
    

    But that's no use in my TC275 code as delay cannot be used as it will screw up all the other motor timings. Instead, asynchronous motor timing is done with the micros() function. The code was run with an LED and serial print console at very low speed to check that the asynchronous ratios were correct. Serial must be removed, as shown, when running the code at high speed.

    // Asynchronous timer
    float speedTimerA = 0.001;
    float speedTimerB = 0.001;
    int LEDState = HIGH;
    unsigned long previousMicrosTimerA = 0; 
    unsigned long previousMicrosTimerB = 0; 
    unsigned long intervalTimerA = 0;
    unsigned long intervalTimerB = 0;
    int count =0;
    
    void setup() 
    {
      Serial.begin(9600);
      pinMode(13, OUTPUT);   // LED
      pinMode(3, OUTPUT);    // motor
      delay(5000);
    }
    void loop()
    {
      motor();
      //printOut();                     // Remove this when using at high speed
    }
    ///////////////////////////////////////////////////
    void motor()
    {
      unsigned long currentMicros = micros();
    /////////////////////////////////////////////////////
      speedTimerA = 650;                                     // Between 1000 and 500. Neutral is 675.
      intervalTimerA = 1000000/speedTimerA;
      speedTimerB = 50;                                      // B MUST be slower than A. Speed of 50 Hz == 20 ms.
      intervalTimerB = 1000000/speedTimerB; 
      intervalTimerB = intervalTimerB + intervalTimerA;
    
      count++;
      if ((currentMicros - previousMicrosTimerA) >= intervalTimerA)
      {
        previousMicrosTimerA = currentMicros;
        if(LEDState == HIGH)
        {
           count =0;             // Count was used to help prove the maths worked ok.
        }
        LEDState = LOW;
        if ((currentMicros - previousMicrosTimerB) >= intervalTimerB)
        {
          LEDState = HIGH;
          count =0;
          previousMicrosTimerB = currentMicros;
        }
        digitalWrite(13,LEDState);
        digitalWrite(3,LEDState);
      }
    } // motor
    void printOut()
    ...
    Read more »

  • Fully Autonomous Weeding

    Tegwyn☠Twmffat07/21/2018 at 17:22 0 comments

    Finally ……. After one whole year of work ….. We have autonomous weeding. Actually the machine can now navigate through a series of waypoints using super accurate error correcting 'RTK' GPS and, additionally, it can now navigate along a bed of seedlings and weed the bed with a rotating claw to an accuracy of about +- 5mm. Navigation on the bed itself uses a line following camera - the Pixy2 as even the very best GPS can't navigate to the accuracy that we need to avoid killing the plants.

    The CNC claw is programmed to move in the pattern shown above, weeding two rows of seedlings every time the machine stops. Some of the code can be seen in the previous log. When the claw reaches position 15, the whole machine moves slowly forwards with the claw still weeding, following a white rope, until it reaches a barcode. Then, when the Pixy2 sees the barcode move to a certain point in the it's field of view, it stops the machine dead and tells the CNC to do another circuit. Full details of the code can be seen here.

    So what's next? This certainly is not the end of the project as, apart from anything else, there are a few annoying bugs to fix and the drive motors used are either not set up correctly or simply not appropriate ….. If only I could bypass the positioning feature of the motor drivers when the machine is driving up paths etc. …… They're great on the beds of seedlings though.

    After some thorough testing of the weeding mechanism during the rest of the season, the next stage would be to start thinking about performing another task such as planting. This is actually probably more challenging than weeding, although sowing seeds would be easy enough. Seedlings are a different matter as they are in plugs of compost with roots and stems. The CNC mechanism can perform planting seedlings with the weeding claw apparatus swapped out for a different device ….. Who knows what that will look like?

  • Testing Automated CNC in the Field on a Crop of Leeks

    Tegwyn☠Twmffat07/17/2018 at 19:10 0 comments

  • CNC Automation Demo

    Tegwyn☠Twmffat07/14/2018 at 14:26 0 comments

    Another project milestone has been reached ….. The CNC mechanism is now automated and a few hundred lines of code written to perform a basic demonstration of all the servo motors running simultaneously. No special servo library is used, which makes coding easier as everything is low level and there's no restriction in the number of channels or 'special' tasks like 'pause' or 'wait until X axis has reached end point' ………. I'm very pleased with how it's worked out and there's still plenty of memory left on the TC275 MCU to write a nice little algorithm for performing an actual weeding routine.


    The next stage is to put a current sensor on the rotating claw driver power supply. This will limit the amount of work that the claw does, which itself depends on soil conditions and the depth that the claw is working at. This way, no expensive LIDAR or radar is required and there *should* not be any problem with accuracy and missing any patches of low lying soil - the soil levels are not dead flat, particularly after the tractor has just been over it.

  • More Test Beds Planted

    Tegwyn☠Twmffat07/12/2018 at 09:51 0 comments

    The farm dog has a particularly good eye for precision and will spot any leek that's out of place! ….. Precision is really important for testing the machine and the plants themselves need to be in exactly the right place. Ultimately, maybe next year, the machine will be able to do the planting, but for now we use humans (and dogs).

    The white rope on the left will guide the machine with +- 5mm precision and barcodes will be printed out and laid down on the rope where we want the machine to stop and perform a series of weeding operations. Obviously, mud and dirt could be a problem by obscuring the barcodes, but for now everything is bone dry and there would be no problem. Eventually, more advanced cameras will be used and the plants themselves will be used to create a virtual 2D array for use as a navigational aid. In this case, the white rope will remain, but the barcodes method can be discarded and we'd revert to GPS instead ….. Well that's the plan anyway!

  • First Steps in CNC Weeding Automation

    Tegwyn☠Twmffat07/11/2018 at 18:02 0 comments


    Now that the machine itself can navigate autonomously, it's time to get the weeding mechanism doing the same.

    In the last log, I got the machine to recognise a barcode, which can be used to stop the machine and allow a weeding routine to be carried out.

    First task is to get the X,Y and Z axis's to 'index' or 'register' on limit switches so that it knows exactly where it is before it starts trying to do a task.

    The code to achieve this fairly simple and no special libraries are used. The only deviation from my normal procedure was using a 30 ms delay at one point, which will probably be replaced with a 'millis' or 'micros' command which will then allow all the axes to be registered simultaneously.

    void CNC_SETUP()
    {  
      unsigned long currentMicros = micros();
    //////////////////////////////////////////////////////////////////////////////////////////
      speedCNCX = 1600;                                         // 1 = one Hz.
      XZeroingStepsTotal = 5000;
      dirStateCNCX = LOW;                                       // LOW is Forwards.
    
      // controlState==HIGH is autonomous mode.
      // Initial movement forward for zeroing:
      if((controlState==HIGH)&&(XZeroingState==LOW))            // Forwards and backwards switch open.
      {
        XZeroingStep=0;
        intervalCNCX = 1000000/speedCNCX;                       // interval is smaller for faster speed.
        if ((currentMicros - previousMicrosCNCX) >= intervalCNCX)
        {
          LSFX = Fast_digitalRead(49);                          // Limit switch X forwards
          if (stepStateCNCX == LOW)
          {
            stepStateCNCX = HIGH;
          }
          else
          {
            stepStateCNCX = LOW;
          }
          //DEBUG_PORT.print("XZeroingState =    ");DEBUG_PORT.println(XZeroingState);
          digitalWrite(53,dirStateCNCX);
          digitalWrite(35,stepStateCNCX);
          digitalWrite(39,stepStateCNCX);                        // Orange LED
          previousMicrosCNCX = currentMicros;
        }
      }
      else
      {
        digitalWrite(35,LOW);
      }                                                           // Initial movement forward for zeroing ends
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////  
      if((LSFX==HIGH)&&(controlState==HIGH))                       // Either x switches closed autonomous(HGH)
      {
        delay(30);                                              // Need this delay for reliable operation of switch for some reason.
        XZeroingState=HIGH;
      }
      if(controlState==LOW)
      {
        XZeroingState=LOW;
      }
      if((XZeroingState==HIGH)&&(XZeroingStepsTotal > XZeroingStep))
      {
        dirStateCNCX = HIGH;                                     // LOW is Forwards.
        if((LSBX==HIGH)&&(controlState==HIGH))                   //  backwards switch open.
        {
          intervalCNCX = 1000000/speedCNCX;                      // interval is smaller for faster speed.
          if ((currentMicros - previousMicrosCNCX) >= intervalCNCX)
          {
            XZeroingStep++;
            LSFX = Fast_digitalRead(49);                          // Limit switch X forwards
            if (stepStateCNCX == LOW)
            {
              stepStateCNCX = HIGH;
            }
            else
            {
              stepStateCNCX = LOW;
            }
            //DEBUG_PORT.print("XZeroingState =    ");DEBUG_PORT.println(XZeroingState);
            //DEBUG_PORT.print("XZeroingStep  =    ");DEBUG_PORT.println(XZeroingStep);
            digitalWrite(53,dirStateCNCX);
            digitalWrite(35,stepStateCNCX);
            digitalWrite(39,stepStateCNCX);                        // Orange LED
            previousMicrosCNCX = currentMicros;
          }
        }
        else
        {
          digitalWrite(35,LOW);
        }     
      }             // if(XZeroing == HIGH)
    ////////////////////////////////////////////////////////////////////////////////////////
    }               // CNC

  • Object Recogition: Barcodes

    Tegwyn☠Twmffat07/09/2018 at 16:24 0 comments

    Barcodes can be placed on the soil to instruct the machine to do a particular task. In the video below, barcode '3' is detected by the Pixy2 camera and the machine stops dead when that barcode image reaches a certain position in the camera's view. The machine can then perform any number of operations such as weeding and then move forwards once more to the next barcode.

  • Will Robots Destroy our Jobs / Communities?

    Tegwyn☠Twmffat07/06/2018 at 10:25 0 comments

    It's the first week of July here at +53 ° latitude, planet Earth and we're all enjoying being outside in the sunshine tending our vegetables. There's no robots in sight - not even on the neighbouring farms ….. yet.

    Then again, there's no people visible on the neighbouring farms either, just sheep and a lot of grass. Already, mechanisation has dramatically reduced the number of people working on farms by about 95% in the last 50 years, depending on which country we are in. I remember travelling through Romania 20 years ago and seeing maybe 50 people in a long line digging over a field with sticks. It looked like extremely hard work!

    So today, maybe it's more of a lifestyle choice if we want to work outside or not? We don't have to use the WEEDINATOR every day for every job if we don't want to. If the choice is available, maybe some of us would actively choose to weed some brassicas rather than play computer games or endlessly browse social media?

    This time next year, the WEEDINATOR will be capable of performing the job in the photo above and in reality, it's a job that 99% of us don't want to do, for whatever reason. If people do actually want to do the job, it's perfectly ok to leave the machine in the garage. There is hope for us to both produce cheap high quality food and enjoy working in the fields. It's just a matter of choice.

  • Control System: Computer or Bare Metal ?

    Tegwyn☠Twmffat07/02/2018 at 13:26 2 comments

    One of the debates that came out of the Liverpool Makefest was whether it would be better to use a computer eg Raspberry Pi or microcontroller such as Arduino for the control system? ….. I tried a Google search, but nowhere could I find a definitive answer.

    In my mind, the Raspberry Pi, or the 'RPi', is great for complex servers or handling loads of complex data such as Ai based object recognition …… Or a complex robot with very many motors running at the same time. In contrast, the Arduino, or 'MCU', will handle simpler tasks with greater efficiency and reliability.

    The RPi works with a huge operating system composed of a vast, almost indecipherable, network of inter-dependable files, using a very large amount of precious silicon. The problem here is that computers are prone to crashing due to their sheer complexity whilst a MCU, with only a few thousand lines of code, is at least one order of magnitude more reliable. The other question that was posed is that if the system, whatever it is, does crash, how long will it take to reboot?

    As development of the machine continues, some of the tasks will be assigned to a small computer, the Nvidia TX2, hosting an enormous graphics processor for Ai based object recognition. More critical tasks such as navigation and detecting 'unexpected objects' will be done on MCUs. One of the major tasks is writing / finding code to get reliable communication between these devices. We might also want a simple 'watchdog' MCU to check that all the different systems are working properly. Maybe each system will constantly flash a 'heartbeat' LED (or equivalent) and the watchdog will monitor this. A small robotic arm would then move across to press the relevant reset button.

View all 37 project logs

  • 1
    Chassis Build

    The central part of the chassis, which is also going to be the CNC machine, is laid out on an extremely flat surface plate so that the pieces of box section can be positioned as accurately as possible, enabling the CNC components to run nice and smoothly. The pieces are welded up on the table taking great care not to get hot splatter on the table itself, which would ruin it.

    The box section itself needs to be cut with an accuracy of about 0.2 mm and I chose the best steel supplier in my location with a saw that used automated feed to get an accuracy to 0.1 mm. Other steel suppliers cut to +- 5mm which is useless!

    The sections are checked for squareness to each other and carefully tacked together in diagonal sequences to avoid distortion.

    At this stage the construction seems to be wildly heavy and very much over engineered, but in the later stages the plasma cutter is going to be used to remove as much mass from the structure as possible.

  • 2
    Buidling the Swivelling Front Axle

    The front drive units are positioned relative to the main chassis and wooden blocks are used to level it up. This enables the front axle to be measured. It is then drilled each side with a diameter 60mm hole in it's centre using a broaching drill. The 600 mm long box is drilled diameter 40mm.

    The small 100 x 100 box sub frame is welded onto the main chassis, getting it as level and square as possible and the suspension tube is inserted and welded into the 60 mm holes.

    The low profile 50 mm bearings are inserted into the tube and the shaft is carefully positioned and welded in.

    The 970mm axle box section is then welded to each of the drive units in turn.

  • 3
    Building the Back Axle Assembly

    The back axle is a temporary fixture to enable testing of the main front drive units. The dimensions of the 100 x 100 mm box sections used are given by setting the rest of the chassis level and making measurements.

View all 13 instructions

Enjoy this project?

Share

Discussions

Flavia Laurencich wrote a day ago point

Very interesting project!! Love it <3

  Are you sure? yes | no

Jan wrote 08/05/2018 at 08:52 point

I hope this question was not asked before but it really boggles my mind: Will the finished unit be fully autonomous? With that I mean: does it roam the fields freely or will it still need visual guides like QR-codes, wires or even kind of "tracks"?
The reason I ask is because I can't think of farmers equipping fields hundreds of meters wide with such delicate stuff like optical markers, wires or something like that.

Cheers, Jan

  Are you sure? yes | no

elad orbach wrote 06/03/2018 at 09:39 point

looks very similar to this project  (2001)

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.431.3255&rep=rep1&type=pdf

hope it can assist you to achieve your goal faster

  Are you sure? yes | no

Tegwyn☠Twmffat wrote 06/04/2018 at 16:29 point

Looks like a good system .I'd certainly love to have in-wheel motors one day!

  Are you sure? yes | no

Tegwyn☠Twmffat wrote 06/04/2018 at 16:35 point

yes and I'd love to be able to use in wheel motors sometime soon!

  Are you sure? yes | no

miltongiordano wrote 04/25/2018 at 12:20 point

love your project, following closely

  Are you sure? yes | no

Tegwyn☠Twmffat wrote 04/25/2018 at 13:59 point

Thanks - We're making a lot of good progress at the moment.

  Are you sure? yes | no

miltongiordano wrote 05/09/2018 at 11:55 point

anything to share? about your progress

  Are you sure? yes | no

Tegwyn☠Twmffat wrote 05/09/2018 at 16:21 point

Yes ..... I've just updated the logs section with videos etc.

  Are you sure? yes | no

RandyKC wrote 04/17/2018 at 16:26 point

Enjoying your project! 

Where did you get your tire(tyre)/wheel/hub/axel from?

  Are you sure? yes | no

berryfarm wrote 03/04/2018 at 18:34 point

Can your motor controller be used on other motors besides stepper motors?

  Are you sure? yes | no

Tegwyn☠Twmffat wrote 03/05/2018 at 07:03 point


 Yes, we are using the controller on other motors including servo and cargo

  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