Voice Coil Rail

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 »

ChrisR wrote:
very surprised at how non-linear is the movement shown
Looks a bit horrible to me - was there some loud music playing? :shock:
Yes, the old Yardbirds "Over Under Sideways Down" :D

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

Post by mawyatt »

ray_parkhurst wrote:
rjlittlefield wrote:
ray_parkhurst wrote:I would see no reason to linearize this response.
Interesting. Clearly I have no good idea what your concerns and priorities are, and I guess there's really no reason I need to.

But to make sure that I'm following the plot line of this somewhat convoluted movie...

Did you just transition from worrying about part-per-million nonlinearity around crossover, to not worrying about a 29:49 ratio of step sizes as shown in mjkzz's data?

--Rik
I of course expected that question. The issue with the speaker nonlinearity is calculated as the INL, Integrated Non Linearity, which basically tells you how straight the overall line is. This assumes there is no strangeness going on when the speaker is at equilibrium and is then pushed or pulled, but this sort of issue is guaranteed not a problem due to the design of the spider. Basically, the speaker has a slow and gently-changing slope to its displacement, and as I stated this has little effect on 3D rendering.

The issue with the driving electronics that I was concerned about is calculated as the DNL, the Differential Non Linearity. This looks at each step vs the next step. If there is a localized discrepancy in step size, there can be a problem with rendering small displacements. My concern was that there would be a large step at an unpredictable place in the stack that would cause 3D rendering issues. I see this problem with my mechanical rail, and it causes some odd distortions in mildly-sloped surfaces. I saw none of these issues when I used the speaker as a rail using the uni-directional voltage source to drive it, and was loathe to introduce such a distortion with the bi-directional source current.
Ray,

"I see this problem with my mechanical rail, and it causes some odd distortions in mildly-sloped surfaces"

The Off Axis Loaded technique I described has helped significantly with rail wobble, non-uniform steps and backlash with my Srackshot and WeMacro Rails. Many others have seen improved results also, both here and another site I post on.

For a few rubber bands and a bolt, doesn't cost much and is easy to implement, certainly worth a try.

Best,

Mike

Haven't tried it on Peter's rail yet, but suspect it will help his also.

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

Post by ray_parkhurst »

mawyatt wrote:Ray,

I took a look at the PS pixel data Rik presented and looked at the Pixel Difference between steps.

+1, +6, -9, +2, +3, +4, +12.

The overall Integrated response looks OK to me but not the Diiferenal between steps.

Either should be correctable within reason with Peter's error correction table.

Best,

Mike
Sure, the second derivative looks bad, but the DNL values are -26% to +40%, which is arguably on the edge of acceptable.

In some situations the correction table may actually cause more problems than it solves. If the speaker is mounted horizontally, with no external horizontal forces on the cone, then the correction may be useful. Mounted vertically, with force causing initial displacement, the table could cause improper correction, eg if the -9 expected position overlaps with +12 physical position, causing a 21 pixel error. This could of course be corrected by calibrating the movements with the force in place, but that is too much. I suspect the best way to deal with this is to use a speaker that has a more linear response.

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

Post by ray_parkhurst »

mawyatt wrote:Ray,

"I see this problem with my mechanical rail, and it causes some odd distortions in mildly-sloped surfaces"

The Off Axis Loaded technique I described has helped significantly with rail wobble, non-uniform steps and backlash with my Srackshot and WeMacro Rails. Many others have seen improved results also, both here and another site I post on.

For a few rubber bands and a bolt, doesn't cost much and is easy to implement, certainly worth a try.

Best,

Mike

Haven't tried it on Peter's rail yet, but suspect it will help his also.
I have always figured my vertical loading compensated this sufficiently so that I was looking at stepper residuals, but perhaps I should try some more loading as you say. But what I'm ultimately talking about is linearity of microstepping, which is hit or miss in my experience. I've never seen non-monotonicity, but I have seen step sizes near zero not due to backlash.

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

Post by mawyatt »

ray_parkhurst wrote:
mawyatt wrote:Ray,

I took a look at the PS pixel data Rik presented and looked at the Pixel Difference between steps.

+1, +6, -9, +2, +3, +4, +12.

The overall Integrated response looks OK to me but not the Diiferenal between steps.

Either should be correctable within reason with Peter's error correction table.

Best,

Mike
Sure, the second derivative looks bad, but the DNL values are -26% to +40%, which is arguably on the edge of acceptable.

