An e-ink screen for a room

31 January 2019

IMG 20190131 102904

I made a small display for my living room.

This project began when we installed a Hive thermostat at home. For various reasons, the thermostat ended up on the upstairs landing, and I thought it’d be nice to have a second display for it downstairs. I know I can look at the app on my phone, but I thought something more ambient might be nice. And, whilst I was at it, one feature I’d always wanted – the next trains at my nearest stations – and perhaps the outdoor temperature and weather as well.

This all coincided with Bryan Boyer writing up his Very Slow Movie Player project, which is a delight. (It shows a movie at a frame a minute, on a large e-ink screen).

I’ve been fascinated with e-ink for a long while. I’m well into the lifespan of my second Kindle, and it’s such a wonderfully un-technological piece of technology. It’s still, to my mind, the single best piece of hardware Amazon have made by a long, long way.

I wrote about the joy of e-ink when I was at Berg, in Asleep and Awake. As Bryan proved, it’s now fairly easy to both source e-inks screens and also to interface with them. The 2.7″ screen I used came ready-attached to a Raspberry Pi HAT, with libraries all written for it.

(As an aside: I’ve been tinkering with Raspberry Pis for a while, but this was the first time I’ve used the Zero form factor; the £10 Zero W, with built-in wireless and bluetooth, is such a lovely fit for this project. It does make the thought of doing lower-level embedded work seem a little foolish for simple IOT prototypes – lots of power and connectivity, and the ability to write high-level code is a delight.)

So: I had a screen, and a Pi. I started with the output: getting a PNG of mocked-up UI to display on the screen. This didn’t take too long, although I’ve had no joy getting partial updates to work – I’m using a fairly heavyweight full screen refresh each time the screen updates. Still, that’s an improvement I can come to later.

With the sample PNG on the screen, there were two remaining strands of work: dynamically generating images, and gathering data to feed them. Again, I worked on the former first, using Pillow. I’m not a great Python developer by any stretch, but a recent work project featuring a lot of it made me a lot more comfortable with hacking on the language, and Pillow’s a lovely tool for simple image compositing. Google’s Roboto font and Erik Flowers’ WeatherIcons do most of the legwork; the rest is simple compositing, step by step.

Once the Python image processing was written, I moved onto data-scraping. I’m happiest in Ruby, but chose Javascript for this work. Why? Partly for how appropriate it was for dealing with lots of JSON, and partly to get more familiar with ES6. I ended up with three scripts: one to get the latest set and actual temperatures from the Hive API; one to get the next trains at some stations; and one to query the Dark Sky API for local weather. These would write out to JSON via lowdb. Then, the Python script could, separately, read that JSON directly, render a PNG, and trigger a refresh of the screen.

Having broken the task down, everything went almost entirely as planned. One by one, I replaced each section of the screen with live content. The only hiccups were the usual wrestling with cron jobs (when do these ever go smoothly?) and dealing with simultaneous writes to the JSON store. (It turned out lowdb wasn’t great for distributing across multiple files, and rather than rewrite everything to use SQLite, I just went with three separate JSON files. Easy fix). Nice to spend a few hours at the weekend motoring on some programming I’m entirely comfortable with: JSON, markup-scraping, server-side fettling and graphics processing.

I’m happy with the results. There’s a bit of a distracting blink when the display re-renders, but the lack of a glow makes it feel very different to a more obviously electronic device. It just sits, comfortable with itself, giving me a little bit of information. I was surprised how many people enjoyed it when I shared it on Instagram, so thought I’d write it up.

What’s next? I might add something else to that lower-right display; not sure what, yet. And, most importantly, I’m going to give it some kind of case – it’s a bit too ‘gadgety’ or ‘maker-y’ as it stands; it needs to be made more homely. Perhaps some wood. In the meantime, though, I’ve been living with it, and had no desire to repurpose it, or switch it off, which is usually the best sign.

