Motor stopped working

Hey guys,
I'm frustrated...
I soldered my board yesterday and it worked. Printed a case overnight, tried again today - nothing.
I have a 12 supply, l7805, Arduino Uno, tmc2208 and a nema 17.
I'm trying to get what component isn't working as intended, but I don't know how to check the tmc2208 and the stepper, since I only have both components only once, so can't check one without the other...
I already checked if 12 &5 v are supplied to the TMC (yes). I tried checking the voltage of TMC to nema, it was jumping between 0 and 0.05v for the two pairs. So I guess it's the driver, anyone can reassure me/tell me what to check to be sure?
Dont know how it broke, since i bought it(and the stepper) just for this project..

can you upload a schematic of the circuit?
have you checked the soldered joints are sound?
does the UNO output information on the serial monitor OK?

2 Likes

Help us help you.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Please include the entire error message. It is easy to do. There is a button (lower right of the IDE window) called "copy error message". Copy the error and paste into a post in code tags. Paraphrasing the error message leaves out important information.

Please post a schematic.

Please post an image of your project.

Please describe the problem better then you just did.

1 Like

Thanks for the hints, and sorry for not following the basic rules :frowning:

thats a low effort schematic, but i hope it has everything needed.
the soldering part is far from good but every connection is working.
i dont think its the uno, based on the fact, that it worked fine yesterday and i havent changed the code?


Code:
set starting pos and final position via small steps (+-150), when correct positions are defined it will move to this positions when specific ir-signal is recieved.

/* ====== minimumStepper =======================================
    Bare minimum to get a stepper with step/dir driver turning
*/
#include <MobaTools.h>
#include <IRremote.h>
#include <EEPROM.h>
#include <avr/sleep.h>
#include <avr/power.h>
#include <avr/wdt.h>

const byte stepPin = 9;
const byte dirPin = 10;
const byte enPin = 8;
int pos;
int pos_final;
const int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;
const int stepsPerRev = 200;    // Steps per revolution - may need to be adjusted
MoToStepper stepper1( stepsPerRev, STEPDIR );  // create a stepper instance



void setup() {
  irrecv.enableIRIn();
  pinMode(8, OUTPUT); //Enable
  stepper1.attach( stepPin, dirPin );
  stepper1.setSpeed( 2500 );              // 30 rev/min (if stepsPerRev is set correctly)
  stepper1.setRampLen( stepsPerRev * 2 ); // Ramp length is 1/2 revolution

  EEPROM.get(0, pos);
  EEPROM.get(4, pos_final);

   // Serial.begin(9600);
}

void loop() {
  // Serial.println("working");
  if (irrecv.decode(&results)) {
    //Serial.println("signal");
    switch (results.value) {
      /*
        Linke Taste(zurück)   Endposition festlegen   0xD21 0x521
        Reche Taste(vor)   Startposition festlegen 0xD20 x520
        Mittlere Taste(play)  Verschieben     0xD35 0x535
        Obere Taste(an/aus) Reset       0xD0C 0x50C
        Hoch Taste Einrichtung vor E98EBC14 842F712B
        Runter Taste EInrichtung zurück E68EB75D 832F6F96
      */
      //Einrichtungsbetrieb: 0 Position
      //Vorhang ganz auf
      case 0xD20:
        stepper1.setZero();
        pos = 0;
        break;
      case 0x520:
        stepper1.setZero();
        pos = 0;
        break;

      //Einrichtungsbetrieb: 1 Position
      //Vorhang ganz geschlossen
      case 0xD21:
        pos_final = pos;
        EEPROM.put(4, pos_final);
        break;
      case 0x521:
        pos_final = pos;
        EEPROM.put(4, pos_final);
        break;
      //Verschieben
      case 0x535:
        if (pos == pos_final) {
          pos = 0;
        }
        else {
          pos = pos_final;
        }
        EEPROM.put(0, pos);
        move_stepper(pos);
        break;

      case 0xD35:
        if (pos == pos_final) {
          pos = 0;
        }
        else {
          pos = pos_final;
        }
        EEPROM.put(0, pos);
        move_stepper(pos);
        break;
      //Verschieben Ende

      //Reset
      case 0xD0C:
        pos_final = 0;
        EEPROM.put(4, pos_final);
        break;
      case 0x50C:
        pos_final = 0;
        EEPROM.put(4, pos_final);
        break;

      //Einrichtung: verschiebe vor
      case 0xE98EBC14:
        stepper1.setRampLen( stepsPerRev / 2  );
        pos = pos + 150;
        move_stepper(pos);
        stepper1.setRampLen( stepsPerRev * 2  );
        break;
      case 0x842F712B:
        stepper1.setRampLen( stepsPerRev / 2  );
        pos = pos + 150;
        move_stepper(pos);
        stepper1.setRampLen( stepsPerRev * 2  );
        break;

      //Einrichtung: verschieben zurück
      case 0xE68EB75D:
        stepper1.setRampLen( stepsPerRev / 2  );
        pos = pos - 150;
        move_stepper(pos);
        stepper1.setRampLen( stepsPerRev * 2  );
        break;
      case 0x832F6F96:
        stepper1.setRampLen( stepsPerRev / 2  );
        pos = pos - 150;
        move_stepper(pos);
        stepper1.setRampLen( stepsPerRev * 2  );
        break;
    }

    irrecv.resume();

  }

}

