View unanswered posts | View active topics It is currently Thu Dec 18, 2014 1:25 pm






Reply to topic  [ 10 posts ] 
Help with Firgelli Linear Actuator ... 
Author Message
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Help with Firgelli Linear Actuator ...
Looking at using both the 50mm & 100mm in a project I'm doing. Xander would probably be the best to answer, but if others have comments, please share.

1) Wondering what additional functionality is added by the RobotC Driver library vs. just programming them as direct motors. I've heard that their encoder readings are different than a normal NXT servo, is this correct? Also, I believe the stall circuitry is not detected properly when just programming them as a standard motor so extra care needs to be taken to ensure you don't try to extent/retract beyond its limits. Is this correct? The Firgelli examples provided with the 3.0b1 library state that ramping is not yet implemented. Is this true? Any idea when/if this will be done? I have a few older driver versions of the library and was wondering if anything specific has changed to the Firgelli code in 3.0b1? I'm not currently using RC 3.51 (but can if necessary).

2) How many encoder counts do you get for the full range of movement on the 50 & 100 versions? What is the approx. length/encoder count? Using the driver library, what is the minimum tick count that can be programmed & successfully executed? I need to move it incrementally (in as small of a tick count as possible) and extend/retract repeatedly and maintain my position. Should this be possible? What problems could I run up against?

3) Unfortunately, my application does not allow me to use the full range of the actuator so my minimum & maximum positions are different than the full-scale values. Given this (and the fact that it does not include an absolute encoder), I'm guessing the best initialization method at program start will be to drive it to a home position so I can be sure it's at the proper home (also necessary since there is no manual movement possible even when powered OFF, so there's no way to manually move it to it's home position). Any ideas on what would be the best sensor approach to use for the home switch to help ensure I can set a reasonably accurate starting position in all cases? I guess the best approach would be to run it at very low speed to allow the code to stop it quickly once home is detected. If the stall detection is included in the driver library, would it be possible to drive it to a hard stop and detect the stall and shut it down there to set the home? If I do this, is there any danger to the actuator? Whatever method I use, I just need a reasonably accurate starting position set each time the application runs.

4) Is the interface to these digital? If so, does anyone know the I2C mapping? Firgelli doesn't appear to provide a datasheet or any information about the actuators.

5) I know this is probably more suited to Firgelli, but when using their NXT-G block in manual mode the movement of the actuators is really herky-jerky (just have their block set in manual in an endless LOOP block). Guessing it has to do with time delays associated with reading the NXT buttons and then jogging the actuator. Does anyone know if this is normal?

Appreciate the help.


Fri Oct 05, 2012 11:50 am
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
Quote:
1) Wondering what additional functionality is added by the RobotC Driver library vs. just programming them as direct motors. I've heard that their encoder readings are different than a normal NXT servo, is this correct? Also, I believe the stall circuitry is not detected properly when just programming them as a standard motor so extra care needs to be taken to ensure you don't try to extent/retract beyond its limits. Is this correct? The Firgelli examples provided with the 3.0b1 library state that ramping is not yet implemented. Is this true? Any idea when/if this will be done? I have a few older driver versions of the library and was wondering if anything specific has changed to the Firgelli code in 3.0b1? I'm not currently using RC 3.51 (but can if necessary).

I implemented stall detection by checking the current encoder count against a previous count over a specific interval. I am not aware of any stall circuitry but possibly there might be some inside the LA. I have not implemented the ramping simply because I haven't had time. Not many have expressed a burning desire to have it implemented, you're probably the second person to ask about it. It doesn't have very high priority at this moment. No code has changed for quite some time. I have a preproduction LA and it apparently behaves very differently from a standard production variant.
Quote:
2) How many encoder counts do you get for the full range of movement on the 50 & 100 versions? What is the approx. length/encoder count? Using the driver library, what is the minimum tick count that can be programmed & successfully executed? I need to move it incrementally (in as small of a tick count as possible) and extend/retract repeatedly and maintain my position. Should this be possible? What problems could I run up against?

I think it's 2 ticks per mm, so you do the math :) I'd say the minimum is probably 4 or so. As I said before, YMMV as I have a preproduction one.
Quote:
3) Unfortunately, my application does not allow me to use the full range of the actuator so my minimum & maximum positions are different than the full-scale values. Given this (and the fact that it does not include an absolute encoder), I'm guessing the best initialization method at program start will be to drive it to a home position so I can be sure it's at the proper home (also necessary since there is no manual movement possible even when powered OFF, so there's no way to manually move it to it's home position). Any ideas on what would be the best sensor approach to use for the home switch to help ensure I can set a reasonably accurate starting position in all cases? I guess the best approach would be to run it at very low speed to allow the code to stop it quickly once home is detected. If the stall detection is included in the driver library, would it be possible to drive it to a hard stop and detect the stall and shut it down there to set the home? If I do this, is there any danger to the actuator? Whatever method I use, I just need a reasonably accurate starting position set each time the application runs.

I tend to use a LEGO touch sensor to null a position. I'd use the stall detection as little possible :)
Quote:
4) Is the interface to these digital? If so, does anyone know the I2C mapping? Firgelli doesn't appear to provide a datasheet or any information about the actuators.

No more digital than your NXT motor :)
Quote:
5) I know this is probably more suited to Firgelli, but when using their NXT-G block in manual mode the movement of the actuators is really herky-jerky (just have their block set in manual in an endless LOOP block). Guessing it has to do with time delays associated with reading the NXT buttons and then jogging the actuator. Does anyone know if this is normal?

Can't say, tbh. It's been a while since I used mine.

Regards,
Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 12:03 pm
Profile WWW
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Re: Help with Firgelli Linear Actuator ...
Thanks for the quick reply.

