Tower Crane; the next step

I would guess it is a knock off of this. Note that the labelling for EN and MS1 is a little misleading because of the extra pins. The important bit is actually on the other side, because that will have the configuration settings, but it is likely that it will operate just fine in default mode as a replacement for the existing driver. The wiring diagram on that page is the same except for the UART, which you don’t need for now. Note that if you have configured the existing driver for microstepping, the procedure is slightly different for this one, as hardware setting for microstepping uses only two pins.

2 Likes

Thanks.

Ah no, haven’t put that toe in the water yet.

2 Likes

Wow, I will give that my best shot tomorrow.

2 Likes

I would say that it is that. Unfortunately, I don’t understand the instructions on the manufacturer’s website to have a go at hooking it up. A wiring diagram and sketch would be a big help but I haven’t been able find them just yet.

2 Likes

There is a wiring diagram at the wiki I linked to. Just ignore the UART connections.
Silent2209 - FYSETC WIKI

2 Likes

G’day all. I have been testing dc motors and stepper motors to see what direction to take the Tower crane. At the moment I am leaning to the Nema 17 for the slew mechanism and a pair of Nema 8 reduction gear box stepper motors for the two trolley controls. I think I have a good grip on how to do all of that now thanks to you guys, and other sources.
The issue that remains is how to make the Nema 17 less noisy. I now have a TMC2209 V1.2 but still do not understand how to use it. Jeff105671, I read the wiki but am not at this time in a position to make any sense of it. What I need is a detailed wiring diagram and a dedicated sketch. Sooner or later I will find one. Thanks for your continued support.

3 Likes

The TMC 2209 is wired in exactly the same way that you have already wired the DRV8825. Or, you can use it in the CNC shield. In both cases the only thing that might trip you up is that Enable must be held high, You should indicate what part of the wiring diagram in the wiki is causing a problem - the conection to the motor is 1A/1B and 2A/2B, as before, with the separate motor power supply at +VMOT. Then Step and Direction from the corresponding Arduino pins, and the 5v logic supply at VIO. Tie Enable high, and connect the grounds together and you’re done…

The first stage in getting it to run quieter is microstepping. This is just some jumpers. For instance, tie both MS1 and MS2 to ground for 1/8 stepping, or tie both to +5v for 1/16th.

2 Likes

Presently I have the A4988 wired to the nema 17, not the DVR8825

The right side of both the A4988 and the TMC2209 appear to be wired identically

But the left sides are different. I understand step and direction are wired the same. I don’t think Tx and RX are to be used in my example and suspect that there doesn’t need to be a jumper to connect them. The next three (going up) are not used on either but there is no connection to enable on the A4988 yet there is on the TMC2209. My TMC2209 diagram (the one shown here) shows enable connected to mcu ( I presume micro controller unit or similar) but not to where or what on the MCU.

I’m not sure what held high means although I presume connected to 5v from the Arduino.

Tie enable High I think I’ve covered but connecting the grounds together has me confused. On the TMC2209 diagram it shows both the grounds on the TMC 2209 being connected to different sources. Also I’m guessing Logic supply is simply 5v and gnd on the Arduino.
As always, thank you for your patience.

2 Likes

Fantastic. How do I pm you. I have a zoom meeting at 4pm today with a couple of blokes from the Arduino forum, just to say hello and have a get to know you chat.

2 Likes

Hi Geoffrey,

When you click on the username at the top of someone’s post, you’ll see a popup with a message button:
image

Hope this sorts you out!
-James

1 Like

Certainly did, Thanks James.

1 Like

The right side is the same, as you note.

The A4988 does have an Enable, but you may have been operating without connecting it. It should be connected, for reliability. Connect it to GND for now. The option shown in the diagram is to connect it to any Arduino output pin and use that pin in your code to enable/disable the motor. You don’t need this functionality yet, but you could consider it later on.

Tx and Rx can be ignored.

Arduino ground, logic power supply ground, and logic GND on the TMC2209 should all be connected together. The motor supply ground is connected to the TMC2209 motor GND. I would recommend that the motor supply ground and the logic supply ground are directly connected together, so that there is no risk of ground currents flowing through any of the devices.

