Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Control a Lego Mindstorms NXT robot arm using LabVIEW

Hi,

 

I am currently using the NI LabVIEW Robotics Starter Kit for a project (DaNI).

 

Is it possible to control the LEGO arm autonomously? In order words, How can I get the robot (DaNI) to controls the LEGO arm by itself. Can I integrate or replace the LEGO intelligent brick with the NI-RIO?

 

Thanks.

 

0 Kudos
Message 1 of 9
(7,528 Views)

Hello Jidekene,

 

It sounds like you are going to take on a interesting project.  LabVIEW is used to program the SB-RIO on DaNI and the Lego Mindstorms NXT, which is why I believe you are asking this question.

 

SB-RIO can be programmed by deploying code on to it which can run without further use of the PC, however, I am not entirely sure that you can use it to replace the use of the Lego brick.

 

The most challenging part I would anticipate would be the control of the Lego servos.  Currently, they plug into the Lego brick, and it is able to decide, for example, how to translate your software commands to the right signal to move them correctly.

 

If documentation exists on the specification of the Lego motors it might be possible, but it will require some research.

 

One idea I have had is to possible use the serial port on the SB-RIO on DaNI and Serial to bluetooth converter to send wireless commands to the NXT brick.

 

None of the above ideas have been attempted before by myself, but others can comment as well.

 

Regards,

George T.
Senior Applications Engineer
National Instruments UK and Ireland
Message 2 of 9
(7,502 Views)

Will this idea work?

 

When the robot spots the balls, it adjusts its distance and then sends instruction to the LEGO NXT intelligent brick to take control of the robot arm. The LEGO intelligent brick controls the arm to pick up the ball, and when the ball is picked, the lego brick hands command over to the SB-RIO.

 

In order words, the SB-RIO is active when the LEGO intelligent brick is inactive and vice versa.

 

How do i get the LEGO intelligent brick and the SB-RIO to exchange commands via bluetooth?

0 Kudos
Message 3 of 9
(7,467 Views)

Hello Jidekene,

 

The way the SB-RIO is handing over to the Lego controller and vice versa is probably the most effective for this setup to work. 

 

I recommend that you start a new post in a either the Real-time forum or the Mindstorms forum for communication to the Lego brick via bluetooth in order to get more responses.

 

  1. As a starting point, you will need to investigate whether the commands that the Lego brick can receive are publicly documented so you know what to send.  This can be done through a standard search engine online.
  2. Then, you will need to consider how a Serial RS232 port can send serial data which will be converted to a bluetooth signal.  This usually involves a chip which is an RS232 to bluetooth adapter.
  3. Finally, you will need to check the feasibility of the SB-RIO Real-time OS being able to send serial data in a format that your converter can use to speak to the bluetooth receiver of the Lego controller.

This may not be the only solution, or a solution at all.  Is this an Academic project?  You should consider all of your alternatives and not only use what you find on these forums.  There are many hobbyists and enthusiats all over the web that discuss RS232 commands, bluetooth, and Lego. 

 

Best Regards, 

George T.
Senior Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 4 of 9
(7,438 Views)

LEGO® is very open in regards to the documentation and functionality of the brick and control of sensors and motors.

The hard- and software development kits are all online and available.

 

During an intern project running at NI Germany we successfully connected a NXT Ultrasonic sensor to a cRIO digital IO module. The digital communication is based on I²C protocol and not to complicated to implement.

 

From what I can see, the motor is controlled through a PWM signal, which is even easier to generate through a digital IO on the SBRIO.

Matching the power consumption requirements might be a challenge.

 

 

NXT Motor Outut.png

 

LEGO® MINDSTORMS® NXT Hardware Development Kit: http://mindstorms.lego.com/en-us/support/files/default.aspx

 

Please post your results here as I also haven't seen someone trying this implementation yet.

 

Regards
Ingo Foldvari
Area Sales Manager - US West Academic
National Instruments
Message 5 of 9
(7,435 Views)

Hi,

 

Thank you all for your wonderful and intelligent contributions. I have weighed my options and I wont be pursing this idea further. Its too complex for the intended purpose.

 

Thanks one again.

0 Kudos
Message 6 of 9
(7,354 Views)

Hi,

 

I agree, that it's probably a significant project to interface an sbRIO to NXT motors. If you are looking for something simpler, you may look into low-cost robotic-arms like the arms from Lynxmotion. These arms are driven by simple model building motors, so all you need to do is to generate PWM signals with the digital outputs of the sbRIO.

 

I did this some time ago with a cRIO system and it took me only about one working day to make the arm move (including cabling and programming). Here you can see a video from this setup.

 

Regards,

Jochen

0 Kudos
Message 7 of 9
(7,317 Views)

Hi Ingo,

For quite some time i've considered connecting my sbRIO to my NXT i2c sensors.

I've tinkered a bit but i'm curious if you have used additional level translation hardware.

Do you have any more info on interfacing ?

 

TIA

Marcus Johnson

Symbio Sweden

0 Kudos
Message 8 of 9
(7,117 Views)

This article is intended to control the direction and speed of a Lego NXT robot using the directional buttons on the computer keyboard, strategic control distance limited by the scope of the Bluetooth transmitter installed.

 

https://decibel.ni.com/content/docs/DOC-32462

 

 

6.png

0 Kudos
Message 9 of 9
(5,550 Views)