Control a Lego aerial tramway with an Android phone app

Lead Image © Marianne Oliva, 123RF.com

Free Ride

, ,

Build an aerial tramway with a Lego Mindstorms NXT robotics kit and the MIT App Inventor web app, and control it remotely with an Android phone.

The Lego Mindstorms NXT and NXT 2.0 kits [1] contain software and hardware to create customizable, programmable robots. They include an intelligent brick computer, a set of sensors and motors, and Lego parts to build and support your creations. These kits have been out for about 10 years, and they are used in many schools and public libraries. We were able to find a used set for about $120, which allowed us to create an aerial tramway that transports a gondola from one station to another.

For this project, we did not need to program the Lego NXT brick. All the programming was done in the MIT App Inventor [2] web app using their Lego interface. The newer Lego Mindstorms EV3 [3] could also be used. In fact, for the MIT App Inventor interface, you will need to use the EV3 blocks instead of the NXT blocks.

Construction

To build the aerial tramway with stations and gondola, we used:

  • 1 Lego Mindstorms NXT brick with a motor and cable
  • 1 Android phone
  • Lots of Lego bricks
  • String
  • 2 Adjustable men's or women's belts

The Lego Mindstorms motor should be connected in either the B or C port on the brick (which we will define later in the App Inventor Designer in the DriveMotors field).

You need to make two gondola platforms: one with the Lego Mindstorms brick and motor (Figure 1) and a second platform with a wheel that can spin freely (Figure 2). You can have a lot of fun creating different gondola platforms. We found that some of the important points in the construction were:

Figure 1: Lego tramway station 1.
Figure 2: Platform setup for station 2.

Securing the platforms. We put our platforms on chairs and used belts to keep them from moving. A carpeted floor will help keep the chairs from slipping.

Building a small gondola. It's tempting to make a big gondola, but we found that big gondolas had more string slippage, and you had to have the gondola stations closer together. In Figure 1, you can see the size of the gondola we used.

Using wheels with grooves or rims. If you use wheels with grooves or rims, the tramway string is less likely to slip out.

Lego NXT Bluetooth Setup

The Lego NXT brick needs Bluetooth turned on. Check the top left corner of the Brick's screen to see if the Bluetooth symbol is showing (Figure 3). If it is not showing, go into the Bluetooth options and turn visibility on (Figure 4).

Figure 3: Lego NXT Bluetooth status.
Figure 4: Lego NXT Bluetooth visibility is on.

To pair the Lego NXT Bluetooth with your Android phone, on which Bluetooth is enabled, choose in your Android Bluetooth settings Search for Devices. The Lego NXT brick will appear as NXT on your Android phone. On the phone select Pair with device, and the phone pairing dialog will come up. The pairing request dialog (Figure 5) might look different for different versions of Android, but the key is to enter the correct pairing PIN.

Figure 5: Android Bluetooth pairing request.

When pairing has started, the NXT brick will beep and prompt you for the pairing passkey (Figure 6). For the pin code (passkey), use the default 1234, and finish with the check mark. This pin code is used on both the NXT and on the Android phone.

Figure 6: Lego NXT pairing request.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content