Introduction: Robot Arm With MSP430

About: Hi! I'm a Ph.D Electronics & Telecommunications engineer. I'm interested in microcontrollers, programming (C, Python), retro computers, embedded systems...

Hi, in this instructable we'll see how to control a plexi robot arm (4 Servos) with the help of the MSP430G2ET Launchpad and 4 potentiometers.

For the project I used the plexi arm in the following link, however there are many different sites that sell the exact same or similar product as well:

https://www.robotistan.com/plexiglas-robotic-arm-a...

I'll not go through the assembly of the robot arm since it's really hard to accomplish, however there are many manuals & video you can go through. Please check the description in the video for links.

Supplies

MSP430G2ET Launchpad, 4 Potentiometers (I used 10K), Jumper cables, breadboard, toggle switch (not mandatory but is good to have), 5V Power supply for the servo motors (I'm using a power bank)

Step 1: Connections & Code

Let's see the connections to our launchpad:

The output of the potentiometer that feeds the clamp servo --> P1.0 on the Launchpad

The output of the potentiometer that feeds the right servo --> P1.4 on the Launchpad

The output of the potentiometer that feeds the left servo --> P1.5 on the Launchpad

The output of the potentiometer that feeds the center servo --> P1.7 on the Launchpad

The PWM pin of the Clamp Servo --> P2.1 on the Launchpad

The PWM pin of the Left Servo --> P1.6 on the Launchpad

The PWM pin of the Right Servo --> P2.2 on the Launchpad

The PWM pin of the Center Servo --> P1.2 on the Launchpad

You can connect a toggle switch to the P1.3 pin on the Lauchpad, or use the on-board button on the launchpad for this purpose:

Since The MSP430G2553 has a single timer moduel (TimerA), we can create two Hardware PWMs, so in the code that I provided, I made a switch mechanism so that if the button connected to the P1.3 is NOT PRESSED : you can control the center and clamp servos and if the button connected to the P1.3 pin IS PRESSED : you can control the left and right servos. The detailed explanation is given in the video.

Make sure that you have an external 5V power supply for the servos.

By this setup, you can use the code that I've written:

https://github.com/selimg76/microcontroller/blob/m...

If you like the content please subscribe to my YouTube channel for similar tutorials and projects.

https://www.youtube.com/c/drselim

Thank you for your time, and see you in another instructable & video...