Arduino RC Robot

by Dylan_Pendlebury in Circuits > Arduino

9049 Views, 54 Favorites, 0 Comments

Arduino RC Robot

preview.jpg
OmniBot Test Drive
Bomb_defusingOmniBot2.jpg
Supe_custome_OmniBot.jpg
OmniBot_Bot_Ball2.jpg
OmniBot_Bot_Ball.jpg
IMG_20190524_171122.jpg
IMG_20190520_173331.jpg

Description

A durable, 3D printed, remote controlled Arduino based robot with several hundred meters range. A modular quick-connect motor scheme lets you rapidly prototype different robot designs without any tools. Perfect for robotics education for kids.

Whats it all about?

So you've just started learning Arduino, or maybe 3D printing and your ready to build something cool. You want to build something meaningful, and practical, but fun... You're ready to build the OmniBot. If the Arduino is the Swiss Army Knife of electronics, then the OmniBot is the Swiss Army Knife of robotics! The OmniBot is the result of a several month long project of Bolts and Bytes Maker Academy that aimed to design a versatile and easy to use remote controlled robotics kit. And now its all open source! The OmniBot is battery powered, can drive up to four DC motor channels, two servo motors, and has a remote controlled range of several hundred meters! And it all fits inside a sleek 3D printed case, running on, you guessed it, an Arduino Uno brain.

Okay, but why?

We really wanted to make it super easy for young kids to pick up some cardboard and glue and end up with a working custom robot. With traditional robot kits you might buy online, you're forced to deal with lots of messy jumper wires, writing your own code, and - oh yeah... you can almost never control them remotely. They just run the same code in a loop. With the OmniBot, you simply plug in a battery, plug in a motor, and tape it or glue it where you want, and - boom. robot. All the code we've written auto-magically works with the same controller you might use for a drone or RC plane. It's the perfect kit for rapid prototyping field ready robots. When you have finished building your OmniBot platform, you have only just begun. In ten short minutes you could go from a mission critical bomb defusing robot, to a Rocket-league style soccer bot, and that's what makes OmniBot powerful. So let's get started!

Recommended Skill Levels:

  • This projects includes some light soldering, it is fairly manageable for beginners.
  • General understanding of Arduino and how to work in the Arduino IDE uploading sketches and adding libraries. No coding is required but advanced users can customize their code if desired.
  • Some light hardware work with screwdriver and wire cutters/strippers. Adult supervision recommended for young kids. (The final product is suitable for use with all ages!)

Supplies

