Motor Controller Project

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Since no one volunteered for laying out the PCB, I went ahead and did this on my own.

These are 2 boards that plug directly into the Raspberry Pi 3B, one is for the Trinamic TMC5130 and TMC 5161 BOB, the other is for the TMC5160 BOB. These boards allow a jumper to select SPI Chip Enable select 0 or 1 address, BOB are plug in, and also allow operation with the Pololu Tic-500.

For S&S work I'm using a TMC5130 for Z axis and two Tic-500 for X and Y, the board supports up to 3 Tic-500.

I've also included an optical isolated Strobe/Flash trigger and isolated camera trigger which should work with most cameras, including the Nikon dual pin trigger approach. RPi power is from usual USB or derived from motor from the DC to DC converter which is diode "ORed" to +5V for safety.

The GX-F12 magnetic homing sensor is also supported.

I've just ordered the PCBs and in process of ordering parts.

Best,

PCB front for TMC5130
Image

PCB back for TMC5130
Image

PCB front for TMC5160
Image

PCB back for TMC5160
Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

iconoclastica
Posts: 487
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Post by iconoclastica »

The very reasons I settled on the RPi!!
I am not giving up, yet, now I have got working what I suppose will be the hardest part of the project (asynchronous P2P socket communication over WIFI). I least I want to experience how hard/easy it is to control the hardware.[/quote]
--- felix filicis ---

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

iconoclastica wrote:
The very reasons I settled on the RPi!!
I am not giving up, yet, now I have got working what I suppose will be the hardest part of the project (asynchronous P2P socket communication over WIFI). I least I want to experience how hard/easy it is to control the hardware.
felix,

Like the never give up attitude :D That's how I eventually got the Trinamic working :shock:

If you decide with the RPI, then VNC is just like having a HDMI monitor, keyboard and mouse connected to the RPi. It's works very well, I was surprised how well it works!!

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

The PCB boards arrived late 5/1 and I began the assembly soon after. I can report the board fits on the Raspberry Pi and is working. I ran a couple quick tests with the Trinimac TMC5130 and THK KR20 and everything seems in order.

Assembly is straight forward and doesn't require super soldering skills, no surface mount devices need soldering, only the thru board components.

I'll make a few of these boards available, and maybe a few kits of parts.

BTW, no jumper nor trace cuts required :D

Best,

Image
Image
Image
Image
Image
Image
Image
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Been able to get some quick stepper motor current waveforms from various motor controllers, Stackshot, Wemacro, MJKZZ and the one I'm developing based upon Trinamic TMC5130. The current probe used has a limited bandwidth (Less than 5KHz I suspect), so higher frequency (speed) waveforms will tend to be somewhat distorted, but nevertheless useful for comparisons.

The motor used is just a run-of-the-mill NEMA 17 400 step ~2ohm motor (JK42HM48-1684AF) I had laying around and had cable adapters for. All tests were on the same motor at 12VDC supply from a linear lab type supply (to not introduce any supply variables).

First off is my old and trusty Stackshot (2010~2011) controller operated from Zerene.

At 100um/s
Image
At 1mm/s
Image
At 3mm/s
Image

Wemacro Controller.

At 100um/s
Image
At 1.8mm/s
Image

MJKZZ Stand Alone Controller.

At 160um/s
Image
At 600um/s
Image
At 1.2mm/s
Image

TMC5130 Controller.

At 100um/s
Image
At 500um/s
Image
At 1mm/s
Image
At 3mm/s
Image
At 5mm/s
Image

Now some start and stop currents.

Wemacro Start
Image
MJKZZ Start & Stop
Image
MJKZZ Start & Stop
Image
TMC5130 Start & Stop
Image
TMC5130 Start
Image
TMC5130 Stop
Image

As you can see the TMC5130 is very smooth in operation and not surprising it's so quite, and the advantages for velocity profiling are evident.

My workhorse Stackshot has a rather ratty looking waveform and helps explain why it's so noisy!! This is a very old rail though, and the newer ones may be much better. The popular Wemacro looks nice as does the MJKZZ, but both have some speed limitations compared to the TMC5130. The properly configured (not optimized though, so maybe more room) TMC5130 can run so fast I won't even post it, as you wouldn't believe me :shock: And it's quite and accurate....not a bad combination IMO.

BTW I have more graphs, but don't want to clog up the thread unless it's acceptable and folks feel it's useful.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Interesting that the WeMacro rail looks good. The MicroMate has a very strong vibration.

