Phone Controlled NXT F1 Car!!!

by SidA2 in Circuits > Robots

1276 Views, 10 Favorites, 0 Comments

Phone Controlled NXT F1 Car!!!

20160605_175212.jpg
20160605_174725.jpg
20160605_175358.jpg

Why would you make a phone controlled Lego NXT car?

Pshh. Why not? It is very fun to play around with and control. Not to mention, I made a basic control app (Android) that I will give to you at the end. The app was made using MIT App inventor 2, and if you want me to post an instructable on how to make a NXT control app of your own, let me know in the comments at the end. I might make a separate instructable for those who are interested.

This instructable falls under the IOT contest because it uses Bluetooth to connect to the NXT, and sensors because it uses the tilt sensors.

Now even if you don't have an NXT, you can see what this build was like. It was very interesting indeed and I tried out some new Lego building techniques which I have not used before.

Parts Needed

20160605_182021.jpg

Now I don't usually keep track of the pieces I use, mainly because I don't know the name of most. I just use them if it looks the right shape....

In the steps, I will show a picture with the pieces needed and I'll also specify the length of an axle or beam.

All parts are from the Lego Mindstorms 2.0 kit and some are from a old Technic kit I had when I was younger which I used in this build mainly for the large tires. Any other large tire may work though such as balloon tires. Just make sure to adjust the attached and nearby parts accordingly.

The main parts though are the NXT brick, three NXT 2.0 Motors, Two Lego Technic 40 tooth gears, and Two Lego 8 tooth gears. These will be used to give a 1:5 motor to wheel gear ratio. Do not use NXT gears as replacements however because they do not match up as easily as Technic gears.

Modules

20160605_183025.jpg

This Lego build is modular in a way and can be separated in these parts:

  1. Rear wheel drive mount with wheels (Right and Left)
  2. Middle NXT brick holder and rear motors (meant for easy battery changing)
  3. Steering system
  4. Bumper
  5. Spoiler
  6. Wiring (More of a step but it will be done last)

Right and Left Gear Drives

20160605_184304.jpg
20160605_184400.jpg
20160605_184452.jpg
20160605_184515.jpg
20160605_184624.jpg
20160605_184902.jpg

The first picture shows shat you need for one side of drive train. Times that by two for every part and you have all the parts needed for this step.

The parts are:

  • 2x 15 stud beams, any color.
  • 1x 8 stud axle. It will be black if the number of studs are even.
  • 1x 5 stud beam
  • 1x 3 stud beam
  • 2 black connector pins
  • 4x blue 3 stud connector pins
  • 40 tooth gear
  • 8 tooth gear
  • 1x 6 stud axle with stopper near end.
  • 1x Large Technic wheel with rim
  • 1x perpendicular beam to axle connector
  • 1x blue beam to axle pin
  • 2x half stud axle stoppers
  • 1x 1 stud axle stopper

The correct number of axle stoppers are 2- 1 stud stoppers, and 1- half stud stopper. I ran out of parts so I improvised. I also used a 7 stud axle on the other side and omitted the stopper at the very end. This does result in a weaker design however so I suggest using two big and one small stopper with the 8 stud beam.

Start by connecting the 3 stud beam at the end of a 15 stud beam using two blue pins. On the other end, attach the other two blue pins and add the beam to the axle connector. On the axle end of the connector, attach the axle to the beam pin. (Picture 2)

Now count five pins from the back (axle to beam thing side) and put a black pin. On the hole next to it, attach the axle so that the one stud part protrudes the same way of the pin, which should be opposite of the 3 stud beam. This is the axle that will connect to the motor. (Picture 3)

Attach the 5 stud beam onto the axle and a black pin 2 studs from the end of the 15 stud beam. On the other end of the axle, slide on the 40 tooth gear. (Picture 4)

Next to the 40 tooth gear, put the 8 tooth gear and slide the 8 stud axle through it. Add the other 15 stud beam to secure everything. (Picture 5)

Lastly, add the 1 stud stopper to the 8 stud axle which isn't on the 5 stud beam part. on the 5 stud beam part, slide on a half stud stopper that will be used as spacing. Slide on the wheel. And lastly, Slide on the last 1 stud stopper.

The 8 stud axle should not be protruding even half a stud on either end, stoppers included. Make sure that when you spin the 6 stud axle with the stopper, the gears move smoothly and the wheel spins faster. This should take some effort though dude to the gear ratio. For this reason, the back motors are attached for more power.

Motors and Middle NXT Chassis

20160605_192325.jpg
20160605_193329.jpg
20160605_195018.jpg
20160605_195110.jpg
20160605_193424.jpg
20160605_193620.jpg
20160605_193836.jpg
20160605_194340.jpg
20160605_194545.jpg
20160605_194709.jpg
20160605_194810.jpg
20160605_194944.jpg

The parts you need for this step are:

  • 1x 9 stud axle. Will be light gray
  • 2x 13 stud beams of any size
  • 1x 11 stud beam
  • 3x 9 stud beam. Same length as axle
  • 1x 7 stud beam
  • 2 NXT 2.0 motors
  • 2x 3 to 7 angle connectors (yellow in this picture but color never matters in this build)
  • 3x 3 to 5 L beams
  • 2x studded L connector. (next to pile of blue pins)
  • 15x blue pins
  • 17x black pins
  • 4x blue beam to axle pins
  • 4x gray 3 stud beam to axle pins.
  • 1x 3 stud beam

This is a very precise step. There are many pictures for you to follow along exactly.

Start off by attaching the angled piece to the motor's bottom using two blue pins and attach two black pins to the back. Mirror for the second motor. (Picture 2)

Attach the axle parts of the gray and blue pins. (Picture 3)

Attach both motors to each other using these new pins we just created. (Picture 4)

Attach a 9 stud beam across the back of the motor where we had put 4 black pins. One stud should jut out. (Picture 5)

Next, attach the two L connectors one stud from the top of the yellow beams. Add four black pins and one blue pin to the very left. Add on a 13 stud beam and make it just out one stud on the right. (Picture 6)

Using a blue pin, attach a L beam on the jutting out pat of the 13 beam. Attach another L beam towards the left yellow beam using two black pins. (Picture 7)

Attach the other 13 stud beam to the tops of both L beams using two blue pins and a black pin. (Picture 8)

Attach the 3 stud beam using two black pins and one blue pin. Attach one black pin to the top of the Left L connector and another black pin on the L beam, except on stud lower. Refer to the picture of this one especially. (Picture 9)

If you did the previous step properly, you will be able to attach the third L beam directly onto the pins. Also, bridge both 13 stud beams with a 11 stud beam and use one blue and one black pin to connect them. Make sure the third stud of the blue pin is protruding upwards, from the viewpoint of the picture. (Picture 10)

Using three blue pins, attach a 9 stud beam across the first two L beams. Also use a black pin to connect it to the 11 stud beam where it crosses. Using the third stud of the blue pins, attach another 9 stud beam across the back. (Picture 11)

Using the last black pin, attach the 7 stud beam across the top and attach two blue pins through the top of the 11 stud beam for connecting to the drive train later. Excluding those two blue pins, you should only have three blue pins jutting out on the same side. These three pins will attach to the bottom of the NXT later when it is being installed on. That side is actually the top. (Picture 12)

Spolier, Wheel, and Mid Assembly

20160606_180755.jpg
20160606_180905.jpg
20160606_180933.jpg
20160606_180954.jpg
20160606_181104.jpg
20160606_181154.jpg
20160606_181510.jpg
20160606_181523.jpg
20160606_181535.jpg

