WebSerial: Browser Based Development For Your Boards And Electronic Badges

For years, one of the most accessible and simplest-to-implement methods of talking to a dev board has been to give it a serial port. Almost everything has serial in some form, so all that’s needed is to fire up a terminal. But even with that simplicity, there are still moments when the end user might find a terminal interface a little daunting. Think of a board aimed at kids for example, or an event badge which must be accessible to as many people as possible.

We’ve seen a very convenient solution to this problem in the form of WebUSB, but for devices without the appropriate USB hardware there’s WebSerial, an in-browser API for communicating with serial ports including USB-to-serial chips. [Tom Clement] argues that this could serve as the way forward for event badges. Best of all it can be a retro-fit to enable in-browser development for older badges or dev boards with a serial port.

The boards on which he demonstrates the technique are the series of event badges running the badge.team firmware platform including his own i-Pane from CampZone 2019 and going right back to the SHA 2017 badge, but there’s no reason why the same technique can’t be extended to other boards.

There’s a snag with all this though, sadly only browsers in the Chrome family support it at the time of writing, with no plans from Mozilla and apple, and silence from Microsoft. So things look likely to stay that way. It is however inevitable that in time there will be commercial products taking advantage of it via the use of cheap USB to serial chips, so perhaps the case to incorporate it will make itself.

Header: Mobius, Public domain.

A Four-Year-Old Event Badge Makes An Environmental Sensor

By now we’re all used to the requirements imposed by the pandemic, of social distancing and wearing masks indoors. But as [polyfloyd] and the rest of the board at Bitlair hackerspace in Amersfoort in the Netherlands were concerned, there are still risk factors to consider when inside a building.  Without fresh air the concentration of virus-bearing droplets can increase, and the best way they could think of to monitor this was to install a set of CO2 sensors. To run them they didn’t need to buy any new hardware, instead they turned to a set of event badges, from 2017s SHA hacker camp.

This badge sported an ESP32 module with an e-ink screen, and of most interest for this project it still has a supported software platform and comes with a handy expansion connector on the rear. The commonly-available MH-Z19 infra-red CO2 sensor and BME280 humidity sensor fit on a PCB that follows the shape of the badge with a protrusion at the top on which they appear as an integrated unit. Processing those readings is a MicroPython badge app that issues warnings via MQTT and plots a CO2 graph on the screen. Everything is available, both the hardware in a GitHub repository and the software as a badge.team app.

We applaud anyone who makes use of an event badge for a project, and especially so for using one years after the event. The SHA badge and its descendants are uniquely suited to this through their well-supported platform, so if you have one in a drawer we’d urge you to pull it out and give it a try.

Bringing Full Colour PCB Art To Production

One of the Holy Grails in the world of electronic badges has been full-colour PCB art as a logical progression from the limited palette of traditional PCB artwork. In the progression towards achieving this goal there have been a variety of techniques applied, and it’s become an expensive commercial possibility rather than an unachievable dream. Has it become practical for mere mortals then? [Tom Clement] has put together a write-up of his progression towards achieving full-colour PCB artwork on a limited production run , and it makes for a fascinating read.

The board in question is the Pixel badge, an improved commercial version of the CampZone 2019 I-Pane badge we reviewed last year. It’s a very bright large multicolour LED matrix that has caught the eye of campgoers at events ever since the original, and has generated enough demand for a new production run. As well as a few electronic enhancements it replaces the original’s dithered monochrome silkscreen rear art with a full-colour design, and it is that with which the write-up is concerned.

It starts with UV printing, and goes through the various iterations of the process until a satisfactory result is achieved. We learn about the effect of reflow temperatures on UV printing inks, it seems that white ink discolours with temperature and the inventive solution is to transfer all the whites to the PCB silkscreen layer. He closes with a discourse on alignment, and we start to appreciate the achievement behind producing this badge. A colour print isn’t necessary for the Pixel’s eye-searing light show, but the point of badges is as much to show off the cutting edge of the art.

As the regular Hackaday reader will know, colour PCB art is a long-time topic of interest here at Hackaday.

When Only The Tiniest Of Violins Will Do

Playing the tiniest of violins may be a phrase to encapsulate the complete lack of sympathy as someone unpleasant receives their just deserts, but have any of you ever considered how such a feat might be achieved? Unless you’re an unusually talented virtuoso with the bow, it’s difficult to believe that such a small instrument could be played with ease, even if it were to be available in the first place.

Happily a solution is at hand to all those minuscule stringed instrument woes, courtesy of [Alexandra Covor], who has created a miniature PCB violin that is after a fashion playable. It may not be a conventional instrument with a horsehair bow and traditional sounding mechanism, but its electronic voice should still deliver enough to delight.

At the heart of the violin-shaped PCB is an ATtiny85 and a piezoelectric buzzer, and just where you might expect them are a set of strings made from wire attached to the PCB. The instrument can play stored tunes, but since the strings are hooked up to an analogue input on the microcontroller, it can be played as a touch instrument. Finally a pair of LEDs behind the translucent FR4-only F-holes complete the look. It’s fair to say that Itzhak Perlman and his ilk are safe from challengers bearing this instrument, but it’s still an eye-catching piece of PCB art.

