BSidesLDN2019 badge 101

This is the first time BSides London has decided to have a try in the conference badge world, and I have been given the privilege to have a try at this.

What’s the idea behind it?

Designing a badge isn’t an easy task. There’s a considerable amount of work that goes into making a badge, a lot more than many realise (myself included!). You want a badge to be original, work with the budget available and be easy to manufacture for the number of attendees (1000 badges is quite a logistical challenge!) while not forgetting the most important factor - how to make a badge that will not become another thing thrown away or, at least - something put at the very bottom of one’s junk cupboard.

The ideas revolved around using any of the common microcontrollers, then any common fit-on-a-breadboard platforms, and then - one night at a dark metal pub I had a stroke of, I hope, genius: why don’t we all try to design something interesting around any of those?

Obviously it wouldn’t be much of a challenge if a badge was just a breadboard, which isn’t exactly exciting. What would be more interesting is if we were to make a PCB configurable via two-pole jumpers. This then makes it into a hackable design: no ratsnest of jumper wires but you can configure each pin of your favourite evaluation/education kit to be connected to a peripheral or one of two common rails (like, for example +3V3 and GND) - and only that. Likewise, each of the pins of the peripherals can be connected either to the main board or one of the rails. Or maybe you can hack it in a way I didn’t even think of :)

Where’s the challenge then?

I wanted this board to somehow represent the challenges one meets in real-life engineering design process: more often than not you cannot have what you want but you have to live with what you have - live off the land, if you will; a phrase well know to many of us sitting on the red side of security.

There’s a number of challenges here: For example, let’s say you want to use Arduino Micro/Nano and connect three I²C devices to it:

  1. You need peripheral devices that have all connections (or connections that matter) on one side only (some of the makers that have them are Adafruit, Pimoroni, Sparkfun, more on this on Mood Badge page);

  2. Arduino Nano/Micro only has one officially supported I²C bus, but you can use software to emulate I²C on other pins - but not on all of them :)

  3. Power: what if the devices need 3V3 while Arduino needs 5V? Do you use a buck-converter for the common rail to 3V3 and then a separate for Arduino to 5V? But there’s only so much space.

I have spent the past 4 weeks with a bag of cheap breakout boards for various sensors, chargers, displays and everything else trying to see if this challenge is really solvable. At the end of it, I believe I have solved it but that’s a story for another time, let me show you what this badge is and how to make use of it.

How do I build it?

The sad part here is that there are 484 pads on the board. That should not scare you, though! Practice makes perfect :)

To remake the badge into a breadboard you will need:

About the links above: you absolutely don’t have to get those, I got them because they were in stock and available for next day delivery.

Assembly

A note on units: I use ‘mils’ as units more often than mm: a mil is 0.001 of an inch and it used to be the de-facto standard (that’s why breadboards have a pitch of 2.54mm == 100mils). Nowadays you will find that half of the population says ‘mils are stupid’, the other ‘mms are stupid’. My advice: be flexible, it’s not a hill to die on.

Now, all that’s left is to solder it all. There are various tips on how to solder on the (check out the Pen Test Partners’s guide for starters), I don’t have a guide yet :( I have several assembly tips, though:

  1. When you insert the 1.27 pin headers you will notice that they’re a bit tight - this is by design, as there’s nothing more fun in life that putting in all components, flipping the board and watching them all fall out. It might happen, though, that some of them will get pushed out: 1.27mm pin sticking out You really, really want to check against a flat surface that they are all in and with the correct heights because later it will be a real pain to fix.
  2. If you, like me, got single-row 15-pin (or less) long 2.54 receptacles you will notice how very unstable they are on a board blue receptacles disarray and trying to put them all in, make them aligned nicely is like trying to catch 126 kittens. There is, however, a way! The pads are on 2.54mm grid vertically (including the peripheral pads, and yes - it is by design for that very purpose) so you can use pin headers that come with various kits badge receptacles held by a pin header (or buy them here) to put it all together in a floating way and then

badge receptacles bound together top badge receptacles bound together bottom badge receptacles bound together on the pcb

solder. Do be careful there as the pins on the receptacles I got are very thin and they like to bend and you will not feel, while pushing it in, that you are bending one pin. You will notice that after soldering 200 pads and finding one empty hole. So, please, check that you see all pins on the other side.

The layout

badge assembled In the middle of the board there are two groups of 30-pin-wide pads - this is where you place the mainboard. The pitch (pad spacing) is the de-facto breadboard standard of 2.54mm or 100mils. The vertical spacing (that is, between top and bottom groups) is on the same 2.54 grid and having three on each side works out to 5 combinations from 500 to 900mils: badge spacing combinations Some examples of boards fitting those spacings:

Unfortunately you will find that manufacturers we all love and respect sometimes (always) miss to say what’s the pitch of the boards they sell, other than “it fits on a breadboard”. That’s just engineer’s life ¯\_(ツ)_/¯.

On the outer (upper and lower) edges of the board there are two single rows of 30-pin, 2.54mm pads - this is where you connect the peripherals. (NB: now that I think about it, who says you have to put the mainboard in the middle and peripherals on the edges… just sayin). Between them on each side there are two rows of 61-pin, 1.27mm or 50mils-spaced pads - that’s the pin configuration section.

Configuring the pins

Each of the paths connecting a pin from the mainboard side to a pin on the peripheral side can be configured to either join the two sides - that is, you put a jumper on the path, vertically, or each side can be connected to either of two common rails. The configuration pins have the following layout: badge configuration pins And that works out as:

and so on.

What are rails A and B? Those are just groups of configuration pins connected together that can be used for any purpose, although the first, obvious one would be to use them as power supply rails: positive and negative (hence I named them VCC and GND).

The PCB tracks for rail A are on side A (BSides London 2019 logo): badge tracks top B on side B for BSides London Logo: badge tracks bottom it’s done this way to help us determine whether we are connecting a pin to the correct side (as on the component, A side you see rail A, if you don’t see tracks - that’s the B side). badge tracks visibility My suggestion, and a totally biased one would be to assign A (top) as the positive and B (bottom) as the negative - this is because a common practice on one-sided boards was to make unused areas connected to ground so it, sort of, makes sense to have ground there - but you do you!

With that in mind, the configuration for each pin can be either

or, each side separately,

(so, either positive or negative, for example). In that way you can put a battery on any peripheral pins available and configure them to be connected to the correct rails and do the same for each peripherals and the main board.

There is, of course, a limitation here that you cannot connect the same pin to both rails… I don’t know why would you want to, but I felt like pointing out that I know of the limitations of the design :)

And what now?

I do not know!

Now it’s your turn :) We, as BSides or me, as Meadow do not have any rewards for this challenge, it’s purely for fun - we want to see how you receive that and whether you’re willing to participate. It might be that some conference would want to build a limited number of your designs… or you will have something to remember BSides London 2019 by, apart from the conference itself :)

I, for myself, have developed a project on this badge called Mood badge and this is the badge I was wearing at the conference. I have ideas for more, and I also already have ideas for improving this design for next editions. I am also happy to share the design!

If all fails, we, and me in particular, hope you had a fantastic experience on BSides London 2019 and this badge will remind you of it :)