Required Tools:

  • Soldering iron and solder
  • Allen wrench/key or hex head screwdriver
  • Phillips head or flat head screwdriver (depending on the terminal blocks of the motor shield)
  • Hot glue gun and hot glue sticks (not required but highly recommended!)
  • Wire cutters (flush cutters are recommended as they can be used in other steps)
  • Wire strippers
  • Needle nose pliers (not required but it makes cleaning the 3D print much easier)
  • Access to a 3D printer (if you don't have one, ask your local maker space, school, lab, or library!)
  • A computer with the Arduino IDE software

Bill of Materials:

The following items and links were sourced from Amazon (all or most are Amazon Prime items) but it should be noted that most, if not all of these, can be found for much cheaper on websites like Banggood and AliExpress if your willing to wait a few weeks for shipping. This can actually cut the project cost in half if you look well enough.

  1. Arduino Uno Microcontroller (the type with the surface mount chip works better for this)
  2. Arduino Motor Shield V1
  3. Turnigy Evo Transmitter (mode 2) (this one comes with the receiver but most receivers with iBus communication should work)
  4. Male and Female JST plugs (I highly recommend the type with silicone because they are more flexible)
  5. 13.5mm x 9mm Rocker Switch
  6. M3x6mm countersunk screws (only 6 screws are actually needed)
  7. 2S Lipo battery (this can be substituted with a non rechargeable battery back between 7 and 12 volts)
  8. 2S Lipo Charger (only required if using a lipo battery)
  9. PETG 3D printer filament (PLA can be used but PETG is more durable and heat resistant to hot glue)
  10. TT motors and wheels
  11. Servo motors (larger servo motors can be used as well)

If you've got all your tools and parts then follow me! We've got robots to build...

3D Printing Your Robot Chassis

CAD1.PNG

For this step you will need:

  • A 3D printer with a minimum build volume of 4.5"X x 4.5"Y x 1.5"Z

The good news is, I've already design it for you! The 3D STL files are all right below. But first, here are some notes.

The print is three separate solid models, the Upped Section, the Lower Section, and the Battery Door. The Lower Section does require support materials, but only under the section where the switch will be installed.

The Lower Section and Battery Door can be printed in one shot as a "print in place" model, meaning that you can pull it straight off the printer when its done and the door will work right away without installation. Some lower quality printers might struggle with the tolerances however and melt these two parts together so I've also included separate print files for each the Battery Door and Lower Section so you can print them individually and assemble them after.

Cleaning the 3D Print

IMG_20190519_100144.jpg
IMG_20190519_095302.jpg
IMG_20190519_095410.jpg
IMG_20190519_095515.jpg
IMG_20190519_095817.jpg
IMG_20190519_100016.jpg
IMG_20190519_100111.jpg

For this step you will need:

  • A pair of needle nose pliers
  • A hobby knife

Carefully remove your print from the build plate. If you printed it all in one shot like I did, you may have to brush off some stringing between parts. Using a pair of pliers, pull out the support material by the hole where the switch will go. On some printers the first layer or two of the battery door may be fused with the lower section, if this is the case you can use a hobby knife to slice out the door. If the fusing is too bad, you may need to print the door and lower section separately and snap them together afterwards.

Preparing Your Arduino Uno

IMG_20190519_131143.jpg
IDE Snip.JPG

For this step you will need:

  • An Arduino Uno
  • A computer with the Arduino IDE installed (you can install the IDE from here)
  • A USB programming cable

The OmniBot code is dependent on a few different libraries.

  1. "Servo.h" (this is built in to the IDE and should not need to be downloaded)
  2. "AFMotor.h" (this great library from Adafruit, along with the guide for its installation can be found here)
  3. "OmniBot.h" (Follow the instructions below to install this Library)

To install the OmniBot library, locate your Arduino Libraries folder (usually under Documents>Arduino>Libraries) and create a new folder named OmniBot. Paste in the OmniBot.h, OmniBot.cpp, and keywords.txt files into this new folder. Close and restart the Arduino IDE to complete the installation. If you were successful you should now see the OmniBot library by navigating to Sketch > Include Library, in the IDE.

Once the Libraries are installed simply plug in the Arduino Uno, choose the correct board under Tools > Board: > Arduino/Genuino Uno, select the active COM port, then upload the sketch!

Preparing Your Robots Receiver

IMG_20190519_133719.jpg
IMG_20190519_133548.jpg
IMG_20190519_133541.jpg
IMG_20190519_133435.jpg
IMG_20190519_132239.jpg
IMG_20190519_132147.jpg
IMG_20190519_132040.jpg
IMG_20190519_131936.jpg
IMG_20190519_131759.jpg
IMG_20190519_131611.jpg
IMG_20190519_131356.jpg

For this step you will need:

  • soldering iron and solder
  • wire cutters
  • wire strippers
  • Arduino Uno
  • IBus receiver module (preferably the one that comes with the recommended transmitter but other iBus receivers may work)
  1. Start by locating the header wires that come with your receiver module. It should be a strand of four. The yellow wire corresponding to PPM on our module is not needed and can be removed or cut from the header bunch.
  2. Snip the individual female header off the end of the wires and strip off about 1 cm of insulation.
  3. Pro Tip: Twist the exposed stranded wire to prevent fraying and tin the ends with solder.
  4. Locate available Gnd, Vcc, and Rx holes on your Arduino. (if using the recommended Arduino they can be found all near each other just below the ICSP pins.)
  5. Insert the tinned wires through their respective holes and solder on the back side. White to RX, red to 5V, black to GND.
  6. Trim the remaining wire on the back to prevent shorting.
  7. Plug the female quad header into the reciever module red to VCC, black to GND, and white to S.BUS
  8. Tuck the receiver module into the Arduino. I found that mine fits snugly between the capacitors and the crystal by the USB port.

Preparing the Motor Driver Shield

IMG_20190519_134356.jpg
IMG_20190519_133945.jpg
IMG_20190519_134403.jpg
IMG_20190519_140317.jpg
IMG_20190519_140848.jpg
IMG_20190519_141649.jpg
IMG_20190519_141839.jpg
IMG_20190519_142031.jpg
IMG_20190519_142252.jpg

For this step you will need:

  • A pair of flush cutters or knippers.
  • A small flat head or Phillips head screwdriver (depending on the terminal blocks your motor shield has)
  • Seven (7) female JST cables adapters.
  1. Attempt to press the motor shield onto the Arduino with the receiver sandwiched in between.
  2. If the motor shield pins do not press all the way into the Arduino female pins, there may be long pins on the under side of the motor shield that are poking into the receiver preventing this. These can be trimmed with flush cutters or knippers as seen in picture 2.
  3. When the Arduino, Motor Shield, receiver sandwich has been made (lets call this the "stack"), start screwing in the JST cable adapters to the terminal blocks as the pictures show. The red wires of the cables are all on the end most positions of the terminal blocks and the black wires are in the center. (note that terminals M1 and M2 on the shield should have two JST cables each, M3 and M4 should each have one, the battery terminal should have one)
  4. Pay very close attention to the battery terminal on the motor shield. Attaching a JST cable to this one the wrong way can fry your stack when a battery is plugged in. Remember, red goes to M+, black goes to GND.
  5. Ensure that there is a yellow jumper connecting the "PWR" pins to the right of the battery terminal block. This provides power to the lower parts of the stack.
  6. Pro Tip: When all the cables are screwed down, give each wire a light tug to ensure it is attached well and wont fall out.

While were here, let me tell you what these connectors relate to. M1 and M2 terminal blocks (each is a set of two individual sockets) are for the robot's right and left drive motors, respectively. There is a fifth socket in the middle of the row that I believe is connected to ground, and for our purposes, will not be used. M3 and M4 terminal block will be "Auxiliary Motors" that are broken out at the front of the OmniBot for whatever general motor functionality you need. The M3 auxiliary motor can be set between 0% and 100% speed rotating in one direction and is controlled by the left joystick up and down motion. The M4 motor can rotate 100% clockwise and counter clockwise controlled by the left joysticks left and right motion. This joystick axis has a "return to center" spring that will naturally set the motors speed to 0%.

Mounting the Arduino Stack Onto the Chassis Lower Section

IMG_20190519_142252.jpg
IMG_20190519_143308.jpg
IMG_20190519_142852.jpg
IMG_20190519_142807.jpg
IMG_20190519_143347.jpg
IMG_20190519_143456.jpg
IMG_20190519_143642.jpg

For this step you will need:

  • The completed stack from the previous steps.
  • The 3D printed Lower Section of the chassis
  • Two (2) 6mm M3 machine screws
  • An Allen wrench/key or long hex driver.

  1. Arrange the JST connectors such that the wires from the M1 terminal block reach to the right side, the wires from the M2 terminal block reach to the left side and the wires from the M3 and M4 terminal block loop under the stack to the front. (the receiver antenna can be looped under the stack as well)
  2. Ensuring that the JST logo is facing up on the red connector body, press fit the JST connector heads into their respective sockets on the printed Lower Section. The order of the right side cables does not mater as they both go to the M1 terminal block. The same is true for the left side connectors to the M2 terminal block.
  3. M3 and M4 cables should loop directly under the stack and plug into the socket they are on the side of.
  4. Using an Allan wrench and M3 screws, bolt the stack to the Lower Section screw standoffs. It might be useful to find a heck screw with a smaller head diameter as one of the screws will likely bite into the female header of the Arduino. Don't worry about damaging this header as we aren't using it for anything.
  5. Tuck all loose wiring under the stack where possible to reduce clutter.

Installing and Soldering in the Power Switch

IMG_20190519_143806.jpg
IMG_20190519_144005.jpg
IMG_20190519_144250.jpg
IMG_20190519_144404.jpg
IMG_20190519_144420.jpg

For this step you will need:

  • A soldering iron and some solder
  • wire cutters
  • wire strippers
  • 13.5mm x 9mm rocker switch

  1. Push the rocker switch into its hole from the under side of the Lower Section until it clicks in place. Ensure that the | symbol faces the front and the 0 symbol faces the back towards the battery bay.
  2. Stretch the black JST wire from the battery terminal to the switch terminal and cut it ensuring that there is enough black wire running from the GND terminal to comfortably reach the switch terminal.
  3. Strip and tin both ends of the cut back wire.
  4. Solder each cut end of the black wire to each switch terminal as shown in the pictures. (be careful not to hold the soldering iron on the switch terminal for too long as the heat can easily transfer down and begin to melt the plastic body of the switch!)
  5. Loop the connector end of the battery terminal cable over the notch of the battery bay down towards the battery door.

Closing Up the Chassis

IMG_20190519_144627.jpg
IMG_20190519_144721.jpg

For this step you will need:

  • Allan wrench or hex head screw driver.
  • Four (4) 6mm M3 countersunk machine screws

  1. Place the printed Upper Section carefully over the Lower Section ensuring that now wire are being pinched between the two sections. If needed, go back and tuck some more wire under the stack to get them out of the way.
  2. Drive all four screws in from the bottom. Pro Tip: Screw all for in most of the way before screwing any one of them all the way in. This helps even the pressure on the printed parts. Tighten each screw more and more, alternating across the corners until all screws are flush.

Building the Quick Connect Motors

IMG_20190520_172104.jpg
IMG_20190520_171941.jpg
IMG_20190520_172207.jpg

For this step you will need:

  • Four (4) TT geared motors
  • Four (4) male JST connector cables
  • A soldering iron and some solder
  • Hot glue gun and glue are strongly recommended but not necessary

  1. Solder a male JST connector cable to the TT motor in the same way as shown in the pictures. Pro Tip: Because these motors drive both clockwise and counterclockwise, the polarity of the wires doesn't matter, but you should ensure uniformity across all motors so that they all operate the same way when plugged in. (i.e. however you solder the red and black wires now should be the same you you solder every motor!)
  2. Pro Tip: Add a glob of hot glue over the solder joint of these motors to greatly increase their lifespan! These motors have somewhat flimsy copper tabs you are meant to solder to and if they bend too much they can fatigue stress and snap right off rendering your motor useless. Hot glue prevents that bending!
  3. When you plug your motor into the OmniBot the two metal contacts should be facing up. They can be a little tricky to plug in the first few times because the Lower Section of the chassis can squeeze the female JST connectors a bit.

Your First OmniBot

IMG_20190520_172223.jpg
IMG_20190520_172358.jpg
IMG_20190520_172329.jpg
IMG_20190524_165232.jpg
IMG_20190524_165350.jpg
IMG_20190524_165500.jpg
IMG_20190524_165706.jpg
IMG_20190520_172535.jpg
IMG_20190520_172802.jpg
IMG_20190524_165939.jpg
IMG_20190524_170122.jpg
IMG_20190524_170134.jpg
IMG_20190524_171518.jpg
IMG_20190524_171122.jpg

For this step you will need:

  • Some quick connect TT motors with wheels
  • Double back sticky tape is preferred but you could also use hot glue or regular tape.
  • Your transmitter controller
  • A battery (7V to 12V will work, but preferably the 2S 7.4V Lipo batteries in the materials list)

First open up the battery bay using an Allen wrench or small screw driver, plug in your battery, and close it back up. After that, there really aren't any rules for the build other than: left drive motors get plugged in on the left side, right drive motors get plugged on the right side, and the brown/back wire of the servo motors face away from the OmniBot. Other than that, make it your own!

You can flow my pictures to get a sense of how I built mine. I would also recommend using building materials like Popsicle sticks, hot glue, and cardboard for other body components or extending the chassis size.

Controlling Your OmniBot

IMG_20190524_171122.jpg
IMG_20190524_171518.jpg
IMG_20190524_171412.jpg
IMG_20190524_171300.jpg
IMG_20190524_171349.jpg
IMG_20190524_171307.jpg

For this step you will need:

  • Your finished OmniBot
  • Your controller

I can't recommend the Turnigy Evo transmitter from Hobby King enough. Its a great 2.4GHz digital transmitter with auto frequency hopping and lots a great features including a touchscreen! It is what we use at Bolts and Bytes Maker Academy and its has served us well. If you are using it as well, make sure you run a firmware update so that you are using the latest firmware. A link for that can be found on the product page on Hobby King.

To get your OmniBot moving, click on the tool box on the Turnigy Evo controler and tap RX Bind, then power cycle (turn off then on) your OmniBot from the switch. The controller should make a sound indicating that it has connected to the receiver inside the OmniBot.

Now drive! All the code should work seamlessly.

You will find that the Turnigy Evo controller features control the OmniBot in the following ways:

  • Right Stick Vertical and Horizontal > Left ports (2) and right ports (2) of the OmniBots for drive motors.
  • Left Stick Horizontal > Front motor port 1, motor speed -100% to 100% and Servo port 1
  • Left Stick Vertical > Front motor port 2, motor speed 0% to 100% and Servo port 2
  • Center Knob > Adjust max OmniBot drive speed
  • Center Switch > Change drive mixing scheme when pulling back on the right stick (there is a lot to unpack there as drive mixing is a complex topic, I'll save an explanation if someone really wants it!)
  • Left Switch > UP: Allows control of front motors and servo motors, MID: Allows control of only Servo motors, DOWN: allows control of only front motors. (this is useful if you need a servo to move but not a front motor at the same time)
  • Right Switch > currently unused

You will also find features in the controller menu for "endpoints", "reverse", and "trim", but there is much to say about each of those and I will leave them for another guide. If you are interested in any of those, a YouTube search on those terms should reveal dozens of helpful videos.

Your All Done!

If you've made it this far, congratulations, I know it was a long one.

I cant wait to see what the community does with the OmniBot. I will certainly look forward to answering any question and would love to hear any feedback. Stay tuned for a lighter version of the OmniBot in a future Instructables guide!