Hi, first post of what I suspect to be many.
I work for a small design consultancy and have been asked to create a robot to accomplish a list of tasks. Problem being is that I have no robotics experience! I have 2 Lego NXT kits available to me as well as 2 Firgelli actuators. I've been playing with the kits and actuators for a couple of days now and I'm not getting very far. I have to make a scissor lift platform to lift a box, just foamboard so nothing heavy, about 10 mm. I've found I need to use 2 actuators to keep the platform steady while it lifts. I've constructed the model and that all works fine but now I have to get it to lift on command.
I have searched the net including this forum but I must be using the wrong terminology as I haven't been able to find any answers. My first attempt at programming consisted of actuator 1 extending 20 mm then retracting 20 mm, I then duplicated the program line positioned it lower on the program screen and linked the program. I then connected actuator 2 and the program ran fine.
Now this is where the fun begins. The robot will be attached to a moving base and will be required to lift the platform when a touch sensor is activated. it will then move again and when a 2nd touch sensor is activated it will drop the platform again.
I set out the program as before Actuator 1 lift - Touch sensor 1 - Actuator 1 lower - Touch sensor 2 - and ran this in a loop, once again all went well. Now I've added the second actuator into the fold and its all gone wrong. The actuator control block doesn't allow you to select multiple actuators in the same fashion that the motor block does.
Is there a way to activate the 2 actuators using the same sensor?
Help please, dual actuator use problem
-
- Posts: 220
- Joined: 23 Jan 2012, 17:07
- Location: Round Rock, TX
Re: Help please, dual actuator use problem
It would help to know what language you are using in the NXT.
McSummation aka James
http://www.mcsummation.com/Mindstorms/
http://www.mcsummation.com/Mindstorms/
Re: Help please, dual actuator use problem
No idea! I'm using the basic programming package that comes with the Mindstorm 8547 kit, it says LEGO MINDSTORMS NXT at the top of my screen if that helps any
Re: Help please, dual actuator use problem
You're using NXT-G then.
I see two solutions. One is to use 2 actuators as you intend. In this can I would make a custom block that let you control the two actuators as if there was only one. To do so you develop a program that does just that and that has a single wire as input. (Part of) this program can then be exported as a custom block. This block can then be used in your main program. In this solution the two beams of your platform will be programmatically linked.
The second solution links the two sides of your structure mechanically. For this you connect the two beams with an axle. Each side of the axle has a gear that runs over a rail made of linear gears. A movement of one of the sides of your construction will cause the corresponding gear to rotate. The axle will cause the other gear to rotate and thereby to other side of your construction to move exactly like the first side. It is just like a car with fixed axles, it can only go straight You only need one actuator then. A mechanism like this can also be found in some wide drawers.
Aswin
I see two solutions. One is to use 2 actuators as you intend. In this can I would make a custom block that let you control the two actuators as if there was only one. To do so you develop a program that does just that and that has a single wire as input. (Part of) this program can then be exported as a custom block. This block can then be used in your main program. In this solution the two beams of your platform will be programmatically linked.
The second solution links the two sides of your structure mechanically. For this you connect the two beams with an axle. Each side of the axle has a gear that runs over a rail made of linear gears. A movement of one of the sides of your construction will cause the corresponding gear to rotate. The axle will cause the other gear to rotate and thereby to other side of your construction to move exactly like the first side. It is just like a car with fixed axles, it can only go straight You only need one actuator then. A mechanism like this can also be found in some wide drawers.
Aswin
My blog: nxttime.wordpress.com
Re: Help please, dual actuator use problem
NXT-G?? You learn something new everyday. I just googled creating a custom block and the tutorial seems straight forward enough. I'll give that a bash first and if that doesn't work out I'll try your plan B. Thanks very much for your reply, it has been unbelieveable helpful
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: Help please, dual actuator use problem
I think my original reply got lost somewhere.
Another option: In your first test, when adding the second actuator, you simply copied the main program and created a second program. You should actually be able to do that for the case where you've added touch sensors.
So, in a loop you have move1-touch1-move1-touch2
Now just create a second loop that has move2-touch1-move2-touch2
There are many ways of doing it. Hopefully, aswin0's answer got you working.
Steve
Another option: In your first test, when adding the second actuator, you simply copied the main program and created a second program. You should actually be able to do that for the case where you've added touch sensors.
So, in a loop you have move1-touch1-move1-touch2
Now just create a second loop that has move2-touch1-move2-touch2
There are many ways of doing it. Hopefully, aswin0's answer got you working.
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Re: Help please, dual actuator use problem
Thanks for the response. I got a program working but it appears the 2 actuators do what they want regardless of what the program states, on a looped program of touch, extend 20mm, touch, return 20mm. After about 20 pushes, one actuator ended up extended fully and the other fully retracted. It would seem my problems was hardware and software at the same time!
-
- Posts: 346
- Joined: 27 Sep 2010, 03:05
- Contact:
Re: Help please, dual actuator use problem
Whatever the problem, there ARE ways of fixing it with software. I have suggestions, and some may be easier to work than others.
First idea should be pretty easy, but may not work. Try using the move block, instead of the actuator block. The values you need to feed in will be totally different, but you should be able to calculate them, assuming the motor moves some number of rotations per mm. IF that method works (which I think it will), the move block will keep the actuators synchronized as they move, and you're done.
The second is a bit harder. Each actuator would have it's own loop, and they would look something like this:
- loop
-- set variable "actuator 1 move complete" (short name is fine) to false
-- move actuator 1
-- set variable "actuator 1 move complete" to true
-- wait until "actuator 2 move complete" is true
-- wait for button press
-- do the same for moving the actuator down
-
Steve
First idea should be pretty easy, but may not work. Try using the move block, instead of the actuator block. The values you need to feed in will be totally different, but you should be able to calculate them, assuming the motor moves some number of rotations per mm. IF that method works (which I think it will), the move block will keep the actuators synchronized as they move, and you're done.
The second is a bit harder. Each actuator would have it's own loop, and they would look something like this:
- loop
-- set variable "actuator 1 move complete" (short name is fine) to false
-- move actuator 1
-- set variable "actuator 1 move complete" to true
-- wait until "actuator 2 move complete" is true
-- wait for button press
-- do the same for moving the actuator down
-
Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests