Close

Testing Texas Instruments DRV8711 with Nema 34 Stepper Motor

A project log for WEEDINATOR 2017

An autonomous roving CNC weeding/cultivating machine guided by GPS and coloured markers.

capt-flatus-oflahertyCapt. Flatus O'Flaherty ☠ 07/15/2017 at 15:270 Comments

I was not having much success with the STM 6482 due to lack of good software examples so switched to the DRV8711 chip which has a few less functions, but much easier to get up and running. There's no SPI acceleration / deceleration control, but managed to write this into code fairly easily using the good old 'millis and previous millis' trick:

  tone(24,i*10);
  digitalWrite (DIRpin, dir) ;
  unsigned long currentMillis = millis();
    if (currentMillis - previousMillis >= interval) 
    {
    previousMillis = currentMillis;
    i++;
      if(i>600){i=600;}
    }

The Tone library gives really nice smooth motor operation and I can gently ramp up the speed and torque quite nicely, preventing sudden current inrush.

Next job is to create a PCB for each of the 12 motors. The current idea is to stick an Arduino Nano on each PCB and link all the PCBs together via the I2C bus - this seems to be the only way to get good simultaneous control of all 12 of them! Hopefully, most of the acceleration and torque profiles can just be uploaded onto the Nanos and then (mostly) forgotten about.

The image above also shows the gearboxes, which currently are being selected as 100:1. Sometime soon I'll be able to actually build one of the wheel/steering/suspension modules.

Discussions