This isn’t the first tiny violin that’s been featured here, some others are much smaller.

Hands-On: BornHack 2020 Badge Has 9×32 Of Bling Fed By CircuitPython

Despite widespread pandemic cancellations, BornHack still happened this year and they even managed to once again bring an electronic badge to all attendees. If you missed it, I’ve already published an overview of the hacker camp itself. Today let’s dig into the 2020 BornHack badge!

Designed by Thomas Flummer and manufactured in Denmark, it takes the form of a PCB in the shape of a roughly 60 degree circular arc with most of its top side taken up by a 9 by 32 array of SMD LEDs. There is the usual 4-way button array and space for an SAO connector on the rest of the front face, while on the rear are a set of GPIO pads and a pair of AA battery holders for power. Connectivity is via USB-C and infra-red, and usefully there is also a power on/off switch.

At the heart of its hardware is a SAMD21G18A ARM Cortex M0+ microcontroller which is perhaps not the most exciting of chips, but the hardware becomes more interesting with the LED drivers. A pair of the IS31FL3731 chips (you may recognise from Brian Benchoff’s Mr. Robot badge) each drive half of the Charliplexed LED array. These versatile chips take the bother of scanning the LED matrix away from the microcontroller with their own internal frame registers fed from an I2C interface. This choice both makes the best use of the relatively meagre microcontroller in this application, and opens the way for the software choice. This badge runs Adafruit’s CircuitPython, and can thus be programmed over the USB connection in the same way as any other CircuitPython board. To test this I put aside my GNU/Linux laptop, and picked up something considerably less versatile to test its ease of use: a Chromebook.


# configure I2C
i2c = busio.I2C(board.SCL, board.SDA)

# turn on LED drivers
sdb = DigitalInOut(board.SDB)
sdb.direction = Direction.OUTPUT
sdb.value = True

# set up the two LED drivers
display = adafruit_is31fl3731.Matrix(i2c, address=0x74)
display2 = adafruit_is31fl3731.Matrix(i2c, address=0x77)

text_to_show = "BornHack 2020 - make clean"

CircuitPython devices mount as a disk drive in which can be found a Python file that can be edited with the code of your choice. The BornHack badge ships with code to display a BornHack banner text, which serves as a quick introduction to the capabilities of its display. It’s noticeable that the text scrolling performance leaves something to be desired, but this microcontroller is hardly one of the more powerful supported by the CircuitPython platform. The Chromebook was happily able to edit the code, though viewing the Python serial console necessitated diving into its Linux virtual machine.

The BornHack badge then, an attractive design that fulfils the aim of being capable and easy to program through its use of the popular CircuitPython platform, and through its decent sized LED matrix and available GPIOs with the chance of seeing a use beyond the camp as a general purpose display/experimentation platform. It may not be the most powerful of badges, but it does its job well. In particular it has achieved the feat missed by so many others, of arriving at the camp fully assembled and with working hardware and software. You can see more about it in Thomas’ badge presentation at the camp (cut from a stream, talk begins at 5:27) which we’ve placed below the break.

We look forward to seeing its influence upon other similar badges. Meanwhile if you are interested, you can compare it with the 2019 BornHack badge which we reviewed last year.

Continue reading “Hands-On: BornHack 2020 Badge Has 9×32 Of Bling Fed By CircuitPython”

Hands-On: Internet Of Batteries Quantum Badge Brings Badgelife Add-Ons The Power And Internet They Crave

Our friends in the Whiskey Pirates crew sent me the unofficial DEF CON badge they built this year. The Internet of Batteries QUANTUM provides power and connectivity to the all-important add-on badges of DC28. The front of the badge is absolutely gorgeous to the point I don’t really want to solder on my add-on headers and disrupt that aesthetic.

The gold-plated copper makes for a uniformed and reflective contrast to the red solder mask which occupies the majority of the front. Here we see the great attention to detail that [TrueControl] includes in his badges. The white stripe of silk screen separating the two colors is covered by some black detailing tape that looks much better than the white.

The antenna of the ESP32 module poking out the underside of the gold cover end of the badge gets its own rectangle of the holographic sticker material, the same as the sheet of stickers that was included in the box. Both decals are small details that make a huge difference to your eye.

The line of nine RGB LEDs have black bezels which goes along with the black stripe motif and underscores the typography of the badge name. These lights are hosted on a daughter board soldered to the underside of the badge with a slot for the LEDs to pass through. They are addressed in a 2×15 matrix that is scanned on the low side by the PSoC5 that drives the badge. This low-res image shows that daughter board before the lithium cell is placed.

Continue reading “Hands-On: Internet Of Batteries Quantum Badge Brings Badgelife Add-Ons The Power And Internet They Crave”

Hands-On: AND!XOR Unofficial DC28 Badge Embraces The Acrylic Stackup

Still hot from the solder party, a new AND!XOR badge just landed on my desk courtesy of the hacking crew that has been living the #badgelife for the past five years. Originally based on the Futurama character Bender, the design has morphed to the point that it’s no longer recognizable as a descendant of that belligerent robot. Instead we have a skeletal midget whose face is half covered by a gear-themed mask.

Continue reading “Hands-On: AND!XOR Unofficial DC28 Badge Embraces The Acrylic Stackup”