Multi NXT Motor control

Discussion specific to the intelligent brick, sensors, motors, and more.
patrick211
Posts: 6
Joined: 02 Dec 2012, 22:39

Multi NXT Motor control

Post by patrick211 »

Hello,

I am about to add my motorization to my new construction, but would like to have some advice please.

I need to move several "structures" at same or differed moments.
Each structure will have either 2, 3 or 6 motors, which should not all move a the same time. But all motors need to "know" where they are in space.

I wish also to be able to get the controls made via SMPTE (Time Code).

As of today, I was looking for solutions with Mindstorms NXT bricks, each controlling up to 3 motors, and have them controlled via Bluetooth.

But, before I spend in 6 additional NXT Boxes, or part of them, I want to make sure it is the best way doing it, or if there are any other alternative solutions using the Power Functions.

Is it possible to use a PF motor with a NXT brick?

Has any one already made such a construction or programmed something similar?

I thank you in advance for all your future supports.

Best regards

Patrick
aswin0
Posts: 201
Joined: 29 Sep 2010, 06:58

Re: Multi NXT Motor control

Post by aswin0 »

I don't know much about combining NXTs. But with Bluetooth you are limited to 4 NXTs.

Look for motor multiplexers from MindSensors. These can be daisy chained to give you virtually unlimited amount of motors with a single NXT.

The PF motors don't know where they are. In your case they are not an option.

Aswin
My blog: nxttime.wordpress.com
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Multi NXT Motor control

Post by HaWe »

I tried to control 7-9 motors at 3 NXTs by BT (incl. reading remote sensor values and remote motor encoder values) but never got it reliably working: BT by the present BT protocol is extremely shaky, BT messages regularly get lost or become corrupted or are sent redundantly without need.
by rs485 theoretically up to 30 NXTs or so might be connected but here I don't know any simple and reliably working protocol neither.
patrick211
Posts: 6
Joined: 02 Dec 2012, 22:39

Re: Multi NXT Motor control

Post by patrick211 »

Hello,

Thank you for your replies.

Well, I guess it is not being an easy thing I want to make.
If I don't use BT, this could make it much easier, don't you think?

I will have a look at the multiplexer solution, maybe it gives me what I need, or at least an idea.

Now, taken one constraint away from my previous post, and say that I don't care to know where the motors are in space, and manage this only by counting the steps made in either direction, could this become an option as well?

Again, thank you for your help.

Best regards

Patrick
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Multi NXT Motor control

Post by mattallen37 »

In regard to BT and RS485, my opinions are quite contrary to those of Helmut.

For me, BT between NXTs is both reliable and easy, with the only major downside being the huge delays (typically in the hundreds of ms).

In my opinion, RS485 between NXTs is also both reliable and easy to use (even easier than BT), with speeds up to about 100 times as fast as BT, and with essentially zero delay time (low enough that it seems real-time to me when using a remote). The only real downsides are that it requires a hard-wired connection between all NXTs on the network, and only one NXT can "talk" at a time (which can be very easily controlled in SW, using a master/slave setup).

Other than direct commands, there don't seem to be any "official" SW layer communication protocols for NXTs to talk to each other. I have made several RS485 SW protocols for my own use, and they all have seemed to be very robust.

I'm not really sure what you mean by your last question, but both the NXT and the NXTMMX (motor multiplexer by mindsensors) support the encoders that are built into the NXT motors.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
patrick211
Posts: 6
Joined: 02 Dec 2012, 22:39

Re: Multi NXT Motor control

Post by patrick211 »

Hello mattalen37,

Thank you for your reply.

from what I understood in your post, I will need to go for a wired solution which is not a problem at all for me.

Just to explain a bit what I am doing:

I set up multiple rigs using each 3 motors and 1 maybe 4 or 6, which I want to move up and down at some specific moments and which are controlled by time code. The rigs will to change position in space, but could do so without having all it's motors move together.

I will program the motors to run at specific moments and then when I want to run the "show", it should do it by itself triggered by the time code.

In my first post, I talked about the motors to know where they are in space, in my second post I said that I take this constraint away, as of my readings, I found out that I don't need to know where they are, as long as the program runs.

I could also integrate a "reset" function putting all motors to a Zero state, which I can easily define.

My initial Post, and all what this is about, is to find the best and cost effective way to do the job.

I own 2 NXT bricks and about 8 NXT motors. I also own some of the PF motors M and XL.

One important constraint is, that any of the motors could happen to move at same time.

Hope this is clear enough.

Best regards

Patrick
patrick211
Posts: 6
Joined: 02 Dec 2012, 22:39

Re: Multi NXT Motor control

Post by patrick211 »

mattallen37 wrote: ..., but both the NXT and the NXTMMX (motor multiplexer by mindsensors) support the encoders that are built into the NXT motors.
Do you know if I can put a NXTMMX on each NXT port? I was looking to find out how many I could plug into 1 NXT brick.

Thank you

Patrick
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Multi NXT Motor control

Post by mattallen37 »

The NXTMMX has four jacks; two output ports for the motors, an communication port so the NXT can talk with it, and a pass-through port, which is connected in parallel to the communication port (a sort of port "splitter"). Using the pass-through port, you can daisy-chain multiple NXTMMXes on a single NXT sensor port.

According to I2C addressing, you are limited to 127 NXTMMXes per port. Based on electrical characteristics, the practical limit would be about 3, or maybe 4 per NXT port. NXTMMXes could be connected to all the NXT sensor ports, but it would be quite unnecessary, unless you need a zillion motors.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
patrick211
Posts: 6
Joined: 02 Dec 2012, 22:39

Re: Multi NXT Motor control

Post by patrick211 »

Excellent, Thank you.

So if I need to control up to 27 motors, I could use 1 single NXT brick.

Just confirm if this is correct:

- 3 NXTMMX multiplexer on each of the 4 sensor ports, which gives me 24 motors
- 1 motor on each "motor" port = 3 motors

Can this be correct?

Thank you

Patrick
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Multi NXT Motor control

Post by mattallen37 »

Yes, that should work. However, if the NXT was controlling all those motors, that would be a lot to think about, so the processing power would be getting used up. Another thing, standard I2C with the NXT is only 9600 bps, so that's not a lot of bandwidth available for communication.

If physical size isn't a huge issue, and you're willing to put forth the effort to make it happen, I really recommend you network NXTs with RS485. Each NXT would support 3 motors and 3 sensors, and also be able to think for itself (you could program it to take care of some of the processing).
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests