PROJECT: Remotely Control Arduino Robot Arm Using IMU Sensor over Bluetooth

IMUcontroller.jpg

So I got started with my next Arduino robotics project based on a cheap bluetooth module and IMU sensors. Also, to stay true to the spirit of the project, I used an Arduino Nano clone and all the cheap parts you can buy from the internet.

If you decide to follow my project, there is a strong chance the exact same parts will not be available and the alternate parts choose will lead you to a new set of problems. This I think is a very important thing to learn as an engineer. I always have to remind myself this too - The skill of an engineer is to be able to “Think” and “To Solve Problems”. Engineering is all about solving problems. Being able to anticipate the unknowns and/or unexpected problems and build it into your project is a key part to a successful project. This means, doing proper research ahead of time, learning from your & other people’s mistakes, estimate your timeline and cost knowing some parts will go bad and need to be re-built/re-purchased. Through out my career, I’ve seen (and responsible for) too many failed projects due to bad planing and estimation. After that, the “Persistence” to stick to the problem no matter how impossible it seems and how frustrating it gets.


Day 1 - 5/23/2021

The goal of the project is to be able to “remotely control the 4DOF Robot Arm using hand gestures”. The approach I am going to take is to leverage the Inertial Measurement Unit (IMU) sensor to read the x, y, z axis movement data of my hand and send the movement command to the Robot Arm over the bluetooth.

The parts I ordered from Amazon arrived and it was time to get started.

  • Lafvin Arduino Nano clone - Link

  • HiLetgo HC-05 Bluetooth Master Module (this module can be configure as both master or slave) - Link

  • HiLetgo HC-06 Bluetooth Slave Module (this is a slave only module that is exactly same a the one that came with my Lafvin 4DOF Robot Arm kit) - Link

  • HiLetgo GY-521 MPU6050 3-Axis Accelerometer Gyro Module - Link

As a part of the process of starting a project, I started by testing the parts. During this process, I will also identify any specific configuration and/or modification requirements for the parts. As expected, I started running into the issues.

I normally don’t like giving a specific answer to a problem as I believe the learning/understanding can only come from an engineer finding and solving the problem themselves. However, in some cases, the barrier to entry is just too high or difficult preventing a learner from getting started. I figure this is the time when a handholding is most needed.

There are many reasons why an electronics or software projects will not go right. In fact, this is the case for majority of the projects and an experienced engineers learned to deal with the frustration and calmly keep pushing forward. Here are some of the things to check if you are having issues with uploading your sketch (program code) to the Arduino Nano clone.

  1. Try selecting Board as “Arduino Uno” instead of Arduino Nano and try uploading the sketch.

    • This was the problem I ran into and following was a quick workaround to continue testing the board. After uploading a sketch with “Board: Arduino Uno”, I changed it back to “Arduino Nano”, and selected “Processor: ATmega328P (Old Bootloader)” and uploaded the sketch again. This made it work for now, but I will have to update the bootloader later.

    • Update: bootloader updated using the instruction - https://www.arduino.cc/en/Tutorial/BuiltInExamples/ArduinoISP

  2. USB Driver issue or wrong processor

  3. Other common Arduino Nano clone problems


Planned Next Steps - Work In Progress

  • MPU 6050 - setup and reading data - Done

  • Bluetooth HC-05 Master setup & connection test - Done

  • Align MPU data to the robot arm movement & test drive - WIP



Previous
Previous

PROJECT: ROS2 Using Neato BotVac D5 Connected Robot & 8GB Raspberry Pi4

Next
Next

PROJECT: Arduino 4DOF Acrylic Mechanical Robot Arm Kit