Assembling the Robot in Real Life

Klaudiusz Kolaszewski
6 min readMar 30, 2021

Hi again and welcome back to the blog. This week I have great news that I have been waiting to tell you for nearly 2 months now, namely the fact that our robots finally arrived in the post! To be honest we were all starting to lose a bit of hope at this stage but thankfully the postman put us out of our misery. Without further ado this week I will present to you the process of assembling my robot, once it is fully assembled there will be a demonstration of its skills to put the cherry on top.

All supplied components

Firstly I layed all of the supplied components out on my workspace and proceeded to open the assembly tutorial handbook. This handbook supplied with the robot kit is an instruction manual detailing a step by step process of how to construct the robot. After familiarising myself with each components name and the 3 different screw types in the kit I got the screwdriver in hand and started putting the model together. I began with the bottom base plate, DC motors and the motor brackets. The for each bracket I used 8 M3x5 screws to firstly mount the bracket to the base plate and then mount the motor to the bracket. It was very important to pay attention to the orientation of the output shafts on the DC motor at this stage of the assembly as they have to be on the bottom of the bottom as opposed to the top. As can be seen from the picture below it was very easy to make a mistake.

Wrong installation of the DC motors, both output shafts need to be on the bottom

After completing that stage of the assembly I moved on to mounting the front clear plate onto the bottom base plate. This was done by securing golden hexagonal columns with M3x6 screws. This clear plate will be very useful in the future as the stabiliser attachment will be mounted to it. Next the Arduino Nano and two modules which relate to the infrared, ultrasonic sensors and DC motors were mounted to the base plate. The Nano and modules were attached to a expansion board to allow for the sensors, LED’s and DC motors to be correctly and orderly wired. As my long term readers can probably remember I used to assume that an Arduino Uno will be used as the microcontroller for this robot but how wrong I was when I found out we are actually using a Nano. This makes sense because of the Nano’s compact size as opposed to the relatively large Uno. To finalise this stage of assembly the wheels were mounted to the output shafts of the motors by the use of couplers. These couplers use the compressive force of M3x5 screws to clamp down on the output shaft so the wheel can firmly move with the same velocity as the motor.

Assembly of the expansion board with arduino onto the base plate

After this the second plate was mounted above the base plate. This plate allows for the power supply in the form of a battery to be mounted. The battery will need to be plugged into the expansion board to hence power up the Nano, therefore the rectangular holes in the plate were useful to plot the battery cables through to the level below. Once again the golden columns and M3x6 screws were used to mount this second plate to the base plate. To conclude this stage cables running from the expansion board to the DC motors were connected. These cables allow the Nano to control the motion of the DC motors.

Battery fitted onto the model

To add the finishing touches onto the robot the top plate was mounted above the battery. This plate is important as in the future during the obstacle course run the basket collecting the ping pong will be mounted onto it. I have to say that I’m very happy with my CAD assumptions as I think the model I created on Solidworks comes very close to the real robot. The physical assembly of the robot was now complete and just check the final results out!

Fully assembled robot

After a quick charge of the battery I proceeded to test the robot out in action. The Nano already came with software uploaded to it, enabling the robot to be controlled by the use of an app on your phone. Other functions already uploaded were Standby Mode, Glowing Mode, Auto Follow Mode, Obstacle Avoidance Mode and Bounce Mode. For my first test I decided that I will make a simulation of my own simple obstacle course incorporating straights, left turns and right turns. In this obstacle course the robot was controlled by a rocker in the mobile app and was not yet automated. You can check out how the robot completed my obstacle course during its first few minutes of life in the video below!

Robot takes its first steps

Finally I decided to try my own hand at programming and I wrote a code to test out the robots mobility. At first I was quite overwhelmed looking at the preloaded code as it was a few hundred lines long with tens of functions! However I decided that I will use the original function which assigns names to each of the pins called Pins.h.

The components that I will need for my simple demonstration are the motors, ultrasonic sensor and the encoders which determine the angular position and displacement of the rotating DC motors. I then defined all of these components as either an input or output in the void setup of the sketch code.

Next I created functions which allow the ultrasonic sensor to return the distance, and make the DC motors move forward, left, right and stop.

After that I moved onto the void loop section of the code, where I created a statement which makes the robot move forward unless there is an obstacle in front of it, in that case the robot will stop completely. The demonstration will include the robot moving forward, turning left, turning right and stopping when it senses an obstacle in front of it. You can check out the video of the robot running my code below.

First code demonstration

As can be seen the self balancing function was taken out of the code and instead my stability attachment that I designed beforehand works flawlessly with minimal rolling resistance. However during the demonstration of my own code I did find a major problem which I had to solve. Namely the robot can accelerate forward with enough force to tip it over backwards as can be seen from the video below. At first I considered adding a second stability wheel to the other side but I thought that there was a better solution. To combat this I included code that makes the motors accelerate forward gradually from motor speed 10 to 50, instead of giving it the full 50 motor speed from the first instance. This way the sudden jerk of the motors does not overturn the robot.

Sudden acceleration issue

Hope you enjoyed this weeks blog detailing the assembly process and a demonstration of the robots capabilities. The next challenge for the robot is the obstacle course so please join me next week where I will detail the process of the obstacle course assignment!

--

--