2014-12-18

Simple IK

I came over this link while looking for a simple IK to drive a simple 3DOF robot arm I am making for work.

There is also this youtube video.

I have shamelessly copied his code here, and I intend to improve upon it for my own project and maybe post an update.

const float cx=2; //coxa
const float fm=6.2; //femur
const float tb=8.3; // tibia
float L, L1;
float alpha, alpha1,alpha2,beta,gama;
void setup()
{
 Serial.begin(9600);
}

void loop()
{
trigono_xyz(2, 4, 6); //contoh x,y,z
Serial.print("gama= ");
Serial.print(gama);
Serial.print(", alpha= ");
Serial.print(alpha);
Serial.print(", beta= ");
Serial.print(beta);
Serial.println();
}

void trigono_xyz(float x, float y, float z)
{
 L1=sqrt(sq(x)+sq(y));
 gama=atan(x/y)/PI*180;
 L=sqrt(sq(L1-cx)+sq(z));
 beta=acos((sq(tb)+sq(fm)-sq(L))/(2*tb*fm))/PI*180;
 alpha1=acos(z/L)/PI*180;
 alpha2=acos((sq(fm)+sq(L)-sq(tb))/(2*fm*L))/PI*180;
 alpha=alpha1+alpha2;
}

2014-08-20

Reading Emcotronic M1 roms

I have sucessfully read the roms from the M1 mainboard using the TOP853 rom programmer.

The process was surprisingly smooth. I was prepared for all sorts of problems along the way, but it just worked. Uncanny...

I ran the TOP853 software from virtualbox to read the roms into .bin files and then i used bokken from the ubuntu repos to parse and look at the files. This is how I did it:



Open the chip select dialog in TOP853.

Type in 27256 and select EPROM.

Select a long delay for reliable reading.

Start reading the chip into the buffer.

Save the buffer to .bin file.
 
Open bokken and select the .bin file.

You can browse the dis-assembled code.
 
You can view the strings table.
The plan ahead now is to buy a few replacement roms (modern variants with identical pin-out) and copy the images over and see if they work. Once they work I can start modifying the code slightly.

Figuring out what to change in the code and where might seem harder than it is. I thought about ho to do it and I came up with the idea that the strings tell me something about what the code does, so all I have to do is to follow the strings and see which code pushes the strings around. Next I just identify which strings relate to which functions (such as loading/saving MSD data) and hijack those routines by jumping to an unused location where I have some space for my own code.

Well in theory at least.

TOP853 rom writer under Ubuntu

The TOP853 rom programmer arrived a few days ago and I just had the chance to check it out.

Since I run Ubuntu as my primary desktop OS, I thought it would be nice to see if I could get it working there somehow. Unfortunately the programmer is married to a proprietary windows-only software, and installing that under wine was a futile endeavour.

I ended up installing a small XP 32bit image under virtualbox. I had to install guest additions, add my user to vboxuser group and reboot to have USB working. I identified the USB device by detaching it and reattaching it and seeing which entry in the list of devices changed in the vbox USB filter settings.

TOP853 running in XP 32bit in virtualbox under Ubuntu.

Mor on this soon.

2014-08-03

Emcotronic M1 EPROM + Static RAM + CPU

Small update on the EMCO.

After posting a few inquisitions on practicalmachinist.com and cnczone.com (major cnc related forums), without a single response at all I felt a bit discouraged. But to quote someone special; "When I get sad, I stop being sad and be awesome instead".

So now I have dragged out all the cards from the M1 computer and started probing them for intel (pun intended). It looks as though the card with the reset button at the back, called "R3D415000", or "Datacontroller" is the culprit.



Big picture
Unfortunately none of my cameras are operational at the moment, so only a stolen picture.


It features among other things the following IC chips:

I haven't bothered listing the rest of the chips as they seem to have lower level functions.

I have also ordered a cheap eprom programmer that supposedly handles the 27256 chips on this card. The plan is to read them in and look at the code (should be in x86 machine code, which there are lots of tools for). If I want to fiddle with it, I can probably write the possibly updated changes to more modern eeprom chips of the same spec that go into the sockets on the card. If I get anywhere with this, I will try to patch the code so that I can run my own subroutines attached to button clicks on one of the inert buttons in the display (there are at least two buttons with no symbol on them, that I guess are just legacy/future-proofing).




2014-07-23

Body material and structure

I have been bending my brains on the matter of how to build the robot body. There are so many options for materials, structures and methods each with their own benefits and downsides. So after contemplating for a while I realized I needed to summarize what parameters are important for my robot before proceeding.

Toilet paper roll robot


I want the robot to be robust to the point that it can roam and tumble about in unknown terrain without wearing down or breaking. This includes the occasional fall and crash.

I want the robot to be energy conservative. This means indirectly that it should be relatively light, so it does not have to drag around a lot of unnecessary mass.

I want the robot to be very flexible in its degrees of freedom, acrobatic if you will, so its limbs may be very slender with long ranges of motion.

I want the robot to be precise in its motion and sturdy. A lot of this comes from the ability of its body to remain composed in any configuration, and not wobble or bend.

It would be beneficial if it is easy to work with the chosen materials, and that they are not prohibitively expensive to acquire, so that I can play with prototypes before deciding on a final design.

In the far end of the spectre, I want it to be hard to detect on radar, have a neutral heat signature and resist heat,  shrapnel and projectiles from conventional weaponry. OK, so I watched too much mech anime.

So what options exist?

carbon fibre profiles


We could use Aluminium, Stainless Steel, Carbon fiber, Glass fibers, Plastics, Nylon, Wood, ...

We could create a cage from joined profiles.

We could combine cage elements with wires and cloth to create intricate shapes with  "skin", as is common in glider aircraft design.

We could simply make an empty hull by welding or bonding plates.

We could cast solid parts.

The idea I ended up with that appealed the most to me is to build a cage from carbon fibre tubes, bonded with strong adhesive to custom machined aluminium end pieces that provide all the necessary contact points such as bearing hinges for the joints, ball joints for actuator connections and ground contact shoes.

The idea came when I was browsing alibaba.com (again), and I found a bunch of suppliers of carbon fibre profiles. Next I found a tutorial on how to work with carbon fibre as a material, which seemed pretty straight forward.

Carbon fibre is really strong and light when it is used properly, but using it properly can be a challenge. You cannot simply drill a hole and fit it with a bolt like you would do with a steel tube. The carbon fibre tubes require that the strain is applied evenly over a larger area, and to do this we need to bond the tubes to a ferrule of some sort. If this ferrule is made from machined aluminium that in turn is bolted to whatever we need then we are set.

perspective illustration of carbon fibre tetrahedron robot limb cages

When thinking in "cages", the design for limbs is self evident. We simply construct oblong tetrahedrons cage configurations for each limb. The knee joint is simply a double bearing hinge that connects two limbs along axis of the knee joint.

The thigh joint is more complex, it could be solved by creating a ball joint in a single point, or by introducing a third intermediary limb to separate the two axis of the motion into two separate hinges similar to the knee joint, that are situated perpendicular to each other

In the illustration above, the ground contact foot is marked A, the ball joints for actuator connection are marked B, the knee joint is marked C and the thigh joint is marked D (in this illustration it is simply a ball joint for simplicity's sake).