You don't seem to have a STOP command in your library. Do you just execute a FLAmoveLA() with a 0 SPEED & 0 TICK to STOP? If not, how do you programmatically STOP it?


Fri Oct 05, 2012 12:33 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
I never implemented that, not a bad suggestion, though. The trick you mention will probably work but I can't test that right now.

I'll add it to the todo list!

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 2:06 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
Try this:

Code:
/**
 * Stop the current operation
 * @param _motor the motor to be stopped
 */
void FLACstopLA(tMotor _motor)
{
  switch(_motor) {
    case motorA: StopTask(_FLACcontrolTaskA); motor[_motor] = 0; break;
    case motorB: StopTask(_FLACcontrolTaskC); motor[_motor] = 0; break;
    case motorC: StopTask(_FLACcontrolTaskB); motor[_motor] = 0; break;
  }
}

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 2:19 pm
Profile WWW
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
It ought to work, I just tested it quickly :)

I used the program below to test it.

- Xander

Code:
/*
 * $Id: firgelli-linearact-test1.c 112 2012-10-04 17:44:38Z xander $
 */

/**
 * firgelli-linearact.h provides an API for the Firgelli Linear Actuator.  This program
 * demonstrates how to use that API.
 *
 * Changelog:
 * - 0.1: Initial release
 *
 * TODO:
 * - Add ramping support (being worked on, has a few bugs)
 *
 * Credits:
 * - Big thanks to Firgelli for providing me with a Linear Actuator to play with!
 *
 * License: You may use this code as you wish, provided you give credit where it's due.
 *
 * THIS CODE WILL ONLY WORK WITH ROBOTC VERSION 3.51 AND HIGHER.
 * Xander Soldaat (xander_at_botbench.com)
 * 15 february 2010
 * version 0.1
 */

#include "drivers/firgelli-linearact.h"

task main () {
  tMotor testMotor = motorA;

  PlaySound(soundBeepBeep);
  nxtDisplayBigTextLine(3, "Retract");
  FLACretractLA(testMotor, 100);
  wait1Msec(500);
  FLACstopLA(motorA);
  while(!isDone(testMotor)) wait1Msec(50);
  wait1Msec(200);
  nMotorEncoder[testMotor] = 0;
  wait1Msec(1000);

  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Extend");
  nxtDisplayTextLine(3, "ticks:  40");
  nxtDisplayTextLine(4, "speed:  50");
  FLACextendLA(testMotor, 50, 40);
  while(!isDone(testMotor)) wait1Msec(50);
  if (isStalled(testMotor))
    nxtDisplayTextLine(7, "STALLED");
  wait1Msec(1000);


  PlaySound(soundBeepBeep);
  eraseDisplay();
  nxtDisplayBigTextLine(1, "Done");
  wait1Msec(2000);
}

/*
 * $Id: firgelli-linearact-test1.c 112 2012-10-04 17:44:38Z xander $
 */

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 2:33 pm
Profile WWW
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Re: Help with Firgelli Linear Actuator ...
I'll test to see what happens. If it can't be STOPPED, how can I implement a FIND HOME algorithm? I'll need 2 STOP points, 1 MIN (Home) and 1 MAX (at my MAX extension of the Actuator). This is basically an XY table, here's a couple images of my rig (note that the stops are not yet integrated):

OVERVIEW:
Image

TABLE DETAIL:
Image

Should I do something like this (need to do small moves to ensure I don't overrun the HOME position):

1. Start retract MOVE with a small tick count (say 4) & low speed.
2. When isDone() returns TRUE, check to see if HOME or MAX reached.
3. If HOME, quit.
4. If MAX, do a retract MOVE with a larger tick count & greater speed to get close to HOME. Then start again at 1.
5. Otherwise, LOOP.

I can assume the actuator starts somewhere between the MIN & MAX (so I can begin by retracting) but I guess there is a small possibility that it could have been moved below the MIN or above the MAX. Above MAX will be taken care of by above pseudo-code but below MIN won't. I won't implement this to start, but I guess I'd have to use isStalled() to check to see if the motor reaches the MIN end-stop first. Then, if isStalled() returns TRUE change the direction of the homing code to do an extend instead of a retract. With such a small move, will isStalled() still detect a stall condition? Does isStalled() maintain a stall condition even after the current move has completed? It would be good if it did, so it could be checked after the STOP to determine if you bumped into something.

When your isStalled() function returns TRUE, do you automatically STOP the actuator?

Bit of an aside, but is there a reason you named the retract functions with an extra t in the name (i.e. like FLACtretractLA)?

Thanks.


Fri Oct 05, 2012 3:10 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
No, it can be stopped, I have tested this now and it works, at least with mine it does. I've also tested the stall detection and that seems to work very well too. The code seems to be OK :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 3:22 pm
Profile WWW
Novice

Joined: Mon May 31, 2010 8:02 am
Posts: 55
Post Re: Help with Firgelli Linear Actuator ...
OK, thanks for the STOP option. With regards to STOPPING, how quickly should the actuator actually STOP? Guessing it still makes sense to move it pretty slowly to help reduce momentum and allow it to STOP as soon as possible. I can adjust for this a bit with the actual position of the STOP sensors but I need it to STOP at basically the same location each time.

Can you also comment on the isStalled() questions at the end of my last post.

Thanks.


Fri Oct 05, 2012 3:29 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3297
Location: Rotterdam, The Netherlands
Post Re: Help with Firgelli Linear Actuator ...
When I tested it, it was pretty much straight away. Perhaps a delay of about 3ms at the most (this is the time between motor commands)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Fri Oct 05, 2012 3:41 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.