Synchronizing linear actuators

Legacy support with Phidget21
valmo
Fresh meat
Posts: 2
Joined: Thu Nov 04, 2010 3:44 pm
Contact:

Synchronizing linear actuators

Postby valmo » Thu Nov 04, 2010 4:11 pm

I made a device for measuring 2-point threshold (the minimum distance for which you can discriminate 2 points, any distance below which the two points feel like one point). I have 2 servos that each control a rack-and-pinion type system. On top of each system is a linear actuator that has a point on top of it. All actuators are controlled with a phidget board through matlab.

Here is the outside of the machine:
0006.jpg
Outside 2-point threshold machine
(65.78 KiB) Not downloaded yet


Here is the inside of the machine:
0007.jpg
Inside 2-point threshold machine
(80.81 KiB) Not downloaded yet


The functioning of the device is such that the servos move the points closer and further from one another, the linear actuators move the points up and down (up so that the points touch the participant's finger pad, down for when the points should not be touching the participant's finger pad).

My problem is that when I issue the command for the points to be pressed into the participant's finger pad (by raising the two linear actuators), the points are not raised simultaneously. Sometimes the two linear actuators raise at the same time, but sometimes one raises before the other. This is the code I use to administer two points (S stands for sevo, A for linear actuator, and there are two of each; the points are being moved a to have a certain separation in mm):

Code: Select all

function administerPoints(handle, separation)

global A1 A1_down A1_up
global A2 A2_down A2_up
global S1 S1_center S1_move_out S1_mm_per_deg
global S2 S2_center S2_move_out S2_mm_per_deg
global point_duration

S1_position = S1_center + S1_move_out*(separation*.5 / S1_mm_per_deg);
S2_position = S2_center + S2_move_out*(separation*.5 / S2_mm_per_deg);

calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, S1, S1_position);
calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, S2, S2_position);
calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, A1, A1_up);
calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, A2, A2_up);
WaitSecs(point_duration);
calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, A1, A1_down);
calllib('phidget21', 'CPhidgetAdvancedServo_setPosition', handle, A2, A2_down);


Is it possible to somehow synchronize the two linear actuators so that they raise at the same time? Given the nature of my project, it is pretty important that the participant feels both points synchronously touching his/her finger.

User avatar
Patrick
Lead Developer
Posts: 2990
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Synchronizing linear actuators

Postby Patrick » Fri Nov 05, 2010 9:56 am

The linear actuator have built-in acceleration/velocity control, so you may get better results is you set speedRamping to false on the 1061 - your results may be a result of the speed ramping on the 1061 interacting in odd ways with the actuators.

-Patrick

valmo
Fresh meat
Posts: 2
Joined: Thu Nov 04, 2010 3:44 pm
Contact:

Re: Synchronizing linear actuators

Postby valmo » Tue Nov 16, 2010 8:38 pm

Thanks for the reply. I spent some time trying to use your recommendation by setting the speed ramping to 0. It seems to have improved the problem, but the two linear actuators continue to rise at slightly different times. It seems to be random - one is not always rising before the other, they switch off, and sometimes they manage to rise at the same time. Do you have any other ideas? Could this be a matlab specific problem?

Thanks.

User avatar
Patrick
Lead Developer
Posts: 2990
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Synchronizing linear actuators

Postby Patrick » Wed Nov 17, 2010 12:14 pm

I don't think it's a Matlab issue - especially if it's not always one actuator starting first. You may wish to contact Firgelli and see if they have a solution.

-Patrick


Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 1 guest