mawyatt
Posts: 2497
Joined: Thu Aug 22, 2013 6:54 pm
Location: Clearwater, Florida

Post by mawyatt »

Lou,

If you look at the start current, you can see it has a sharp "edge". This current edge can cause a sudden "jerk" in the start (and stop) of the rail. Probably the cause of the vibration you mentioned.

Best,
Research is like a treasure hunt, you don't know where to look or what you'll find!
~Mike

ray_parkhurst
Posts: 3438
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

mawyatt wrote:Lou,

If you look at the start current, you can see it has a sharp "edge". This current edge can cause a sudden "jerk" in the start (and stop) of the rail. Probably the cause of the vibration you mentioned.

Best,
In your sims, did you check if it might be possible to filter the motor currents to improve things? Your method of waveshaping is of course best, but for folks using other controllers, an analog filter solution might be feasible.

kaleun96
Posts: 273
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

Post by kaleun96 »

mawyatt wrote:The properly configured (not optimized though, so maybe more room) TMC5130 can run so fast I won't even post it, as you wouldn't believe me :shock: And it's quite and accurate....not a bad combination IMO
How fast are we talking? Just curious as I've had to order in some new pulley wheels to change the gear reduction from 1:2 to 1:1 on my rail as the Arduino + TMC2130 couldn't quite manage the speeds I needed, even with acceleration profiles. Though I only want the fast speeds for homing the rail, I don't need nearly as much speed for other functions.

Some caveats to that are the Arduino's 16MHz clock speed, slowness inherent to the accelstepper library, and slowness inherent to the digitalWrite() function compared to the much faster Port Register manipulation.

My Pololu 1200 stepper seems to be capable of faster theoretical speeds than your more powerful motor (http://techref.massmind.org/techref/io/ ... timate.htm) but in addition to the limitations above I also have the 1:2 gear reduction (effectively making it a 400 step/revolution motor) and a small screw lead of 1mm. I think the fastest I could achieve without stalls was 7mm/s but including start/stop time over a length of 100mm you would need to add a few seconds for accel/deceleration.

I wonder if my upper limit is mainly determined by the Arduino clock and function speed or the inability of my motor to run faster under load.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

This current edge can cause a sudden "jerk" in the start (and stop) of the rail.


Mike, I paid special attention to this yesterday in my stacking of a cave amphipod in liquid. The vibration was continuous during the motion, not especially great at the beginning or end.

ray_parkhurst
Posts: 3438
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

Lou Jost wrote:
This current edge can cause a sudden "jerk" in the start (and stop) of the rail.


Mike, I paid special attention to this yesterday in my stacking of a cave amphipod in liquid. The vibration was continuous during the motion, not especially great at the beginning or end.
Lou...are you using a dual-shaft motor? If so, I highly recommend adding a Vexta Clean Damper to the second shaft. In my system it helps quite a bit with vibration, and acts as a knob for manual operation. I actually didn't care much about vibration effects, only installing them as knobs, but indeed they do make a smoother operation.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Ray, I am not sure what you mean by that. I am just using the standard MicroMate set-up.

Edited "Mike" to "Ray"
Last edited by Lou Jost on Fri May 10, 2019 3:25 pm, edited 2 times in total.

ray_parkhurst
Posts: 3438
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

Lou Jost wrote:Mike, I am not sure what you mean by that. I am just using the standard MicroMate set-up.
I think you meant "Ray"?

I checked the Wemacro site and see that the motor is a single-shaft type. As I remember from my Wemacro system, the motors are high-torque types. You might consider replacing yours with a high-accuracy type with dual-shaft.

Lou Jost
Posts: 5990
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Post by Lou Jost »

Ray, sorry, I didn't notice you were the sender.

Could high torque be important for this application? I do use very heavy lenses....

ray_parkhurst
Posts: 3438
Joined: Sat Nov 20, 2010 10:40 am
Location: Santa Clara, CA, USA
Contact:

Post by ray_parkhurst »

Lou Jost wrote:Ray, sorry, I didn't notice you were the sender.

Could high torque be important for this application? I do use very heavy lenses....
How much torque does it take to turn the knob on the microscope? I'd be not very much. Also, the knob doesn't move on its own, so no detent torque or holding torque is really required. Overall I think the MicroMate could benefit from the use of a high accuracy motor more than many other applications. Dual-shaft would be nice as well so you could turn the knob from either side.

Post Reply Previous topicNext topic