void move_stepper(int tmp) {
  digitalWrite(8, LOW);
  stepper1.write(tmp);
  while ( stepper1.moving() );
  digitalWrite(8, HIGH);
}

Problem: The motor isnt moving anymore. arduino, ir-reciever and driver are supplied with 5v (checked), the driver also with 12v (checked). ir reciever gives visual feedback, workes(checked via serial). Arduino is working to (serial).
I want to find out, what component isnt working anymore (should be nema or tmc), but dont know how to do this. Hope this is useable?

I really cannot follow your schematic, I am trying to find the power source and what it is rated at. The links to the technical information on the parts I cannot find. Schematic flow is top down, left right. How are you measuring the voltage? Are you using solid or stranded core wire?

Please label and number pins, and explain the 7805 circuit. What is the purpose of the diode?

This is how a 7805 regulator is normally wired and how the circuit drawn. The output capacitor is required.

Capture

1 Like

for drawing simple circuits I find the open source project TingCAD useful

1 Like

stepmotor-drivers are sensitiv to voltage-spikes.
If you did connect or disconnect the motorwires as long as the stepper-driver is powered the dis-connecting causes high voltage-spikes which can destroy the stepper-driver.

This means two things: make sure that the wires between stepper-driver and steppermotor are connected with real high reliability and can't be disconnected by som accidently applied forces on the ends of the wires. I recommend this sort of Wago-clamps.
You can connect disconnect without tools just by pulling/pushing the lever.
If lever is closed you would need a lot of force to rip-out the wire

image

Connect / Disconnect motorwires only if power-supply is switched off.

best regards Stefan

Hey all,
thanks for all the input. i already ordered some new drivers (why not get better tmc2209 if they cost nearly the same). well: nothing changed. Since i have tried the curcuit on the breadboard before, and hadnt changed this, i was able to try out, if anything was faulty regarding the soldering. Still nothing.
Well, went back and remembered, that i changed the code from pin 7,8,9 (enable, dir, step) to 8,9,10 for cosmetic reasons (3 pins in a row instead of 1 and 2). Dont know if theres some hardware mistake on that one or if the arduino cant send the correct signals from the higher pins, but after going back to 7,8,9 everything was working again.
So: lesson learned: dont be stupid :slight_smile:

I have two capacitors, i honestly forgot about the small one (+5v to gnd).
The diode is to avoid damage to components in the 5v circuit. Thanks for the advice, next time i will sketch the circuit on the pc before creating it in real life, makes things easier, i guess?

@ StefanL38 thanks for the adive. I never work on the parts as long as they are plugged in so this wont happen at all, but gonna think about a high reliablilty solution for the connection itself!

dupont jumper cables are great for a quick prototypes but it is worth looking at breadboards with screw or solder terminals for greater reliability

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.