Develop my own robot

Reprinted the base and arms, rewrote the math several times - there were errors in calculating and interpreting angles, broke two mounts. Now though it works, but I do not like the result - it will be inconvenient in work, it is necessary to turn the base and can be reprinted on a smaller one. In general - the work is in progress.

1 Like

As usually happens at startup burned one servo (good that I buy a stock - break/loss), ripped off one linkage, but finally finished the firmware, albeit with some problems - but I think everything will be solved. The video is still without the holder (the rod is glued) :wink:

  1. Of course with a holder it will be clearer. I will glue the rod - I will take another video of the work.
  2. Z rotations work (twist scripts - +/-45 degrees)!
  3. Synchronization is kind of excellent up to ms (by eye in running DeoVR on the phone).
  4. Still the limitations of the PCA9685 PWM controller on slow movements are noticeable - about 0.5 degrees resolution.
  5. Figured out how to do the same functionality (6 servos) to compress - by rotating the upper part relative to the lower left/right +/- 30 degrees on the thrust bearing.
  6. I do not like the mechanics I think horizontal arms rotate relative to the X axis 30 degrees up, and vertical +/- 30 degrees relative to the Z axis. It would then be possible to reduce the base and increase the twist to +/- 60 degrees.
  7. There is a random skip of points in the script - I think because of the time synchronization of the controller and DeoVR.
  8. Math is a cool thing - you can position the robot not directly to the user’s face, but to the right or left - recalculating the coordinates.
  9. Also interpolation should be reconsidered - now it is linear.
3 Likes

i would suggest using a more powerful powersupply. the servos can have really high spike power draw.
My SR6 has spikes of over 10A at 6.5V.

I am curious to see where your project goes in the future! It looks interesting

I use a 1-12V 10A power supply with a regulator - I have not noticed any power/current shortage (you can see it in the photo and video above). I burned the servo drive because of a math error - one of the rods got jammed and it overheated.

I assumed you may had a slight voltage drop due to too high power load in your video. But if it works good, then ignore me :smiley:

I’m now thinking of a coordinate system other then L0/L1/L2/R0/R1/R2

From the POV of the robot it’s entirely correct, but from the point of its user, which is a stick fixed at one end, the meaningful measures somewhat differ

  1. Bottom robot point is defined by
    1.1. A radial distance. 0 means it’s completely inside, 1 means it gonna fall off (by definition of 1 as the point where it falls off)
    1.2. Longitude and latitude. I guess 0deg will be the top and forward/clockwise (back would have more sense but forward gives better analogy with analog clocks)
  2. The direction of the robot is defined by
    2.1. The angle between the zero-input vector and the robot. You don’t want it to be of any large value for safety purposes. 0deg is straight.
    2.2. The angle between the zero-input vertical plane and the robot.
  3. Twist

Since I wrote my multi-axis scripts in Blender, I took its coordinate system as a base when developing.


The bottom of the holder is the main reference point:

  1. Down to the maximum is 0.0 in Z.
  2. Up to maximum is 100.0 in Z.
    Consider the 3D coursos (sphere) is where the penis grows from.

With regard to XY movements you don’t have to worry, I specifically calculated correctly so that the vector length does not exceed 100 when moving. I write the ZXY rotations (yes exactly in this order) in this way, and then I convert the obtained angles into quaternions (it is more convenient to work with them).
I will probably describe the math of the work as the first ready prototype for public use.
By the way, I checked on my robot the movement of -50 to +150 mm is normal.

1 Like

…well i think that’s genius, you’re incredible. My suggestion would be to give it a face, cos then it would look moar robot…

1 Like

I’ve imagined OP’s avatar head on top of the bot and now i’m rofling

IRL probably would look weird tho

4 Likes

Well the name was a long time ago - booby :wink:

1 Like

…i was gonna say just slap a big face in the middle…

6 - reprinted the base, according to those parameters, the base became smaller, although it is possible to make it even smaller a little. I made a little thicker walls in the places where the servos are attached and added a nut holder on the inside.


7 - found a bug in the code (forced buffer clearing for Wi-Fi), now there are ā€œerrorsā€ in movements only when the controller loses connection with DeoVR.

1 Like

There is one problem that relates to the ball joints between the arms and the rods…
This is probably why the SR6 uses a separate pivot module and the movement of the holder relative to the left/right servos does not extend beyond their pivot plane. I don’t know whether the creator came to this practically or analytically, but by removing one axis (Z rotation) and using 6 servos, you get 5 degrees of freedom. For all sorts of crafts on the arduino in the Internet platform is located so - that there is a balance between the servos and additionally helps gravity for the moving part. Those that use linear actuators are not subject to this problem.
As a solution I have not thought of anything better than to add two more servos that will additionally control the distance from the base to the holder. Considering the future possibility of twisting and pulling, this is even better.
Unfortunately I’m out of blue servos, I have cheap red ones that were bought for another project (noisy/slow and 270 degrees). There are no magnetic mounts of this size either, there are for 7 kg and 1 kg of force. I’ll be remodeling…
PXL_20250201_125744334-ezgif.com-video-to-gif-converter

2 Likes

I would trade a lot of axis’ to keep Z-rotation. Next to up/down, it seems to be the most important secondary axis. But I find this project fascinating so you do you

1 Like

