Hands-On: CCCamp2019 Badge Is A Sensor Playground Not To Be Mistaken For A Watch

Last weekend 5,000 people congregated in a field north of Berlin to camp in a meticulously-organized, hot and dusty wonderland. The optional, yet official, badge for the 2019 Chaos Communication Camp was a bit tardy to proliferate through the masses as the badge team continued assembly while the camp raged around them. But as each badge came to life, the blinkies that blossomed each dusk became even more joyful as thousands strapped on their card10s.

Yet you shouldn’t be fooled, that’s no watch… in fact the timekeeping is a tacked-on afterthought. Sure you wear it on your wrist, but two electrocardiogram (ECG) sensors for monitoring heart health are your first hint at the snoring dragon packed inside this mild-mannered form-factor. The chips in question are the MAX30001 and the MAX86150 (whose primary role is as a pulse sensor but also does ECG). We have high-res ADCs just waiting to be misused and the developers ran with that, reserving some of the extra pins on the USB-C connector for external devices.

There was a 10€ kit on offer that let you solder up some electrode pads (those white circles with gel and a snap for a solid interface with your body’s electrical signals) to a sacrificial USB-C cable. Remember, all an ECG is doing is measuring electrical impulses, and you can choose how to react to them. During the workshop, one of the badge devs placed the pads on his temples and used the card10 badge to sense left/right eye movement. Wicked! But there are a lot more sensors waiting for you on these two little PCBs.

Card10 is made up of two circuit boards separated by standoffs just tall enough to hide the 200 mAh lithium battery between them. The user interface is a color LCD screen, four extremely tiny buttons actuated at 90 degrees off the left and right side of the top PCB, and numerous LEDs — some obvious and some less so.

Hardware on Top of More Hardware

When it comes time to hack on this badge, the hardware is a gift that keeps on giving. Is there an accelerometer? Oh, very much yes — and here’s where it gets crazy. I’ve been playing around with the BHI160 which is both accelerometer and gyroscope, and in looking up the part number while writing I find there also a BMA400 accelerometer that I didn’t know was there. Hey, guess what? There’s also a BME680 for temperature, humidity — ho-hum those are both common — oh yeah it does air pressure and air quality too. What?!? How is there room on the board, much less in the budget for this?

Hey, you know that MAX32666 Cortex-M4F processor running at 96 MHz with 512 kB of RAM at the center of this thing? One core runs all of the critical functions, while the second core handles the MicroPython layer and all of the user code. Oh, and there are eight megabytes of external flash to augment the one megabyte provided by the microcontroller. In keeping with the smartwatch theme, there’s a vibration motor on the board. And along either side of the bottom board are breakout pads meant for adding your own hardware to the watch band using conductive thread.

This is a wolverine in sheep’s clothing, ready to shred badges that mistake this for pedestrian.

Assembly is Both Easier and More Difficult Than You Think

The watch band itself is a surprisingly clever part of the design. Two flexible steel plates span the board between the bottom screws used or the standoffs. They sandwich the soft synthetic watch band, which is the least-dense neoprene I’ve ever encountered. This is great as it never felt hot in the sweltering August sunshine. A simple piece of hook-and-loop fastener — I’d never dare to call this by the brand name Velcro (we already made that dire mistake) — acts as the clasp.

First off, bravo to the packaging team. Everything was in a nice zipper envelope and all of the smallest parts are themselves inside of a tiny paper envelope. There are printed instructions a-la Ikea to help with assembly.

At first glance the kit feels like it will involve a lot of work; it does not. Deciphering the pictograms requires a bit of head-scratching and will have the polarizing effect of either making you feel smart or foolish. If the pictures don’t give you challenge, the very tiny screws certainly will. I was lucky enough to be in the Hardware Hacking village when I put mine together and they had the exotic tiny Torx wrench for the screws.

I’m not complaining… it’s a wrist-mounted ECG, and space matters. The imperceptibly thin double-sided tape for attaching the battery worked great after some fiddly peeling, and my fears of catapulting the tiny screws when flexing those steel watch band clamps were only calmed by knowing extra screws were provided in the kit. The only real head-scratcher for me is why one of the standoffs is nylon while the other three are all brass?

Choose Your Own Bling

When you first turn it on, card10 doesn’t light up the LEDs on top of the board by default. But isn’t that a good thing? When you see the row of eleven RGB LEDs doing something on this watch it’s because the wearer took action to make it so. Yes, the top layer goes to eleven, but there’s more… dig in and you’ll find parts of the board with the CCC rocket logo illuminated by LEDs from the board below. It took me several hours of digging through the documentation before I discovered the design for a side-firing “flashlight” LED. Unfortunately, a layout error means this was never populated, but it would have been so useful at camp as locating your flashlight in a dark tent at 3 AM is a treat. (Who am I kidding, everyone has a cellphone flashlight, but still.)

Who Let the (Micro)Python Out?

