Friday 19 July 2019

KiCad Kata

Pretty (but dumb) LED Matrix
The picture shows the result of another workout with KiCad as executed by Seeed Studio and finished by me. This looks rather prettier than the original and was considerably easier to solder, not to mention more LEDs!

However a few defects are obvious too:

  • the LED spacing is wider than on stripboard, which can make patterns harder to discern
  • the interface split between anodes and cathodes is the same as the original, for no good reason
  • it now uses 16 gpios!
The first and second of these are my fault but the last could have been mitigated by adding an LED driver, such as the MAX7221 to the design:
MAX7221 DIP package
This particular chip requires only a couple of capacitors and a single resistor to function (see the circuit here). Also it is cheap, less than €1 from China and has a mature Arduino library. It could comfortably have fit in the space occupied by the resistors on the left of the picture. On the downside, it requires a 5v supply. (The Arduino playground has a lot of information about it.)

So, it was instructive to lay out an LED matrix and write a library for it, and I'd encourage you to try it for yourself. (However I also won't blame you for simply buying one on eBay, they seem to be cheaper than the cost of parts somehow!)

Wednesday 17 July 2019

At the Margin

(Who knew that the Economics of Seinfeld was a thing? Given that it was the first link returned by Google, everyone but me I guess!)

The idea of "marginal cost" is usually in mind when I'm preparing a PCB order from Seeed Studio. That's because their product is cheap and high quality but shipping rates are high. This means that it's almost free to load up an order with small items which would not of themselves justify the total cost.

This post describes a couple of such items, which gave me practice (I'm learning KiCad) yet took no longer than a few hours to produce.

The first of these is a breakout board for the (pre-ESP8266 anyway) ubiquitous nRF24L01 radio module. Its main advantage is its low power, allowing projects using it to run off batteries. Its main disadvantage is its breadboard-hostile pinout. Enough said: see picture below.
nRF24L01 breakout
Sparkfun does something similar; however theirs is better, and more expensive! I kept mine pin-compatible though, because why not?

Next up is a breadboard-friendly development board for the attiny84. This had been on my maybe-list for a while but it was only when I discovered Spence Konde's awesome Arduino core for ATtiny that I decided to go for it. The presence of Optiboot sealed the deal for me: the pin header allows sketch upload via a standard FTDI dongle.

attiny84 devboard
Lastly, just to show that they both play nicely together, the pair wired up, and programmed with a sketch using my ATtiny port of the RF24 library (originally written by Maniacbug of course).
All together now!