#3140 Tic-36v4 Only Runs When Connected to MicroUSB

Hello,

I’m fairly new to this, so please pardon my ignorance. I’m trying to create an LCD scrolling menu to set speed and distance parameters for a stepper motor-powered linear stage. I’m using the following to do that:

All_Together_v3.ino (5.4 KB)


I used the TIC software to limit the current draw to 1.5A and set the step mode to 1/8 step. I’ve successfully gotten the menu to set speed and distance that I want and proceed to run the linear stage at those set parameters, but I have two issues:

  • One, I would like to be able to interrupt the movement of the stepper during its action. Early trials to govern the movement using while() and if() statements based on button inputs haven’t solved the issue. I’ve only been able to abort the motion by de-energizing the controller in the Tic software.
  • Two, I’d like to run the program and system completely removed from my computer after initial setup. Right now, as soon as I unplug the MicroUSB from my laptop to the Tic, the Tic stops responding to the Uno. After reestablishing connection to my laptop, the Tic works again. Is this a coding setup issue?

Connections are as follows:

  • 12W Wall to Uno
  • DFRobot shield on Uno
  • Tic SCL to DFRobot SCL
  • Tic SDA to DFRobot SDA
  • Tic GND to DFRobot GND
  • 96W +/- into Tic Vin/GND
  • Stepper A+,A-,B+,B- into Tic A1,A2,B1,B2

The more pressing issue is the mandated laptop connection. Any advice would be greatly appreciated!


Thanks,
Ben

Hello, Ben.

You should be able to interrupt a movement with the right commands, but for now lets focus on your more pressing issue, then we can get back to that after it’s working without a USB connection.

Is the red LED on the Tic coming on when you remove the USB connection (indicating an error)? I noticed that you have the resetCommandTimeout() and delayWhileResettingCommandTimeout(uint32_t ms) functions from our examples in your code, but it does not look like you are calling them anywhere in your main loop. So, unless you have adjusted the default command timeout settings on your Tic, I suspect a command timeout error is getting triggered. Could you try adding a call to the resetCommandTimeout()function somewhere in your main loop that will run every cycle? Alternatively, you could try temporarily disabling the command timeout setting in the “Input and motor settings” tab of the Tic Control Center to see if that fixes the problem.

If the problem persists, I recommend doing the following test to narrow down which error is stopping the Tic:

  • run your system with the board connected to the Tic Control Center via USB
  • take note of the “count” for each error in the “Status” tab
  • disconnect USB and wait for the red LED on the board to come on
  • reconnect USB and see if the “count” for each error has changed

Brandon