10. Machine design and Mechanical Design

Project Planning

With this motivation in mind, I divide the development of the project into four major Steps:

  • 3D Printing of the hand
  • PCB production
  • Programming
  • Integration and Testing

Talking to my tutors I set the schedule of daily activities

My schedule for this week

Assignments

This week assignment was divided in two main topics (Machine Design and Mechanical Design)

  • Group assignment (Machine Design)

    • Design a machine that includes mechanism + actuation + automation
    • Build the mechanical parts and operate it manually
  • Group assignment (Mechanical Design)

    • Actuate and automate your machine

The main idea of this weeks is to make a robotic hand that can be controlled using a APP The motivation for this week can be seen in the figure below

Image1 - Luke Skywalker mechanical hand

3D printing

For the building of this project, it was necessary a 3D model of a hand that was actuated by servo motors, so for that it was used the thingiverse site that has many 3D models. The Model that was used in this project was the Humanoid Robotic Hand which can be easily downloaded from the thingiverse by clicking on Download All Files.

Image2 - Hand model on thingiverse

With the 3D models it was necessary to slice the pieces in the slicer, the Sindoh software was used to perform this process. The pieces and configurations used were:

  • Fingerdesign_ALL

Image3 - Fingers

  • Forarm_9-2

Image4 - Forarm 1

  • Forarm_9-3

Image5 - Forarm 2

  • Hand5

Image6 - Hand

  • Hand5Thumb3

Image7 - Thumb

  • Servo_Hold

Image8 - Servo Hold

  • ServoHorn

Image9 - Servo Horn

A 0.2 mm high layer was used to shorten the printing time, the nozzle temperature was 210 ° C with a print speed of 60 mm/s and table temperature of 60 ° C, the filament used was the PLA. A 30% fill was used so that the pieces had a little resistance and less printing time.

Image10 - Printing the hand parts

The parts had a total printing time of 23h and a total of 200g of filament was used.

Video1 - Printing the Hand

Power source box

The source box (PCB and power supply case) was modeled in Solidworks, it is divided into 3 parts which are: - Box

Image11 - Power source box

  • Right side cover

Image12 - Right side box cover

  • Left side cover

Image13 - Left side box cover

The source box is responsible for storing the source and the circuit board.

Image14 - Mounted box

PCB Development

Electrical Diagram

To facilitate the use of the component, as well as to increase the reliability in the connections between the pins of the circuit, a PCB was created to be used with the ESP32 allowing also to organize the connections with ease. A 127 to 5 V and 3A power supply, which I had in the laboratory, was also used to enable power without the need for a bench voltage source or other machines.

Image15 - Circuit diagram

Proteus

For the creation of the diagram, the Proteus software was chosen, as it is already known and used as in the previous activities. For this board, the tracks are required to connect the ESP32 pins to output pins for possible necessary adjustments or future uses and between the specific pins used for the communication between the servos and the board.

Image16 - Schematic in production

Image17 - Final schematic

List of components for the board: - 1 ESP32 - 4 Molex 8 pin connector male - 5 Molex 3 pin connector male

Ares

With the schematic of the electrical circuit diagram done, the next step is to design the board. For the design of this board, it was decided to make the tracks in direct lines external to the board area, with the pins of the Molex connectors to facilitate its design and internal tracks to the ESP board area for the servo motor connectors facilitating the identification of the ESP pins for the servo. As there is no footprint model available in the software library, but the distances between each pin are equal to the distance between the pins of the digital connectors then the only necessity would be to adjust the distance between the side pins on each side of the ESP32, to find this distance, a pachymeter was used.

Image18 - Measure with pachymeter

Then, after checking the distance values, the headers pins were positioned to ensure the distance and area of the plate and ensure that the plate would fit, only then were the other elements of the plate as components and tracks. As plate configurations, 1mm track thickness and 0.5mm drill diameter were selected.

Image19 - Final Board

Preparation of steps

Having saved the plate files, it was necessary to separate the steps:

  • traces
  • holes
  • edges

Mods

Having each image of each process ready, the next step was the preparation of the files in RML, making use of the platform on the website mods.cba.mit.edu(link), through the program available on the server: Rolando mill SRM 20: PCB svg.

The settings for each stage were as follows:

Image20 - traces settings

Image21 - holes settings

Image22 - edges settings

For all stages, the coordinates of origin were chosen at point X, Y and Z = 0, and home for X and Y = 0 and Z = 10 mm.

Image23- milling settings

Image24 - Mods settings

Production

Then, having prepared the files, they were loaded onto the machines, making use of each file in its proper order, obtaining the following board:

Video3 - PCB Production

Them I got the final PCB

Image25 - Board finished

ESP32 programming

The Arduino IDE was used to program the ESP32, to use this card it is necessary to add the URL of that card in preferences, in the same way that was done with ESP8266 previously.

  • https://dl.espressif.com/dl/package_esp32_index.json

