• Using freeRouting with Kicad 5

    04/11/2019 at 03:45 0 comments

    I was not looking forward to the manual work of routing traces in pcbnew (Kicad 5) so I started looking for autorouters. In Kicad 5 this is currently done externally, whereas 4 had a builtin autorouter.

    Now I know this is a controversial topic because the best human routers can do better than an autorouter but you can always use an autorouter in the beginning until you get better. Or you can tweak the results of the autorouting. Sort of like the arguments over C versus assembly decades ago I think. Well, we know which language is used more now.

    I tried freeRouting last night on a small board with about 60 nets and it did everything automatically, using 5 vias by the end. Well I moved the ICs to where I judged would be the best locations before starting which helped.

    The best advice I found on freeRouting was this page by Peter Dalmaris, a maker and educator, who teaches Kicad on Udemy. Instead of getting freeRouting sources from github (where there are many forks) and compiling, download the LayoutEditor package, available for various platforms, in native package format. So if you use Linux, it's as easy as just downloading and installing the right package for your distro. The files will be installed in /opt with one symlink in /usr/bin. The freeRouting JAR file is included (it's a Java app).

    I made this shell script wrapper so that I can call it with or without a DSN file as the argument. If no argument is provided, it opens up the file browser. The advantage of providing a DSN file as the argument is you don't have to traverse the directories to find your project.

    if [ "$1" -a ! -r "$1" ]
            echo "$1" not found
            exit 1
    exec java -jar /opt/layout/bin/freeRouting.jar ${1:+-de} $1

    (Yes, I know, this script won't handle spaces in the filename gracefully.)

    A heads up, don't use the Ω symbol in symbol values. freeRouting can't handle it, presumably due to not being Unicode ready. μ seems to be ok.

    Another gotcha is if you create mounting holes using the mounting hole symbol, you need to assign each hole a unique reference, otherwise pcbnew's Spectra DSN format exporter complains. You should make the references invisible so they won't appear on the silkscreen. This is strictly speaking not a freeRouting issue.

    freeRouting has also been mentioned in a few places on Hackaday, just search for it.

  • Make 5V power supplies from surplus power adaptors

    03/20/2019 at 03:44 0 comments

    If you are like me you will have accumulated surplus power adaptors for all kinds of things, modems, external hard disk drives, and so forth. Here's how to put them to use and avoid causing more 5V power adaptors to be made.

    5V has become a common standard for chargers and digital circuits. On eBay you can buy buck voltage converters that take 6-24V input and output 5V at 2A or more for about a dollar. As a bonus they have a USB A socket on the board ready to receive a USB cable. They are small, only a little longer than the USB socket. You just need to solder the input wires onto the board (double checking polarity first) and it's ready to use. Here's one powering a Raspberry Pi 1B.

    The primary current drawn depends on the input voltage and the output current. Assuming 90% conversion efficiency, the formula is:

    So for a current draw of 2A and an input voltage of 12V, the input current is just under 1A.

    One thing to be aware of: If you are using the input voltage for other purposes at the same time, the negative lines of the input and output are common, there is no isolation.

  • My experience using a PCB fab service (Pcbway)

    02/25/2019 at 14:00 2 comments

    When I counted a dozen 8085 CPUs in my retro tech stash, I decided to do a SBC project with them. The goals would be to learn to order PCBs online, and several other things. Coincidentally about this time a Pcbway rep contacted me asking if I would like to sample their service and post public feedback.

    The design I submitted is not mine, it's a completed 8085 SBC design published by Sergey Kiselev, see my project page for the links. This means I am confident that there are no mistakes in the placement and routing. It is not a complex design, only a handful of ICs due to the use of a GAL to replace a lot of discrete logic, two layers, 0.1 inch pitch ICs, and through hole components. One step at a time; I'll learn to use Kicad/pcbnew for my own designs later.

    A personal note: A PCB fab service over the Internet is something only dreamt of back in the days when I started making PCBs, first with resist pens, then later with photoresist, while dealing with noxious chemicals like ferric chloride and xylene. Well the Internet didn't even exist then. The disadvantage of course is the turnaround time so you should be fairly sure of your circuit before you commit to PCB. The old tailor's or carpenter's adage measure twice cut once is very apt here.

    Submitting the order through the website

    Like many fabs, registering an account on the Pcbway site will get you starter credit.

    At this point assume you have breadboarded and debugged your circuit, have laid out the PCB and are ready to generate the Gerber and drill files.

    The website is attractive and the steps are easy to follow. Just click on the Quote and Order button and it will take you through the steps. There are help buttons for the various entry fields. Pcbway seems to offer a great variety of options for the boards. I accepted the defaults as I have no special requirements. Maybe one day I'll design boards requiring advanced features. Like other fabs, the magical size 100x100 mm (from the limit of the free version of Eagle EDA, Kicad EDA is always free and has no limit) has special pricing, so usually people start with 5 or 10 boards within this limit.

    I noticed that Pcbway offers to upgrade you from HASL (Hot Air Solder Levelling) to the more expensive ENIG (Electroless Nickel Immersion Gold) at their discretion for no extra charge. This Pcbway page explains the two technologies. Searching on those acronyms will find you more explanations. You can veto giving them discretion if you wish.

    For Kicad 5 the documentation of pcbnew explains how to generate Gerber and drill files and can also be found in Pcbway's tutorial. For other EDA software there are abundant tutorials on the Internet. Package the generated files (usually 9) as a zip archive and upload to the website.

    At this point Pcbway will do a review of the files. Now I uploaded on a Sunday night so either they have software doing the checks, or there are reviewers working shifts which is plausible as a big fab like Pcbway must get a continuous stream of orders from all over the world, thanks to the Internet....

    Read more »