Kicad Redux

It’s been a few months now since I did the big switch from Eagle to Kicad, so I thought I’d post a few updates on how the process of switching has gone.

I’ve had to go back a few times to dig old designs out of Eagle, and I can’t say that I really miss any features of Eagle. I’ve gotten very used to all the little graphical glitches of Kicad so these don’t bother me as much any more. The designs have definitely gotten a lot better since switching as well.

I commented on the first post about switching I felt Eagle had a better connection between the board and the schematic, but I have to withdraw some of that. There’s a few features of Kicad which make a lot more sense now and the connection between the two isn’t as bad as I first thought.

kicad-dual-head

For example, it’s very easy in Kicad to have both the PCB and schematic up in separate windows on different displays (something I do rather constantly), and this helps make the two feel connected. Highlighting a component on the PCB side will actually cause the schematic to leap and centre that component, so you can see the context both in the board and the schematic very quickly.

Schematic hierarchies also work really well for breaking a design up into managable chunks. In the image below, I’ve buried the USB and power sections in their own schematic pages, so it’s easy to work on just the relevant parts of the board.

kicad-heirachy

 

During early PCB layout, the “get footprint” tool is fantastically useful. Hit “T” and enter a reference, and it grabs that part for moving. This makes it far easier to do the initial rough layout with parts in the right order to do things, and makes it easier to find related parts.

The workflow I’ve gotten very used to now. It’s an ingrained routine of change things in schemtic, generate netlist (when annotation usually pops up), adjust the footprints needed in the footprint assignment, and then reload the netlist in the PCB view. It’s not quite as fluid as the live connection Eagle has, but it’s close enough I’m much more comfortable with it now.

I’m very pleased with the native image to PCB import feature, although it could do with part scaling as currently this really depends on some external tools to get right. But being able to nicely import artwork into the silk as an explicit module is a big improvement over those capabilities in Eagle.

There are still things I’m not happy with about Kicad, but these are more general problems and not enough of a reason to switch back, I genuinely can’t see myself switching back to Eagle at all really.

Things that could be better:

  • You can’t just drop GND vias or even just vias in a spot, at least if you can I haven’t found how
  • The graphical glitches sometimes can be a bit misleading, is that an extra trace or just noise?
  • If you redraw a section of track, it will remove the old section only about 50% of the time. It’s not clear to me why it does or doesn’t at any given moment.
  • In a schematic, if a pin is not on the grid, you can’t connect to it. It would be nice if the wires could “snap” to the pin even if it’s off-grid
  • BOM generation is a bit of a hack and there doesn’t seem to be an easy way to generate a consolidated BOM (ie, qty 4 of part X with references R1, R2, R3, R4).
  • Refilling zones doesn’t appear to have a hot-key. Which means you are forever switching back to the zone tool to refill, and then back again. Grrrr.

All in all, I’m very happy with Kicad and have pushed out about 4 boards now using it, all of which have been just great, and significantly better than previous efforts.

w5500-beakout-instagram(another board designed in Kicad)

 

Posted in Design, Projects | Tagged | Leave a comment

Quick look: XYC X-26Y Mini PC

A quick jot of some notes about the XYC X-26Y from nicegear:

The good:

  • OpenELEC on it just works. And by works I mean everything works. Wifi card, HD video playback, even HD Audio over HDMI works. All I had to do was point audio at HDMI instead of analog out in XBMC.
  • XBMC UI doesn’t drag much at all. I’ve loaded it up with Aeon Nox (which is quite pretty, and therefore quite hungry) and it is just fine.
  • Price. Considering it includes a wifi card, 2GB of RAM, and a 32GB SSD, the price is really excellent.
  • Fanless. Yep, it’s completely silent with the SSD in it. It wouldn’t be if  you installed a spinner, but out of the box it’s indeed silent.
  • Build quality looks good. Feels solid. I haven’t opened it up but I’m not expecting it to be anything bad.
  • It’s quite wide/deep but moderately thin. So it’s pretty good for size overall.
  • GigE. Excellent!

The bad:

  • Fanless means this thing is not cool. It’s not just warm to the touch, it’s noticeably hot. Not so hot you can’t touch it at all, but it’s not comfortable after a pretty short amount of time. But that’s the trade-off, right?

