Designing an Earth rover inspired by the Moon

Not your usual Internship story.

TeamIndus Foundation
TeamIndus Foundation
8 min readJun 7, 2018

--

This is based on the internship experience of Vedant Kuchhal. He was a part of our internship for high school students.

Me with our mentor Hari (He is the avionics engineer at TeamIndus) and co-participant Vihaan

2nd May, 2018 | 9: 15 AM: It was a cloudy day when I reached the TeamIndus headquarters to begin my internship. And I knew it was going to be one hell of an experience.

The Problem Statement

The email I had received before said we were to design a completely autonomous rover that can travel from one specific point to another point over a flat surface , while avoiding numerous obstacles on its way. All instructions for obstacle avoidance had be pre-programmed into the rover.

Our role as interns in building this rover was to help explore options to automate some of the rover drive operations to minimize human intervention and improve rover drive turnaround times.
To say I felt quite nervous and excited would be a gross understatement.

This project was to be done over the course of 2 weeks at the TeamIndus facility in Bangalore.

Internship Begins at TeamIndus

We used a myriad of different sensors, controllers and drivers in order to build our rover. Some of the equipment we used were not implemented in our rover but was used to better understand other, more complex hardware or simply test our programme code.

Interacting with and understanding this hardware was the primary part of our experience at the internship and therefore the bulk of my blog will concern focusing on each hardware component individually. By doing so, I will try to best share my experience here.

Arduino Mega 2560:

Image 1: Operating voltage: 5V ; Maximum Current: 40mA

This is undoubtedly the most important piece of hardware that we worked with. The Arduino Mega 2560 is able to connect with other devices using the 54 digital pins (numbered 0–53) and the 16 analogue pins (numbered A0-A15). There are also power pins for 5 V and 3.3 V along with ground pins.

The micro controller is instructed to do its tasks by code which is uploaded into it beforehand. Arduino provides its own IDE and compiler, downloadable or available online, to facilitate writing(the code is written in a variant of C), compiling, and uploading programmes(known as ‘sketches’) from the computer into the micro controller via the USB port at the top left corner in Image 1.

In our project, we used digital pins in all cases, even when we were sending analogue signals. We did this using something called PWM(Pulse Width Modulation) outputs, and digital channels 2–13 can be seen to have the PWM functionality.

Image 2: When these PWM signals are viewed through an oscilloscope, the time a signal lasts for is seen in terms of the ‘width’ with a signal lasting on the ON state for longer having a greater width

In our entire system, only two of our outputs needed to be PWM. Both these outputs went to the next device I shall be talking about: the motor driver.

L293D- The Motor Driver:

Operating voltage- 4.5–36V ; Maximum current-600mA

The driver changes the rotational direction of the wheel by changing the current direction of the motor. We would also set speeds on motors using the enable pins with PWM signals.

The PWM duty cycle controls the speed of the motor. Higher the duty cycle, faster the speed. Lower the duty cycle, lower the speed.

Motors:

Operating Voltage — 3–12V

The motors used in the rover were single shaft geared DC motors which have a speed of 60 Rotations Per Minute at 12 V. They are small, lightweight and ideal for driving systems such as our rover.

This image shows how the microcontroller, motor driver, and the motor are connected to each other

Sensors:

We used two types of sensors on our rover to help it detect and understand the outside world. Both sensors gave us raw data which we had to process and interpret in order to implement the readings we obtained into our code.

HC-SR04

This ultrasonic sensor is used to detect proximity, and works by sending out and receiving ultrasonic pulses, inaudible to the human ear.
Though this sensor cannot be used in space, it was used to introduce different kinds of sensors and their interfaces.

MPU6050

Although this was definitely the smallest component we worked with, it was also decidedly the most difficult component we worked with, and at the end of it, we understood the principles behind its operation only to an extent.

The MPU6050 consists of an accelerometer and a gyroscope, with three axes each(x, y, and z) hence making a 6 DOF(Degrees Of Freedom) device. This makes it an IMU, or an Inertial Measurement Unit. It also has an inbuilt temperature sensor which detects and outputs temperatures in Celsius.