After adding the URL it was necessary to install the card in the card manager in the same way as with ESP8266 previously.

Image26 - Board manager

With the card installed, the libraries that will be used were installed.

Image27 - Libraries

To add the libraries, it is necessary to go to Sketch, then include a library and finally click on Manage libraries to add the ESP32Servo and PubSubClient libraries.

Image28 - Libraries manager ESP32Servo

Image29 - Libraries manager PubSubClient

With the libraries installed, ESP32 programming started, which is divided into:

Image30 - Including libraries and servo

  • Inclusion of ESP32Servo, PUBSUBClient and Wifi libraries, in addition to adding servo objects.

Image31 - Creation of variables

  • Creation of the msg variable and the various ssd, your internet password, the name of your network. It was also created several variables that have the addresses of the subscribers and the id of esp32.

Image32 - Adding broker

  • Add the broker address to the BROKER_MQTT variable and assign port 1883 to the BROKER_PORT variable. Creation of the initMQTT, mqtt_callback, reconectMQTT and VerificaConexaoMQTT functions.

Image33 - Selecting broker ports

  • Inform which broker and port should be connected in MQTT.setServer and assign a callback function (function called when any information from one of the subscribed topics arrives) in MQTT.setCallback.

Image34 - while and if blocks

  • When any information from one of the subscribed topics arrives, the message will be converted to the msg string using the for loop.
  • The if decision structures, condition the topic received to the topic of the corresponding subscriber, within the if the convention of the variable msg for interior is carried out and the value is written on the servo.

Image35 - Functions

  • The reconnectMQTT function checks whether MQTT.connected is connected to the broker.
  • The if decision structure checks whether the ESP32 is connected to the broker, if the connection is made, the subscription topics are started, otherwise the connection attempt is made again in 2 seconds.

Image36 - VerificaConexaoMQTT function

  • The VerificaConexaoMQTT function is responsible for verifying whether MQTT.connected is connected to the Broker, if there is no connection with the Broker, the connection is re-established.

Image37 - Setup Function

  • In the setup function, the serial is started, so that we can view program information, ESP32 also connects to the wifi network. The servos that will be used to control the fingers are declared with their pwm ports that will be used and the initMQTT function is initialized.

Image38 - loop Function

  • In the loop function, the VerificaConexaoMQTT function starts, to continuously check if the connection is being made and MQTT is in a loop.

MQTT Dash

The MQTT Dash application was used as a publisher in this project, the application allows me to create buttons, text for use by publishers or subscribers and it is also free. The connection of the application with the broker and the creation of ranges for publication were carried out as follows:

Image39 - add dashboard

  • Clicking on the plus symbol has started adding a new dashboard.

Image40 - Naming the dashboard

  • The name of the dashboard and the address of the broker that was used was added and these settings were saved.

Image41 - Showing the dashboard

  • The new dashboard can be viewed on the home screen.

Image42 - adding range/progress

  • Clicking on the dashboard it is possible to include options that will be used as publishers, the option used was Range/progress.

Image43 - Adding name and topic of publication

  • The name and topic of publication has been added and the maximum and minimum value of the ranger has been modified.

Image44 - Repeating the operation for the other fingers

  • Once saved, this operation was performed for the other 4 fingers and the tests were performed.

Integration and Testing (Assembly of hand and servomotors)

Hand assembly

The assembly was divided into the following steps:

  • For the assembly, a shock cord was used to secure the fingers to the hand.
  • Glue was used to hold the Forarm_9-3 piece to the hand.
  • The ServoHorn piece was placed on the servants.
  • The Servo_Hold part was screwed to Forarm_9-2.
  • The line of parts was used to attach the fingers to the pulleys that are attached to the servo motor.
  • The servants with the pulleys were placed in the Servo_Hold.
  • A fishing line was used to connect the fingers with the servants with the pulleys.
  • Final adjustments were made, and the hand was ready.

The video with the montage is available on the channel of the original developer of this project, which is Making a 3D Printed Humanoid Robot.

Image45 - Assembly of the Hand

Video2 - White Hand

Then we perform the hand painting and carry out the final tests on the system.

Image46 - Hand painted

Video3 - Hand Working

Video4 - Hand Working 2

Video5 - Hand Working 3

Outlined problems

  • when I put all the pieces together at once to print in the 3d machine, the power turned off of the laboratory and I lost all the printing, so t I decided to print the parts of the mechanical hand individually

  • The first idea was to model de mechanical hand, but it was not possible to do in this week assignment. I download a file from the thingiverse and was very difficult to put the fishing line in the fingers.

Conclusions

This was a fun week that I had the opportunity to make a robot hand, the process was very challenging due to the programming part. To help in this process I use 3 links as references 1,2 and 3.

  • All the files done in this week assignment can be find in the repository

3D Printing

PCB Production

Programming

Future Development Opportunities

  • Learn Flutter/Dart

  • Make the code more efficient

  • Make the arms of the project