I suspect that on my death bed I will still hold a deep love for the C programming language. Don’t get me wrong, I love Python too, but for desktopy/webby things like OAuth and text manipulation. (n embedded platforms, Python feels like using a sonic toothbrush when a hammer is called for.

Testing out code live on the badge in a serial terminal window

Thus I’m still undecided upon this. I do think MicroPython is the future for embedded electronics. We will always need embedded engineers, but in the same way that electronic design trended away from analog and toward digital, engineer-focused electronics will trend toward higher level languages and I think Python has already managed to vanquish its challengers.

I struggled with some strange things on this badge. It seems the accel/gyro will sometimes return an empty value — my C sensibilities expect this to be erroneous data and not a showstopper, but Python throws and exception and my code wasn’t ready to catch it. On the other hand, Python provides a live interpreter via the USB-C jack on the badge so you can try out each command and discover problems along the way. It’s also a printf dream come true to have Python’s uber-powerful print() statement piped out to /dev/ttyACM0. My verdict on this is that it’s just different — C would have taken longer to pick up, but much of that time was lost again dealing with MicroPython (which I’m much less familiar with) quirks.

Picking My Jaw Up Off the Floor

Like a fine Scotch, the first sip was not what I was expecting, but over time I became addicted. Documentation for the card10 badge is the best I’ve ever seen (specifically the firmware docs) outside of a major Open Source software project that already has extensive adoption. The sensor array is a dev-board dream come true. There’s even an established app repository in the form of the badge.team hatchery so you can see what tricks your fellow hackers are up to. But most important of all, this thing makes sense attached to your arm rather than as a pendulum around your neck. (Although without a battery-backed RTC the clock does need to be set to the current time via Bluetooth using the smartphone companion app.)

My fear is that five thousand badges made it out into the wild, but few will realize what they have. My plea to all the amazing people at camp: what you’re holding is special and deserves so much more than one weekend of fun… don’t let this get lost in your parts bin! Don’t take my word for it, check out the badge talk from the con to bring you up to speed:

Once you’ve started developing, join the conversation on IRC at freenode #card10badge.

19 thoughts on “Hands-On: CCCamp2019 Badge Is A Sensor Playground Not To Be Mistaken For A Watch

  1. Micropython is pretty terrible, especially on the BBC microbit microntroller which ships with this as it’s default language. This is a shame because it gives a bad name to regular python, particularly so to (usually young kids) those using a microbit as their first experience of embedded programming or programming at all. Micropython effectively risks putting people off, at a young age, programming (in general), python (if they would have otherwise gone on to use it in a data processing or text handling context on normal computers) and embedded programming. I’m not sure why this ECG would want to use micropython and all the troubles that entails, I hope there is atleast a way to put C on that second processor as an alternative to micropython?

    1. Every component on that badge, and even its production, is made possible by capitalism. Antifa is a communist movement that started to resist all forms of capitalism, which they equated with fascism.

      1. All the work in designing and documenting this project is an act of hardware kindness, and a gift, but it’s not likely to make sense to try to replicate, even though it’s open source.

        The team got a lot of parts given to them for free, and were able to include more sensors than you might otherwise. If you’re designing for a particular purpose, you’ll probably want to optimize differently anyway.

        That said, ST has some nice “all-our-sensors” boards and there are projects like https://hackaday.io/project/19649-stm32l4-sensor-tile that do similar things.

  2. “Antifa” is way more complicated than that, especially in Germany. Right after the war antifacism was common within most parties, some were communist and some anticommunist. Even today there are different antifa sub groups, some are pro and some are against communism / capitalism / militant / … It’s everything but an homogeneous political movement.
    Even the Grundgesetz (Germany’s constitution) is antifacist, pro democratic and mixes that with somewhat social capitalism.

    And well, the CCClub has no official communist / anticapitalist agenda, but the club has a very clear incompatibility declaration (Unvereinbarkeitserklärung [1]) to exclude facist.

    [1] who doesn’t love compound words?

    1. From Wikipedia, history of the Kommunistische Partei Deutschlands (German Communist Party):

      The party’s paramilitary wing was the Roter Frontkämpferbund (“Alliance of Red Front-Fighters”), which was banned as extremist by the governing social democrats in 1929; in 1932 the KPD also founded Antifaschistische Aktion, commonly known as Antifa, which it described as a “red united front under the leadership of the only anti-fascist party, the KPD,” and which largely attacked the “social fascists” [social democrats]

      This is the origin of the symbol with the two flags, black and red … quite a few years before the war.

      https://en.wiktionary.org/wiki/antifaschistischer_Schutzwall

      Germans were happy enough to see their “Anti-fascist” wall come down in 1989. How quickly the memory was erased, huh?

      1. Many groups used the term anti-facist for quite different phenomena.

        The term “Antifaschistischer Schutzwall”, however, was pure euphemistic propaganda of the former “German Democratic Republic” regime, targeted to their own population.

        I don’t think you can grasp the “Antifa” movement just by reading google and (english) wikipedia articles.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.