Coding

A key part of the work we did was writing a lot of code to interface with all the sensors and drivers. We started off with writing code to analyze each sensor’s output. Then we worked with the driver ICs and wrote the code to make the hardware execute the instructions. These actions could vary from making the LEDs blink to driving the motor.

We finally tied all these pieces of code together as a master code which would run the rover in the end. We interfaced the accelerometer code snippet with the drive code snippet, together with the algorithm to avoid obstacles.
So, if the ultrasonic sensor detected an obstacle, the code would detect that, stop driving and commence turning. We used the IMU sensor output to monitor the rover’s turn and stop when we hit a specified angle. We would run this whole thing in loops.

Small pieces of code went into this and the master code that tied it all together was our core algorithm of the rover operations.

This is where we learned about the control systems, including using feedback signals. This can be marked as one of our most crucial takeaways.

Jumper cables and Breadboard

Although these may seem trivial, they were an integral part of the numerous connections we made between the various hardware components that have been described. Just as important is the breadboard, through which it was possible to connect all the components and act as a common ground.

Other materials used: ULN2003, LEDs, FC-51

Result

Our rover is ready to roll!

By this point we have discussed most of the hardware we used on our rover, the only remaining parts being the castor, wheels and the chassis itself(which is small, lightweight and made of plastic).
We can now move on to how we applied each of these components in a practical situation.

Our plan was to set the rover on a straight line to its destination, and make sure it followed that line till it reached the destination. If there happened to be an obstacle on the way, the rover would go around the obstacle and get back on the straight line to its destination.

With all of the adjustments measured above, including a few others, we came well short of achieving our aim stated in the beginning. We did not have sufficient time to add telemetry and telecommand systems we were aiming for. Although the straight-line corrector worked initially, it eventually failed, and we were not able to obtain a perfect straight travel path. This meant that our aim of following an imaginary straight line to the destination would not work.

The session with the TeamIndus engineers as they share their feedback on our design

In the end, we were able to demonstrate a very basic example of obstacle avoidance where the rover traveled around a single obstacle under certain dimensions autonomously.

To Sum It All…

Biggest learning?

Physical components are never perfect, and this always has to be taken into account while designing an engineering system. It may sound rather obvious, but this experience made me realize this for myself for the first time.

Nevertheless, the point is not in the objective, but rather the experience of reaching that objective. This was a completely new experience for me, and I certainly learned a tremendous amount.

The knowledge and skills I acquired in order to build the rover will help me in countless other places. These include:

Structured programming- I had done some computer programming earlier, however it was very basic and used for handling small sets of data. The programming skills and concepts I learnt, such as declaring separate functions and calling them as required will be a big step forward for me to use while programming later in life.

Reading datasheets- Datasheets are documents consisting of everything one needs to know about a specific component and being able to read and interpret them is an important skill.

Using a breadboard and jumper cables- Again, this may sound basic, however this was something I had never done before and in the process I learnt everything I would need to know about these components.

Hazards- One of the most important of my learnings was learning about the delicateness of electronic equipment, and dangers such as Electrostatic discharge which can severely damage components.

A very important part of this for me was that was completely hands-on using very basic hardware with very less that was pre-programmed. We had to find out how to interface the sensors ourselves. We had to find out which digital signals controlled what rotation on the motor ourselves.

This experience made concepts I had learnt in school very tangible for me.

For example- I knew that one could obtain displacement mathematically from acceleration in hypothetical calculus questions but I had never attempted it in real life. I knew what integrated circuits were from computer science, I had simply never known what working with one would feel like.

With this internship I got a glimpse of what engineering feels like. Despite hearing so much about it, I had never really understood what it meant till the internship. Thanks to the entire TeamIndus crew, who are truly some of the nicest and most helpful people I have met.

You can contact us at <moonshot@teamindusfoundation.org> for further details.

--

--

TeamIndus Foundation
TeamIndus Foundation

Bringing science to life through experiential learning. Through our programs, we hope at least 20 out of every 1,000 students choose an adventure with science.