Most notably: it continues to affirm my belief that e-ink is a most gentle and domestic technology. I can confirm that it’s now very easy to play with, if you’re so inclined; a Python library and bolting a £30 HAT onto a Pi was all this took to get live. I might do some more tinkering with this technology in due course.

  • A nice talk from Adrian at Making It (which I was too ill to attend, annoyingly). In particular, good at covering the _middle_ of things: small-to-medium enterprise, small-to-medium-term companies, manufacturing between "China" or "hyperlocal".
  • "The characteristic grid-like simplicity of the view, the absence of barriers… a landscape where nothing officially exists, absolutely anything becomes thinkable, and may consequently happen… — that’s Reyner Banham describing deserts, though I like to imagine he was looking at a spreadsheet." Rod's component of By Hand & By Brain is just wonderful.
  • "Having to learn how to make something ‘the long way’ helps you to understand how to manipulate materials at a fundamental level. It means that you can become fluent. The ability to articulate your thoughts through and with matter, rather than just make it into a shape you have thought of, means that you are more likely to find innovative or creative ways to exploit both materials and machinery. This is true whether you are talking about traditional craft techniques or more contemporary (digital) ways of making: I don’t think you can avoid the notion that time and effort are the only way to get good at something. Using digital technology as a way to shortcut the temporal aspects of craftsmanship is effectively relegating these sources of immense creative potential to the category of ‘labour saving devices’. I am really looking forward to a time where we can fully appreciate the potential for modern digital craftsmanship, by which I mean the skilful manipulation of digital systems as ‘matter’, rather than as express facilitators of shiny objectness." yes-yes-yes-yes.
  • "When my brother and I wanted a new toy, we cannibalized whatever we’d made before, which had been made of all the things we’d ever made before that. So of all those years of guns and starships, I have only that Wrightian feeling for form in the fingertips — and the sound, somewhere between rustling and clinking, of a thousand plastic pieces tumbling from an overturned bucket into a disorderly pile, rippling away from a seeking hand." As Paul M pointed out, that sound is very, very visceral for many of us. This is a lovely article about what Lego does to the head.
  • "We learned that being first is important, but should not be the only factor when determining the viability of a project. If you have an evolved approach to a preexisting concept, you are likely doing something original and the results have a good chance of being meaningful." So, in one sense, it's another physical mirror. But: I like this point, that sometimes, you have to do a thing for yourself to learn about it. And by learning about it, you might ultimately differentiate your own work. As long as you don't claim you were first, there is no shame in doing what other people do. How else do you learn things? Not by other people yelling "OLD!" at you, that's for sure.
  • "Gifsicle is a command-line tool for creating, editing, and getting information about GIF images and animations." Handy.
  • "These three frameworks — objects as portals, objects as subjects, and objects as oracles — propose distinct (yet related) structures for thinking about how connected objects might begin to contain their own narratives, seek their own history, develop their own perspectives, and become storytellers in a multitude of ways." Nice article about the various perspectives on Connected Objects (which namechecks Hello Lamp Post).
  • "My class handouts grew into a crude PDF textbook, which somehow escaped the walls of the school. Emails began to arrive asking me to conduct workshops. An editor at Routledge, invited me to elevate my drawings and prose to a publishable state, and the result was Handmade Electronic Music — The Art of Hardware Hacking" Might have to get this.

Knitting

24 October 2013

E3136546caea11e2928c22000a9f3092 7

I built a synthesizer this year: a Mutable Instruments Shruthi. I didn’t design it or invent it; it was designed by Olivier Gillet, who released it in kit form. It’s not very expensive – about £150 with the case as well.

3acfbaf8c84011e296c422000a9e0891 7

It arrived in a few plastic bags, and I also ordered the lasercut enclosure. And then, I spend a few happy afternoons putting it together.

92006200ca0c11e2b04622000a1f9be0 7

All it required was moderately competent soldering, the ability to follow instructions, and patience. In that regard, it differed little from building Lego, much like I did when I was small. And for the seven or eight hours it took to build, I was lost in my work: entirely happy, paying care and attention to things being made with my hand – occasionally taking out the multimeter to check I hadn’t fluffed a joint.

D34ab69ccada11e2a95722000a9f09e9 7

It’s a lovely instrument, with a really interesting sound. It’s a hybrid analog/digital synthesizer: digital oscillators and envelope, but analog filters. The filter is the bottom of the two PCBs, and there are lots of different ones available, for builders looking for different sounds.

Because of that weird structure, it’s not quite like your average analog monosynth. Yes, it can do that – but it also has all manner of interesting digital oscillators, not to mention wavetables (and custom wavetables if you want it), which you can step through with an LFO and… you get the picture. It has some really fat, interesting sounds; a bit like an ESQ-1. But there’s not much on the market like it – and nothing that sounds like it for less than about three to four times the cost.

2cc3cb36cae111e2b36722000ae90e0a 7

It went together fairly smoothly, with only one error that came down to forgetting to completely solder in an IC socket. I mounted it in its case, and added two small switches – one for power, one to swap between two- and four-pole filters.

It’s hugely satisfying to make noises and music with something you’ve built with your own hands. And, though it’s just assembly, there’s a degree of craft going on; care and precision, using tools. That practice has definitely fed into the electronics I’ve constructed myself this year.

