Advanced PCB Graphics With KiCAD 6 And Inkscape

There are many, many video tutorials about designing the functional side of PCBs, giving you tips on schematic construction, and layout tips. What is a little harder to find are tutorials on the graphical aspects, covering the process from creating artworks and how you can drive the tools to get them looking good on a PCB, leveraging the silkscreen, solder and copper layers to maximum effect. [Stuart Patterson] presents his guide for Advanced PCB Graphics in KiCAD 6.0 and Inkscape, (Video, embedded below) to help you on your way to that cool looking PCB build.

Silkscreen layers in yellow, solder mask opening in red

The first step is to get your bitmap, whether you create it yourself, or download it, and trace it into a set of vectors using the Inkscape ‘trace bitmap’ tool. If you started with an SVG or similar vector shape, then you can skip that stage.

Next simply create a PCB outline shape by deleting all the details that aren’t part of the outline. A little scaling here and there to get the dimensions correct and you’re done with the first part. [Stuart] has an earlier video showing that process.

The usability improvements in KiCAD 6.0 are many, but one greatly demanded feature is the ability to group objects, just like you do in Inkscape and any other vector graphics tool for that matter. That means you can simply import that SVG outline into the Edge.Cuts PCB layer and all the curves will be nicely tied together. Next you select the details you want for the silkscreen layer, solder mask removal layers and any non-circuit copper. In Inkscape it would be wise to use the layers feature to assign the different material types to a uniquely named layer, so they can be hidden for exporting. This allows you to handle silk, mask and copper PNG exports from a single master file, in addition to any vector details for outline, slots and holes.

Once you have PNG bitmap exports for the silk, mask etc. you need to create a footprint inside a board-specific library, using the KiCAD image converter tool. It was interesting to note that you can export a new image footprint from the tool and paste it straight into the footprint editor, and tweak all the visibility details at the same time. That will save some time and effort for sure. Anyway, we hope this little tutorial from [Stuart] helps, and we will be sure to bring you plenty more in the coming months.

Need some more help with KiCAD? Checkout this tutorial, and if you want a bit more power from the tool, you need some action plugins!

Continue reading “Advanced PCB Graphics With KiCAD 6 And Inkscape”

Baby Steps Toward DIY Autonomous Driving: VW Golf Edition

Nice thermal design, but conformal coating and no ID marks make this tough to reverse engineer

[Willem Melching] owns a 2010 Volkswagen Golf – a very common vehicle in Europe – and noticed that whilst the electronic steering rack supports the usual Lane Keep Assist (LKAS) system, and would be theoretically capable of operating in a far more advanced configuration using openpilot, there were some shortcomings in VW’s implementation which means that it would not function for long enough to make it viable. Being very interested in and clearly extremely capable at reverse engineering car ECUs and hacking them into submission, [Willem] set about documenting his journey to unlocking openpilot support for his own vehicle.

And what a journey it was! The four-part blog series is beautifully written, showing every gory detail and all tools used along the way. The first part shows the Electronic Power Steering (EPS) ECU from a 2010 Volkswagen Golf Mk6 module (which rides on the back of the three-phase steering rack motor) being cracked open to reveal an interesting multi-chip module approach, with bare die directly bonded to a pair of substrate PCBs, that are in turn, bonded to the back of the motor casing, presumably for heat dissipation reasons. Clever design, but frustrating at the same time as this makes part identification somewhat tricker!

Entropy less the 1.0, and zero sections indicate no encryption applied

[Willem] uses a variety of tools and tricks to power up and sniff the ECU traffic on the CAN bus, when hooked up to a SAE J2534-compliant debug tool, eventually determining it speaks the VW-specific TP2.0 CAN bus protocol, and managed to grab enough traffic to check that it was possible to use the standard KWP2000 diagnostic protocol to access some interesting data. Next was a very deep dive into reverse engineering update images found online, by first making some trivial XOR operations, then looking at an entropy plot of the file using Binwalk to determine if he really did have code, and if it was encrypted or not, After running cpu_rec, it was determined the CPU was a Renesas V850. Then the real work started – loading the image into Ghidra to start making some guesses of the architecture of the code, to work out what needed patching to make the desired changes. In the final part of the series, [Willem] extracts and uses the bootloader procedure to partially patch the code configuration area of his vehicle and unlocks the goal he was aiming at – remote control of his steering. (OK, the real goal was running openpilot.)

In our opinion, this is a very interesting, if long, read showing a fascinating subject expertly executed. But we do want to stress, that the vehicular EPS module is an ASIL-D safety tested device, so any hacks you do to a road-going vehicle will most definitely void your insurance (not to mention your warranty) if discovered in the event of a claim.

