Close
0%
0%

GAT Nametag SC8

A small OLED nametag addon that keeps your name always upright.

Similar projects worth following
This is a small OLED nametag that aims to present your name in a dynamic way, with configurable edge RGBLED lighting to attract attention.

By default, the letters of your name are kept always upright with respect to the ground. Alternatively, different dynamic name rendering effects can be used, such as wiggling letters or demoscene waves.

You will also be able to edit a virtual contact card, and synchronize this card with people you meet over infrared and possibly BLE.

Very complete on-board menu allows you to configure and customize your nametag.

This wasn't intended to be a last minute project but ended up being one...

Code and resources at https://basic.truecontrol.org - click on GAT Nametag SC8

At DEF CON 27, I released my first badge addon - a nametag that keeps your name upright no matter its orientation. See here: #GAT Nametag DC27 Addon

At DEF CON 29, I needed some code for the Whiskey Pirates badge. I ported the nametag code to a new platform and added more RGBLEDs, resulting in the WP DC29 minibadge. See here: https://hackaday.com/2021/08/06/hands-on-whiskey-pirates-dc29-hardware-badge-blings-with-risc-v/

For Supercon 8, I am revisiting this nametag. Porting to yet another MCU, the nametag has become smaller yet still eye-catching and readable.


Original features:

  • Shows your name (of course)
  • Select from several fonts
    (will include instructions on converting and adding new fonts at SC8)
  • Letters in the name are always upright no matter the addon orientation
  • Alternate rendering modes such as static, wiggling letters, or demoscene waves
  • Has 12x configurable RGBLEDs to show off and attract attention
  • Full on-board menu system to edit your name, choose fonts, and configure other settings
  • Does all this while remaining (somewhat) power-efficient: low-power RGBLED programs, no movement auto power off, etc.

New features for Supercon 8 (WIP):

  • I2C slave support; set arbitrary text or operate menus from the host nadhe
  • Infrared communication to sync virtual contact cards
  • USB support, to edit contact card or read synced contact cards
  • BLE support...maybe?
  • Games like 'snek' might finally be completed???

Current status:

Boards have arrived. Made a major mistake which will require rework of every board. It is my hope that I have around 80 of these ready for Supercon 8.


Due to unforseen emergency commitments, this addon was designed much later than originally planned. The design started in the second week of October and was finalized and sent for production on the third week. Several issues have been found during the assembly process.

If somehow this addon wins the Supercon 8 addon contest, I propose and can make the following changes to improve use / feel, product reliability, and reduce assembly steps and manual intervention. Most of these changes are trivial.

  • Part overlap, pinout, and other errors will be fixed
  • Following changes should reduce manual soldering to: addon header, OLED hot bar, and board-to-board interconnects without need for spacers or a hard requirement for jigs, trimming headers, etc.
  • Bottom PCB changes:
    • Will be made slightly larger as it doesn't affect the visual design
    • The menu operation buttons will move to the bottom PCB
    • The menu operation buttons may be larger for easier use
    • Prototype-related pads and components will be removed (debugger pins will stay)
    • Will use Type-C instead of micro-b
  • Top PCB changes:
    • Will use different IrDA part that can be machine placed
  • OLED changes:
    • Will custom design board for better front look, faster machine assembly
    • Custom board will slightly reduce power consumption
  • Diffuser changes:
    • Will ensure proper fitment
    • Cutout holes will be changed for new OLED board
  • Code changes:
    • At a minimum, further power optimization
    • Will try to clean stuff up to be easier to understand

sch_gat_nametag_top_sc8_REV4_20241023.pdf

Schematic, Top PCB

Adobe Portable Document Format - 210.35 kB - 10/23/2024 at 11:32

Preview

sch_gat_nametag_bot_sc8_REV4_20241023.pdf

Schematic, Bottom PCB

Adobe Portable Document Format - 160.04 kB - 10/23/2024 at 11:32