What I Talk About When I Talk About Knitting

I’ve characterised this sort of work recently as both whittling and knitting. Something to do with my hands, to empty my head, often between projects.

I think there’s value to just going through motions – what a martial artist would call a kata. It’s why I work through exercises on exercism even after I’ve hit a working solution; why I worked through the Ruby Koans even though I know the language. They’re both warm-ups and refreshers; it is good for the hands to go through motions before they start real work.

It reminds me of watching my Mum knit; she can knit during almost anything. She likes the things she makes, but I’m pretty sure there’s also just a habit of having something to do with one’s hands. It doesn’t always have to be challenging, or harder than last time. It has to be familiar, expected, calming. Progress, learning comes out of repeating the straightforward, just as much as it comes from trying new things. Craft is something to be honed as well as practiced.

A couple of months back, I left a theory-heavy conference session with an urge to make something, anything with my hands – just to offset a slight feeling of impotence that came out of lots of ideas being discussed without implementation. “Whittling for the soul,” I called it at the time.

The Shruthi sounds good, but it felt it’d shine with some effects – a shimmer of delay, or maybe some distortion.

It turns out guitar effects pedals are not that hard to build. This week, between some projects, I did some more knitting.

The Delay Box

Cf44ec36327a11e3aca722000ab7858a 8

There’s a huge culture, it turns out, of building your own effects boxes – the schematics of existing boxes are reverse-engineered and shared by guitarists on forums, and slowly they piece together PCBs or stripboard layouts. I got a bit lost in Tagboard Effects. But in the end I settled on this delay pedal, which happened to be available in kit form at Bitsbox (a favourite supplier of mine).

641c7510337311e3aa4422000ae90e71 8

Again: I’m not an electronics engineer; I can piece things together, and have worked out a few little boards to package Arduino projects. This layout felt within my grasp – with hindsight, it was perhaps a bit ambitious for a first board.

7deb1e92337311e3a03a22000a1fbd56 8

It took a handful of hours to put together the board, working through the layout, patiently cutting and linking the stripboard. I’m not that proud of the soldering on this, although coming back to it later, it’s not too bad.

7e8ac88e369811e389b122000a9f18c4 8

Once the board was populated, I started work on the offboard wiring: rigging potentiometers to little breakout boards, linking up the jack leads and DC socket. Next time, I’m going to do this once the components are in the box – I ended up with a correct circuit, but by god it’s a tangle.

2b089d9a370511e398b622000a1fbd3a 8

Of course, a stompbox is nothing if it’s not in a box. So I sat down with a Hammond 1590B, a unibit, and a carefully laid-out template in Illustrator, and got drilling.

I’ve said it several times: boxes will chew you up and spit you out if you’re not careful. I did a reasonable job here – only one hole too large, and I could have been more generous with the spacing. Fitting everything inside was fiddly and tight – I was convinced everything was going to short out. That hole I cut too large led to internal space being cramped. And yet: somehow, I slotted it all in, screwed it tight, jammed the back on.

(It’s worth noting: Hammond enclosures, especially these pre-painted ones, have a great feel to them).

61c84cae3cb411e3b0d822000ae80177 8

A few silver knobs, and the box was complete. The delay worked first time, and sounds delightful – not quite an analog tape delay, but not a perfect digital shimmer; just a hint of degradation as it tails off. Fiddling with the delay time whilst sound’s going through leads to lovely pitch-shifting, and it begins to oscillate and feedback really nicely in the right circumstances.

It didn’t work for a while – and then I discovered the box was fine; it was my jack lead that had sheared internally when I wasn’t looking. A new jack lead, and my guitar was shimmering and dancing away.

Yes, it was just assembly. But it was more than that, too. I refined my manual soldering skills again; I spent some time away from the screen, instead inhaling the delightful smell of solder fumes; I continued to level up at building enclosures – I think this was the most refined one yet, and my first in metal. A really nice artefact.

And again: the fiero of making sound, making music, with a thing you put together yourself.

It was a good piece of knitting in every sense.

I think this type of work is important. It’s easy to spend time learning new things, and pushing ourselves – but it’s equally good to spend time in a relaxing, comfortable space, and enjoy the act of executing well. Craft is not always about the new: it’s also about being able to repeatedly execute quality. Which is why making a simple thing well, is good for the soul.

And an added bonus: slowly, I’m heading back towards making types of music I’d not considered, on instruments and devices I’ve made myself. Next on the knitting list: a fuzz pedal or two, to be built when the next project is over. Or perhaps sooner, if my hands get itchy.