Last december I posted a blog about the development of the crane controller. The controller is working fine, most of the time… but because of the eararsh conditions and the moisture some errors occurred.
If you haven’t already read the post about the crane controller, you can use this link to know the background about this story: Crane controller Dez2015
A big potential for faults is the fact that the pcb was made with a mill and not properly etched. This results in problems with oxidation of the traces. The vias between the top and bottom layer were implemented with copper rivets. This rivets typically build a electrical connection just by the force of the squeezing. But to ensure a longtime connection it is essential to solder all the vias after riveting. Still there is a high risk of failure due to vibrations and the non professional designed vias.
At the time two of this vias caused errors on the controller and the power board.
The second big point is the lack of solder resist on the pcb. With time the moisture in the plastic case will oxidize the copper resist and slowly build electrical bridges between tracks. This produces problems with signal integrity which can be observed in form of display faults and pixel/color problems. As the spi bus is already over its maximum length with 10 meters – which could only be achieved by using a differential receiver/transmitter – the signal integrity is a very important point.
All this potentials of faults can be eliminated by using a proper 2 layer pcb with a solder resist layer. As this pcbs are not cheap in the context of a hobby project I had to look for cheap alternatives to regular board houses here in Germany. As always: China shops are a hobbyists best friend! For example Dirt Cheap Dirty Boards is one of the cheapest board houses with free international shipping. You will get ~10 pcbs in 50x50mm for 14 USD or 100x100mm for 25 USD. If you do not need that much boards you can also use a service from the US. It is called OSH Park and you have probably seen some projects with the iconic purple solder resists. This service charges you by the area of your pcb so that you will pay $5 per square inch and always get 3 copies of your board. Depending on your needs you will always make a good deal with one this board houses. The quality is by no means as good as with a regular board house from the US or Germany, but it should be good enough for all hobby projects.
As the prices for pcbs larger than 100x100mm go up significantly, I decided to do a redesign of the KranPower pcb. The schematic has only been updated minor. I just layed out the board on the smaller area and resigned of the cutouts for better heat diffusion of the step down regulators. This cutouts turned out to be obsolet, as the temperature of the regulators won’t rise above 45°C. By making that changes it wasn’t to hard to shrink down the size to the maximal area of the 25 USD pcbs from DirtPCB.
Taking the chance of a redesign to make some changes to the schematic too, I added some components and functionality. One thing was the DVI connector. I used a 90° version this time to avoid bending the cable and its connector to fit it into the case. I also added a reverse protection diode right after the screw terminal. It is a 30 amp high power version as in some situations all the servo motors can draw their peak current.
The software also got a little update. I implemented a low pass filter for smoothing the movements of the crane and improve the safety of the hole system by that. By reducing the maximum acceleration of the crane, the risk of flipping the tractor over can reduced significantly as well.
#if defined(LP_FILTER) //Low Pass Filter ain[i] = ((LP_coeff * ainOLD[i] + (10 - LP_coeff) * ain[i]) / 10); ainOLD[i] = ain[i]; //store old value #endif
This C code is one of the simplest forms of a first order low pass filter with just one filter coefficient.
All the updated files can be found on Github: