Tuesday, August 11, 2020

A Beautiful Old Chair

During the pandemic, I fixed a chair! Well, part of a chair. 


The problem: 

It was broken. (All good repair stories start here...) The wooden legs dovetail into a cast iron center piece. The corners of the wooden dovetails had split along the grain, causing the legs to fall out, and the area where the casters attach to the wooden legs was worn badly. 

I didn't take a good picture before I started, because I wasn't planning to write this. But, by popular demand, I'm blogging again. You will just have to pay attention to the in-progress pictures to see what is being fixed and why. (Or, skip to the end and take a peek if you are OK with spoilers.)


The solution: 

Steel. I like steel (and metalworking/machining in general.) It seems like the right amount of overkill for this. 



First, some context. Then we will go back to the beginning. Here you can see the four wooden legs, and the center piece that they dovetail into. My repair was making the metal banding that follows the curves of the legs and dovetails into the center piece. 

Step one. Buy materials. In this case, my local hardware store had 3/16" thick steel flat bar in exactly the width I needed to match the wooden legs. Two 3 ft. pieces set me back $13. 


Step two. Play with fire. I'd recently gotten an oxy-propane torch to play with brazing. Turns out it can also be used for bending. I heated the end and used my bench vise and a hammer to create a decent 90 degree bend. The short portion at the end will lock into the widest part of the metal dovetail socket. The long end will be bent to match the curve of the chair legs. 



Step three. Bend the steel. It took a while fiddling with things to match the curves closely enough to make me happy. All bending was done by hand, with the help of some parallel-jaw pliers and a sturdy bench vise. 



Step four. File to fit the dovetail socket. I found a place to buy a decent large file for a reasonable price. The downside is that they are sold in a package of six. That's not all bad news, in that the extras will be given to friends. I could have used an angle grinder, but that is noisy, and it is way too easy to take off too much material. Using a good file, this went surprisingly quickly, was rather cathartic, and I got a very good fit. 



Step five. Drill and countersink holes. My plan is for these to be screwed to the bottom of the legs. For that to happen, they need screw holes. This would have been easier to do before bending. Thinking ahead is not one of my strongest skills. And, I only screwed up the alternating pattern on one of the legs. Oops. I couldn't have done this without a drill press and a decent vice. 




Step six. Weld the caster posts in place. The posts for the casters were mounted on plates that were a bit too wide for the legs. My answer was remove the posts and weld them to the steel. I was really happy with how this turned out. Well, at least until I turned it over. I wasn't thrilled with the tiny gap between the wide part of the post and the steel. 



Step seven. Silver brazing to the rescue! Fill the insignificant gap by brazing. (I mean, I have the torch. I'd be a crime not to use it... This step was totally necessary. I don't know what you are talking about.)




Bonus:  these pictures of the brazing process are beautiful! 



Step eight. Prime and paint. The color is Rust-oleum Universal Oil Rubbed Bronze. It's a good color. Goes with everything, or so I've heard. This used up the last dregs of a can I had sitting around.




Step nine. Fill in the worn hole left by the old-style casters. The wood was cracking here on all the legs, so I figured it could do with some reinforcement. I drilled it to fit a standard sized wooden dowel and glued in pieces. Cost of dowel was about $3.



Step ten. Drive some long screws into the end of the dovetail on the legs. The heads of these fit into the gap between the wood and metal pieces at the dovetail. Later pictures will make this clearer. This gap will be filled with epoxy, and the screw heads will anchor it into the epoxy.



Step eleven. Seal the perimeter of the dovetail connection between the wood and metal. This will prevent the epoxy from leaking out wherever there is a gap. I had this old sealant sitting around. It still worked, and the dark gray matched the color scheme. 




Step twelve. With the sealant cured, fill the gap with epoxy. The top view here shows the gap I'm referring to. I used some steel BBs as filler to make the epoxy last longer. I had these left over from when Dad and I replaced a handle on a sledgehammer in high school. I also got to use up all the leftover epoxies I had sitting around getting old. You will notice that I didn't fill it all the way to the top. I had to leave room for the end of the metal pieces to fit down in there. 



