Designs

We have a winner. Test results in PCB test 2


LibreServo sending data via RS485 to Arduino plotter

After several tests, the LibreServo hardware is finally chosen and it's working, even the H-bridge that gave me a lot of problems! In general, all the parts of LibreServo remain as they were, because they were already working correctly, except the parts are discussed in this article.

New PCB Test v2 for LibreServo


Hello World in LibreServo PCB test v2

A month ago I was analyzing the results and conclusions obtained with the LibreServo test PCB v1 and trying not to lose momentum this month I have designed, I have ordered new PCBs and I have already assembled the LibreServo test PCB v2! 🥳

It is the first PCB that I have designed with 4 layers for LibreServo and I hope that this will mitigates some issues with the H-bridge that I think comes, in part, from electronic noise. For the rest, it is a PCB with the final components, it is closer to the final design in which I have forced myself to put the components as close as possible to each other to see the real limit between what is designed and what can be easily welded without overcomplicating things, everything holds up on paper but then you have to bring it to reality.

Results and conclusions of the tests

RS-485 9 Mbps Hello World
RS485 Hello World at 9 Mbps

After analyzing all the parts of LibreServo, I have decided to make several design changes again. I am happy with the results obtained with the test board since without it, it would have been impossible to analyze all the components separately and detect all the errors and faults that I have found, it is something that I should have done from the beginning and it would have saved me a lot of time. The topics to be discussed are:

  • Current Sensor
  • Protection against change of power polarity
  • New power supply, mpm3610 + ap2112
  • NTC temperature sensor
  • New more compact RGB led
  • RS-232 vs RS-485 serial communication
  • New AEAT-8800 magnetic sensor
  • H bridge
  • Next PCB (4 layers)

Power Analysis (MPM3610 + Ferrite + AP2112)

MPM3610 and AP2112 circuit with Ferrite MPM3610 and AP2112 circuit

One of the parts that I have changed the most in LibreServo and thought about is the power supplies. In previous versions it was a linear regulator that I reduced in size, but the truth is that I was not at all comfortable since if LibreServo was powered with only 12V, the linear regulator should dissipate up to 1.74 Watts and in 16v 2.54 Watts... something that was really unreal that it could handled.

A few months ago I discovered the MPM3610, and this finally made it possible for me to design the power supply as I wanted. This tiny component is a powerful 1.2A step-down that supports up to 21V input and also has a built-in diode and coil! It is the latter that makes it perfect for my design, due to the reduced space used, being the only step-down that is manufactured that has an integrated coil and diode in the same package. The difference between using a step-down and a linear regulator is that a linear regulator from 3.3V to 12V gives an efficiency of 35%, while a step-down of 80% or higher, the rest is dissipated in heat, so one is much more prone to overheating than the other. The downside of using a step-down is that they are quite noisy and their output is not as clean as one from a linear regulator.

Análisis del sensor de corriente ZXCT1010

Circuito básico ZXCT1010 con protección Zener MMSZ5226BS Circuito básico ZXCT1010 con protección Zener

El primer componente que voy a analizar en mi nueva placa para testear LibreServo es el sensor de corriente ZXCT1010, el cual es una versión mejorada del sensor ZXCT1009. La mejora sobre todo es en la parte baja del sensor, cuando hay poca caída en Rsense, parte en la que quería estar ya que no quiero que se desperdicie tensión en Rsense. Además, aparejado al sensor de corriente está el diodo Zener MMSZ5226BS para evitar que la tensión de salida del sensor de corriente pueda superar los 3,3V y quemar el microcontrolador.

Manual primer proyecto STM32. Parte 1: Diseño Electrónico

Hace años me costó bastantes dolores de cabeza tener todas las piezas claras y como sé que el artículo más visitado de LibreServo es Software para programar STM32, voy a intentar realizar un artículo que conglomere todos los pasos necesarios para poner a funcionar desde cero un microcontrolador STM32, tanto a nivel de diseño electrónico, como de programación. Como LibreServo está basado en el microcontrolador STM32f302K8, todo irá referenciado a éste microcontrolador por facilidad, pero los pasos son exportables a todos los microcontrolador más comunes de la familia STM32 ARM Cortex de ST, de hecho, si es tu primer proyecto no sería la mejor opción con la que empezar, más que nada por el encapsulado que trae. El STM32F302C8 sería el gemelo pero en un encapsulado mucho más sencillo de soldar. Pero hay literalmente decenas de microcontroladores según lo que cada uno requiera.

Esquema electrónico mínimo para STM32 Esquema electrónico mínimo para STM32

Nuevos diseños para el futuro

Encóder magnético vs potenciómetro

Llevo un tiempo dándole vueltas y desde el primer momento que me plantee LibreServo había un componente que me generaba dudas... el potenciómetro. En Selección de componentes para LibreServo ya lo comenté y hasta ahora siempre había más ventajas en utilizar el potenciómetro de Murata que un caro encóder magnético, al menos para una primera versión de LibreServo. Pero puede que eso haya cambiado.

Desingns, schematics and PCB

After detecting the error in the design in the serial communication part as I commented in the rush, that bad advisor, I had to update the designs and therefore the designs previously shared here and here are outdated. As this could happen more times in the future, and as I also want to share the files themselves, I leave in this post the latest edition of the designs in photo and in Github I will leave the uploaded files also. Of the PCB layout file, there are 4 versions. Versions a, b and c correspond to the special versions that I had manufactured as I mentioned and explained in the entry of my first LibreServo order.

Schematics and designs
Buses

Diseños, PCB

No es objetivo de esta entrada explicar las decisiones de "routing" que se han llevado a cabo, eso sí, apuntar que todo el routado lo he realizado a mano. Comentaré sólo ciertos aspectos generales.

Debido al estrechísimo espacio que dispongo, me veo obligado a usar 3 placas separadas interconectadas por un "bus" de siete pines formado por una tira de pines con paso de 2mm, y por otros dos pines. Además, el potenciómetro es tan "grande", que a dicho nivel sólo se subirán los pines necesarios.

Buses en LibreServo
Buses

Diseños, esquemas

Sin poder entrar en todos los detalles y decisiones tomadas, en el propio diseño electrónico y esquemático, se ha seguido siempre el propio datasheet de los componentes seleccionados, en algún caso aumentando los condensadores de desacoplo. Dejo a continuación el esquema general completo (se ha corregido a posteriori algún detalle), y comentaré las partes en los que ha habido algún pequeño cálculo.

Primer diseño esquemático de LibreServo
LibreServo sch