Older ECUs are a bit easier to hack, if you can pull the EPROM, and people out there are producing modules for allsorts of vehicular hacking. So plenty to tinker with!

Production PCB And Pogo Pins Produce A Clever Test Jig

[Hans Summers] runs a site qrp-labs.com, selling self-assembly kits mostly for radio gear and GPS applications, and had some production problems with his QCX-mini QRP transceiver kit. They were using an assembly house that had some problems with a sub-contractor going under during the pandemic, and the replacement service was somewhat below the expected level of quality, resulting in a significant number of SMT populated boards coming out non-functional. Obviously, not wanting to pass these on to customers as a debug problem, they set to work on an in-house QA test jig, to give them the confidence to ship kits again. The resulting functional test jig, (video, embedded below) takes a fairly interesting approach. Skip the video to 9:00 for the description of the test jig and detailed test descriptions.

By taking an existing known-good PCB, stripping off all the SMT parts, and moving the through hole components to the rear PCB side, pogo pins could be soldered to strategic locations. Building the assembly into a rudimentary enclosure made from sawn-up raw copper clad board, with the pogos facing upwards, and a simple clamp on top, allowed the PCB-under-test (let’s call it the UUT from hereon) to be located and clamped in place. This compressed the pogos in order to make a firm electrical contact. A piece of MDF that had been attacked with a dremel did duty as a pressure plate, with cutouts around the SMT component areas to achieve the required uniform board pressure and keeping the force away from the delicate soldered parts. All this means that with an UUT connected via pogo pins to a through-hole only test PCB, the full circuit would be completed, if and only if the UUT was completely functional, and that means defect-free soldering and defect-free components.

Next the firmware was rewritten to do duty as the test controller, which when powered up would step through a sequence of test scenarios and measurements, logging the results to an OLED display and a serial interface. This rig survived 1,000 SMT tests without failing, giving [Hans] the confidence to ship out new kits and providing a database of datalog results as a backup should a customer have an issue during final assembly. All-in-all a smart idea to solve a difficult problem, with nary a custom test jig PCB in sight!

These pages have been graced with many a pogo-based test rig over the years. Here’s one to start, and if you’ve got a handy laser cutter and some scrap wood, making an accurate test rig is no bother either.

Continue reading “Production PCB And Pogo Pins Produce A Clever Test Jig”

PsyLink An Open Source Neural Interface For Non-Invasive EMG

We don’t see many EMG (electromyography) projects, despite how cool the applications can be. This may be because of technical difficulties with seeing the tiny muscular electrical signals amongst the noise, it could be the difficulty of interpreting any signal you do find. Regardless, [hut] has been striving forwards with a stream of prototypes, culminating in the aptly named ‘Prototype 8’

The current prototype uses a main power board hosting an Arduino Nano 33 BLE Sense, as well as a boost converter to pump up the AAA battery to provide 5 volts for the Arduino and a selection of connected EMG amplifier units. The EMG sensor is based around the INA128 instrumentation amplifier, in a pretty straightforward configuration. The EMG samples along with data from the IMU on the Nano 33 BLE Sense, are passed along to a connected PC via Bluetooth, running the PsyLink software stack. This is based on Python, using the BLE-GATT library for BT comms, PynPut handing the PC input devices (to emit keyboard and mouse events) and tensorflow for the machine learning side of things. The idea is to use machine learning from the EMG data to associate with a specific user interface event (such as a keypress) and with a little training, be able to play games on the PC with just hand/arm gestures. IMU data are used to augment this, but in this demo, that’s not totally clear.

An earlier prototype of the PsyLink.

All hardware and software can be found on the project codeberg page, which did make us double-take as to why GnuRadio was being used, but thinking about it, it’s really good for signal processing and visualization. What a good idea!

Obviously there are many other use cases for such a EMG controlled input device, but who doesn’t want to play Mario Kart, you know, for science?

Checkout the demo video (embedded below) and you can see for yourself, just be aware that this is streaming from peertube, so the video might be a little choppy depending on your local peers. Finally, if Mastodon is your cup of tea, here’s the link for that. Earlier projects have attempted to dip into EMG before, like this Bioamp board from Upside Down Labs. Also we dug out an earlier tutorial on the subject by our own [Bil Herd.]

Continue reading “PsyLink An Open Source Neural Interface For Non-Invasive EMG”

New Part Day: The RISC-V Lichee-RV Module And Dock

