Avatar

Arduino Bluetooth Rover

Nov 14th, 2020 | by: Atakan Suslu
Category: Electronics Arduino
Views 43

Bluetooth Controlled Rover

A Bluetooth controlled rover is one of the most common projects you can find for people who just started learning about Arduino and electronics. I also built one because it is easy to build and fun to play with. But I decided to complicate this rover by adding different components. These components are:


  • Front power led as headlight
  • 2 power LEDs to bottom
  • RGB LEDs to sides
  • 8 red LEDs to the front
  • Speaker

So yeah, basically I added LEDs, a lot of them. But adding these LEDs taught me a lot about integrated circuits and transistors. Such simple additions like this can make big differences in outcome, so you should not underestimate them.


Designing the Rover

Idea Phase

Before I started designing, I did some research on this topic. I watched a lot of videos on YouTube to see how people designed their rovers.

After this, I decided to use an Arduino Nano and HC-06 Bluetooth module. I recently bought a 3D printer, so I decided to 3D print the case of the rover to gain experience with it. Most people used one motor controller for their rover, so they could only move forward, backwards or spin around themselves. They couldn’t turn while moving forward. To solve this problem, I decided to use two motor controllers. Until this point, my design was a common Arduino Bluetooth controlled rover. Then, I decided to add “enchantments”.

I had a small speaker laying around, which I salvaged from a broken electronic device. I decided to include it in the rover, so I could learn how to use it. I also decided to add RGB LEDs, so that I could create strobe lights like the caramelldansen meme. Then, I had this bright idea of adding a line of red LEDs to the front, like the KITT from Knight Rider. While at it, I added a power LED to the front as headlight and two to the bottom as underbody LEDs. Why? Why not.


Component Selection

I already decided on Arduino Nano as the main microcontroller board and HC-06 Bluetooth module as the communication module. Then, I selected four standard yellow hobby motor with wheels as they are cheap and powerful enough for my purposes. To drive those motors, I selected two L293D Dual H-Bridge Motor Driver IC. I also chose two 18650 li-ion batteries to power the rover. Power LEDs were rated for 12V, but batteries were 7.4 V, so I had to use a boost converter. I decided to use MT3608 module for this purpose.

After that, I realised that Arduino pins would not be enough to control all of the components. To solve this problem, I decided to build RGB strobe LEDs independent from Arduino, and only control the on-off status of these LEDs. To achieve this, I selected two NE555 Timer IC and two 74HC74 Dual D Type Flip Flop IC. With this, I decreased the amount of required Arduino pins from three to one for RGB LEDs. A 74HC595 Shift Register IC also selected for this purpose, decreasing amount of required pins from eight to one to control front red LEDs.


CAD Phase

I wanted to 3D print the parts, but I didn’t have much experience with 3D printing while designing this, so I decided to make a simple, easily printable design. With that in mind, I designed a box-like shape for the rover inspired by this Youtube video. Please note that antennas are not functional; they are only for decoration. I modelled everything in SolidWorks, except for motors and wheels, which I downloaded from GrabCad as there is no need to reinvent(or in this case redraw) the wheel.


Building the rover

3D Printing

I 3D printed with Natural PLA filament because I only had that filament. 4 Connector took about 1 hour, the main body took about 12 hours, and the top lid took about 5 hours to print. All parts got printed without any problem. After the print, I painted everything to black.

Assembling Electronic Components

I decided to solder every component into a protoboard. It started well, got complicated quickly. I have not soldered Arduino Nano, Bluetooth Module and any of the ICs directly to board. Instead, I used female headers so that in case of a failure, they could be replaced easily. Motors and LEDs are connected to the board with female jumpers. So nothing but MT3608 module and passive components are directly soldered to the board. I soldered MT3608 directly to board because cable density there is low and it can be replaced easily in case of a failure.

Programming

Programming the Arduino

It was fairly easy to program the Arduino, as stated before, this is a beginner project. I didn’t need any external libraries for programming. I used transistors to control power LEDs and RGB LEDs, which can be easily controlled with digitalWrite() function. To communicate with the shift register, software SPI communication is used with shiftOut() function.

To use the speaker, I needed to use loops. But the problem with loops is they are blocking the program until they complete their loops. To overcome this problem, I used the main loop as my only loop and used flags to control the program. When an input is received from the Bluetooth module, related flags changed. With this non-blocking loop, I could still control the rover while the speaker is active.


Programming the controller app

At first, I used a Bluetooth controller app which was available on Google Play. Although it was good enough for driving around the rover, It couldn’t control all of the features of the rover. Therefore, I decided to build a control app myself. I used the MIT App Inventor to build the app. With this app, I can control every feature of the rover. I can toggle LEDs, play predefined animations with front LEDs or control each one manually and obviously drive around.


Result

Everything came together perfectly, and the rover behaved just like how I wanted. It is slow, but fast enough for indoors. The battery lasts for about 1 hour and 15 minutes of continuous usage. It weighs 658 grams everything included. It is surprisingly powerful; when it comes across to an obstacle, it climbs over the obstacle if the obstacle is not bigger than the rover.


Can it be upgraded?

Yes, definitely. Hardware cannot be changed without redesigning it, but front LEDs and speaker solely runs on software. By upgrading the software, tons of predefined animations for front LEDs can be added, or music can be played from the speaker while the rover is driving around.


PHOTO GALLERY


Electronic Board
Assembled Electronics

0 Comments

Login or Sign Up to post comments on this project.