The indifferent

  • USB ports are upside down. At least I’m not plugging stuff in often.
  • Box it came it bears no resemblance at all to contents, so don’t be alarmed by the ATOM and ION2 logos on the outside, this is an Ivy Bridge Celeron and QS77 chipset.
  • An IR window would be cool, but it’s not a big deal.
  • Wireless antenna placement is on one of the sides, which isn’t a big deal I guess. Would have been hard to cram it into the back as thin as it is.
  • No eSATA, which would be nice for expanding storage beyond the mSATA and 2.5″ internal drive bay.

All in all, I’m pretty happy with the box and how it has performed.

Posted in Opinion | Leave a comment

The design of BBPSU

My Breadboard Power Supply is designed to overcome a number of problems with other existing plug-in power supply designs. At a glance, it might not seem to make much difference how my supply board is designed compare to other solutions – they all get you a stable voltage from a wall wart – but read on for how those differences actually matter.

Most Breadboard power solutions provide a single output from a DC jack. This is fine if you know you’ll only ever need one power rail. But increasingly ICs and components are only available with 3.3V, and other components don’t run at their top speed unless being fed at 5V. Having both available at once is more of a necessity than it has been in the past.

For example, Microchip make one of the only Ethernet chips you can plug into a breadboard: the ENC28J60. A small, through-hole IC, which provides almost all the hardware needed to add Ethernet – just a jack, some magnetics, and terminaton is required. But this part is 3.3V only. Similarly, to get the maximum speed out of a AVR MCU you can plug into a breadboard, say the ATMEGA328P (like an Arduino uses), you need to run them at 5V.

So my breadboard supply board provides you both at once. You don’t have to switch between one or the other. Both 3.3V and 5V are available from the same input and the same board.

The second problem with most supply boards is the way they connect to the breadboard. A breadboard has down each side two power rails (usually marked red for positive and blue for ground), and it’s natural instinct to connect a supply board directly to these rails.

But there’s problems with connecting that way. Not all breadboards have the same width. The main area of a breadboard, the grid of holes, is always spaced the same, but the number of columns varies between breadboards, and the distance from the grid to the power rails varies as well. This means most supply boards will either only connect to a single side rail or if they do try to connect to both, they are only able to connect to a few specific breadboards.

Instead, I noticed there’s one area of a breadboard which is always consistent – the IC well. Breadboards are designed to accept all DIP packaged ICs, their pins are always spaced on a 0.1″ grid. So all breadboards have their grid spaced the same way. And to split the sides of a chip into separate lines, they have a well down the middle. That too is spaced on the same 0.1″ grid, to ensure any DIP chip will fit.

That’s the better, more reliable, place to connect a supply board – it’ll always be the same spacing on any breadboard. Since it’s also split between sides, it makes it easy to provide both 3.3V and 5V at once – they are just different sides of the IC well.

Most supply boards droop off the end of the breadboard, which is both sloppy and may damage the breadboard or pins in the supply board. My supply board uses additional pins to provide stability, so there is no droop and the board and pins are firmly held in place without bending.

The LEDs for each side are also placed nice and close to the pins where the output is present, so you can see easily that each side is live. I’ve also put more emphasis on limiting the number of components down to what you really need, and not things which aren’t critical to have. This means my supply board is much cheaper, about 30% cheaper than other boards with only a single output, and you get two outputs from my supply board.

It’s also been designed to be easier to install a small heatsink on to the regulators. Linear regulators do generate a significant amount of heat, but most boards try to cram too many components around the regulators, making it hard to use a small heatsink to improve how much current can be drawn from the supply board.

By keeping the space either side of the regulators clear, it’s very easy to glue down a small heatsink designed for DIP packages to both regulators. Very few supply boards can accept a heatsink this easily.

Lastly, buying locally means you get customisation options. The boards can be supplied with custom voltages, or without pins or DC jack loaded so you can solder it into a fixed installation.

In summary, the hairy.geek.nz breadboard power supply:

  • Provides two outputs at once, instead of only one
  • Prevents damage to the breadboard by limiting droop from the power input
  • Fits to any breadboard
  • Provides a clearer indication power is on
  • Ensures you can easily install a heatsink if required
  • Is lower priced than most single-output boards
  • Can be customised to your specific needs

You can get the hairy.geek.nz Breadboard PSU from nicegear here.

Posted in Production | Tagged | Leave a comment

BBPSU 2.0 available now!

A quick note to report version 2.0 of the Breadboard PSU is now available from Nicegear.

