Video Pendant

Put screens on your jewelry.

Similar projects worth following

Whenever people see the 0.9" TFT ST7735S screen, they tell me I should make jewelry with this. So here it goes. A small color screen that you wear on your neck, that displays some cool animations.

Inside there is a SAMD21 (because that's what I have in my drawer), a LIR1220 battery (whooping 8mAh), and the minimum of components needed to make it work. USB socket lets you charge it and upload the images, and a switch lets you, well, switch it on an off. All fits on the 0.9" PCB under the display.

  • Goodbye

    deʃhipu09/11/2023 at 16:05 0 comments

    I decided to stop pretending I will ever finish this project, and put it out of its misery.

    I still believe it's generally possible to get the exact hardware I used to display animated GIF that you can easily upload to an USB drive. However, it would require a bit of work to write the firmware that does it, and I find that I no longer am interested in doing that work.

    While I was procrastinating, CircuitPython grew a gifio library, that displays animated GIFs straight from the filesystem. It's as simple to use as:

    import board
    import gifio
    import displayio
    import time
    import struct
    display = board.DISPLAY
    odg = gifio.OnDiskGif('sample.gif')
    start = time.monotonic()
    next_delay = odg.next_frame() # Load the first frame
    end = time.monotonic()
    overhead = end - start
    display.auto_refresh = False
    display_bus = display.bus
    while True:
        time.sleep(max(0, next_delay - overhead))
        next_delay = odg.next_frame()
        display_bus.send(42, struct.pack(">hh", 0, odg.bitmap.width - 1))
        display_bus.send(43, struct.pack(">hh", 0, odg.bitmap.height - 1))
        display_bus.send(44, odg.bitmap)

    That's it. It works. But of course not on the SAMD21, which has way too little flash and memory to fit it all. I have built a custom version of CircuitPython that has almost everything disabled to fit gifio, and it kinda works, except of course:

    Auto-reload is on. Simply save files over USB to run them or enter REPL to disable. output:
    Traceback (most recent call last):
      File "", line 9, in 
    MemoryError: memory allocation failed, allocating 24024 bytes
    Code done running.
    Press any key to enter the REPL. Use CTRL-D to reload.

    I'm sure I could tweak the gifio library to make it use smaller buffers and make it fit in that RAM. But I don't want to.

    I also don't want to write the whole thing in C, using tinyUSB and a gif library. It just feels too much like work, and very little like fun exploration.

    Note that I will probably get back to the idea of a pendant with a display showing animated GIFs. Especially since it's now literally just a few lines of code in CircuitPython. But I will probably use a different displays and definitely a more powerful microcontroller. And I will possibly just use a ready development board, such as the Seeedstudio Xiao, because there is very little I would gain doing a bare chip thing from scratch at this point (and because I got spoiled by SAMD21's minimal component count, and any other microcontroller feels like too much work now). 

  • Where Are We?

    deʃhipu11/01/2022 at 22:11 0 comments

    Hardware-wise, I think I'm reasonably happy with what I have – at least it's more than sufficient as a prototype for testing. What I need now is the software. I have tested the device with CircuitPython – I have even written a GIF decoding library in pure Python specially for this – and I'm confident this can work, but not with CircuitPython. So the next step is to get the the firmware for this working.

    I can use the TinyUSB library to expose the filesystem over USB – it's the same library that CircuitPython is using, in fact. And I can use a super-optimized GIF library written by @Larry Bank. That should get me the minimal functionality. I can then also experiment with sleep modes and touch and all that stuff.

    The problem I am facing right now is setting up an environment for development for the SAMD21. I will probably start with Arduino, because that is already mostly ready out of the box, but there is still some work with that, that I currently just can't get myself started on. So until I get that going, the project is on hold.

  • Ressurected

    deʃhipu08/12/2020 at 20:21 0 comments

    I'm bringing this project back from the dead, now that I have learned a bit and got new ideas for it. I already wrote about a solution for the battery problem — have the battery on the other side of the wires, on your neck. I'm going to go with that, but since the #Electronic Barrette Hub is not ready yet, I will use a regular battery holder.

    The other innovation is using a thin PCB, and a PCB USB socket — that lets me make it really thin.

    I slapped together a PCB design with those ideas incorporated, and it arrived today, so I assembled it:

    It's flashed an ready to be programmed. Next step is to compile a version of CircuitPython prepared for it.

    The last innovation I have is software: I no longer need to use BMP files, as I wrote a Python library for reading GIF files. It's probably not fast enough, but there is one more possibility — perhaps I could include a C library that was recently created for SAMD21 for playing animated GIFs as a CircuitPython C module — then they should play at native speed.

  • Barrette as the Base Station

    deʃhipu08/26/2018 at 10:50 0 comments

    Considering the latest redesign idea, I'm not aiming at a very small pendant with just the microcontroller, connected to the #Electronic Barrette Hub for power. The hub will also be used for programming the display over the USB, this way I can use a very small and nice-looking connector on it, which won't interfere with the eventual resin casting.

    That means that the PCB design will be greatly simplified, but I have to wait for it until the design of connectors for the barrette is finalized.

  • Redesign

    deʃhipu08/02/2018 at 16:59 1 comment

    I have been showing off the prototype of this pendant in different places, and during the poster session on EuroPython a person who I can't now remember (sorry) suggested a really great solution to the problems of small battery and large thickness of the device. It looks something like this:

    (The wire length is not to scale.)

    Basically, they proposed to put the battery, together with the charging electronics and power switch on a separate device, that would be located on the neck or back, and that could be pretty much any reasonable size. The power would be transmitted to the device through a pair of soft wires that replace the string on which the pendant hangs. The pendant itself then only needs the actual screen, the microcontroller and the USB port for data transfer — all relatively small elements, with the USB socket being the largest. This lets me make it really thin, and since there are no mechanical parts, it can be embedded in resin easily (USB port can be problematic, but I have some ideas).

    There are still some problems to be solved. How to prevent the heavy battery from sliding down the back of the wearer and pulling the pendant up? Maybe some kind of a clip for the collar? How prevent electronics from irritating the sensitive skin on the back of the neck? We will see how all that works.

    That means that I won't be assembling the PCB that just arrived from OSHPark. And good, because due to my laziness it misses the cutout for the sunken USB socket:

    But that also means that now I need to design two new PCBs. No rest for the wicked.

  • Touchy Power Switch

    deʃhipu07/14/2018 at 12:31 0 comments

    One more version of the pendant, this time with the mechanical power switch replaced with an AT42QT1012 chip. This thing is tiny — about 2mm on a side — and I had to make a custom footprint for it. Of course Fritzing decided to not cooperate and rolled out all of its SVG parsing bugs. I got it to a state where it should probably work, but it's not pretty.

    I actually ordered this version, we will see in a few weeks how it works.

  • Sunken Components

    deʃhipu07/04/2018 at 21:11 0 comments

    I have the promised design of the pendant using a QFN package of the SAMD21. I'm also experimenting with reducing the thickness of the whole device, by making holes for the battery, USB socket and power switch, and mounting them inside those holes. I'm curious how this will work.

    In the mean time, I dropped the touch pads, so no touch sensing in this version. But it's probably not going to be final, I still have to experiment with getting rid of the mechanical switch and using something else in its place, so that I could drown the whole thing in resin. I wonder if I could keep the USB socket, but fill it with something like wax before casting.

  • Ready for More Prototypes

    deʃhipu06/14/2018 at 09:11 0 comments

    More displays just arrived:

    I now have three goals:

    • write a GIF decoder in C and include it in the firmware, so that animated GIFs can be displayed,
    • redesign the PCB with a QFN package of the chip, and try to make it all thinner,
    • figure a way to get rid of the physical switch, so the whole thing can be cast in resin or something similar.

    For the second point, I'm considering making a hole for the battery in the PCB, and moving the microusb port and the charger electronics to a charging station.

    For the third point, I guess I would need to add a mosfet on the backlight, figure out the sleep modes of the MCU, and make it wake up on touch or add an accelerometer for waking up (and also for some interactive animations).

    However, for now the first point has priority.

  • First Picture

    deʃhipu06/13/2018 at 19:46 0 comments

    I finally sat down, compiled the firmware, adapted the ST7735 driver to the new dimensions, and quickly hacked some code for displaying a 16-color BMP (because I already had similar code for the #µGame). The result:

    The colors are a bit funny because it's dark in here and the display doesn't have good viewing angles either. But I think it's pretty nice.

  • This Never Gets Old

    deʃhipu06/13/2018 at 09:06 1 comment

    The batteries arrived, and a quick test revealed why it didn't work with the CR battery: of course I swapped the terminals of the battery holder. Fortunately the voltage regulator I'm using has reverse voltage protection, so nothing burned. A quick desolder, removal of the plastic numbs that key the holder in the right position, and re-solder in opposite position fixed it.

    Though I still need to compile the firmware for it.

    I fixed the PCB, but I still want to rework it to use a QFN version of the chip — that should free some space on it too.

View all 13 project logs

Enjoy this project?



connor patterson wrote 07/03/2021 at 09:33 point

can I buy one please?

  Are you sure? yes | no

Markus wrote 06/23/2019 at 07:57 point

The SAMD21 has touch already included! AND it is designed to run actively in the background only waking up every few ms. This way you can react to touch, without added components. Even more, you have the possibility to add multiple buttons for menus and navigation!

It's called PTC, peripheral touch controller 

  Are you sure? yes | no

deʃhipu wrote 06/23/2019 at 08:58 point

Yes, it's great, however we still didn't get the sleep modes and wakeup to work in CircuitPython — focusing on the graphics right now. The backlight is the main drain on the battery anyways.

  Are you sure? yes | no

Neo wrote 07/04/2018 at 09:38 point

How about a soft-start IC like MAX16054. You add a tiny bit hanging below the pendant and a metal pad on top (maybe even the latch), both of these give you a wire that can poke through the acrylic (you pour over them), when the user touches the dangling bit to the top latch for 2 seconds the device powers up.

You could also use a reed-switch with the IC and put a magnet on a ring. The user runs the ring close to the pendant and the magnet turns on the reed switch initiating the power-on/off cycle.

How much power does the display draw? I ordered some too, they seem really cute.

  Are you sure? yes | no

deʃhipu wrote 07/04/2018 at 10:54 point

Yeah, there are many possibilities, I was also thinking about the AT42QT1012.

To be honest I didn't measure the display's current. I suspect it's negligible, and most of it is consumed by the backlight, which is pretty much a normal white LED.

  Are you sure? yes | no

Joshua Elsdon wrote 06/21/2018 at 15:43 point

I can recommend the ADXL363, I am using it extensively. It has a mode that allows it to be a self contained motion switch, polling at 6Hz and checking thresholds for 270nA (at 2v, it is more at 3.3). You can kick it up to 400hz in run mode, which still is only in the order of uA. Super cool and very easy to use. For connectivity, pogo pins seem like a good option for resin casting, as you can polish down the surface of the resin to re-expose the metal. Last but not least is IR, goes through the resin well, and people have done bootloaders like that, though you could just have data put through and processed by static firmware. 

  Are you sure? yes | no

deʃhipu wrote 06/21/2018 at 16:23 point

Nice, personally I was thinking about LIS3DH, which has similarly low power requirements, but can use either I2C or SPI, and can in addition detect taps and double taps.

A light sensor for data transmission is an interesting option, because then I could just have a web application that sends the images to it — you just hold it against the screen or phone. And the light sensor would also be useful to adjust the backlight brightness, to save energy. I'm a bit worried that the images might require a bit too much data to send it this way reliably, though. And I still need physical contacts for charging, since it's way too small for a charging coil, so I may as well also expose the data pins.

  Are you sure? yes | no

prosto wrote 06/18/2018 at 12:32 point

fajne, małe, ale raczej na zegarek bym przerobił.

  Are you sure? yes | no

deʃhipu wrote 06/18/2018 at 13:09 point

śmiało, chętnie przeczytam tu o twoim projekcie zegraka

  Are you sure? yes | no

moosepr wrote 06/14/2018 at 10:33 point

super tiny!!! Love it!!!

  Are you sure? yes | no

Dan DWRobotics wrote 06/13/2018 at 20:28 point

This looks really cool! I can definitely see this having some wide appeal amongst the hacker community. Has some real gift value. Imagine you are stuck looking for a cool present for a tech savvy partner who is a fanatic about some obscure 80s TV show, well now you can present them will a digital picture/animation of that TV show on something that can be put on a key ring/neclace etc. If you can crack a way to make it light up when moved to preserve battery over a long period, then you have a real cracker of gift here.

  Are you sure? yes | no

deʃhipu wrote 06/13/2018 at 20:53 point

An accelerometer is probably a good idea. Not only I could get rid of the physical switch then, but also have some interactive displays, like water or sand.

  Are you sure? yes | no

Alex Bowden wrote 06/13/2018 at 21:07 point

Perhaps also BLE? That way you can remove the USB port.

  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