Category Archives: Tools

Kicad Nightly

Since the excellent CERN push and shove router has been pulled into mainline, I’ve been playing around with the KiCad nightlies. This is a bit bleeding edge, but given the rate of development (and, so far, mostly minor crashes) it’s been okay.

The push and shove router is just awesome. At the moment it still only exists as a special rendering mode, so it’s a bit cumbersome to switch between it and the rest of the functionality. I can’t wait for the OpenGL rendering CERN have added to be the default.

There’s a few really powerful changes straight off in the OpenGL mode. The first is the layer you’re working on is brought to the top, so you can much more easily see the related traces for the layer. This seems simple, but it makes a world of difference for running traces.

The push and shove router has some great features. Apart from being able to more intelligently follow where you are pushing the cursor, it will adjust tracks around the path you’re taking to meet design rules. This means tracks are gently pushed away to fit the new track, but only enough distance to ensure you are within DRC.

But you can also drag traces like never before. Hitting G on a trace allows you to just drag the trace section, so it adjusts how it connects to the other stationary parts, and adjusts other traces to suit how you are trying to push the segment around.


For example, in the screenshot above, I’ve just pulled the LED lines so they are spaced close, and clear of the mounting hole. It’s easy to just grab the angle section and pull it towards the capacitor to the left, and then pull the other lines to bring them together.

Similarly, I ran the USB D+/D- lines first, but then needed access to the two pins beside them. It’s easy to start a trace, and drop a via, with the lines being gently pushed out to suit.

KiCad was already allowing me a lot less instances of having to rip-up traces, but with the new router I’m doing so even less, and it’s much easier to get a really tight design done.

Circuit Lab for easy modelling

The MOSFET driver sheild has some problems in it. Both 1.0 and 1.1 don’t keep the voltage of the gate below the Vgs limit, which is usually +/-20V. It also doesn’t pull the voltage source from before the switched load, so if the load is resistive, then we get an unknown voltage into the gate. So version 1.2 of the shield will have some fixes.

But how this is supposed to be fixed was a bit of a dark art. I am not much of an analog electronics person, I understand digital fairly well, but not the analog behaviour or idioms much at all. Another problem is, short of building it and watching it explode, I really would prefer to simulate what the behaviour actually was.

The way this is usually done is with a set of tools known as SPICE. Unfortunately, SPICE does not have a very easy to use interface, you can’t just drop common components down and away you go. There are some tools which attempt to make this easier, but none are really that easy to drive either.

CircuitLab provides a SPICE-like capability with easy drag and drop design, and it’s completely online. With it I was able to correct the design of the board and get the result I wanted and validate it over a wide range of inputs. (It turns out that, as I had suspected, if I limit the current going into the gate, and provide a 10V zener diode between the gate and ground it will hold the gate at 10V when selected.)

Next time you want to do some analog electronics modelling to solve a problem? Try out CircuitLab!

Hakko FX-888 Soldering Station

I finally decided that the ageing cheap soldering iron I bought many years ago was probably not the best tool around for the job. My requirements haven’t really gotten that much more complex, but I had noticed while helping people out on their first soldering experience the iron I have is heavy and slow.

But could a soldering iron that costs about ten times as much as a cheapie really be that much better? It turns out, absolutely it is.

I’m not going to do a full review, but here’s a few thoughts on the Hakko FX-888 I ended up buying..

  • The iron itself is very light and the cable is flexible. This makes it much easier to handle as a tool and position it without fighting both the mass of the iron itself and it being dragged out of place by a heavy cable.
  • The power/control base feels solid and well built. The teardowns I’ve seen floating around the net suggest the internal build quality is pretty good, and the base won’t move easily at all (which again helps with the whole cable thing).
  • It’s really fast. The ceramic heater in the iron seems to hit the dialed temperature (since this is a temp controlled iron) in around 10 or 15 seconds, way quicker than a cheapie iron. I’m far too used to having to plug in the old iron several minutes before I can do anything with it.

I really wasn’t that sure a soldering iron many times more expensive than my cheapie would make such a difference, but it really has. I find it much easier to clean up solder bridges on 0.65mm pitch TSSOP parts with the new iron than I’ve ever had luck with using the old one.

Open Bench Logic Sniffer – First Impressions

Anyone who has poked around with either building their own hardware, or worse trying to work out what’s wrong with someone else’s, will probably end up getting a logic analyser at some point. It can be very difficult to really understand what is going on inside the circuit without one.

