In the Sci-Fi TV show Doctor Who, psychic paper is a blank piece of paper nestled in an ID wallet, used by the holder to psychically show IDs and credentials.
While we're severely lacking working psychic paper in the real world, we can at least make Psychic ePaper: updatable, changeable IDs and credentials using the power of e-ink/e-paper!
Powered by Adafruit's ItsyBitsy nRF52840 Express and CircuitPython, the Psychic ePaper is Bluetooth LE compatible and updatable from a phone, tablet, or computer running Adafruit's Bluefruit Connect apps.
The CircuitPython_textMap library is working out well… really well. Freeing up so much RAM is giving me a chance to really go all out with the software part of the Psychic.
Speaking of software, here's some achievements since the last time:
Transparent bitmaps! - I finally sat down, went through some learn guides, and downloaded GIMP. Now I understand how to make 'transparent' bitmaps in CircuitPython… which means I can do cool things like summon a Weeping Angel over the top of the current ID.
Embedded YouTube video, which shows the Psychic displaying a library card for the 10th Doctor. After entering the command [blink] via Bluetooth, the screen refreshes to show a Weeping Angel superimposed over the library card.
Going on from this, I'd love to make a regeneration like effect, with one doctor superimposed over the other. Something to look into!
Commands - I've been adding to the ever growing list of 'Commands' that can be sent via a Bluetooth LE to control and change aspects of the Psychic. My favourite is [blink] (to summon a Weeping Angel) and [mischief managed] (to wipe the psychic, because who doesn't like to mix universes?).
Customisation - I started out with a few IDs that looked pretty much the same, just with different text and symbols. I'm upending things a bit so IDs can follow different base templates. The end goal is to give people the ability to customise IDs a lot more via BLE, an input file, or maybe even some kind of GUI application. There's still a bit of time until I can get to that stage, but it's exciting working it out!
Ok wow, it's been a hot minute. I was making good progress and then Covid-19 hit and suddenly I had other stuff that "needed" doing (like a miniature toilet).
I've recently picked this back up again, so for my own peace of mind, let's review what's been happening and what there is to do:
Be an ally and read, donate, and amplify black voices. Resources at ally.wiki
Data storage: The Psychic ePaper now has the ability to save all the changes that get applied to it when connected to a phone/tablet/computer via Bluetooth LE. When you regenerate the Doctor, send the save command, and power cycle the Psychic, your newly regenerated Time Lord will still be there. Cool.
UART messages >20 bytes: For some reason when using the Adafruit BLE connect app + CircuitPython, messages > 20 bytes won't be received/sent. This is a bit of an issue if I want to send long messages to the psychic. Fortunately it's recently been made an issue in the CircuitPython BLE library, so we'll see what happens!
Wear a mask and practice physical distancing > 2 m/6 ft.
Memory Issues: I've been flying close to the sun when it comes to RAM and having enough of it. An update of CircuitPython had me quickly plummeting to the ground with Memory Allocation issues.
For last few days I've been playing with @kmatch98's CircuitPython_textMap library, which "attempts to overcome the large memory usage of the current 'label' function in the CircuitPython Display_Text library". So far so good! I'm still getting to grips with it, but I've got 39 kb more memory than I had with the CircuitPython Display Text library. Rewriting the code to work with textMap has also been very refreshing.
Version 2: I should really get on that again! SMD Soldering 0.5 mm pitch pins is difficult!
After coming up against some memory allocation issues and then solving them with some optimisation and freezing some libraries, I've moved onto playing with the ItsyBity's nRF52840 chip and it's Bluetooth LE connection.
The main goal here is to be able to change text, images, and settings on the Psychic ePaper using a phone and a Bluetooth connection (imagine going to a convention, and being able to quickly customise an ID on the fly!). Fortunately with the CircuitPython BLE libraries and Adafruit's Bluetooth LE app, this has been very very easy. Using the example UART code from the CircuitPython BLE library and coding in a few key commands, I'm able to send messages to the Psychic and actively change text or swap images. Cosplaying as the 10th Doctor instead of the 12th? No problem! Just send the command [regenerate]10 and watch as the brooding face of David Tennant appears on the Psychic. Want to have the ID show you've been 'certified' by Rhe Convention of Doctors? Just send [title]The Convention of Doctors and it'll appear like it just read your mind!
The next step for me is storage, so that changes are not lost when the Psychic is turned off… and maybe a few advanced commands, like setting up the number and order of IDs. That'll be this week's goal!
Version 2 progress
With version 2 I'm focusing on thinning things down and making construction easier and neater. I've started with the top half of the Psychic, which includes the e-ink display and adafruit's E-ink Friend. In version 1, both are embedded in a piece of paper/chipboard (the stuff hardback books are made out of… R.I.P Inorganic Chemistry textbook), and are connected to the micro-controller via a rat-nest of wires.
While this all works for a prototype, I think I can do a lot better for version 2!
So far for Version 2 I've:
Replaced the textbook cover with a 3D printed cover. It feels just as rigid and means I don't have to spend an hour carefully carving pockets and channels into the chipboard with an X-Acto knife. I've designed it so the display and components fit into it nicely, while protecting the FPC ribbon cables.
Moved the E-Ink Friend to the bottom half of the Psychic. Am I moving my problems elsewhere? Sure, BUT… it allows me to make the top half of the Psychic really thin and reduces the whole rat-nest of wires. The bottom half of the psychic is the thicker of the two halves, so might as well lump stuff together. Future me can sort this out.
Made a FPC/FFC adapter board. The display used to connect to the E-Ink Friend via it's FPC connector. I made an adapter board that the e-ink display connects to instead, while an adjacent FFC connector connects to a FFC ribbon cable to the E-ink Friend. This setup is a lot thinner, mostly because I ordered a thin (0.8 mm) and really thin (0.1016 mm!) PCB boards for the adapter. With some low profile FPC/FFC connectors, I've saved at least 3-4 mm.
With all these changes, the top-half of the Psychic looks a lot neater and is now more reproducible. I'm going to have to see how durable the FFC cable is with the fold between the top and bottom half of the Psychic. Hopefully with the fabric and some strain relief, it won't be much of an issue!
Hey folks! I've just completed the first version of my Psychic ePaper and I thought I better start making a better job of documenting the build process, especially if I want to improve the dang thing!
The first version has gone A LOT better than I hoped (I honestly thought it was going to be held together by electrical tape) and has already been used by my partner in their Doctor Who cosplay.
So far I've programmed several different IDs that get refreshed with a button press. They mostly use the same template, with certain text and images swapped to represent different IDs. This makes the code more efficient AND it makes some of the joke IDs easier to get. The IDs are easy to make and I'm going to be adding a whole bunch more, with the goal of having a random one display when first used.
Speaking of code… the Psychic ePaper is currently being programmed with CircuitPython. I'm extremely new to CircuitPython and slowly learning about its strengths and weaknesses. Loading and displaying images are a dream compared with Arduino… but even with an M4 chip I'm coming up against some memory issues. I think with some practice, cleverness, and the frequent community updates to CircuitPython, we can get around this and make something very robust.
I'll be making an Arduino version of my code purely for completeness, and will be putting both on github soon.
Improve and polish construction, including my sewing!
Start playing the Bluetooth LE capability: The nRF58240 allows us to use BLE, so let's use it! Let's see if we can update the Psychic ePaper on the fly via a phone! Maybe receive phone notifications like the Doctor sometimes receives messages?
Reduce profile: While the Psychic ePaper already has the look and feel of a wallet, there are a number of areas where we can make things thinner. I've already started reorganising the top half of the wallet, which contains the paper display and the E-Ink Friend. If successful I think I can make it over 50% thinner!
Rechargeable power: The 2032 coin cell batteries and their holder take up a lot of room. I haven't needed to swap them out yet, but once I start playing with Bluetooth I might need to. If I can make it so the power source is inbuilt and rechargeable, that might help reduce the profile and make things easier to use/construct.
Improve code for usability: CircuitPython is new to me, I think I can be more efficient with my code AND make some settings easier to change.