Steps thirteen (epoxy) and fourteen (screws). (I clearly didn't take enough pictures.) Fill the remainder of the gap with just epoxy and push the metal pieces down into it. I also coated the entire area between the wood and metal with epoxy, for it to bed into and fill any small gaps. Next screw the metal pieces into the wood. I spent about $10 on different length wood screws to account for the tapering thickness of the legs. You can also see in this picture that I had to shim the space between the center support and the legs since there were some gaps. 




Step fifteen. Install the center support piece. Use the threaded holes I forgot to mention making back in step five. Curse when two of the holes don't quite line up. Modify the center piece to make it work. No one will ever know. 

Step sixteen. (Not pictured.) Reinstall and shim the casters to sit flat. Did I mention that I didn't take enough pictures? 



Complete! And, beautiful. Hopefully it is strong enough. Now it goes back to my friend to be reunited with the rest of the chair. This was a joy to work on. 

Total cost: about $26. Not bad. 


Tuesday, August 4, 2020

E-ink Weather Display

It's been seven years since my last post. I'm a bit surprised that everything is still here. Anyway...

I turned an old Nook e-reader into a weather display.

I am still thrilled with my purchase of a Nook. It has lasted over seven years as an e-reader and works just as well as when it was new. I've replaced the battery once, which was pretty straightforward.

However, Barnes and Noble have since released a Nook with a backlight. The screen without a backlight is amazing in bright light, but being able to easily read in low light conditions was a very tempting feature. Having a newly redundant Nook with a beautiful e-ink display was one reason for starting this project.

The other reason is that we recently purchased a personal weather station. The optional display they offer for it is kinda awful. We can do better, and nearly for free!



By popular request, here are details on how I did it:

Step 1. Root your Nook. 
This allows you to install Android apps on your Nook.
I made a post about this back in 2013.  I don't have much to add.


Step 2. Install the Electric Sign app. 
Electric Sign is an app by Jeremy Friesner that lets you easily use your Android-based device as a self-updating display. It loads a website at the interval you specify.
https://play.google.com/store/apps/details?id=com.sugoi.electricsign

He has also made the source code available on GitHub.
https://github.com/jfriesne/Electric-Sign

The app lets you specify how often it reloads the website. I have it set for every 5 minutes. 


Step 3. Build a website. 
This was one of the more challenging parts for me.
Luckily, I found some amazing examples to go by.

This is the one whose code I used as the basis for mine:  galacticstudios.org/kindle-weather-display/
They provide a download of their code under the "Setting Up the Server" section. It uses PHP to pull data from a weather service API and turn it into an 600x800 pixel PNG image. They used an old Kindle, so there are a bunch of details if you are using that platform. 

Other great examples include:  

The Weather Underground API is only accessible if you have a personal weather station. If you have one, link it to update data to Weather Underground. wunderground.com/pws/overview Then, you can create an API key, and the documentation on the API can be found here.   

In the past, I'd played a bit with the Nest API to pull data into a google spreadsheet. This works in a similar way.

Ok. Now to learn enough PHP to cobble something together that does what I want. Luckily the internet is an unending font of knowledge. Unfortunately, the resulting code looks exactly like you would expect from an amateur building his first program while teaching himself the language. I'm sorry. 

I needed a way to be able to run PHP scripts on my computer to test things as I go. XAMPP does exactly this. It can be found here:  apachefriends.org/index.html 

After much trial and error, I got something I am happy with. 

As a side note, the Nook I have is an older device. It has issues with modern https websites. It means you likely won't be able to pull up just any weather website. This isn't an issue for me since I wanted to create my own custom display, but it is something to be aware of.


Step 4. Host your website. 
I didn't feel like paying someone to host it for me, and there was no need for it to be available outside of my home network. So, I started thinking of other options.

I have a desktop computer that is on most of the time. But, "most of the time" is not "all of the time." I'd prefer something that was more available.

I considered building a stand alone web server. That felt like massive overkill, and during the pandemic I had limited accessibility to free old computers to re-purpose.

My router lets me attach an external drive for storage, but there is no ability to host a website.

I found an example using a Raspberry Pi. That could work, but I was trying to minimize the cost. I was hesitant to purchase something if there was another way.

I have a Western Digital networked hard drive. Its operating system is a bare-bones distribution of Linux. I wondered if that could be used... Turns out that it can, and someone has already done it:  community.wd.com/t/app-webhosting-for-firmware-v4-10-2015/94892  They even made an installer available.

The downside is that the free authentication system for downloading it is broken, and the hosted ads are some of the sketchiest I've seen in a while. But, I had an old prepaid debit card with a few bucks left on it, so I gave the donation option a try. Others had commented that it still worked even though the free method was broken. The extensive contributions of the developer on the WD community forums are what convinced me to try sending a donation.

With $10 sent to a stranger on the internet, I had my own tiny little web server up and running without having to add another device to my network.

I don't think I recommend this option. It only made sense for me since I already had that exact model of WDMyCloud. Barring that I would have likely gone with re-purposing an obsolete computer as a web server. 

If you are going with the WDMyCloud option, here are some details for setting things up.
  • Give your WDMyCloud a static IP address in its network settings. 
  • Turn on SSH access in the WD settings so you can remotely access the command line, and be sure to change the default password when you do. In windows command prompt, then type "ssh root@[IP ADDRESS]" to connect.
  • The default directory where websites are hosted is:  /var/www/html/
  • The server error log is:  /var/log/nginx/error.log
  • You can set this up as a network share for easily transferring files by adding an entry in /etc/samba/overall_share and then restarting samba.
  • There is a setting that caught me - the WDMyCloud is set up for a production environment. So once a PHP script runs, it is stored in memory until the device is restarted. This is to maximize speed. It doesn't have to keep accessing the hard drive, but it has no way of knowing if a file changed. I am using it more as a development platform. I am making constant changes and tweaks. Change this setting so it verifies the most recent version is in memory. We aren't expecting thousands of hits. A little disk access won't be a big deal. In the file /etc/php5/cli/conf.d/05-opcache.ini change opcache.validate_timestamps=true. 

Potential improvements. 
Electric Sign never does a  full screen refresh to clear up artifacts that occur over time on the e-ink display.

The easy way around this is to enable the setting where Electric Sign writes the image to a screensaver. When the Nook goes to sleep, it refreshes the screen when the screensaver starts.

The downside is that I lose about 40 pixels at the bottom of the screen. This is where the nook puts the wake up prompt for exiting the screensaver.

I'd like to modify the Electric Sign app to add a screen refresh and reclaim those 40 pixels. With the source code available, there is a chance.

Applied Science on YouTube did a fascinating experiment playing with E-paper display update rate. I can't see how to apply anything he did to an old e-reader, but it is still a fascinating watch. https://www.youtube.com/watch?v=MsbiO8EAsGw&feature=youtu.be



For now, the display lives behind our kitchen sink. It sits on a stand made from the pulley from a broken alternator and a bit of hex bar brazed together.