The Open Bench Logic Sniifer is a fairly cheap tool to poke around the state of your circuits. It’s notable for being completely open source – the main capture core is actually an FPGA you can get the source to. The client to use it follows a open protocol, and the clients are all open source as well. But is it any good?

Out of the box the first thing you will end up doing is upgrading the firmware on it. Well, when I say firmware, that also includes the FPGA configuration. Thankfully this process is no harder to complete than applying upgrades to anything else. The board has a PIC MCU implementing a USB bridge between your PC and the capture core, as well as handling updates to the FPGA configuration of the core.

You don’t get any probes with the base board, the yellow wires above are just jumper cables I happen to have (and are just fine for anything on a breadboard). Probes are easy enough to get, although vary considerably in quality. The big problem with most probes is the limit of what they can tap. If you’re using fine-pitch QFP packages good luck finding probes which aren’t insanely expensive, even for 0.8mm pitch which isn’t even as fine as QFP packages go.

Even with more expensive logic analysers you’re probably going to be limited by the probes for what you can tap. Keep this in mind both when you’re designing your own boards and when looking at more pricey options.

As-is the board can capture 16 channels at once, although you can solder on a “wing” to give you another 16 (32 in total). That many channels gives you real flexibility to monitor more than just a couple of serial channels, but busses and a significant number of interactions between components. It’s capable of sample rates up to 200MHz, but keep in mind that this is hugely limited by buffer space.

Some analysers stream data continuously to the host PC. This allows them to sample more or less indefinitely, which can be very useful for boot processes or situations where long interaction is required. But streaming comes at a cost – they are limited in the sample rate they can capture. Conversely, while this board can capture much faster sample rates (24MHz for a “streamed” analyser vs 200MHz for this board) it can’t do so for anywhere near as long. 24k samples at 200MHz is microseconds of coverage. Given that, it’s good it supports on-board triggers for when to start captures.

Do you need 200MHz? Probably not, most microcontroller stuff is going to be clocking around 10-20MHz. However, recent updates to the capture core now provide better duration coverage even with fairly high sample rates, and illustrate the advantage of an updatable FPGA core.

Software-side, the PC clients are mostly cross-platform and do an acceptable enough job. The preferred client has a number of useful interpreters for basic serial types (SPI, I2C, UARTs), although lacks a more capable bus interpreter which would be quite accessible given the number of channels available. The client does need a fair amount of polish, and there does seem to be a lot of active development on it towards that end.

In the end, it’s half the price of any of it’s 8-channel competitors while offering 16 channels out of the box and 32 for minimal extra cost, and being FPGA based can be considerably extended and upgraded with features. On the downsides, the sample rate may be higher than it’s competitors but the sample depth is still lacking, and it lacks the pretty (but ultimately not as useful seems) probes of other kits.

Trying out an XMEGA uC

Above is the shiny new XMEGA development board which arrived a few days ago. I have had a plan for a while to switch the NTP Server project from the smaller MEGA microcontrollers to something a bit larger.

It’s been something of an ordeal to get just basic features of the board functioning. I appear to have tripped over some sort of bug in the Linux USB CDC code since it utterly refuses to treat the USB Serial bridge on the board as anything useful at all. Thankfully I wasn’t planning on relying on any bootloader in the main XMEGA chip, so lacking the bridge is an annoyance rather than a complete killer – the board still breaks out two further TTL-level USARTs (as well as SPI and I2C!) so I can actually work around it fairly easily.

Otherwise the board is quite neat. It has the requisite blinky LEDs (8 of them!), a bunch of buttons arranged the way I tend to do so (they pull the input to ground, and rely on an internal pull-up in the uC), RTC crystal, along with stuff slightly less useful to me now (a speaker wired up to the DAC, a temp sensor, a light sensor, and 1MB of SDRAM). What’s great is none of this takes away from having a decent number of IO pins left over. They’ve also made sure that while the firmware on the bridge chip needs some improvements, the hardware has been built to support a number of interesting future uses for the bridge chip.

So far I’ve managed to also validate I can reflash the USB bridge chip with arbitrary code, since it has a DFU bootloader on it. I think the only things they’ve got wrong is they could have staggered the USB bridge chip off the accessible JTAG port as well as the main XMEGA chip, but instead it’s JTAG interface is test points on the underside. And it has unpopulated footprints for flash, which considering it’s maybe a couple of bucks for 1MB of flash is a bit cheap to leave off.

We’ll see how this goes. It’s looking at least promising enough I’m willing to consider switching to the XMEGA line for the next major board revision of the endless NTP Server project!