Preview

  • 1 × WCH CH592 Main MCU, BLE, 448K flash, 26K SRAM
  • 1 × awinic AW20054 RGBLED Controller
  • 1 × ST LIS2DW12 Accelerometer
  • 1 × WCH CH32V003F6U6 Sub MCU, 16K flash, 2K SRAM

  • SC8 over, short break

    true11/04/2024 at 21:34 0 comments

    Going to rest up a bit and take a break now that Supercon is over.

    No promises but before the end of the year I should finish assembly of all the extra nametags I have.

    I also want to get the infrared code working. With updated firmware, you’ll be able to sync a contact card with someone else’s nametag, so maybe you can remember each other later. Most of the hard code is done - it’s about finishing and testing it.

    RGB programs didn’t get touched like I wanted so expect several more with all program variables documented by the end of the year as well.

  • Progress 20241031

    true10/31/2024 at 16:56 0 comments

    have 33 units ready for supercon. ready meaning the hardware is built; they're not tested and firmware isn't flashed. won't be flashing firmware until I can fix up a few more things for release.

    lots of features I wanted to get done won't get done in time because hardware assembly went so long. will see what I can accomplish at con.

    parts for another 30 or so addons are at the final assembly stage so those will be soldered on the first day. should have >60 nametags good to go by noon or so on the first day. not my initial target of over 100 but it's what I was able to deliver with a one week assembly and coding window.

    hopeful to have 70-80 total roaming around the con. I don't plan on working on nametag hardware beyond the first day, instead focusing on software. hopefully I'll have time to walk around and see what people are doing or help people learn i2c but I feel like I am going to be drowned in making the features of the nametag work.

  • Progress 20241030

    true10/30/2024 at 08:13 0 comments

    0100:

    all top and bottom boards designated for Supercon are soldered. now I need to fix acrylic parts, tape and stick acrylic, solder OLED top to board, then solder assemblies to bottom boards. Most of these steps are fast.

    almost out of acrylic tape parts. need to cut more on the laser. will do that tomorrow evening, but…

    out of time for assembly. hoping I can get all my errands done early enough to fit a few more hours in tomorrow. was hoping for a day and a half more for code but … not sure about that now.

  • Updates 20241029

    true10/29/2024 at 09:59 2 comments

    0300:

    I am still utterly drained. Tried to sleep to reset sleep schedule but only kinda napped for an hour and a half.

    Back to soldering. This is my last day of soldering. I need a day to prep the vehicle for the trip and take care of other things, and the code still needs a LOT of work to be where I want it to be.

    0730:

    Nowhere close to done. Numerous roadblocks. There were 4 discrete steps but that’s now at about 6. I am at 90%, 55%, 35%, 6% and 6%. sleep is screwed up and having nerve / spasm issues. will keep pushing to get this all done.

    1745:

    Still super far behind. Slept a little bit. Finding more issues with my assembly. Only 10% are finished but at least I am at the last assembly steps. Counts are 100%, 55%, 35%, 19% and 10%.

    1900:

    100%, 70%, 35%, 19%, 19%, 19%.

    2230:

    100%, 70%, 65%, 37%, 37%, 25%.

    2355:

    100%, 70%, 65%, 37%, 37%, 37%.

    Only 30 units done…

  • thoughts on CH592

    true10/28/2024 at 14:46 0 comments

    the nametag uses CH592 as main MCU for the nametag. why? there's a few reasons for this choice:

    • peripheral support needed for this project is minimal
    • it's a small and inexpensive mcu
    • ...which has lots of flash storage space, which I need
    • it has BLE, which I might use in the future... who knows. it's also very low power in BLE receive mode, just 3.5mA
    • crystal needs no caps as bias is configured internally
    • may not need a matching network for some RF designs but I haven't read into how this works yet
    • adc has native "TouchKey" support, which works pretty well and is ridiculously easy to use
    • supports USB device OR host, has RTC

    but still ... why CH592? after all this MCU has some cons as well:

    • not many peripherals
    • hardware I2C shares pins with debug, and has no remap
    • CH59x comes with debug locked, so first thing I have to do is connect USB just to be able to use the debugger...
    • timers are only sourced from system clock, which sucks
    • execution from flash memory sucks. datasheet specifies "zero-wait at the system frequency of 20MHz" though any registers relating to setting wait states are undocumented. it sure feels slower even at 16MHz but I haven't tested it yet. flash and RAM both go through the main bus in this design so there's no special benefit to executing from flash instead of RAM as there is in other designs. rather there's a negative: significantly higher power consumption and significantly slower execution speed.
    • on that note... the datasheet is very terse and is missing information. sometimes it blatantly says to check example code, or it even says it will not document certain functions...


    so why did I settle on CH592?

    ultimately, the main factors were as listed above, but the big one was flash storage. I knew I was going to reuse the nametag code, and I haven't had time to rewrite the code to use external storage for fonts. I'll get to this eventually but I don't have time to do it now, so large flash it is. CH592 is extremely cheap for having 448K standard flash. How far we've come...

    actually, I wanted to use this part until I read through the datasheet. knowing this nametag would be I2C heavy - particularly with OLED updates - I wanted a working hardware I2C peripheral, ideally with DMA so the CPU could save power. CH592 has a hardware I2C peripheral but it's on the same pins as debug, which disqualified it. debug is important. power consumption during execution was really low however: executing from RAM at 48MHz consumes about 2.5mA. pretty nice. so if I had to do soft I2C, vs doing interrupt I2C, I guess there isn't much power difference, just code architecture differences (can't interrupt I2C comms in the middle of sending bits, some devices don't like that...)

    so I looked at using a different MCU. CH582 has the same slow flash, but has more RAM for code. importantly the I2C pins are not shared with debug or anything else I'd use in the design. there's also more use publicly of CH582 as it's been around longer. it costs more than CH592 but not by much: ~$0.75 vs $0.45 in badge qty. still cheap. oh, and the radio can support long range modes if I want. this has been stripped out of CH592.

    by the time I got around to working on the nametag hardware I completely forgot that I researched this and went with CH592 in the final design...

    so this is where we're at now. I run the soft I2C master routines at 32MHz and for this MCU at least the power consumption isn't much different between 32MHZ and WFI. of course this MCU isn't doing much in it's low speed time so I could use ultra low power mode but ... I'd only be saving a little over a milliamp. I'd like to not consume this but it's an addon. most people hardly consider power consumption anyway, lol. do I really want to be like that too? I guess not really...


    final thoughts on ch592?

    for general purpose work, it's ok.

    peripheral library is weak. sample code kinda sucks.

    hardware peripherals are limited in type and generally very simple, though some have some interesting features (such...

    Read more »

  • Updates 20241028

    true10/28/2024 at 07:37 0 comments

    0100:

    Assembly is going really slow. I'm ... drained.

    The acrylic has been designed and I uploaded a photo of a prototype. Progress was made after the prototype and the final acrylic looks much better, diffuses more light forward, fits tight with just enough tolerance.

    Did a quick test of current in the nametag mode with the brightest RGB program (rainbow) running.

    20mA with no screen. Add the screen, is 27mA.

    I didn't test with no RGB program but I would guess between the quiescent of the RGBLED controller and MCUs, the current would be something like 10-12mA. Not awful I guess. This is with only basic consideration for power optimization, and soft SPI master on the main MCU.

    I'll stop procrastinating and get back to assembly in a little bit.


    2030: Still soldering. Still adding headers and standoff pins.

    How is it done?

    I have jigs for the top and bottom boards. The top board gets two pin TH header.

    Bottom PCB gets modified addon connectors. These are modified as I screwed up the board and have the connector mirrored, lol. Don’t want to pass power back over the GPIO and cause problems. The header gets soldered and bodge wires added.

    Following these steps, the OLED gets attached to the top board next with acrylic and tape sandwiched in between. After that, the OLED+acrylic+top assembly gets soldered to the bottom assembly, finishing the process.

    Note that if this was to somehow win a spot in the contest, parts of this assembly would be simplified or replaced with SMT alternatives in order to speed assembly and reduce hands on work needed.

    I hope to be at the OLED assembly phase in a few hours. If things go well I may have them all assembled before I go to sleep.

  • Progress 20241027

    true10/27/2024 at 08:46 0 comments

    Been hacking away at code. Struggled yesterday with button / multi-mcu comms code code but got it squared away after 10 hours. Since then things have mostly worked out OK. All core features work and added a couple new things. There's still a lot to do.

    Designed assembly jigs a few hours ago. Once my brain isn't so hazy I'll finally design and cut the diffuser acrylic to post real photos. I'll be working on assembly for the next couple of days to have as many ready as possible for con. Still need to fit in vehicle prep time for the trip.

    No idea what comms will work by the start of SC8. Hoping I can get the IrDA code done at least as that's the key feature.

    I really need another week...

  • Progress 20241025

    true10/25/2024 at 10:25 0 comments

    Had a bunch of bugs in main MCU code. Been pretty brain fried so was slow going, but it's mostly working now. Renders the OLED and gets accelerometer data.

    Now I need to finish the button handling part. Will write the initialization code for button interrupts after I wake up and see if all the rest of the code falls into place. If so then I can focus on hardware for a day or so, clear my mind, then come back to code in a couple days and add the new fonts, Supercon banner, and text render modes. Oh and maybe get some basic IrDA comms working. Not sure I'll have the USB card thing by con but I can have a name and message log at least!

    Can do more if time permits.

  • Progress 20241024

    true10/25/2024 at 00:30 0 comments

    1630:

    PCBs arrived.

    Testing the main board so far, have a major problem. Knew stress and rush would bite me and I’d screw this up on some project eventually. Addon header is backwards, lol. I can work around it with bodge wires and cutting traces but this already cuts into time I don’t have. I guess the GPIO pins won’t be used. They were wired but I wasn’t planning on using them anyway.

    After some initial troubles I do have debug and program working. I2C soft master code doesn’t seem to be working correctly (or at least the OLED isn’t initializing) so the next task is to troubleshoot that. Hopefully it’s as simple as my delay constants being wrong. Once I know I2C master works and something shows on the OLED, I’ll work on getting the slave MCU code debugged.


    1900:

    soft i2c master bugs fixed, timings also fixed.

    Need to start work with the sub MCU now.

  • Updates 20241023

    true10/23/2024 at 11:25 0 comments

    PCBs are finally with the carrier, and will likely be here tomorrow. Friday at the latest. There's a lot to do once they arrive...

    Nearly every other project is wrapped up and ready for Supercon. For a week, this will be my focus.

    Expect real photos of an assembled unit this weekend.

    Uploaded schematics for anyone who wants to get an idea of what this thing is made of.

View all 14 project logs

Enjoy this project?

Share

Discussions

jeremy.geppert wrote 11/04/2024 at 14:23 point

This project is likely seriously underappreciated. After seeing it in person and being fortunate to trade for one, it's incredible what is all packed in and how well it is done. Lots to learn from this.

  Are you sure? yes | no

Tom Nardi wrote 10/17/2024 at 23:12 point

The "always upright no matter the addon orientation" feature is definitely going to come in handy with this year's badge...

Looking forward to seeing this one, here's hoping they arrive on time!

  Are you sure? yes | no

true wrote 10/18/2024 at 00:21 point

Mike reviewed my DC29 badge back in the day, which was the source for the code for this addon. The review shows this feature in action.

https://hackaday.com/2021/08/06/hands-on-whiskey-pirates-dc29-hardware-badge-blings-with-risc-v/

That should give you an idea of how this feature should work.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates