E-Ink Nameplate

My workplace has an open floor plan with small desk/cubicles for everyone on the team, and with such a setup we all have a small plastic nameplate with our name and desk location on it. It is useful for facilities and such for understanding where a particular desk is, but doesn’t get much other use.

Well, a couple weeks ago I changed desk locations. That combined with my curiosity of E-Ink display for years now, and exactly how they worked, got me inspired. I decided to replace my boring paper nameplate, with something a little more custom. Below is my MVP (minimum viable product).

Display

It all started with the display. After all, I have never played with one of these before and was curious to try it out. I found the Waveshare 7.5inch E-Paper E-Ink Display on Amazon, and decided to give it a shot. With some quick searches online I was able to discover that it had Raspberry Pi support, which was exactly what I was looking for.

I was pretty happy to see that this display supported red in addition to the basic black and white.

Raspberry Pi

After receiving the display, it only took about a night of playing with it and a spare Raspberry Pi I had sitting around to get it do some something interesting. I started with some of the sample code that they had, and made some small python modifications to print something pretty simple, with my name on it and the current date.

I could have went with something a lot more complicated (a mistake I have made many times before), but the point here was to really just prove it out, and to get a prototype working. So with that working, I was done with the application.

Case

My next task was to handle how I was going to display it. I originally thought something wood might be a good option, but I knew I just don’t have the skills to make something nice looking with any type of detail at all.

After thinking about it for a little while, I decided this would be a good opportunity to try another first…maybe I could 3-D print something? [Wait…wasn’t this supposed to be simple?] I had been wanting to print something simple from Thingiverse for a while, but I just have not gotten around to it, even though I have access to a 3-D printer.

Obviously nothing off the shelf is going to meet my exact needs, so I played around a little bit, and designed something using some custom measurements that I took, and also the specs from the display company. After a little bit of design, plugging it into the 3-D printer, and clearly some good luck, wallah, I had something that might actually work.

Final Construction

Taking the separate pieces, I put the display in the new case along with some good old epoxy to hold it in plate. I then added all the other components, added a USB cord to power it, and closed it on up (with some padding to hold other components in place).

Given that this is my first experience with E-Ink, and my first time 3-D Printing something, I am very happy with how it came out.

PS

Some lessons learned:

  • When 3-D printing, the bottom of the print is the “rough side”, and should not be your presentation side. (In mine, I made it the front…ooops)
  • Raspberry Pi’s are in extremely short supply right now (June 2022). A Raspberry Pi Zero W that you could have previously got for $10/$15 is now costing ~$80.

Pool Controller Header Image

Pool Pump Controller

For the past 3 years our pool has been using one of the very common analog pool pump timers (eg. Intermatic T104R3 Time Switch) to turn the pump on day in and day out, but that all came to an end last week. One day I noticed that the pool was never turning off, and the time was not changing on it. Opportunity knocks!

Overview

Time to get rid of that old analog timer, and to replace it with a new digital device, one that can be controlled remotely and can be queried at any time.

New Pool Controller: Arduino and Relay Module

Components

As sometime who tinkers from time to time, I just happened to have everything I needed on hand to make this a reality. The key were the following 2 components:

By putting these 2 together, we get exactly what we want. A remotely controllable switch to turn the pump on and off.

Install

The existing timer came in a nice waterproof case, so the first step was to remove that old broken timer from the existing case, of course remembering to shut of all associated power first.

Existing Analog Timer

With the timer removed, there was just enough room to install the Arduino and Relay Module. These were installed in such a way to make room for each other, and to also allow for upgrading of the firmware in the future (which ended up being needed immediately). After that was done:

  • The existing braided power lines were connected to the relays with some new solid core power wires using wire-nuts.
  • The Arduino was wired up to the relay module.
  • For simplicity reasons, power was delivered via an external power transforming and a nearby outlet.
  • Network was supplied via a short Ethernet cord, and a jack which was previously installed for a Network Access Point.

Arduino and Relay Module Installed

All the necessary components are now in place.

Software

This is one of the areas in which I really won. Years ago, I was working on putting together software for an Arduino based project on which I could control the lights near my pool. The concept was to expose an HTTP interface which would turn the lights on and off. It was a simple pivot, to change this to control the pool, and a couple more HTTP endpoints to accommodate that.

With the updated code, the Arduino starts up, grabs a Dhcp address on the network, and then exposes the following endpoints:

  • / – Status page which reports the current state of the controller
  • /pump/off – Turns the pump off
  • /pump/on – Turns the pump on
  • /uptime – Returns uptime of the device (this was used mostly for debugging)

This code was all written in C++, and uploaded via a serial connection.

As you may have noticed, there is nothing turning the pool on or off at this point. That was achieved with a simple cron script on a local server that I use for many other things. This is what that looks like:

  # Pool Pump
  ###########
  # 8am-12pm and 3pm-7pm daily (8h)
  #
  0 8,15 * * * curl -m 5 http://10.13.0.216/pump/on
  0 12,19 * * * curl -m 5 http://10.13.0.216/pump/off

Uploading latest firmware to the Arduino

With that, the software is complete.

Summary

All in all, I am very pleased with how this came together. I would say that it came down to equal parts luck (having the right components on hand), and previous work (having most of the software complete). There was a little bit of debugging to resolve a couple small issues, but after that, new working pool pump controller. All in all, very satisfied.

Mirror Display – Hardware

This project has been a long time in the making. A couple years ago, I initiated the process of creating a mirror display with an old mirror, a new two way mirror I acquired online, and a cheap tablet. Unfortunately an old android tablet wasn’t great for this project, for multiple reasons. This article will concentrate on resurrecting that project, and specifically the hardware part of this project.

Overview

As seen and productized many places on the internet, this project is to build a mirror, which when activated shows a screen from behind it, and then when disabled disappears again completely. I have found this to be pretty cool since the first time I saw it, and this is the first time I have a real plan on building a decent solution. My intent here is to build a screen that can show me supplemental information in the morning while I am getting ready, such as the weather, my schedule for the day, or just a photo memory of the family.

Finished Mirror hanging in Bathroom. Upper Left – Display Off, Upper right – Display On, Bottom Left – Zoom In on Display, Bottom Right – Back of Mirror when complete (without RaspberryPi attached)

Mirror

This was the easiest step. This mirror is one of two matching mirrors that I had in my bathroom previously. As mentioned, years ago, I replaced the mirror in it with a 2-way mirror, and put a tablet behind it. The first step here was to remove the old tablet, and to start getting it prepared.

Display

Recently I found an inexpensive Raspberry Pi screen with the SunFounder 7” 1024×600 LCD Screen, that with a Raspberry Pi (Zero W) would make a great replacement for the old tablet. Full control of what is displayed, and full capability to automate and update device as needed.

Process

Preparation

The first step here was to get the mirror ready for the project. This included taking down the mirror, removing the old back (which as you can see, was not a quality job before), and removing the tablet/cardboard behind the glass.

Glass Preparation

One of the problems I encountered before, was that with the light cardboard behind the glass, in some cases when the sun shined directly on the glass, it would reflect from the cardboard which would make the cardboard visible from in front of the mirror. To solve this problem, I decided to spray paint the back of the glass that would contain the screen and leave only the screen area exposed. To do this, I first taped off the area where the screen would go, spray painted the exposed areas black, and then removed the tape to expose the glass.

Screen Mounting

Now that the mirror is prepared, the next step was to test the display, and then mount it on the mirror. To test the screen, I attached it to a Raspberry Pi with software that I will discuss in a followup post. After testing was complete, I used a couple brackets purchased from Home Depot, to position the screen directly over the exposed mirror area. This was done while the screen was on to position in exactly the right spot.

Finish

To finish off the mirror, the cardboard was added back to the mirror for a needed buffer, and a new piece of backing was mounted to the back of the mirror (with a space for the connectors of the display, and room for inserting the Raspberry Pi). From there, the Raspberry Pi was inserted, cables were connected, power was plugged in, and the device booted.

Success! Raspberry Pi is booting, and I am able to enable and disable the screen programmatically.

Linux Desk Lamp

Premise

Work recently offered to pay up to $50 to help decorate our cubicles recently. Question: How can I take advantage of this in the most ridiculous way?

“Light Bulb Goes Off”…

Create a intelligent desk lamp that can be aesthetically nice looking and notification mechanism at the same time. Old Ikea Lamp + Rasperry Pi Zero W + RGB Led’s => SSH capable Desk Lamp with 30 RGB Led’s.

Final Product

Raspberry Pi Linux based Desktop Lamp running at 1 Ghz with 512 MB Ram on WiFi. 30 RGB Led’s controlled by python program, with pull-chain switch.

Build

Components

  • Old Desk Lamp
  • Raspberry Pie Zero W/SD Card (16GB)/Case
  • Micro USB Power Supply (2.5A/12.5W)
  • 30 Addressable RGB Led’s (WS2812B)
  • Spare Ethernet Wire
  • 10k Resistor
  • PVC Connector (for supporting LED strip)

Pictures


Steps

  1. Disassemble lamp as much as possible. This includes disassembling light assembly and getting access to wires running up the stem, and removing those wires.
  2. Drill holes in light assembly, and run new wires from base, through stem, and out new holes in light assembly. If possible also leverage existing switch and run wires to it. My setup contained the following:
    • 3 wires in parallel for the LED strip. (+5V power. Used 3 to support current of LED strip.)
    • 3 wires in parallel for Ground to the LED strip.
    • 1 wire to LED strip for data to control strip.
    • 2 wires to lamp switch as input.
  3. Glue LED strip around PVC connector, and let dry. Solder wires to LED strip.  Place PVC collar around existing bulb, and glue in place if necessary.
  4. Take wires from stem and run into Raspberry Pi case. Power (+5V) should be connected directly to power supply, with one additional line going to Raspberry Pi. Ground (GND) should be connected directly to power supply, with one additional line going to Raspberry Pi. LED data line should be connected directly to Raspberry Pi, and Switch lines should also be connected to GND and +5V with a 10k Resistor.
    • One interesting insight that I learned, is that the Raspberry Pi Zero W does not need to be connected to power via the Micro USB port. Since the Raspberry Pi does not have a voltage regulator for the 5V, you can back feed the power directly via the GPIO +5V/GND lines.
    • Make sure wires are in their final location, before soldering them all together. (ie. make sure power line is routed where you finally want it)
  5. Power the Raspberry Pi, and connect to monitor and keyboard. If you have not installed the OS, then do it now, and make sure you have a way to connect to it remotely (ie. enabling SSH). Also run some sample program to test the LED lights are working correctly.
  6. If necessary, debug hardware and/or software problems.
  7. Place Raspberry Pi in the base, and attach as necessary. If possible, put base cover back on lamp and finish assembling back together.
  8. Place on desk, and enjoy.  SSH and update as necessary.