If there were fast inexpensive ($50) linear actuators with feedback - I’m sure that a similar robot would already exist, there all the math with rotations and movements on all axes ends on calculation of vector lengths from the base to the holder. Here I have to make mistakes all the time, starting with the math I invented for the servos (I don’t use complicated formulas that are available on the internet) and ending with testing the actual mechanics.

But interesting - to the max!

1 Like

Stewart platform math when using servos.
This article is long overdue, while the new holder and base for ā€œboobyā€ are being printed, I will post my version of the math for the platform.

So the platform consists of two parts - the base and the movable part (holder in our case for silicone, I will call it further so and will call it). The connection points of the base and the holder are predetermined/known and have coordinates in relation to the origin points (i.e. vectors), there is also a transition vector that connects the origin point of the base with the origin point of the holder. The whole principle of the stewart platform is that when you rotate or move the holder relative to the base - you need to rotate and move the holder and then calculate the coordinates of the connection point in the coordinate system of the base and find the lengths of vectors between the coordinates of the points of holders and the base.
Let’s go into a little more detail point by point.
I took a couple of hexagons and drew the pulls between the connection points.

Turned the moving part.

Rotation of the platform is done by Euler angles or quaternions (my version), and movement is done by vector.
Mathematically we have 19 vectors - 6 of them from the center of the origin of the base coordinates to the attachment points, 6 from the center of the holder to the attachment points, a vector for recalculating the holder points and 6 vectors connecting the points between the base and the holder.
To move the holder, we add the movement vector to the holder vectors. To rotate, we rotate these 6 holder vectors by a quaternion with respect to the holder’s coordinate center. Then we add the transition vector between the base and the holder and get the points (or vector from the origin of the base coordinates).

If there were fast and accurate linear actuators with feedback, you only need to calculate the lengths of vectors from the points of the base to the points of the holder and a robot based on the Stewart platform would already exist - let’s split up :wink: But the world is not perfect and now for the cost of about $50-100 there are only slow actuators available, so you need to use servos + arm + rod with ball joints between the arm and the rod, and with ball joints between the rod and the moving part.

If you want some real brain porn go here and google it. Many sleepless nights will be guaranteed!
Stewart Platform Math

Rotation of vectors by quaternion - there is a classical variant, there is a fast variant which you can read about here
A faster quaternion-vector multiplication | Molecular Musings
I specifically measured the speed of calculations on esp8266 for the classic I got about 0.43 ms for 6 vectors, for the fast 0.21 ms, which is twice as fast :wink:

My variant of the solution to find the necessary angles for servos at the level of high school, although it took me a few months of thinking and experimentation.

  1. Each servo base rotates only in a plane. We know the length of the lever and rod, the coordinate point from where we need to calculate the rotation and angle of the plane relative to the global ā€œXā€ axis.
  2. By calculating the points on the holder with respect to the servo arm connection point we can rotate these two planes so that the angle of the rotation plane is parallel to the global ā€œZā€ axis.
  3. So we know the length of the arm and the point is a sphere in three-dimensional space, the intersection of the sphere and the plane will always be a circle. And the distance from the center of the circle to the plane can be easily calculated by the difference between the values of the need axis of the servo point and the center of the circle. Since we now know the length of this segment, which is perpendicular to our servo plane, we can use the Pythagorean theorem to find the radius of the circle of intersection of the sphere and the plane of rotation of the servo lever, as well as the distance from the point of attachment of the lever and the center of the resulting circle.
  4. As a result, we have a triangle in the plane with sides:
  • distance from the center of the circle to the lever attachment point
  • circle radius
  • lever length

We need to calculate two angles and the difference between them. One angle is the angle between the global axis and the distance from the center of the circle to the point where the lever is attached. The second angle is the angle in the triangle.

Something like that :wink:

Hey, congratulations on hanging in there and getting so far with your project!

I also started on a design a few weeks ago after getting a 3d printer and wondering what to do with it :slight_smile: Reading this post I saw the magnetic ball joints that were completely new to me, so thanks for that. However, the only ones I found were really expensive. In case you didn’t know, it’s possible to buy threaded magnetic cups and threaded balls separately at a fraction of the price.

I first bought these pulls with balls and magnets for the delta 3D printer Kossel K800 for about $15 in China.


But they have a holding force of about 1 kg, which turned out to be quite small.

Then I freaked out and bought these 7 kg hold-down kits for about $8 each - turned out to be too much. They rotate well through the nylon tape for sliding, but it is impossible to pull the ball off the magnet with your hands. And I was planning to use this feature for quick removal of the holder and as a safety feature to keep my dick from ripping off :slight_smile:

Before the new year from the same seller in China, I bought another 6 sets with a 5 kg hold and they are already better and slide well and hands are hard but possible to remove the holder. I think the optimum will be the holding power of about 3 kilograms, but I have not found such, maybe for a trial I will take a pair of 2 kg.


I couldn’t find the magnet and balls separately, only balls and they are made of stainless steel and are not magnetic :frowning:

I’ve been throwing away plastic for the last year has accumulated a lot. Of course I will remove the magnets and metal parts - but the photo is amazing :wink:

Heh, at least your case collection looks pretty intact and respectable. Mine looks like a graveyard: I’ve used black PLA and often I’ve had to manually hack bits off after printing or bits have been ripped off by unexpected servo movements.

Thanks for the magnet feedback. Sounds difficult to choose the right strength so I’ve ordered a few from Amazon to test and will return the unsuitable ones. I expect the rose joints have less friction but sometimes the larger range of motion might enable more functionality.