Testing The Real Tumbller

David Rohu
5 min readApr 3, 2021

--

I know it has been a while since the last blog but a lot has happened since then which I’m excited to talk you through now. I am happy to report here that the Tumbller robot finally did arrive and I was able to collect it and bring it home last week. I was worried for a while that it might not show up at all this college year and that we would have to finish our design module with next to no physical design. Thankfully this isn't the case though.

Building the robot was actually quite fun and took me back to building things as a kid, although the Tumbller is a bit of a step up from Lego. I was pretty impressed with the standard of the parts and how well it was presented and put together. Everything you need was provided in the box, including a small crosshead screwdriver. The full range of parts and electronic components are shown in the image below.

Parts and Components of the Tumbller

The whole building process was very quick and easy especially with the instructions provided in the box. Everything is held together with screws of different lengths and diameters as well as the copper columns that build the frame of the robot.

The electronic components were also very simple to put together, with most of them already attached to the expansion board. The two components that had to be fitted were the GY-521 module, which holds a gyroscope, accelerometer and a digital motion processor (DMP), and the ultrasonic sensor. Both of these were also easily fixed through screws or just being pushed into place in the case of the ultrasonic sensor.

Finally I did the wiring, connecting the battery to the expansion board to provide power to the Arduino and the other components. The motors were individually also connected to the expansion board which you can see in the images below.

Electronic Components and Wiring

That was the entire build and the next image shows how it all turned out in the end. You probably don't need me to tell you which is the real Tumbller and which is the CAD, but all the same I’m very happy with how close I got in my SOLIDWORKS model.

The Full Tumbller Build — (The right is the CAD for those still not sure)

I was pleasantly surprised to find out that the code for the Tumbller has been preinstalled and that all I needed to do was charge up the battery to get it going. The different functions of the Tumbller are also very easily activated on the robot. This can be done through an app called ELEGOO BLE TOOL, via Bluetooth, or by pressing the push button on the front of the robot a specific number of times.

The list of functions that come preinstalled are as follows, Standby Mode, Obstacle Avoidance Mode, Glowing Mode, Auto Follow Mode, Bounce Mode and Mobile Mode.

Mobile mode is where the robot is controlled via a virtual joystick (rocker) through the app. This as well as the bounce mode, where the robot tilts forward and then bounces back up into balance as well as the lights from glow mode are demonstrated in the following video.

I also tested the auto follow mode to make sure that the ultrasonic sensor and the two IR sensors were working. In the video below you can see the robot detecting an obstruction (my hand) and following it. The ultrasonic sensor allows it to ‘see’ straight ahead and the IR sensors allow it to detect objects more to the left or right. Together the sensors enable the Tumbller to follow and turn well as demonstrated in the video.

Although I knew that the Tumbller was working well, I did want to get the hang of programming the robot myself, so I wrote out some simple code to see if I could get it uploaded.

I kept the global variable names as they were in the original Tumbller code and simply included the .h file in my own. I then defined the input and output pins for the motors (which have encoders) and the ultrasonic sensor. This is shown in the image on the left. I also created some functions for the motors and ultrasonic sensor shown on the right.

My Tumbller Code

Finally I got the the ultrasonic sensor readings to convert to centimeters and displayed them through the serial monitor. I also made it so that the Tumbller only starts once the ultrasonic sensor gets a reading closer than 10cm. (You can clearly see it work in the image below as monitor showed ‘Tumbller Start!” once the distance reached 7cm) The variables I put into the motor functions should make the Tumbller move forward for three seconds, then stop for three seconds and then drive again for half a second.

Because I took out all the self balancing code that was original code (and there was a lot of that), I had to add a stabilisation wheel to keep the Tumbller upright. The motor speed was made so slow because the stabilisation wheel is a bit too big for the robot. This makes it tip backwards if the speed is any higher. The video below will show you the code in action. (I didn’t actually add a siren to the robot, it was just bad timing)

Although this caster wheel has done the trick for the moment I still want to build the one I designed myself and presented here. I have been extremely busy lately but I’m really hoping I do get a chance to get round to that.

I hope you enjoyed reading through this as much as I did finally doing some hands on design work. Now I’m going to be doing some more work on my code because we did actually get more details on the obstacle course for the Tumbller, so that’s the next step.

I’ll update you guys on that real soon.

…..

--

--