LibreServo v2.1 Schematics

LibreServo v2.1 PCB LibreServo v2.1 PCB

These schematics will not last long because new changes have already been made and will be sent to manufacture in the coming days if all goes well. The order of the next version will coincide with the Chinese vacations, but I hope not to have any problem except some small delay already announced by the manufacturer JLCPCB.

In this LibreServo version, the main PCB, goes from 4 to 6 layers because JLCPCB, as we mentioned in the article of changes in LibreServo v2.1, has made a very aggressive offer in which it is cheaper to manufacture a 6-layer PCB instead of 4, taking into account that in 6 layers you get for free the ENIG finish (in gold) and the vias are filled and covered, in other words, a totally professional finish. It is a really crazy offer.

Despite all this, of course LibreServo will maintain full compatibility with 4 layers and only when generating the gerbers the central layers are removed and the matter is solved.

LibreServo v2.1 changes

In the previous article on how to tune a PID, you can see how LibreServo is already fully operational. All the collected data you see in the graphs are data returned by LibreServo and the movements in the video are also real LibreServo movements. With this I want to say that LibreServo is already very close to a final and mature version of the project, at least in the hardware part, since in the software part there is always room for adding features and improving those already present.

With all the above said, I have made a new version of the hardware improving the little things that I have been seeing in the last months. Although at first glance it is not noticeable, changes and tweaks have been made throughout the board.


[...]

How to properly tune a PID

There are hundreds of guides on the Internet on how to adjust a PID and they can all be summarized in the following simple steps:

  • Set KD and KI to zero and increase KP until the system corrects the error and starts oscillating. That would be the maximum KP
  • Increase KD until the KP oscillation stops.
  • Increase KI slightly so that the system fully corrects the error.

They seem like three simple and quick steps, but the reality is that in the end it becomes a sort of trying to guess the constants and after hundreds of tests and hours, if you are lucky, you get a relatively stable PID. It is a rather cumbersome task that rarely achieves a completely satisfactory result.

Let's forget about all that and try to obtain KP and KD mathematically.


PID comparison video

LibreServo v2 Schematics

PCB para test LibreServo LibreServo v2 PCB

I had pending for months to upload the schematics to the web. The schematics are exactly the same with which I made the LibreServo v2 PCBs but with the texts corrected in position so they read better.

In previous posts as you can read in the article of the first LibreServo test board and in the conclusions of the second LibreServo test-board, the LibreServo changes were massive in each and every aspect. Virtually every component was overhauled and moved to a two PCB, four-layer design.

New version of the 3D encoder parts


LibreServo encoder assembly video

To know the position of the servomotor axis, LibreServo uses the AEAT-8800 16-bit encoder. This encoder replaces the potentiometer that the servomotors have and with it we get much more precision and allows the servomotor to rotate 360 degrees.

To achieve this, LibreServo makes use of a tiny 10.2x11.2 mm PCB to which a 3D printed part of the same size and shape as the original potentiometer is attached. This 3D printed part consists of 3 small parts, a 4x7x2mm bearing and a small 6x2.5mm diametrically magnetized magnet. Only a glue point is needed to fix the magnet. The rest of the parts, bearing and PCB are designed to be snap-fitted and fixed.

LibreServo commands (part two)

I have spent a lot of time on the command part of LibreServo and I think it is one of the most important parts of the project, it is how LibreServo is presented to the user. It offers a flexibility and possibilities that I have never seen in any manufacturer.

The documentation of the commands will be divided into two articles, this article is more focused on examples and explanation of execution and the other article is focused on the description of LibreServo commands.

LibreServo has a task manager for the high-priority engine management part and a separate low-priority task manager for sending data to the user only (commands GX). This must be taken into account since the order and timing will be independent between the commands to receive data and the rest of the commands.


[...]

LibreServo commands (part one)

I have spent a lot of time on the command part of LibreServo and I think it is one of the most important parts of the project, it is how LibreServo is presented to the user. It offers a flexibility and possibilities that I have never seen in any manufacturer.

The documentation of the commands I will divide it in two articles, this article is more focused on the description of the commands and the second part is focused on examples and explanation of execution in LibreServo.


[...]

Last steps for first official release


Music with LibreServo

Although I had many parts of the code already done, the truth is that putting all the code together and making all the functions and internal structure non-blocking has been a much more laborious task than expected. In addition, I have programmed dozens of commands and the first version of the LibreServo Software is much more complete than I had originally anticipated.

Updated LibreServo software (version v0.1)

After several months of work, LibreServo has finally reached version 0.1 in the software. What does this mean? It means that LibreServo is still in Beta version, but it is mature enough to present itself in society. This will be only the first of several entries that I will be uploading these days.

I have updated the Github of LibreServo with the latest files and I will try to keep it updated.

In the next few days I will upload the documentation of LibreServo commands, but in case anyone wants to read the code itself, I have made two small diagrams to help understand how LibreServo works.

Motion curves

S-curve graph S-curve graph. Position, acceleration and velocity.

A servo motor is a motor that maintains a given position, but how does it get to that position?

A normal servomotor only receives the final position by PWM and always goes as fast as it can to that point. A smart servo motor, on the other hand, usually receives a command that tells it the end position and how fast it has to reach that position, at which point the smart servo motor starts to calculate the path to the end position. There are several ways to trace the route, those are the motion curves.

Subscription

Receive an email for each new article.

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.