Sipeed have been busy leveraging developments in the RISC-V arena, with an interesting, low-cost module they call the Lichee RV. It is based around the Aliwinner D1 SoC (which contains a Pingtou Xuantie C906 for those following Chinese RISC-V processor development) with support for an optional NAND filesystem. This little board uses a pair of edge connectors, similar to the Raspberry Pi CM3 form factor, except it’s based around a pair M.2 connectors instead. The module has USB-C, an SPI LCD interface, as well as a TF card socket on-board, with the remaining interfaces provided on the big edge connector.

The minimalist Allwinner D1-based Lichee RV

So that brings us onto the next Sipeed board, the Lichee RV Dock which is a tiny development board for the module. This breaks out the HDMI, adds USB, a WiFi/Bluetooth module, audio driver, microphone array interface and even a 40-way GPIO connector. Everything you need to build your own embedded cloud-connected device.

Early adopters beware, though, Linux support is still in the early stages of development, apparently with Debian currently the most usable. We’ve not tested one ourselves yet, but it does look like quite useful for those projects with a small budget and not requiring the power-hungry multi-core performance of a Raspberry Pi or equivalents.

We’ve seen the Sipeed MAix M1 AI Module hosted on a Pi Hat a couple of years ago, as well as a NES emulator running on the Sipeed K210. The future for RISC-V is looking pretty good if you ask us!

Thanks [Maarten] for the tip!

A Simple Touch Probe Made With Basic Tools

Six points of contact detect any displacement.

LinuxCNC contributor and machining enthusiast [Andy Pugh] is certainly not afraid to try making specialised tools to see how well they work out, and this time he’s been busy making a touch probe (video, embedded below) for checking the accuracy of machining operations and general measuring applications.

These things are not cheap, since they are essentially ‘just’ a switch with a long probe, But, as with anything specialised and machined with tight tolerances, you can understand why they cost what they do.

After inspecting and spending some time reverse-engineering such a unit, [Andy] then proceeded to grab some PEEK bar he had lying around and chuck it into the lathe (get it?). He notes Delrin would be more cost effective for those wishing to reproduce this, but as long as you have the ability to machine it and it’s non-conductive, there are many other options you could try.

Using no special tools other than a collet block (like this one) all the angled holes and slots were made with ease, with the help of a specially 3D-printed mount for the vise. A nice, simple approach, we think!

[Andy] tested the repeatability of the probe, mounted over his CNC-converted Holbrook lathe, reporting a value of 1 um, which seems rather good. Centering of the probe tip within the probe body was off a bit, as you’d expect for something made practically by hand, but that is less of a problem as it would seem, as it results in a fixed offset that can be compensated for in software. Perhaps the next version will have some adjustability to dial that out manually?

The whole assembly is formed from two plastic parts, a handful of ground-finished hardened steel pins, and a big spring. The only part remotely special is an off-the-shelf probe tip. During the electrical hookup, you may notice the use of a self-fluxing verowire pen, which was something this scribe didn’t know existed and has already placed an order for!

The reference 3D model for the design is shared from [Andy]’s Autodesk Drive for your viewing pleasure.

Of course, this isn’t the first DIY touch probe we’ve seen, here’s one for example, and over on Hackaday.IO, here’s an attempt to make one using a piezoelectric transducer.

Continue reading “A Simple Touch Probe Made With Basic Tools”

Improved Thermochromic Clock Uses PCB Heaters For Better Contrast

We love timepiece projects round these parts, so here we are with another unusual 7-segment clock design. Hackaday’s own [Moritz Sivers] wasn’t completely satisfied with his last thermochromic clock, so has gone away and built another one, solved a few of the issues, and this time designed it to be wall mounted. The original design had a single heater PCB using discrete resistors as heating elements. This meant that the heat from active elements spread out to adjacent areas, reducing the contrast and little making it a bit hard to read, but it did look really cool nonetheless.

This new version dispenses with the resistors, using individual segment-shaped PCBs with heater traces, which gives the segment a more even heat and limited bleeding of heat into neighbouring inactive air-gapped segments.  Control is via the same Wemos D1 Mini ESP8266 module, driving a chain of 74HC595 shift registers and a pile of dual NMOS transistors. A DS18B20 thermometer allows the firmware to adjust for ambient temperature, giving more consistency to the colour change effect. All this is wrapped up in an aluminium frame, and the results look pretty nice if you ask us.

Both PCB designs and the Arduino firmware can be found on the project GitHub, so reproducing this should be straightforward enough for those so inclined, just make sure your power supply can handle at least 3 amps, as these heaters sure are power hungry!

Got a perfectly good clock, but desperately need a thermochromic temperature/humidity display? [Moritz] has you covered. And if this digital clock is just too simple, how about a mad 1024-element analog thermochromic clock instead?

Continue reading “Improved Thermochromic Clock Uses PCB Heaters For Better Contrast”