For this step you will need:

  • The motor assembly
  • The two mirrored wheel assemblies
  • 2x bumper pieces. (they should be opposite)
  • 2x blue axle to beam pins
  • 2x small L beams
  • 1x 4 stud axle (Sorry it got cropped out. It will be black)
  • 12x black pins
  • 2x 3 by 7 angled beams
  • 2x perpendicular beam (Not sure what it's called. It is the two black parts under the motor assembly)

Start off by connecting the wheel assembly to the motor assembly by sliding the axle through the motor and the black pin of the center hole of the motor back. Do for both sides of the wheel assembly. (Picture 2 and 3)

Next, attach a 13 stud beam to the two blue pins at the back to the wheel assemblies. One stud will jut out, doesn't really matter which way. (Picture 4)

Using a black pin and a beam to axle blue pin, connect an angled beam to the inside top of a motor. Do for both motors.(Picture 5)

This part is kind of tricky. Using the 4 stud axle, connect the 2 L beams in between the ends of the two angled beams. It helps to position the L beams and the sliding the axle in from one end. (Picture 6)

Using two black pins, attach the Perpendicular beam to the short end of a L beam. Repeat for the other side. Attach a black pin on the outermost hole on both perpendicular pieces. (Picture 7)

Using the two black pins from before, attach a 13 stud beam. Make sure it is centered. Then attach a black pin to the end of the beam and attach another 3 holes from the end. DO on both ends of the 13 stud beam. (Picture 8)

Attach the two bumper pieces using the inside edges of it's connecting beam. Now you are done with the rear part of the F1 Car. (Picture 9)

Bumper

20160606_191815.jpg
20160606_191905.jpg
20160606_191943.jpg
20160606_192128.jpg
20160606_192235.jpg
20160606_192253.jpg
20160606_192354.jpg
20160606_192433.jpg
20160606_192449.jpg

You will need these parts:

  • 1x 13 stud beam
  • 1x 11 stud beam
  • 2x 9 stud beams
  • 2x blue axle to beam pins
  • 16x black connector pins
  • 4x blue connector pins
  • 4x H connectors
  • 2x L beams
  • 2x mini L beams
  • 2x straight bumpers
  • 2x side bumpers, one left and one right
  • 1x 5 stud beam

Start by attaching two H connectors to the ends of the 11 stud beam. Next on the other side of the beam, attach two more connectors but one stud from the end. (Picture 2)

Using two black pins, attach a L beam bending inwards on the H connector. Repeat for the other H connector you just put. (Picture 3)

Using an axle to beam pin and a blue beam pin, attach the mini L beam to the underside of the Large L beam, but facing outwards this time. Repeat with the other mine L beam. Next attach two black connector pins on top of both mine L beams on the short 2 stud side.(Picture 4)

Next, bridge the two L beams with the 5 stud beam on top of the protruding blue pins. Also, attach two black pins to the outside of the front two H connectors and a blue pin to the inside of each. (Picture 5)

Attach two 9 stud beams on the end of the H connectors using the pin you just placed there. (Picture 6)

Counting from the outsides, attach a black pin to the underside of the 9 stud beam on hole one and three. Attach another but facing upwards on hole six. Repeat for the other 9 stud beam as well. (Picture 7)

Bridge the two 9 stud beams using a 13 stud beam and attach the side bumpers to the ends using the inside of their beams. (Picture 8)

Lastly, attach the two straight bumpers to the front two H connectors and keep it in like with the other side bumpers. Now flip the entire thing over because I made you build it upside down for ease. (Picture 9)

Front Steering Assembly

20160606_203538.jpg
20160606_203628.jpg
20160606_203751.jpg
20160606_203926.jpg
20160606_204033.jpg
20160606_204135.jpg
20160606_204240.jpg
20160606_204353.jpg
20160606_204440.jpg
20160606_204509.jpg
20160606_204540.jpg
20160606_204614.jpg

The parts you will need for this step are:

  • 1x 13 stud beam
  • 3x 11 stud beams
  • 2x 7 stud beams
  • 1x gradual 90 degree curve beam
  • 4x 3 stud beams
  • 7x blue pins (I ran out so I used a beige pin)
  • 6x black pins
  • 1x loose beige axle to beam pin
  • 1x 4 stud beam with stopper
  • 2x 6 stud beams with stoppers
  • 1x T shaped beam or another 3 stud beam
  • 1x H connector
  • 2x L connectors
  • 4x large 1 stud axle stoppers
  • 2x Large Technic tires
  • 1x NXT 2.0 motor

Start by attaching the H connector to the center of the 13 stud beam. Attach two L connectors on the same side but at either end. Next, add on one black pin on both L connectors. (Picture 2)

Next, use a 11 stud beam between both black pins previously attached. on the inner top holes of both L beams, attach a 3 stud pin. Make sure that two studs of pin are protruding up. (Picture 3)

Stack the other two 11 stud beams on the blue pins and attach a beige / light brown pin on the top center. (Picture 4)

Separately, attach two 3 stud beams (or one 3 stud beam and one T beam) to the end of the 90 degree beam using two blue pins. It will be one stud from the end since the end stud connects to an axle and not to a beam. (Picture 5)

On the motor, attach a 3 stud beam using two black pins and a blue one in the center. (Or beige) (Picture 6)

Attach the 90 degree beam to the motor using the 4 stud axle with stopper. (Refer to picture 7)

On the underside of the motor, attach 2 black pins opposite to each other. Attach two blue pins through the H connector as well and leave out only one stud protruding. (Picture 8)

Using two 7 stud beams, bridge the black pins with the blue pins. The beams should be parallel. (Picture 9)

Separately, slide a 6 stud axle with stopper through a 3 stud beam and slide a 1 stud stopper on the longer end of the axle. It should not be able to fall out of the beam now. (Picture 10)

Add the wheel on the long end of the beam and follow with another 1 stud stopper. Repeat to make another wheel with mount. By the way, this was a pretty ingenious idea if I say so myself :D. (Refer to picture 11)

Attach the 3 stud pin directly onto the sides of the L connectors. (Picture 12)

Now you have finished all of the assembly except for the NXT mount and wiring. WOHOO!!!

Final Wiring and Mount

20160606_213024.jpg
20160606_213042.jpg
20160606_213053.jpg
20160606_213224.jpg
20160606_213720.jpg
20160606_213803.jpg

To wire and mount the NXT, you need wires and the NXT.

The wire Lengths I used were two 35 cm wires and one 18-ish cm wire (I know it is the smallest NXT wire that comes with the kit).

Start by attaching a 35 cm wire to the motor on the front steering assembly. Don't attach the other other end to anything yet.

Next, attach the front wheel assembly to the middle assembly by removing the two blue pins and replacing them. The pins should got through the front two holes of the beam protruding out and on the farthest two holes on the motor. This will give enough space for a wire to be attached. (Picture 1)

Using the four black pins, attach the bumper to the front of the car. (Pictures 2 and 3)

next, using the three blue pins protruding out, attach the NXT to the car. While doing so, bend the steering motor's wire towards the left (looking from the front of the car). Refer to pictures 4 and 5 while doing so.

Next, attach the steering wire to motor port A by looping around the NXT and bringing it up from underneath.

Using the short wire, attach the right motor to port B. Use the last long wire and connect the left motor to port C by looping it around as well.

Connecting and Driving

The app I created is quite basic. It has components that can let you use the phone's tilt sensor to move as well.

To start off, turn on bluetooth on the NXT and on your phone, which should recognize and pair with the NXT.

Next download the app to any file on the android device. Go to settings > security > and click allow unknown sources. Now go to the file viewer app and find where you saved the app file. Click on it and allow it to install.

Now open up the app and click on Connect List Picker, which shows all the NXT bricks paired to the phone via bluetooth. Now I don't know why, but if a connection is lost or an error pops up, it takes a while to go away and in some cases may not go away at all. The best way to avoid this is use the connect list picker first and then make sure your car is within range of the phone.

Once the app exits the menu, it is connected to the NXT. Using the sliding bar at the top, you can set the motor speed. Due to the gear ratio, most low speeds won't work.

To move forwards or back, click the up or down arrows. The left and right arrows will turn the car, but when you release the button it will revert to going in the original direction. Now this isn't always accurate so the trim buttons are there. It does the same thing but it doesn't turn back. It just shifts the motor a bit. I find this helpful to control with actually.

Now for the experimental part. This isn't fully functional yet for turning but it works okay with front and back movement. Click on the auto speed button. Now with the phone on a flat surface, the car won't move. You may also notice a number at the bottom, which represents the phone's tilt front and back. Tilting front makes the car go forwards and back makes it go back. The incline also controls the speed. Tilting the phone side to side will turn the front wheels, although it may not always be accurate if you are tilting you phone to move forwards or back at the same time. It seems to work best for me, however, when the NXT batteries are low. This make the front steering movements less powerful and therefore easier to control.

Now keep in mind that driving it outside can lose parts, which I have had to me twice. (Only a stopper though... which led to my shortage way earlier)

If you guys liked my instructable, vote for it in the sensors and IOT contests, leave a favorite, and feel free to leave suggestions or questions in the comments section below. Thanks to all of you viewers who made it to here and I will see you in my next Instructable :D

Downloads