They come fully assembled, so you can rip it out of the package and drop it straight into your solderless breadboard to get started.

This version, despite being significantly smaller is actually just as capable as the old version, and still supports custom voltages if you need them. They can also be sourced without any connectors or pins installed, if you are using them for a permanent install. Best to contact Nicegear if you’d like those options.

And for those of you looking for a way to power your Arduino from a higher voltage source, check out our Wide DC Supply Shield Kit which makes it easy and safe to use a DC input between 9 and 37V DC. No excessive heat or exploding capacitors on your Arduino!

Posted in Projects | Tagged , | Leave a comment

Testing

The second part of getting up to better production standards is testing. While I’ve always done testing, it’s usually a slow process of fiddling with sockets and checking each point with a multimeter by hand.

For v2.0 of the Breadboard PSU an important design decision was to include better support for being able to test the assembled boards quickly. The intention was to take advantage of one of these.. a pogopin:

pogopin

Pogo pins are a spring-loaded conductive pin which can be soldered in like a header pin. They are small enough to fit standard holes boards already usually have for various kinds of headers, and come in a variety of tips, including ones which make solid contact with flat exposed pads.

The output sides of the board already have useful holes to connect a pin to, but the input side didn’t have anything. So v2.0 has two holes down by where the DC jack is soldered specifically for pogopins during testing.

The next part is making the testing frame. For this, I used the laser cutting services of Ponoko. These are the plastic cuts I designed and had cut:

The three pieces make up a bottom layer to hold a sacrificial PCB, and two top layers, one of which is just used to assist on placing the board. The small holes are to allow the pogopins to pass through, with bolt holes in each corner.

The sacrificial board is one of the boards from the panel with nothing soldered down to it. Pogo pins are soldered down on the existing holes, and additional wires are soldered to pads and holes which connect to the same signals.

The whole contraption, connected to a pair of multimeters and a DC jack, looks a bit like this:

From the side, you can see the way the pins are arranged to allow contact from a board under test:

This is probably not ideal, the pins are too high, but you get the general idea.

All that needs to be done now to test a board is press it down on the array of pins, and check the meters and LEDs are lit:

As you can see, the LEDs are lit confirming that they’ve been soldered down correctly (for once!), and the voltages of both sides of the output. This board was rejected after testing, as the 5V output is too low.

Testing is a critical part of making sure the products you make are working as the end user expects. By using a testing jig like this, I can test a board in about 5 seconds.

Using a small MCU, a more complete testing platform could be made, that automatically measures voltages, or flashes firmware images, or interrogates the target board to ensure it operates normally.

All you need is a bed of pogopins, and some imagination.

Posted in Production | Tagged | Leave a comment

Panels

As part of expanding my production processes, I’ve taken the next step in production scale: panelised boards rather than separate boards. The idea behind this is rather than applying paste to one board, you apply it to a panel of boards which has multiple copies of the design. Once reflow is done, you can split these by hand into final boards you want.

For the newest revision of the Breadboard PSU, I got panels made by Hackvana, who do fantastic high quality PCB production ideal for hobbyists like myself. I worked with Mitch from Hackvana on the panel, providing a single design and then approving the panelised version he’d built. Only a few days later, the panels turned up, and they looked great.

To actually get them soldered up and ready to ship out to Nicegear, it’s almost the same process I normally would go through for a single board, but now it’s multiple copies at once.

The process begins with applying paste to the board. Here you can see the multiple copies making up the panel, and empty board around the outside. There are four holes in the corners which align with the holes in the metal plate below, and have 2.5mm pins in them. The stencil is taped down on top of the board, and also has holes where the pins are.

Applying paste is just like you would for any other board, smear solder paste on the stencil, and then scrape it off. Once you’ve removed the stencil and released the board from the pins, you get a panel with paste applied to the pads:

The grey paste can be clearly seen on the pads here.

Now we go through the process of dropping down our components. I use a vaccum pump with a fine tip I bought from AliExpress for this part. It makes it easier to lift the parts straight from the tape on to the board.

Once we’ve placed all the parts, the board looks like this:

Now we’re ready to cook the board. I have a “modified” toaster oven driven from an SSR by a PID controller called osPID. The reflow profile is loaded into the osPID controller and it pulses the mains into the toaster oven to hit the temperatures the profile needs. There is a thermocouple inside the oven so the osPID controller is getting closed-loop feedback of how the oven is performing.