In some situations the correction table may actually cause more problems than it solves. If the speaker is mounted horizontally, with no external horizontal forces on the cone, then the correction may be useful. Mounted vertically, with force causing initial displacement, the table could cause improper correction, eg if the -9 expected position overlaps with +12 physical position, causing a 21 pixel error. This could of course be corrected by calibrating the movements with the force in place, but that is too much. I suspect the best way to deal with this is to use a speaker that has a more linear response.
I would expect recalibration to be required when moving from vertical to horizontal, even when staying in same orientation but with the load changing. Lots of external influences should effect the Voice Coil "zero position" and linearity, but with a 12 bit DAC driving the system, Peter should have enough available resolution to do a decent correction.

Best,

Mike

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

Post by mawyatt »

ray_parkhurst wrote:
mawyatt wrote:Ray,

"I see this problem with my mechanical rail, and it causes some odd distortions in mildly-sloped surfaces"

The Off Axis Loaded technique I described has helped significantly with rail wobble, non-uniform steps and backlash with my Srackshot and WeMacro Rails. Many others have seen improved results also, both here and another site I post on.

For a few rubber bands and a bolt, doesn't cost much and is easy to implement, certainly worth a try.

Best,

Mike

Haven't tried it on Peter's rail yet, but suspect it will help his also.
I have always figured my vertical loading compensated this sufficiently so that I was looking at stepper residuals, but perhaps I should try some more loading as you say. But what I'm ultimately talking about is linearity of microstepping, which is hit or miss in my experience. I've never seen non-monotonicity, but I have seen step sizes near zero not due to backlash.
Agree, microstepping as far as linearity goes is questionable. I prefer a higher resolution stepper (400 vs 200 step) but must admit that microstepping hasn't shown up as an issue yet.

The main ideas behind the offaxis loading is to create a somewhat uniform force against the thread screw face and nut face, thus making the stage movement track the thread and nut face surfaces (which should be pretty linear with rotation I would expect). This is slightly different than just backloading the stage to reduce or eliminate backlash. An added benefit of this approach is to load the bearings on the sliders on one side against the rail to help reduce rail wobble.

If you watch camera live view under high magnification with 5X or higher lens and reverse direction you will see a slight shift latterly when the direction changes. Make sure backlash comp is OFF in your controller. If you select an spherical angle that is somewhat normal to the thread surfaces and place your off axis loading point at that angle anywhere on the spherical angle this is the best spot. Increase the loading (add more rubber bands) until the change in direction produces almost no change in image, add few more rubber bands for measure and you are good to go.

Anyway it works really well as I've shown in previous posts.

I am anxious to see how well these THK rails behave, but a simple bracket is in the way to mate the THK rail to my Thor sliding clamp. Wish I had a small machine shop at home but my wife would kill me!! She's been pretty tolerant of my mess, so can't complain!!

Best,

Mike

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

0 to 375ma, total "usable" distance is (2010/3456)*14.8/7.5 = 1.147mm, also did not move around to cause vibrations.

Image

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

Post by ray_parkhurst »

Linearity looks much better in this test. I think you downsized the image by 2x as my measurements are about half of yours. Still shows the compression/expansion/compression but less variability. Maybe it was vibration?

Image

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Hi Ray, not sure what you mean by 2x, if you are referring to 2010px, that is pixel count in original image

Yes, this time I was staying still and not walking around. the camera is on a tripod at edge of desk and the speaker is on the desk, so even when I move the mouse around, it actually affects the outcome as I saw in live view.

All Files

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

Post by mawyatt »

Chris, Peter,

Here's some new data showing the frequency compensation for a given Coil inductance and resistance for the bi-directional current source Voice Coil Driver.

I've ploted the power in the NPN 2N2222 and PNP 2N2907 transistors, also their collector currents and the output load current thru the Coil. The Op Amp output current is scaled by 10 so you can see it better.

This shows the transistors are going to dissipate about 1W when driving +-100ma output current thru the load with +-15 Volt supplies.

Input is a PWL from 0V to +5V, then -5V and back to 0V, corresponding to a load current of Vin/Rsense or +-100ma.

Note how the transistor power curves have a non-linear shape as they should since the power is proportional to the load current and the voltage across the transistors.


Edit: A little circuit analysis shows the NPN (or PNP with Vee instead of Vcc ) transistor power dissipation follows:
Pd ~ (Vin/Rsense)*(Vcc -Vin(1 + Rload/Rsense)), assuming high transistor beta and small Ldi/dt (inductance drop).


Best,

Mike

Image
Image

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

Thanks Mike, looks very good. The only thing is the 1W power dissipation, not sure if a surface mount 2N2222 can handle that. With my circuit at about 0.1A and 18 ohm load, 1 ohm Rsense, it is about the same power dissipation, I can smell it, so I took it out and replaced it with a TO-220 + heat sink (I purposefully put a socket so that I can do this on my PCB :D)

While my PC was crashing running Prime95 and Zerene and it turned out the thermal paste dried up and after fixing that, it is now OK (thanks Rik). So I took the chance to upgrade my system (install SSD etc), but I accidentally formatted the drive that contains development stuff, ooops.

Fortunately I have backup, unfortunately, I lost latest stuff
:evil: Once I get stuff back, I will post some results, too. The speaker thing MIGHT just work very well after looking at some data just an hour before I formatted the HD.

Peter

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

Post by mawyatt »

Peter,

Yes the 2N2222 & 2N2907 won't handle this kind of power, but any good T0-220 should be fine. If you lay it down on a big Cu area, you probably don't need a heat sink.

1 ohm Rsense is way too small in my circuit topology unless you are planning on up to 5 amps load current. Your circuit may be different, but mine I would suggest 50 ohms for Rsense with load current of +- 100ma,Vin of +-5v and 18 ohm load, this should work fine.

Good luck with your data recovery!! SSDs are great, you'll never go back to rotary drives for your main drive. I still use a big hoge-poge array of rotary drives for data storage but all apps are run from main 1TB SSD.

Best,

Mike

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

OK, got some data back and did some more experiments.

The following graph is constructed by taking 256 images with even current step (ie, step size of 1 ma) and then use Zerene Stacker to align them. From Zerene's log view, offset data are extracted. This is what Rik did in one of his posts (I could not find it anymore).

This function was integrated into the VCM software (for PC), but I lost the code base, only recovered the one without this data extraction and lookup table building part. Nevertheless, it should not be too difficult to put them back in. One thing though, since the code rely upon Zerene's log, so it is heavily dependent on Zerene.

Essentially, after saving Zerene's log data to a file, data for this graph can be obtained. Then, the range R is divided into 4096 parts (my DAC is 12 bits), then build a lookup table from P to C, ie from position to current. Linear interpolation is used.

It seems 12bit is not enough because sometimes two positions are mapped to same current value, it could be resolution or could be the response curve of speaker.

The lookup table is (will be) built automatically and when stacking, the actual current value will be looked up and set so speaker will move to the desired position.

The graph looks wavy, I guess it has something to do with construction of the speaker I was so close to do the same experiment stepping in actual position displacement, but need to re-write that code now.

Image

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Post by mjkzz »

My ultimate goal is to use a real VCM, so I constructed one with parts from Junk yard.

A - BEI KIMCO coil motor
B - digital dial indicator with 1um resolution (doubt it, though)

My construction failed as I was cheap not to make custom aluminum parts. One day, I will get a real VCM from Moticon with nice 1/4 inch travel distance.

Why the digital dial indicator? Well, I was thinking about hacking it so that I can read data from it electronically, then I can build a closed loop, ie, no more lookup table, system. If I want to move 10um, I can keep changing current until the data from this digital dial indicator says so.

Since these digital dial indicators are "expensive", I bought a cheap digital caliper (3 USD) to experiment, surprisingly, it is easy to hack. Here is my blog about it with Arduino code

Image

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

Post by ray_parkhurst »

I have received the materials I ordered from Peter/mjkzz:

KR26 rail conversion
Stepper controller and software
Voice Coil controller and software

I ended up building a vertical setup using the KR26 and Peter's conversion kit, plus a bunch of pre-cut aluminum from eBay. I mounted the speaker on the stepper rail stage. It is all working amazingly well, though I still need to work out the Camera control. I'm used to using a Trinamic system, with Helicon, and it's all pretty easy. I'm still not sure the best way to handle Canon camera control with Peter's system. For now I'm doing manual shutter control.

The voice coil controller and software works very well, and controls the small 1.5" speaker as expected. I still need to check overall range and such, and will publish the results here when available, but I was successful with the first stack, and with using the controller and software!

Post Reply Previous topicNext topic