Building a Robotic Arm — Part 1

Introduction

Apparently a quarter life crisis is a real thing. Not wanting to miss out on this phenomenon I decided to build myself a robotic arm. Not the sort of arm that replaces a missing limb, but the sort that are used in factories around the world to pick, place, and construct products.

Unfortunately living in an city quickly shrunk my dream of building a giant robot to a more apartment friendly size. Probably for the best!

I have absolutely no idea what I will use a robotic arm for. I suspect the desire to make one came from watching Simone Giertz and her “Shitty Robots”. These robots are designed to complete a single task, but instead fail spectacularly often resulting is a huge mess.

Since I am mainly interested in electronics and software I opted to buy a kit for the mechanical parts. There are several options out there; searching ebay, amazon, and Alibaba for “robot arm” yields 1000’s of sensible results. Most variants are built around standard hobby servo motors that are typically used in remote control cars and planes. While these motors are not exactly known for their repeatability, smoothness, or accuracy they are very cheap!

I opted for a “Mirocle Aluminium Robot 6 DOF Arm” from amazon which was £22.50. Unfortunately it has subsequently gone out of stock, but searching ebay for “6 DOF robot arm” gives many identical kits.

My kit, like most of the ones I saw, did not come with servos. I ended up buying six super cheap “Tower Pro MG996R” clone servos off ebay for £21.50 delivered. Given the price the servos are actually of reasonable quality, and have metal gears. However, if you are not a cheapskate like me, buy better servos!

Tower Pro MG996R servo with top removed

The servo horns supplied with the servos were plastic. I believe my robot arm kit was supposed to come with some replacement metal ones, but they weren’t in the box. Instead, I purchased some metal ones off ebay relatively inexpensively.

Now I had everything I needed to build the mechanical assembly of the arm. I was very happy to find that no instructions were included with kit. Figuring it out myself is much more fun 🙂

All the parts ready for assembly (Knolling)

Click below to read the next post:

Part 1 — Introduction (You are here)
Part 2 — Building the Mechanical Assembly
Part 3 — Designing the Electronics System (Pending)
Part 4 — Developing the Microcontroller Software (Pending)
Part 5 — Developing the PC control software (Pending)

One Day Builds — Enigma Machine Emulator

Enigma Machine By Alessandro Nassiri CC BY-SA 4.0

I went to Bletchley Park last week for a fascinating day trip. Bletchley Park was the location where the British code breakers were based during World War II. It was from here that Alan Turing and many other incredibly gifted mathematicians, statisticians, and translators worked tirelessly throughout the war to continuously crack and decrypt the messages sent by the Germans.

During the war the Germans used several variants of an electro-mechanical rotatory cipher machine known as the Enigma machine. The Germans believed the encryption generated by these machine to be unbreakable. Theoretically there were in the order of 1.07 x 10²³ possible combinations for the Wehrmacht (Army) version of the machine. Fortunately (for the Allied forces) a weakness in the encryption method could be exploited and using a clever technique, alongside a custom build electro-mechanical device known as the Bombe, the message could be decrypted.

To learn a bit more about how the Enigma machine worked I decided to make an Enigma Machine Emulator in C. Read More

Using an HD44780 alphanumeric LCD screen

The Hitachi HD44780 is an LCD screen controller used to control small alphanumeric LCD displays. Many cheaper displays don’t actually use the HD44780 IC. However, they use the same pin-out and control scheme, and therefore can be operated in the same manner.

Connecting the display

Most screens use the following pin-out, however it is best to refer to the screen’s datasheet if available.

1.  Ground
2.  VCC (Normally 5V)
3.  Contrast adjust input (Voltage between VCC and GND)
4.  Register select (For a command RS = 0. For data RS = 1)
5.  Read/Write (To write to the display = R/W = 0. To read = R/W = 1)
6.  Enable
7.  Data bit 0 (DB0)
8.  Data bit 1 (DB1)
9.  Data bit 2 (DB2)
10. Data bit 3 (DB3)
11. Data bit 4 (DB4)
12. Data bit 5 (DB5)
13. Data bit 6 (DB6)
14. Data bit 7 (DB7)
15. Backlight +
16. Backlight -

The screen has 3 main control lines. RS, R/W, and Enable. The RS and R/W lines determine the operation of the screen, as shown in the table below.

The Enable line acts like a clock signal. To clock data in or out of the display the enable line should be set high for 1uS. The enable signal is registered on the falling edge.

The screen has 8 data lines which are used to both read and write data to and from the display. The screen can also operate with 4 data lines, where only DB4, DB5, DB6, and DB7 are used. In this case DB0 to DB3 can be left unconnected. This article will only cover operation of the display using all 8 data lines. Read More