This is the board being cooked in the toaster oven:

I try not to burn my fingers when removing the boards from the oven after the reflow process is done. You can see in the photo below the bright silver solder, showing it’s now all soldered down:

Now we just need to start breaking the panel apart into the separate boards. Hackvana have used a v-score cut along the dividing line between boards and the boards and rails, so they can be snapped apart by hand easily.

Finally we have all our boards separate and ready for testing!

Once all the through-hole soldering is done, we get our nice shiny finished product, ready to be sent out into the hands of eager users!

Posted in Production | Tagged | Leave a comment

0R and you

Recently on Twitter I made a comment about my supplies of zero ohm resistors (0R) going missing, and I was asked why it mattered since they’re just a wire link.

It’s true that effectively a 0R is a wire link in intent, but that’s not necessarily the best way to think of them, and in many cases you actually want something which doesn’t look like a wire link at all.

Let’s say we have designed a small linear voltage regulator into a board. The most flexible design is one using an adjustable regulator, since we can set it to any desired output voltage. The circuit for that is below:

An adjustable regulator has the output voltage set by changing R1 and R2. Laying this out on a PCB, we end up with something like:

We’re using SMD components for this board. C1 and C2 are either side of the regulator in the middle. R1 and R2 are above C1 and control what voltage we want.

Most voltage regulators also come in a fixed version: R1 and R2 are hidden inside the regulator, so we don’t need to place them outside on the board like this is laid out. Instead, that adjust pin has to be tied to ground like this:

That ADJ pin is now a GND pin. If we look at our PCB, we can see we don’t need to populate R1 any more (there is no connection from Vout to the pin via a resistor), but what about R2. It was a resistor, now it has to be a link. We could design a new board, but if we look at how R2 just needs to become a link, we can do this instead:

This is where we’d use a 0R, they are not just a wire link but the same package as any other resistor. They are physically built the same as any other resistor we could use there, so we don’t need to design a whole new board.

This means we can use both fixed and adjustable versions depending on what we have available, on the same board design, with the same size components. Designing a board for implementation flexibility (in this case, being able to use both types of regulator) improves what they are capable of, so you’ll often find 0Rs on many boards.

Posted in Uncategorized | Leave a comment

Invisible software

The recent decision by the government to flip-flop on the wording of changes to the Patents Bill has pushed the concept of “embedded” software back into the limelight. The whole concept that there is an obvious or well defined line between “software” and “embedded software” is nonsense, but we seem to be persisting with this idea.

If you’ve read this blog before, you’ll have noticed I am spending a bit of time writing code for a few projects that could be called “embedded”. Actually, I don’t personally see them that way at all, they are just code running on general purpose CPUs with some restricted hardware configuration. To me, they are no different in concept to a PC or any other general purpose CPU.

That is, after all, the definition of software: instructions executed by a general purpose machine. Hardware is not a set of discrete abstracted instructions with a concept of execution. The line is very sharp between those two realms.

The arguments seem to boil down to an idea that if the software is invisible enough (to whom is not defined) then it is “embedded”. For example, recently I spent some time with a large aircraft manufacturer discussing some aspects of their aircraft systems. One component was described as an “embedded” security appliance. It actually turned out to be a Linux machine – a general purpose, commonly used OS – on merely a slightly restricted and custom board.

Does a general purpose OS, running on special hardware, but otherwise no different to any other implementation of that OS, constitute ”embedded” in any meaningful way?

Invisible to some is not enough to consider it to be some special class of software, because it’s still software. Another example is the fact that microcontrollers (general purpose CPUs in a very compact form) have reached a price point and size where they are suitable replacements for traditional logic designs. So, every headphone cable shipped with an iPhone or an iPod contains a CPU: it’s in the case with the control buttons in the cord. It’s “invisible”, so therefore it’s now a special class of software, even though it is just software?

Software should not be patentable. Period. How invisible it is, or whatever organisation structure is around how it’s written is irrelevant. Software is not different merely because it’s hidden from view.

Where this becomes complicated is inventions which depend on general purpose CPUs and code. The line should be explicitly stated in the bill: an invention may depend on such a thing but patent protection does not apply to any software involved in the invention, regardless of the form that takes.

Anything else is open to be gamed by industry to create effective patent controls on software, and “embedded” is fluid enough that you can regard all software as embedded in some way.

Posted in Opinion | Leave a comment

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!

Posted in Tools | Leave a comment