New to Raspberry and Stepper Motor Controllers

The Reset command timeout command can be sent to reset the timeout counter and clear the error. It is also possible to change or disable the timeout period with the Command timeout setting. You can change that setting from the command line utility using these three steps:

  1. Write all of the Tic’s settings to a text file using the command ticcmd --get-settings FILE. FILE is a placeholder for your filename which could be something like my_Tic_settings.txt.

  2. Edit the text file using a text editor to change the command_timeout setting to 0 (which will disable the timeout).

  3. Write the settings in the file to the Tic using the command ticcmd --settings FILE. If you are incorporating this into some sort of automated routine, be careful not to call the command to write the settings in a fast loop to avoid wearing out the Tic’s EEPROM, which is rated for only 100,000 write cycles.

-Nathan

Nathan,

Thanks for the details. This will be valuable to help store the write some initial setup parameters. I’ve noticed that the command ticcmd —energize does not energize the motor but ticcmd —deenergize does isolate the motor, is this normal?

Your help is greatly appreciated,

Best,

Mike

We expect the command ticcmd --energize to energize the motor unless there is an error condition preventing them from being energized. By energize, we mean that the driver sends current to the coils, which should cause the motors to present a holding torque rather than being free spinning.

If your Tic does not energize after the ticcmd --energize command, can you run the ticcmd --status --full command and post the results here so we can help you troubleshoot the problem?

-Nathan

Nathan,

Thanks.

I was able to use the ticcmd --resume command and this worked from both the command line and program.

Best,

Mike

Hi Nathan,

What is the resistor value of Rosc (or toff) in the Tic500? I’m trying to figure out what the motor current PWM rate is. Also is there a way to find out when the Tic500 has reached it’s target position destination without polling?

BTW just ordered another Tic500, so have 4 now!! Probably be getting 3 or 4 more since I’ll be building 2 complete systems at a minimum. When I post the performance of this system, I’m sure others will be getting these Tic500, they are really great to work with!! Hat’s off to you and the Pololu team for such a nice useful controller :grinning:

Thanks for the help,

Mike

We use a 220k resistor for Rosc. Polling is the only integrated way to determine if the Tic has reached its target.

-Nathan

Hello,

I’ve made good progress now and have all 3 axis working.

I’ve got a setup with 3 stepper motors on X ,Y and Z axis driven by a Pololu Tic500 on each axis, controlled by USB from the Raspberry. Separate X, Y and Z setup routines to allow each axis to define a Start, End and Increment size work and allows the motors to increment Y, then X and finally Z with predefined Start, End and Increments. This is a camera/lens setup where the camera/lens is attached to a Z linear rail, X & Y linear rails move the subject. All the linear rails are driven my stepper motors, which turn motor rotation into linear movement.

All works well, however I need to go to each X position, at each Y position and setup a specific Z axis Start, End and Increment size for each X position at each Y position, so a specific Z Start, End and Increment for each predefined X of Y position is required.

A nested “for” loop of Y overall, with X and then Z runs fine and positions all 3 stepper motors at the correct positions with the predefined setup Start, End and Increment size for X, Y and Z. I’ve tried using the same nested stepper motor position routines “for X loop” inside a “for Y loop” to move to the desired Y and X positions , but using the Z Start, End, Increment setup routine to capture the Z parameters at each Y and X position. The Z axis Start, End, Increment routine only gets run once then bypassed, as if it’s ignored for the rest of the Y and X “for” loops. Here’s the basic general concept;

for y in range (y number of increments ):
    move to y position
    y position = y position + y increment
   for x in range (x number of increments):
      move to x position
      x position =  x position + x increment 
      z axis start end increment routine
      print z parameters
    print x parameters
print y  parameters

This is the same sequence that runs everything fine with “z axis start end increment routine” replaced with;
for z in range (z number of increments):
move to z position
z position = z position + z increment

Any help is greatly appreciated,

Best,

Mike

I edited your post to add code tags so the code you posted shows up as code. Python uses whitespace indents to determine nesting and your indent spacing looks a little inconsistent. You might check the spacing in your code.

-Nathan

Nathan,

Thanks. I have the code with the proper indentation, but when I copied it this wasn’t passed on. Think I’ve found the problem.

When inside the “for loops” I am calling a z axis routine to define start, end and increments. For some reason this z routine only gets run once. If I bring the z routine code directly into the for loop, as direct code rather than a called routine then things work. I suspect that something in Python’s “for loop” doesn’t like calling this routine from within a “for loop”. The routine has 3 sequential “while True try except” statements with “break” which might something to do with my problem.

Best,

Mike

Hi Nathan,

Still haven’t figured out the one Tic-500 behaving differently yet, but I’ve been able to get the entire Precision Stack and Stitch up and running, and things are working quite well indeed!! The Tic-500s are performing exceptional well with the two modified USA THK KR-15s and modified THK KR20 rails. I’m using the Raspberry Pi 3B as the computer with 3 Tic-500 connected via USB, the Raspberry is operated remote via VNC, so no keyboard, mouse nor monitor is needed with the Raspberry. The code is in Python and still evolving, but working well at this point.

Here’s some threads you might be interested in showing the setup and development of some of the components.

http://www.photomacrography.net/forum/viewtopic.php?t=38353&start=0&postdays=0&postorder=asc&highlight=stack+stitch

https://www.photomacrography.net/forum/viewtopic.php?t=38511&start=0&postdays=0&postorder=asc&highlight=

https://www.photomacrography.net/forum/viewtopic.php?t=38512

Happy Thanksgiving,

Best,

Mike

1 Like

Nathan,

I tried to run a Raspberry Pi Zero W V1.1 with the Tic-500 via USB and get an error message (13 I recall). I can get the Raspberry Pi working via VNC or by using a USB hub, it works, but the Tic-500 won’t work. The Tic-500s work on my Raspberry Pi 3B and 3B+, so they are good. I count not get the Ticgui to recognize the Tic-500 or the Ticcmd. I don’t have the setup running now, but thought maybe there was some special “thing” that might need to be done with these Raspberries.

Best,

Nathan,

Just hooked up the Raspberry Pi Zero W (I’m operating the Raspberry Pi Zero W via VNC), and here’s the error code I get when trying to connect to the Tic-500 with USB from the Polou Tic …trol Center.

"There was an error connecting to the device. Failed to open USB device /dev/bus/usb/001/002. Permission denied. Error code 13 "

Any ideas??

Best,

Nathan,

Evidently I need use use the sudo command to initiate the ticgui, now it opens and can read the Tic-500. Now it’s seeing the Tic-500.

1 Like

Hello, Mike.

I’m glad to hear you found a workaround. By the way, using sudo is not generally needed. The procedure in the “Installing Linux Software” section of the Tic User’s guide should modify permissions so that the Tic USB device can be accessed without using sudo. Failing that, we have some instructions in the “USB troubleshooting for Linux” subsection of the “Installing Linux Software” section that we expect to address the error you mention without using sudo. I’ve copied those instructions here for easy reference.

If you get a “Permission denied” error when trying to connect to the Tic, you should make sure to copy the 99-pololu.rules file into /etc/udev/rules.d and then unplug the Tic and plug it back in again. The install script normally takes care of installing that file for you.

Of course, it is still possible that something else put your system in a state where the procedures we provide won’t work correctly.

-Nathan

Hi Nathan,

Hope all the folks at Pololu had a great Thanksgiving Holiday.

Thanks for the notes and information, I’ll give this a try.

Haven’t had time to try and trace down the erratic Tic-500, and identify the problem. BTW I picked up another 4 Tic-500 on your Black Friday sale. So I’ll end up with two complete setups, and a couple spares, since I now have 8 Tic-500s!!

Best,

Mike

1 Like

Hi Nathan,

As luck would have it I’ve found the problem with the suspect Tic-500, thank goodness I have some spares coming (my only spare Tic-500 now has your supplied connectors, I use different connectors with my setup). The MPS6500 has failed on this X Axis Tic-500, how do I know? I have burnt finger!! When I started up everything to try your suggestions, after getting home from the office (office power failed so I got home early), the Raspberry Pi 3B would reboot when I started my program. If you’ve followed my threads on PM I pointed to, you know that I’m using a DC to DC converter to create the 5 volts for the Raspberry from the 12V motor supply. After checking things carefully and using a Fluke DVM I noted the 5 volts was dipping and causing the Raspberry to reboot, so I monitored the 12 volts and sure enough it was dipping. I suspected a weak 12 volt power supply (it’s only rated for 2 amps), but I’ve been using this all along without issue. Anyway, I replaced the 12V 2 A supply with a 12V 5 A supply and repeated things. The Raspberry didn’t reboot but the X axis stepper motor (THK KR-15 with NEMA 11 motor) was highly erratic, something I’ve never seen before with any of the motors. Well the X axis Tic-500 was hot, real hot (my finger found out!!). I lets things cool down and checked everything out with same result (sans burnt finger!!). So I swapped the X Tic-500 with my Y Tic-500, now the Y axis motor was acting up (and the tic-500 getting hot).

So it seem’s the MPS6500 chip on the X axis Tic-500 has failed and drawing excessive current. This may explain the misbehavior I was seeing before. I have no idea why this has failed, it’s driving a NEMA 5.6 ohms motor like the Y axis, never seen a supply more than ~12v and has same current limit (634ma) as Y axis Tic-500, Z axis Tic-500 is set to 1452ma but has a heat sink and is fine. In normal operation none of the 3 Tic-500s got very hot. I have the 12V supply loading with a separate 220uF cap, and all motors are connected directly to the 12V supply, so supply has plenty of capacitance to absorb motor kickback currents.

I’m interesting on your thoughts on might have happened,

Best,

Mike

Nathan,

Today I received the 4 Tic-500s I ordered on Black Friday…thanks!!! I immediately soldered up my connectors on a new Tic-500 PCB and plugged in the cables, ran ticgui and set the Tic-500 parameters. Everything is now back working as it should.

Thanks for the quick delivery of the 4 additional Tic-500s. I have no idea why the particular Tic-500 MPS6500 chip decided to fail, but at least it didn’t prevent me from moving forward!!

Best,

Mike

I am glad to hear your system is up and running. If you connected or disconnected a motor while the system was powered, that could damage a driver.

-Nathan

Nathan,

Yes, I know all about inductive kickback and damage. Any of these controllers/motors are always removed from power by disconnecting the 12 volt supply rather that disconnecting the individual motors coils. This failure was hinted with the prior behavior of this particular Tic-500, so what I was thinking might have been a interface problem may have all along been a MPS6500 chip problem. Anyway, I’m not going to worry too much about this particular failure, just chalk it up to a possible bad MPS6500 chip!!

Best,

Mike

Thanks for the additional info. We would like to help you out with a replacement, and I have sent you a direct email about that.

-Nathan