TMC2209

[Version 2 - corrected for circuit error]

2 Likes

Awesome, thanks. I’ll give it a whirl on the morrow.

1 Like

G’day Jeff. Just got this info from the other side of the world. It seems it may be even more complex than I thought.

"They are more complex to control than regulars A4988’s or the DRV8825’s

For Arduino they are controlled by UART and if you only have one pin exposed at the driver you need to make an aditional circuit to the PDN pin for setting it up also for setup you use the TMCStepper Library there you setup the current, Stall Value and Shaft direction

For control you use the AccelStepper Library and use the Step and Dir pin.

Those are some of the pointers sorry I couldn’t be of more help."

So, that said, I would like to investigate micro stepping with the A4988

However, Peter has one of the 2209 modules on it’s way to test and he should be able to figure it out.

I will pack away the scales problem, wait and see what Peter comes up with in relation to the TMC2209, do some research on micro stepping and now I will get on with engineering the cassette to drive the two boom trolleys. I’ll keep you up to date with little vids on the core forum. Cheers.

2 Likes

That is the easiest way to explore microstepping, but the concern about the TCM2209 is unfounded. It is correct that the device can be controlled by UART, but you don’t have to do it like that - UART control is optional. It provides more features, but they are not necessarily relevant to your application.
However, it is possible that it might be relevant to load calculations, so perhaps you can save it for the cable control. I will have a look at that.

In the meantime use the A4988 for rotation, after adjusting for microstepping.

Microstepping is implemented by selectively connecting the MS1, MS2 and MS3 pins to +5v according to the chart at this page. For instance, connecting MS1 to +5v will give half stepping. Connecting MS1 and MS2 to +5v will give 1/8 stepping, etc. No changes to code are required for testing, but to get the same amount of movement you have to multiply the steps by the amount of the microstepping (eg by 2 for half stepping).

To ensure that microstepping is working correctly current limiting should be in effect, To ensure this is the case, turn teh current control variable resistor fully anti-clockwise. Turn it gently, because it is possible to turn it past the zero stop. The details are at the same page referred to above, under the heading ‘Current Limiting’.

2 Likes

I went back to the A4988, followed the wiring diagram loaded the sketch but get nothing, not even locked up stepper motor. I tried many combinations of the wires from the stepper but nothing. I have to pull my head in and think of another way to get it working again.

This setup works for me - it should be exactly the same for you.

// Random Bounce
#include <AccelStepper.h>

boolean moveState = true;

// Define a stepper and the pins it will use
const int STEP = 2;            // pin number for step command
const int DIRECTION = 5; // pin number for direction command
AccelStepper stepper(AccelStepper::DRIVER, STEP, DIRECTION); // Step direction driver.

void setup()
{
}

void loop()
{
  if (stepper.distanceToGo() == 0)
  {
    delay(1000);
    if (moveState) {
      stepper.moveTo((rand() % 100) + 100);
      stepper.setMaxSpeed(100);
      stepper.setAcceleration(100);
      moveState = false;
    }
    else {
      stepper.moveTo(rand() % 100);
      stepper.setMaxSpeed(100);
      stepper.setAcceleration(100);
      moveState = true;
    }
  }
  stepper.run();
}
1 Like

Aha. I wasn’t using the CNC shield Maybe I better do that. I’ll let you know. Thanks Jeff.

Did that. I have a working stepper. Awesome. Solved a few other little problems along the way. Thanks Jeff.

I’m pleased to share this. Especially to those who have given time and valuable help to get the project this far. Work continues to fine tune the sketch now but basically the slew mechanism works. Thanks so much. Of course I will continue to post questions as we move on to the next phase, the trolley drives.

2 Likes

It has been a while and much has, and has not, happened. Whilst I was dithering away trying to get some action happening, Michael was working furiously developing the code. I am happy to say that, after a marathon phone hook up piece of fantastic mentoring, the crane works again. Better than ever. Still a minor issue with noise but I think we can improve that yet. Thanks everybody for all your help. Here is a little vid of progress made.

3 Likes