close-circle
Close

Day 6: Base bearing and Axis 2 (pcb and motors)

A project log for Building the Thor+ robot arm

Building a 6-axis robot arm based on the AngelLM's Thor robot and the add-on's and improvements of dannyvandenheuvel.

Sepio 08/16/2017 at 13:537 Comments

Yesterday the bearing 16014 arrived from eBay. It did cost $14.04 shipping included. It's a russian bearing. The quality is very good.

Tonight the printer printed ART1BODY_P2.stl. This morning I found out that one of the very thin walls had collapsed. But after cleaning the print it is nice enough to be used.

I created the supports with Meshmixer. They look nice. I have some trouble printing thin lines  (like the support structure in Cura) with PETG filament. Cura doesn't have a setting for this material type. I use the CPE profile. 

By using Meshmixer support I could create another type of support structure. This looks very nice, doesn't cost much material and is easy to remove.

After cleaning this part I was ready to temporarily mount the stepper motors.

First I had to remove the screws from the stepper motors and then I replaced them with M3x30 and M3x35. I didn't have M3x35 so my top screws are too long and will be replaced tomorrow.

UPDATE: Please look at day 7 for a better and easier way to mount the motors.

After mounting the motors it was time to create the custom PCB with the connectors. An 24 wire slipping will be added in the future.

The wires will get some color codes. The polulu stepper motor driver male header pins have the same colors. (So the red coded wire will be inserted in the red connector and will be driven by the red polulu).

The two green connector pins are connected on the underside of the PCB. The 0V and 5V from the Arduino connector are connected to the Fan connectors. The male header pins below the Arduino connector can be used for debugging purposes. 

Make sure you leave some room for the ring that will be mounted on the underside of the PCB.

The PCB is mounted on the ring with some distance between them (to make room for the slip ring and its wires).

Axis 1 can be fitted on or removed from the base.

Discussions

Olaf Baeyens wrote 08/16/2017 at 17:37 point

If you want to toy with the software yourself, these are the 2 core parts of the code that will take you off. These are specially developed for the Ultratronics board. There is tons of information on the Arduino Uno and Mega but almost nothing for the Arduino Due.

This is a timer function to drive your Arduino Due at a constant speed.
I intend to use this as the motor driving control loading from a queue buffer of predefined step commands.

https://hackaday.io/project/16483-building-the-thor-robot/log/59688-motor-control-the-timer-interrupt-driver

This contain the code to simultaneous drive all 7 Polu drivers SIMULTANEOUSLY at the fastest possible rate.

https://hackaday.io/project/16483-building-the-thor-robot/log/60372-development-controlling-the-stepper-motors

Usage is like this:

// Enable the Motor Z and Motor Y only, all other motors are disable.

SendMotorEnableCommand( MOTOR_BIT_Z | MOTOR_BIT_Y);

//  Set direction of motor Z and Y to bit 1 all other motors in the other direction.

SendMotorDirectionCommand( MOTOR_BIT_Z | MOTOR_BIT_Y);

// Step motor Z, Y and E2 in the direction you have set above

do

    SendMotorStepCommand( MOTOR_BIT_Z | MOTOR_BIT_Y | MOTOR_BIT_E2));

while (true)

Just a remark, use the code at tour own risk! Also realize that apparently the C libraries are not completely ported to the Arduino Due. I had a situation where the compiled code appears to be buggy. It is probably because I am spoiled at C++ on a windows PC and not realize that the C++ on a Arduino may not have a good memory manager implemented. Code that works on a PC may not function on the Arduino.

  Are you sure? yes | no

Sepio wrote 08/16/2017 at 18:08 point

Thanks, I already saw your code. But I have to wait for the slip ring to arrive. If I use your code now I’m sure that I will mess up my wires.

  Are you sure? yes | no

Olaf Baeyens wrote 08/16/2017 at 20:40 point

It is indeed dangerous to use.  I test the software first with stand-alone motors. I also tested my motors in a partially assembled parts. I unplug and plug in the motors I want to test.  You can unplug the base motors  in this case.

Originally I tested with the debug led only. Later I discovered the logic analyzers that you can buy for $10. The biggest part of my development I used was without motors but using this logic analyzer to see if the code does what it is supposed to do.

For your information, the pins under the Polu drivers are the ground, the direction, the enable and the step pulse (I don't remember the order).

  Are you sure? yes | no

Olaf Baeyens wrote 08/16/2017 at 17:14 point

Good choice to make it a black base. If I recall there was an issue where photo detectors did not work correctly because the plastic was too translucence.

  Are you sure? yes | no

dannyvandenheuvel wrote 08/16/2017 at 17:00 point

Fine! enjoy your last week, if we ever meet we drink something on it :-)

  Are you sure? yes | no

dannyvandenheuvel wrote 08/16/2017 at 15:31 point

Fantastic work! very good log, that's what I missed, I don't have to disassemble mine anymore, they can all follow your build! I will post forward to your place if they want to build one to. Top! Soon all electronics/software will be released so you can go as far as I am with the project! Automatic moving the robot arm is not ready for the moment because I'm still writing on my Robo GUI software. But you can do all movements with joystick without problems. I'll allready connected to the GUI controller and can see all feedback sensors and simulate the movements. It's just the recoder that I have to develop, It's gonna be a graphical designer like the famous blockly, scratch software from google. I need more time ;-( At the same time I'm building a robot arm with smart servos.

  Are you sure? yes | no

Sepio wrote 08/16/2017 at 16:22 point

Thanks. I really like this project. Time flies...

This is the last week of my holiday. Next week I will have to go to work and then I will also need more time. Also the large prints will then have to wait for the weekend. Now the printer is on 24/7.

I can’t wait to look at your source code. In the beginning I want to use it as is and learn how you control al those motors and sensors. In the future I might (try) to do the coding myself. 

  Are you sure? yes | no