Since I've joined Build AI for IoT with Infineon competition I'm lucky enough to receive their PSoC™ 6 62S2 Wi-Fi BT Pioneer Kit & IoT Sense Expansion Kit for my proposed project, a desktop robot arm. Normally, most robot arms rely solely on vision and pre-coded commands to function, but with the potential capabilities of Infineon's PSoC, I plan to utilise its AI and voice recognition features for easy and simple control of the arm with just my voice.
I've decided to name the project "Armo". Before receiving the Kits I drafted ideas on how I wanted Armo to look on paper, this way it is easier to model in Fusion 360. The arm was originally supposed to have 6 Degrees of freedom, with each axis containing an amplifying gearbox to increase torque and precision. Almost all parts of the arm are 3D printed except for support rods which are cut from 5mm diameter steel rods, and M3 bolts and nuts to lock the whole assembly together
Here are all the Steel Rods and Bolts you'll need
Steel rods (5mm in diameter)
- Base: 20mm x6
- Axis 1: 25mm x3
- Axis 1: 15mm x4
- Axis 2: 21mm x4
- Axis 2: 21mm x4
- Axis 4: 265mm x1
M3 bolts
- Axis 1: 8mm x4
- Axis 1: 45mm x6
- Axis 2: 8mm x4
- Axis 2: 40mm x6
- Axis 2: 45mm x5
- Axis 2: 50mm x4
- Axis 3: 8mm x4
- Axis 3: 25mm x4
- Axis 3: 45mm x9
- Axis 4: 8mm x4
- Axis 4: 25mm x4
- Axis 4: 35mm x4
- Axis 4: 45mm x4
M3 nuts
- x70 nuts should be sufficient
M4 bolts
- Axis 5&6: 8mm x4
M4 nuts
- x4 nuts should be sufficient
All parts are printed in black PLA with 20% infill except for gears which are printed in 80% infill.
After assembling the printed parts with stepper motors and steel support, I utilize a python GUI Asgard.py to test the movements of Armo. I've made the realization that Axis 2 does not provide sufficient torque to sustain the arm in full extension, thus I've adjusted to remove Axis 3 and the arm link between Axis 2 and 3 to make Armo a 5 DoF robot arm.
The robot arm is powered by 6 motors:
- 3 Nema17 stepper motors (controlled by Arduino UNO compatible CNC shield)
- 2 28byj-48 stepper motors (controlled by ULN2003 driver board)
- 1 SG90 servo motor
All motors are controlled via two Arduino UNO boards, one board being the master and the other being the slave. The master receives G-code angle data from the computer and parses the angles, it then drives Axis 1-3 while sending angle data for Axis 4-5 and the gripper via I2C protocol.
G-code used is formatted like this: "M0 A0 B0 C0 D0 E0", where
- M = Angle for Gripper servo
- A = Angle for Axis 1
- B = Angle for Axis 2
- C = Angle for Axis 3
- D = Angle for Axis 4
- E = Angle for Axis 5
An example of a valid G-code being sent to the Arduino can be "M80 A60 B-30 C90.0 D30 E-60.0"
Note: Axis 1 & 2 are driven in 1 step, while Axis 3 is driven in 1/16 step. This is to reduce noise on the steel transmission rod. You can change the steps on the driver by putting a jumper in the setting pins under the driver modules.
The role of the PSoC™ 6 62S2 Wi-Fi BT Pioneer Kit and IoT Sense expansion kit in Armo is to receive voice commands, after reviewing their provided PicoVoice tutorials I managed to make the PSoC board and IoT sense's mic recognize my custom commands. Just clone the repository I made and upload it to your PSoC™ 6 62S2 Wi-Fi BT Pioneer Kit, make sure it has the IoT Sense expansion Kit attached in order to enable microphones.
All my code is provided in this repository. Upload the following codes into their respective boards
- "Robot_Voice_Command" repo into your PSoC board
- "Uno_master.ino" into the master Arduino UNO board
- "Uno_slave.ino" into the slave Arduino UNO board
Make sure you edit the com port number of the PSoC board and Arduino master board in lines 7&8 of Armo.py before you run it.
Once you have the arm, circuit, and code all set up, you can now control Armo using your voice alone!
Apology to InfineonI would like to apologize to the Infineon team for not being able to deliver on what I originally proposed. I truly had the intent to give Armo computer vision and AI capabilities. However, due to my insufficient knowledge of C language and inability to fully understand ModusToolBox I am unable to make use of all the components within the PSoC board. That is why I resorted to modifying the provided the PicoVoice example codes to fit my needs. Add to the fact that I was caught up in the middle of my mid-term exams while in the late stages of Armo, my time was very much limited. I had tried to use Darknet's YOLO as a framework for Armo's computer vision, but after countless hours of sitting in front of my computer debugging, I'm still not able to train my model successfully, and with the hours till submission down to 2 digits, I had to move on. I only ask to keep my PSoC and IoT expansion kits because I wish to learn more about them and eventually make full use of their potential. Thank you.
Comments