<![CDATA[Made By Nathan]]>https://madebynathan.com/https://madebynathan.com/favicon.pngMade By Nathanhttps://madebynathan.com/Ghost 5.82Sat, 27 Apr 2024 07:35:12 GMT60<![CDATA[Do we need more HTML colors?]]>I wrote a blog post about painting my fence. This got me thinking a lot about colors and how I use them as a web developer.

Color Matching Paint In GIMP: Don’t Make These Mistakes
Please note: This post is a stream-of-conciousness journal entry that describes all of
]]>
https://madebynathan.com/2024/04/26/do-we-need-more-html-colors/662c3d2564b91700bc78f63cFri, 26 Apr 2024 23:58:11 GMT

I wrote a blog post about painting my fence. This got me thinking a lot about colors and how I use them as a web developer.

Color Matching Paint In GIMP: Don’t Make These Mistakes
Please note: This post is a stream-of-conciousness journal entry that describes all of the mistakes I made while trying to color match paint. This is not a how-to guide from an expert. We’re renting an old house that needs a lot of maintenance. The landlords are very easy-going so we’re
Do we need more HTML colors?

So I asked myself a question: What's the perceptual difference between two adjacent HTML colors?

There are 16,777,216 possible colors (256 x 256 x 256), since there are only 256 possible values for red, green, and blue. I've been using this Delta-E calculator to calculate the perceptual difference between colors:

Delta-E Calculator - ColorMine.org
Accurate and easy color comparisons with our online delta-e calculator. Compare colors in Rgb, Cmy, Cmyk, Hsl, Xyz, CIE-L*ab, CIE-Lch, and Yxy spaces.
Do we need more HTML colors?

I chose a random green/blue color (rgb(50,200,180) and calculated some differences after adding/subtracting one from each color channel. Here are the results:

  • 0.1192 = R:50,G:200,B:180 -> R:51,G:200,B:180
  • 0.1168 = R:50,G:200,B:180 -> R:49,G:200,B:180
  • 0.6929 = R:50,G:200,B:180 -> R:50,G:201,B:180
  • 0.6943 = R:50,G:200,B:180 -> R:50,G:199,B:180
  • 0.5714 = R:50,G:200,B:180 -> R:50,G:200,B:181
  • 0.5711 = R:50,G:200,B:180 -> R:50,G:200,B:179

Subtracting one from the green channel seems to show the biggest perceptual difference.

Here's the difference when you subtract one from each color for pure white (rgb(255, 255, 255):

  • 0.3561 = R:255,G:255,B:255 -> R:254,G:255,B:255
  • 0.667 = R:255,G:255,B:255 -> R:255,G:254,B:255
  • 0.5079 = R:255,G:255,B:255 -> R:255,G:255,B:254

So the green channel shows the biggest difference for both addition and subtraction. The next largest difference is in the blue channel, and red makes a relatively small difference.

Here's the progression from rgb(255, 255, 255) down to rgb(255, 232, 255)

You can see that it's very hard to tell the difference between any two colors that are right next to each other.

I thought of another question: What are the biggest and smallest perceptual differences between two adjacent HTML colors?

I decided to write a Ruby script to figure this out. I found this color_difference Ruby gem that uses the CIEDE2000 Color-Difference formula.

GitHub - mmozuras/color_difference: Implementation of CIEDE2000 color-difference formula
Implementation of CIEDE2000 color-difference formula - mmozuras/color_difference
Do we need more HTML colors?

Paper: https://hajim.rochester.edu/ece/sites/gsharma/ciede2000/ciede2000noteCRNA.pdf

require 'color_difference'

max_difference = nil
min_difference = nil
max_difference_colors = []
min_difference_colors = []

0.step(255, 1) do |r|
  0.step(255, 1) do |g|
    0.step(255, 1) do |b|
      color = { r: r, g: g, b: b }
      puts "Color: #{color.inspect}"

      [1, -1].each do |diff|
        %i(r g b).each do |channel|
          new_color = color.dup
          new_color[channel] += diff
          new_color[channel] = [0, new_color[channel]].max
          new_color[channel] = [255, new_color[channel]].min

          next if new_color == color

          difference = ColorDifference.cie2000(color, new_color)
          if max_difference.nil? || difference > max_difference
            max_difference = difference
            max_difference_colors = [color, new_color]
          end

          if min_difference.nil? || difference < min_difference
            min_difference = difference
            min_difference_colors = [color, new_color]
          end
        end
      end
    end
  end
end

def format_float(number)
  sprintf('%.15f', number).sub(/0+$/, '').sub(/\.$/, '.0')
end

puts "Max difference: #{format_float max_difference}" 
puts "Colors: #{max_difference_colors.inspect}"
puts "------------------------------------"
puts "Min difference: #{format_float min_difference}"
puts "Colors: #{min_difference_colors.inspect}"

Results:

Max difference: 0.012461248722627
Colors: [{:r=>24, :g=>23, :b=>23}, {:r=>24, :g=>24, :b=>23}]
------------------------------------
Min difference: 0.000064328231603
Colors: [{:r=>0, :g=>255, :b=>255}, {:r=>1, :g=>255, :b=>255}]

I've included the colors below. The large blocks are the two adjacent colors with the biggest/smallest differences. The smaller blocks are what it looks like if I continue adding one to their respective color channels (green for the largest difference, and red for the smallest difference.)

Note: It's easier to see the largest difference against a black background.

Largest perceptual difference:

Smallest perceptual difference:

You can clearly see the top blocks becoming more green, while the bottom blocks all look like the same color. (I had to double-check my HTML code to be sure I hadn't made any mistakes!)

I can't even really tell the difference between rgb(0,255,255) and rgb(30,255,255)!

I have to go all the way up to rgb(120,255,255) before I can really notice the difference.

(I'm not color blind! I did a test!)
EnChroma® Free Color Blind Test | Test Your Color Vision
Take the free Enchroma color blind test to accurately assess your color perception. The results provide a recommendation for EnChroma color blind glasses.
Do we need more HTML colors?

So I think we now have enough information to answer the question: Do we need more HTML colors?

No, 256 possible values for each color channel is plenty. It's virtually impossible for a human to tell the difference between any two adjacent color codes.

]]>
<![CDATA[Color Matching Paint In GIMP: Don't Make These Mistakes]]>Please note: This post is a stream-of-conciousness journal entry that describes all of the mistakes I made while trying to color match paint. This is not a how-to guide from an expert.

We're renting an old house that needs a lot of maintenance. The landlords are very easy-going

]]>
https://madebynathan.com/2024/04/25/color-matching-paint-is-harder-than-it-looks/6625d685cab1a83ac77b09beThu, 25 Apr 2024 06:26:42 GMTPlease note: This post is a stream-of-conciousness journal entry that describes all of the mistakes I made while trying to color match paint. This is not a how-to guide from an expert.Color Matching Paint In GIMP: Don't Make These Mistakes

We're renting an old house that needs a lot of maintenance. The landlords are very easy-going so we're allowed to have a dog and two cats. They also said we can pretty much do whatever we want to the house, so we've installed lots of home automation stuff, put up a garden shed, and hammered nails into the walls to put up pictures. We also take of the lawns and the garden and help to keep the place tidy.

"Tidy up the fence" had been on my todo list for a long time. There's a few marks and rusty nails, and it looks like someone had tried to paint a... smiley face?

I thought it would be nice to touch up the fence with a bit of paint. I guess the proper way to do it is to pressure wash the fence, sand it down, apply a coat of primer, then a coat of paint. I didn't want to do all of that since the fence is old and probably due to be replaced. I just wanted to paint over a few spots, so I needed to find a matching paint color.

I tried taking a small bit of painted wood to the hardware store. They have a computerized paint machine that can scan a color and mix some paint to match the color. Unfortunately this didn't work too well and the resulting paint was too dark. They said that my painted wood chip had a bit too much dirt and grime and it wasn't easy to clean it, so they couldn't get an accurate color.

I went over to the Resene color swatches and held up my paint flake. "Double Thorndon Cream" seemed like it was a good match, so I bought a small test pot. I also brought home a collection of 28 Resene color cards for white and neutral colors, just in case I needed a different color. (They were free!)

Color Matching Paint In GIMP: Don't Make These Mistakes

I held up the color swatches and double-checked that "Double Thorndon Cream" matched the fence. It seemed pretty close, so I tried it out.

Color Matching Paint In GIMP: Don't Make These Mistakes
Not close

Wait, what? Why is it so light? Maybe there's something wrong with the paint in the test pot. Even if it's a bit brighter when it's wet, I can't see how it will be the right color when it dries.

I took a picture and used the color picker tool in GIMP. I wasn't able to choose a single pixel since the wood has a lot of texture, so I checked the "Sample average" option and took the average color from a 50x50 square.

Color Matching Paint In GIMP: Don't Make These Mistakes
Test Pot Color = RGB(197, 203, 200)

I also checked the color of the original paint:

Color Matching Paint In GIMP: Don't Make These Mistakes
Fence Color = RGB(180, 180, 171)

I did some Googling and found an online "Delta-E calculator":

Delta-E Calculator - ColorMine.org
Accurate and easy color comparisons with our online delta-e calculator. Compare colors in Rgb, Cmy, Cmyk, Hsl, Xyz, CIE-L*ab, CIE-Lch, and Yxy spaces.
Color Matching Paint In GIMP: Don't Make These Mistakes

This tool can calculate the "perceptual distance" between two colors by using the Cie76 algorithm.

Color Matching Paint In GIMP: Don't Make These Mistakes

The difference between the original paint and the paint from my test pot is: 8.9811. Apparently that's quite a big difference. Humans can't tell the difference between colors if the difference is less than 1. That might be too hard to find, so I decided to aim for a difference of less than 2.

But how did I get it so wrong? Maybe I didn't mix the paint in the test pot well enough, or maybe it was a lot lighter than the swatch. So I checked the colors in GIMP.

  • Swatch = rgb(201, 203, 199)
  • Paint = rgb(198, 203, 201)
Color Matching Paint In GIMP: Don't Make These Mistakes
They're basically the same color.

The Delta-E difference between these two colors is only 1.5174. They're actually very similar colors.

So the paint does match the swatch. Maybe I shouldn't be relying on my eyes so much.

Checker shadow illusion - Wikipedia
Color Matching Paint In GIMP: Don't Make These Mistakes

Anyway, now I know that the color swatch cards can be trusted. If the test paint matches it's corresponding swatch, then maybe I just need to find a swatch that matches the original paint. But I'm not going to rely on my eyes this time. I'm going to use the color picker and look at the Delta-E differences.

I took photos of all 28 swatches against the fence and went through all the colors one-by-one.

Color Matching Paint In GIMP: Don't Make These Mistakes

Resene Double Parchment™️cc - Y80-025-083

I found a color called "Double Parchment" that perfectly matched the paint. It was even the exact RGB value I was looking for: rgb(185, 186, 179). There was something very satisfying about finding a perfect match. (Although the color of the fence varies slightly, depending on where I measured it.)

I went back to the store to buy another test pot. Unfortunately they didn't have any small pots available, so I had to buy a slightly bigger one. No problem, I was pretty sure that I got it right this time.

Color Matching Paint In GIMP: Don't Make These Mistakes

Well that doesn't seem quite right.

You can see that I was getting a bit frustrated so I just went ahead and painted over all the graffiti anyway. But still want to figure this out, because I want to touch up some other parts of the fence and the house. If I manage to figure out the right color then maybe I'll paint over this section again.

New strategy:

I'll compare the new paint with the old paint and calculate percentage difference for each color channel. Then I'll apply that same percentage difference to the color swatch and look for a swatch that matches the darker color.

Color Matching Paint In GIMP: Don't Make These Mistakes
Original Paint = RGB(202.6, 195.7, 186.2)
Color Matching Paint In GIMP: Don't Make These Mistakes
New Paint = RGB(221.6, 215.4, 204.0)

Color difference:

  • Red: 202.6 / 221.6 = 0.9142599278
  • Green: 195.7 / 215.4 = 0.908542247
  • Blue: 186.2 / 204.0 = 0.912745098

So I need to find a paint color that's about 91% as bright as Double Parchment.

I finally stumbled onto the Resene website, and realized that I had been doing everything wrong up until this point. Using the GIMP color picker for my swatch photos wasn't a very reliable process.

Color Matching Paint In GIMP: Don't Make These Mistakes

This looks a lot more promising! Now I can rely on some official RGB values for Resene Double Parchment. I just need to multiply them by around 91%, and hopefully this next color will be the right one.

  • Red: 199 * 0.9142599278 = 182
  • Green: 187 * 0.908542247 = 170
  • Blue: 163 * 0.912745098 = 149
Color Matching Paint In GIMP: Don't Make These Mistakes

They even have a search feature, so you can look for paint colors matching some specific RGB values:

Color Matching Paint In GIMP: Don't Make These Mistakes

I calculated the Delta-E differences for each color to see which one was the closest. Here are the results:

  • Bison Hide: 2.0151 = R:182,G:170,B:149 -> R:181,G:172,B:148
  • Half Malta: 2.6672 = R:182,G:170,B:149 -> R:181,G:166,B:149
  • Half Grey Olive: 2.4561 = R:182,G:170,B:149 -> R:177,G:171,B:149
  • Joss: 2.5412 = R:182,G:170,B:149 -> R:185,G:168,B:150
  • Double Tea: 1.312 = R:182,G:170,B:149 -> R:178,G:168,B:148
  • Mandrake: 2.1529 = R:182,G:170,B:149 -> R:176,G:169,B:148
  • Eagle: 3.5444 = R:182,G:170,B:149 -> R:176,G:172,B:148
  • Drought: 2.843 = R:182,G:170,B:149 -> R:184,G:168,B:143
  • Quarter Gargoyle: 3.795 = R:182,G:170,B:149 -> R:178,G:164,B:149
  • Half Rickshaw: 4.1016 = R:182,G:170,B:149 -> R:189,G:167,B:147
  • Quarter Pravda: 4.5576 = R:182,G:170,B:149 -> R:180,G:171,B:158
  • Quarter Stonewashed: 5.0726 = R:182,G:170,B:149 -> R:178,G:169,B:157

"Double Tea" was the closest match with a difference of only 1.312.

Color Matching Paint In GIMP: Don't Make These Mistakes

So maybe I'll go back to the hardware store tomorrow and buy another test pot.


The Next Day:

I went outside to look at the fence again. The paint had dried. Turns out that "Double Parchment" was pretty close after all.

There's still some room for improvement, but I don't think it will be noticeable after I paint the rest of the boards in this section. The posts spaced every ~2 metres will help to hide the color difference, especially when the sun is hitting them and casting shadows.

Lessons Learned

  • Don't trust your eyes.
    • It's very easy to get fooled by optical illusions. Your eyes can be tricked by all sorts of things, including shadows, patterns, textures, perspective, background color, color temperature, etc. Don't use your eyes to compare two colors. Use a color picker tool and check the Delta-E difference.
  • Be patient.
    • Wait for paint to dry before you make any decisions. Sometimes paint gets lighter after it dries. Sometimes it gets darker. Maybe some paint even stays the same color.
  • Don't be lazy.
    • I should have washed the fence first. The color of the old paint will probably change if I ever clean it. (Maybe I'll get lucky and it will match the new paint.)

Things I might try next time

If I ever need to color match some paint in the future, I might try using one of these ColorChecker charts:

ColorChecker - Wikipedia
Color Matching Paint In GIMP: Don't Make These Mistakes

Maybe I can hold this card against the wall and take a photo. Then I can use the chart to calibrate the photo and get a reliable RGB color for the wall. I could also hold up a ColorChecker chart against some Resene color swatch cards, and then calibrate them against the official RGB values from the Resene website.


Update:

I pressure washed the fence and painted a few more spots. I tried taking a timelapse video, but the sun is too bright and you can't really see any difference. Oh well.

0:00
/0:11
Color Matching Paint In GIMP: Don't Make These Mistakes

It's close, but not really!

I used the color picker on this photo:

  • New paint: rgb(193.8, 195.8, 181.8)
  • Old paint: rgb(181.4, 183.4, 171.4)

Differences:

  • Red: 181.4 / 193.8 = 0.9360165119
  • Green: 183.4 / 195.8 = 0.9366700715
  • Blue: 171.4 / 181.8 = 0.9427942794
Color Matching Paint In GIMP: Don't Make These Mistakes

I took the official RGB values for Resene Double Parchment from the website, and multipled the values by this ratio to find a slightly darker color.

  • Red: 199 * 0.9360165119 = 186.2672858681 (186)
  • Green: 187 * 0.9366700715 = 175.1573033705 (175)
  • Blue: 163 * 0.9427942794 = 153.6754675422 (154)

Then I searched for this new color: rgb(186, 175, 154)

  • Akaroa: 1.9844 = R:186,G:175,B:154 -> R:190,G:178,B:154
  • Half Hillary: 3.8147 = R:186,G:175,B:154 -> R:185,G:179,B:152
  • Triple Parchment: 2.5177 = R:186,G:175,B:154 -> R:189,G:175,B:150
  • Half Nomad: 3.4854 = R:186,G:175,B:154 -> R:183,G:175,B:160
  • Silk: 4.9492 = R:186,G:175,B:154 -> R:187,G:173,B:161
  • Half Napa: 3.747 = R:186,G:175,B:154 -> R:180,G:173,B:158
  • Joss: 3.4876 = R:186,G:175,B:154 -> R:185,G:168,B:150
  • Serene: 4.4225 = R:186,G:175,B:154 -> R:189,G:176,B:163
  • Antidote: 3.2984 = R:186,G:175,B:154 -> R:193,G:176,B:159
  • Coral: 4.857 = R:186,G:175,B:154 -> R:192,G:176,B:147
  • Eighth Stonewall: 4.1965 = R:186,G:175,B:154 -> R:178,G:173,B:158
  • Quarter Pravda: 4.6182 = R:186,G:175,B:154 -> R:180,G:171,B:158
  • Bison Hide: 2.251 = R:186,G:175,B:154 -> R:181,G:172,B:148

Akaroa looked promising. I picked up a test pot and tried covering up a few more rusty nails.

Color Matching Paint In GIMP: Don't Make These Mistakes

The color was perfect! I couldn't see any difference.

... as long as I didn't look at it from the side.

Color Matching Paint In GIMP: Don't Make These Mistakes

I forgotten to consider the "sheen", or high shiny the paint is.

Painting - what gloss level should I select? Resene
How to choose the correct gloss level paint for a particular application or project.
Color Matching Paint In GIMP: Don't Make These Mistakes

Resene paints come in a few different gloss levels:

  • Gloss
  • Semi-gloss
  • Satin
  • Low sheen
  • Flat (or matt)

The test pot I tried was "made using Resene Lumbersider low sheen exterior and interior paint." It turns out that I needed a flat / matt paint with zero sheen.

I did some more research and saw that Resene has a "Lumbersider Matt" paint. I couldn't find any matt test pots for sale online, and it looks like Lumbersider Matt might not even be available in New Zealand. But I will go back to the Resene store on Monday and ask them about it.

Otherwise, I might need to start over with a different paint brand. Maybe Dulux or Wattyl.

]]>
<![CDATA[Fried Rice Sandbox Toy]]>My wife is a counselor who does "play therapy" at a primary school. She has a sand tray and some toys that kids can play with during their sessions. Sometimes she asks me to 3D print things for the kids to play with. For example, I printed this

]]>
https://madebynathan.com/2024/04/20/fried-rice-sandbox-toys/6623bcbfcab1a83ac77b08beSat, 20 Apr 2024 14:04:53 GMT

My wife is a counselor who does "play therapy" at a primary school. She has a sand tray and some toys that kids can play with during their sessions. Sometimes she asks me to 3D print things for the kids to play with. For example, I printed this little shovel for the sand tray:

Small Spade/Shovel for plants by Quackulla
a small spade for use with houseplants and such
Fried Rice Sandbox Toy

One kid really likes trains, so I was asked to 3D print a toy steam train:

Fried Rice Sandbox Toy

Another kid really likes pretending to make fried rice in the sand, so my wife asked if I could 3D print some plastic ingredients and a toy spatula.

I found a few 3D models:

Fried egg - dual extrusion by nglasson
No - I’m not cooking my breakfast on a super hot heat bed. I just happened to have white and yellow loaded on my first dual extrusion configuration, and felt a need to print something “real” after doing some calibration prints to fine tune the second extruder offset. (http://www.thingiverse.com/thing:401570). Warning for complete idiots: if you print this thing - don’t eat it. It is plastic - not food. If you want a real 3D printed fried egg you will need to message Will: http://www.thingiverse.com/WillandMrData2/designs. He seems to have the 3D printed food market all stitched up and will sue your pants off if you try to print this and eat it.
Fried Rice Sandbox Toy
Download Corn Grains 001 3D Models for free | Freepik
Download professional Corn Grains 001 3D Models in various formats ✓ Ready to use on your projects | Freepik. #freepik
Fried Rice Sandbox Toy
Parametric compartment box with lid by acker
This is the same item as hippiegunnut’s http://www.thingiverse.com/thing:12307, tweaked very slightly with an optional lid added. -- UPDATE 4/13/2013 -- I added a second type of box: now you can use a sliding lid. Prints nicely, with a very steep angle in the lip so no overhang problems. I’m using these as chess boxes, card deck boxes, screw sorters, etc. Still fully parametric, of course. -- UPDATE 5/6/2013 -- Okay, finding a lot of uses for this recently. :) I added a parameter to include a coin slot in the lid. Now it’s a divided piggy bank too! (My 8-year-old son uses it to handle savings, etc. separately.)
Fried Rice Sandbox Toy
Spatula by tdebest
spatula I printed on its side with base supports only
Fried Rice Sandbox Toy

The wok model was tricky. I used this tool to convert the OBJ to STL:

Free Converter App for 3D File Formats
Convert 3D File to Autodesk, Draco, Wavefront, 3D Studio and many other formats.
Fried Rice Sandbox Toy

The resulting STL had some errors, so I used this tool to fix them:

Free online stl repair tool

I also added some basic shapes in Bambu Studio (spheres, cylinders, and cubes) to peas, bacon, omelette, and green onions.

Fried Rice Sandbox Toy

Some of these small parts were quite difficult to print. I had to experiement with the support and raft settings, especially for the peas and corn. You can see that I still lost a few.

0:00
/0:19
0:00
/0:06

Here's the finished product:

I had a lot of fun making this. I hope they have fun playing with it!

]]>
<![CDATA[LoRa Mailbox Notifications]]>I bought this awesome device that sends me notifications whenever we get a new letter or package in our mailbox.

I bought it from the creator's online store:

MailBox Guard Wireless IR Sensor

The design is also open source and available on GitHub:

GitHub - PricelessToolkit/
]]>
https://madebynathan.com/2024/04/20/lora-mailbox-notifications/662318e8cab1a83ac77b079cSat, 20 Apr 2024 01:52:08 GMT

I bought this awesome device that sends me notifications whenever we get a new letter or package in our mailbox.

I bought it from the creator's online store:

MailBox Guard Wireless IR Sensor
LoRa Mailbox Notifications

The design is also open source and available on GitHub:

GitHub - PricelessToolkit/MailBoxGuard: Lora Long Range Mailbox Sensor for Smart Homes or for Standalone use
Lora Long Range Mailbox Sensor for Smart Homes or for Standalone use - PricelessToolkit/MailBoxGuard
LoRa Mailbox Notifications

They included STLs for a 3D printed case. I also designed a custom mailbox flap with embedded magnets. The flap opens whenever a letter is pushed into the mailbox. This triggers a reed switch that turns on the Mailbox Guard and sends a notification to the receiver.

0:00
/0:05

Sensor case and custom mailbox flap

I bought this LILYGO TTGO LoRa32 board to receive messages and send them to Home Assistant via MQTT.

39.45NZ$ 10% OFF|LILYGO® TTGO LoRa32 V2.1 1.6.1 ESP32 LoRa 433MHz 868MHz 915MHz Development Board 0.96 Inch OLED TF Card BLE WIFI Wireless Module
Smarter Shopping, Better Living! Aliexpress.com
LoRa Mailbox Notifications

I 3D printed a case for the receiver: TTGO Lora32 T3 Slimline Case on Printables

0:00
/0:15
LoRa Mailbox Notifications

It turns out that most of our mailbox notifications are flyers and leaflets, and sometimes the wind. I will probably turn off the real-time notifications and just show the status on a dashboard somewhere.

I've noticed that LoRa is more reliable than some of my Zigbee devices, and has a much longer range. I might try designing some of my own LoRa devices in the future.

Future Ideas

I would like to add a second reed switch on the main door of the mailbox, so that I can automatically reset the count to zero whenever we take the letters out of the mailbox. But I don't know if this is possible due to the design of the board.

I would also like to add some LoRa transmitters to our cars, so that I can automatically open and close our garage doors. I've already set this up with the Home Assistant mobile app for home presence detection, but sometimes there's a delay, or my wife is driving my car (or vice versa.)

]]>
<![CDATA[3D Printing Log]]>I bought a Bambu Lab X1-Carbon 3D printer in March 2023.

I'm extremely happy with this 3D printer and highly recommend it! It's more expensive than entry-level printers, but it's a very high quality machine and is very reliable. I can focus on designing

]]>
https://madebynathan.com/logs/3d-printing/6621e803cab1a83ac77b00a6Fri, 19 Apr 2024 11:40:26 GMT

I bought a Bambu Lab X1-Carbon 3D printer in March 2023.

3D Printing Log

I'm extremely happy with this 3D printer and highly recommend it! It's more expensive than entry-level printers, but it's a very high quality machine and is very reliable. I can focus on designing and making things instead of spending lots of time tinkering with my 3D printer.

I find a lot of models on Thingiverse, Printables, and MakerWorld. I also design my own parts in OpenSCAD and Fusion360.

This page is where I log some of the things that I've printed.

2024

Aeria Mechanica Mini

3D Printable Aeria Mechanica Mini by Dan
Quickbuild Snippet: https://youtube.com/shorts/tSU-9JgXX4o?feature=share Assembly Guide: https://drive.google.com/file/d/1r7BkmFpSfY84eBJSskd3xgEm4L7gxlrf/view?usp=sharing | Download free and paid 3D printable STL files
3D Printing Log
3D Printing Log
0:00
/0:08
0:00
/0:05
0:00
/0:08

Leviathan Steam Train

Steam Engine Train Leviathan by mardur
Detailed steam engine train loosely modeled after the number 63 Leviathan. Matching tender is available at https://www.thingiverse.com/thing:4772254 The model is not to any scale and not an accurate replica, particularly for the wheel sockets and the cabin. Most parts can be printed without or only very little support. Careful, there are more than 100 pieces to the entire model. If parts are to be printed multiple times, the amount is indicated in brackets in the filename. A standard LED can be placed inside the lantern and cables will run inside the model towards the cabin. Another LED might be placed loosely inside the boiler to indicate the burning fire. The details in the model are designed to be printed with 0.4mm nozzle FDM at 0.2mm layer height. I personally printed it on an Ender 3 in PLA. Most parts will be glued in place. Some parts (especially the wheels) are supposed to be attached with M2x20mmm screws. Any other diameter or length will not fit. Sorry about that. The wheels and drive mechanism are theoretically moving, but at least for my print, the tolerances are too tight for smooth movement. I am not particularly happy with the wheel sockets either. I should come up with a better solution there.
3D Printing Log
0:00
/0:13

Fried Rice Sandbox Toy

Fried Rice Sandbox Toy
My wife is a counselor who does “play therapy” with children. She has a sand tray and some toys that kids can play with during the session. Sometimes she asks me to 3D print things for the kids to play with. I printed a little shovel for the sand tray:
3D Printing Log

See the project blog post for more details

3D Printing Log
0:00
/0:19
0:00
/0:06

Replacement Generator Cap

My cousin works for a company that supplies generators for events. They lost one of these generator caps and asked me if I could print a new one, since it's quite expensive to buy a replacement. I copied the design in OpenSCAD and printed it using ASA filament for strength and UV resistance.

0:00
/0:06
This took a few attempts because there was significant warping with ASA. You can see the build plate jump up a little bit as the plastic cools and shrinks, but it was able to finish printing without any issues.

Dune Ornithopter Model

House Atreides Royal Ornithopter Kit Card by Iron_Man_
----NOT MY CREATION---- originally made by Kamteix over on printables. their page can be found here: https://www.printables.com/model/783683-dune-house-atreides-ornithopter-kit/files I’ve included two files, one file that’s compact, and one for a small print bed. If you choose the compact version, make sure to download one of the wing files. I recommend the long wings, but it’s up to you. STL files soon!
3D Printing Log
0:00
/0:02

The Moon

This print took 33 hours.

Designer Lithophane Moon Lamp by humphrey_b52
This is a remix. This is a cool lamp. Maybe a gift. This is easy to print. This is an eye catcher. This takes 2 days to print. This is a #3dp design. MK2 is here! Globe: got bigger to the max. Prusa envelope Bayonet lock: works better with all tolerances Light stand: redesigned rocket legs and better proportions And there is a ceiling adapter. And a version (28 mm socket hole) for a popular IKEA cord set If you like what you see, consider following me to support my work. prusaprinters.org/frankdeschner/ There will be more practical #3dp prints regularly. Moon Globe High-res Moon Globe, diameter approx.: 210 mm / 8.2 in Hole for light bulb, max diameter: 60 mm / 2.3 in Credit for the Moon Lithophane goes to u/moononournation: 8 in Progressive Detail Moon Lamp Light Stand Height: 85 mm / 3.4 in Socket hole diameter: 40 mm / 1.6 in Ceiling Adapter Height: 20 mm / .8 in Socket hole diameter: 40 mm / 1.6 in plus versions with socket hole diameter: 28 mm Lamp kit E26/27 lamp socket, 12 ft braided cord, on/off switch amazon lamp kits Light bulbs Small LED globe light bulbs, warm/neutral white, 25 W amazon 25 W bulbs LED light bulbs, warm/neutral white, 40 W amazon 40 W bulbs Smart bulbs WiFi tunable white, LED bulb Wyze bulbs WiFi light bulb, LED RGB color changing amazon RGB bulbs (no affiliation)
3D Printing Log
0:00
/0:06

Replacement Sunvisor Clip for Audi

Audi Sunvisor Clip Replacment part by Papillote
Hello Everyone, It works with most AUDI cars !!! I designed a sunvisor clip for my Audi A3 as the clip was broken (see pictures). The printed part works exactly as the original one. You have to reuse the grey case and the small iron part. It is very easy to change, just follow theses steps according to the pictures : 1) Print the stl file as it is, hook looking up and with support in contact with the bed. While it is printing, remove your broken sun visor clip thanks to slotted screwdriver. 2) Take printed part and remove supports 3) Take the iron part of your broken sunvisor clip to mount it on the printed clip. 4) Put the printed part on your car (no glue, just press it) 5) Add the grey case and that’s it, your ready to go. This replacement clip should work with the following cars : A1 S1, A3 S3, A4 S4, B6 B7 B8, A5 S5, Q3 Q5 and maybe more... Hope it will be usefull for you, and helps you saving time ! Thank you for liking it, collecting it, post a comment and a make :D
3D Printing Log
0:00
/0:02

Lighter Fluid Tracks

Lighter fluid tracks by OscarMorris-Design
Tracks designed to carry lighter fluid for an interesting effect... Designed with Steve Mould for this video:https://www.youtube.com/@SteveMould Editable parameterized Fusion360 files are available here: Loop: https://a360.co/43UdRgP Split: https://a360.co/4b1J9on Spiral: https://a360.co/3QbwZRI Coil and Loop: https://a360.co/4aG2jjL Rays: https://a360.co/3JpINfy Figure Eight: https://a360.co/4aNZWMc
3D Printing Log
0:00
/0:02
0:00
/0:03

Raspberry Pi 4B Cases

This my new favorite case design. It looks really cool and snaps together nicely.

Raspberry Pi 4B Case by mkellsy
A Raspberry Pi 4B case with honeycomb vents. This has 384 different configurations. Here is the matching Raspberry Pi 3B+ case.https://www.thingiverse.com/thing:3361218 If you are looking for a touchscreen case, check out my matching official Raspberry Pi touchscreen case here. https://www.thingiverse.com/thing:4610955 Or do you have a hat and need some extra cooling? Check out the wind tunnel version. https://www.thingiverse.com/thing:4611538 Compatibility Raspberry Pi 4 Model B Configurations This includes multiple mount configurations; 75 mm VESA mounts 100 mm VESA mounts 8020 mounts No mounts Also included are multiple top configurations; Standard Slotted for display and camera ribbons 25 mm, 30 mm and 40 mm fan cutouts Clean version (great for modding and remixing) And then there are different body styles Standard Full Slim Mix and match 8 bases with 16 different tops and 3 different body styles. That’s 384 different configurations. Assembly To assemble you will need A #6-32 tap. 4 x #6-32 x 3/4 socket head cap screws. (slim body) 4 x #6-32 x 1/2 socket head cap screws. More detailed instructions can be found here. Assembly Instructions. Updates 8/11/2019 Update. Added full body version. Added slim body version. 8/16/2019 Update. Added fan grills This is remixed from 0110-M-P’s design, however it is not compatible with it. This has a different bolt pattern.
3D Printing Log
0:00
/0:05

Other Stuff

Cable Organizer by Fuzz98
This is a cable organizer for your desk to keep all those running wires organized in this sleek design I made in Audodesk Fusion 360. This was printed on the Anycubic Kobra 2 Neo Printer! This design can be printed with PLA or ABS to make the print stronger! I will also be releasing a TPU VERSION to make sure cables never fall down or out of the printed part! Some tips to make this stronger is to print with more infill and walls!! Follow me on Thingiverse and Like!!! Go check out my other models!!
3D Printing Log
NASA Fabric - V2 by RileyDesigns
This is NASA fabric, it’s a super satisfying sheet of hexagonal chainmail that you can fidget with our display. The model isnt fragile so play till your hearts content. The model is fully scaleable and a full bed print was included so you can create your own shapes by deleating indevidual hexagones. Simply import the STL raw model file into the slicer and separate the sheet into parts and delete the ones you don’t want. For best results use a small layer size, I used 0.12 mm and it worked excelent. To change the face pattern, adjust the “Bottom surface pattern” I used the Concentric mode which left me with a beautiful hexagonal infill pattern.&nbsp;UPDATE:New geometry makes upgrades this model in every way-Prints in 4 hours at .2mm-Print on either face-More accurate triangle reduction-Slices faster-Less lag when moving in slicer-Now works at .2mm layer height&nbsp;There is also a dragon scale and scnake scale version available on my profile, it looks amazing and is themed for the year of the dragon! Its a great model to use on costumes with color shifting filament.
3D Printing Log

2023

Desk Cable Organization

My first big 3D printing project was to organize all the cables under my desk. I found some of these models on Thingiverse, and I also designed a few of my own things in OpenSCAD.

Caldigit TS3+ Plus Wall / Desk Brackets by therealmrgadget
I wanted to be able to mount my Caldigit TS3+ Plus either under my desk, or on the wall next to my desk. These brackets fit snuggly and allow for both wall and desk mounting. Please note that the fixed rubber (grey) base part of the TS3+ has been accommodated for in the design, so you don’t have to remove it. This means that one side is slightly longer than the other side. You will find out easy enough as it will not fit if you try it the wrong way first ;) I have included the Autodesk Fusion 360 file if you want to tweak the design further, as well as the Cura file if you also have an Ultimaker 3 Printer. Please enjoy. I hope this helps you to tidy up your desk clutter as it has for me :)
3D Printing Log
Under Desk Cable Organizer Box with Lid by ndbroadbent
I made a box to tidy up the cables under my desk. The OpenSCAD file requires the BOSL2 library, which you will need to download from GitHub and install into the OpenSCAD library directory for your platform: Windows: My Documents\OpenSCAD\libraries\ Linux: $HOME/.local/share/OpenSCAD/libraries/ Mac OS X: $HOME/Documents/OpenSCAD/libraries/ If you are just using the .3mf or .stl files then you don’t need to worry about this, it’s only for the .scad file. The OpenSCAD file also has variables that you can adjust for width, height, length, screw size, etc. (It’s my first OpenSCAD project so the code is crazy, but it works!)
3D Printing Log
Cable Chain “SnaKe” by patricio5s
This is my remix about cable Chain, SnakeChain can move in multiple directions.
3D Printing Log

Mailbox Guard and Lora Receiver Case

LoRa Mailbox Notifications
I bought this awesome device that sends me notifications whenever we get a new letter or package in our mailbox. I bought it from the creator’s online store: MailBox Guard Wireless IR SensorPricelessToolkitPricelessToolkit The design is also open source and available on GitHub: GitHub - PricelessToolkit/MailBoxGuard: Lora Long Range
3D Printing Log

See the blog post for more details

3D Printing Log
0:00
/0:05
0:00
/0:15

Michaelangelo's David Bust

I printed and spray-painted this David bust to display on a shelf. I paused the print half way and filled it with pebbles to give it some weight.

Michaelangelo’s David Bust bisected at a 45 for cleanest print by K3D_Creates
I cut this scan of David by Cosmo Wenman via the Scan the World project on MyMiniFactory at a 45 for the cleanest possible print. Fusion 360 made the file too large for printing, but reduce the scale the same amount for both parts for your preference. Part of the reason I cut it up was to print a human head sized version on my Ender 3 (hat in photo for reference) It’s a very intricate model, but the angle I cut it at prevents supports from marring David’s face. Most supports are just to hold up underneath the overhang of the bust above the columnar pedestal, and then sections of hair on the head section. You will want supports (probably tree), and you’ll want high resolution settings. Print to preference other than that. Maybe a brim for the neck part. I did not make peg holes or anything, since I just match them up as best I can and cover seams with filler/primer. The shape of the model is quite unstable if rocked or knocked...the head is positioned forwards on the column instead of on the center, so when you glue together the two parts, you’ll want to make sure you have a VERY stable spot before you apply adhesive.
3D Printing Log

Figurines for Airbrushing and Painting Practice

I printed this duck, Crash Bandicoot, and Pikachu to get some practice with my airbrush. My printer can do multi-color prints using the AMS, but it takes a long time, wastes a lot of plastic, and doesn't always look very good. Another good option is to print all the parts separately and glue them together.

Duck by Infalivia
Duck for 3d printing. Download exclusively, models for download! ❤https://www.patreon.com/Infalivia Check my instagram: @infaliviahttps://www.instagram.com/infalivia/
3D Printing Log
Pikachu Pokemon EDLI3D by ShadowBons
I design this for my project 150 pokemon, i hope you enjoy it, follow us on instagram, youtube, facebook, and .com, you only need to search EDLI3D, the best 3Dprinting community. Diseñé este modelo para mi proyecto 150 pokemon, espero que lo disfruten, siganos en instagram, youtube y .com, solo busca EDLI3D, la mejor comunidad de impresión 3D.
3D Printing Log
Crash Bandicoot Statue (Crash 4 Version) by HappyMoon
IT’S ABOUT TIME! (get it because I haven’t uploaded in nearly 11 months haha) I’ve included files for 3 different poses (see second image for previews) - the ‘full’ files are the statues all in one piece, however I have also split them into different parts for easier printing. When making these files, I started by modelling Crash in his default idle position (pose1) based off of screenshots from the game, and then played around with different poses - thanks to the amazing Crash community on Twitter for helping me decide on these poses! :D Sorry for not uploading much recently, hoping to release more props + statues in the future :)
3D Printing Log
0:00
/0:27

Crash Bandicoot

3D Tic-Tac-Toe

3D Tic Tac Toe Remixed by nathan.f77
I designed my own version of 3D Tic Tac Toe in OpenSCAD. You can make changes to the .scad file to control all the different sizes, margins, padding, tolerances, etc. I copied most of the main design elements from https://www.thingiverse.com/thing:6171473 but wrote all the code from scratch. I designed tubes for the “O” pieces instead of spheres.&nbsp;Print list:&nbsp;* 1x base* 9x poles* 14x X pieces* 14x O pieces&nbsp;I added holes to the base plates, so you can print all the poles separately. I recommend printing the poles horizontally with some supports, because this makes them much stronger. (They can be very brittle and snap easily if you print them vertically.) You could even buy some wooden dowel rods from the hardware store, or maybe some metal tubes. You don’t need to worry about buying some cylinder with the perfect matching radius - just tweak the radius variable and everything will be adjusted to fit.
3D Printing Log

Tri-Hex Holder For Pens, Paintbrushes, etc.

Tri-Hex Holder by Saiteik
A holder made out of three hexagon’s that was a request from my SO. The heights are 100mm, 120mm, 140mm. Can be used to hold various items depending on their heights. ex: Brushes, Pencils, Pens, Markers, Long Slim Tools
3D Printing Log

Replacement Rack Ears for Ubiquiti Switch

I bought a used Ubiquiti Switch that didn't come with any rack ears. I designed and printed these little brackets so that I could mount it in my server rack. The brackets prevent it from slipping out of the rack, but they are not strong enough to support the switch. It needs to be placed on top of another rack-mounted device for support.

Replacement Rack Ears for Ubiquiti Switch (No Load) by ndbroadbent
I was inspired by some similar rack ears that I found on Thingiverse, but I had to design my own from scratch in OpenSCAD since the other ones weren’t quite right. I used these for a Ubiquiti PoE switch that I bought second hand, since it didn’t come with the original rack ears. I had to make the sides quite thin to fit in my rack, and I made the holes much smaller for the screws. Also note that these rack ears are not designed to hold any weight. You should put the router or switch on top of another device that is mounted using proper rack ears. These rack ears just hold the device in place and stop it from moving forwards and backwards.
3D Printing Log

Battery Organizers

I printed lots of organizers for coin cell batteries, AA, AAA, 9V, etc.

Battery dispenser AA & AAA by LarNil
Designed for very easy printing. AA & AAA version for gridfinity too. These 2 dispensers each hold 18 batteries. Gridfinity versions holds 20/19 for AA/AAA. The AAA dispenser can be added on top of the AA dispenser. (from version 3 AA adds on top of an AA dispenser and AAA on top of an AAA too). Dedicated standalone models and gridfinity version available. The batteries can slide out from the side, be gripped from the side or directly from front (version 4). Stacked, standalone or gridfinity, you decide! Version 2: Version 2 is extendable and can still be stacked. The extension holds 16 batteries. Version 3: Added possibility to stack AA on top of AA and AAA on top of AAA. Reduced the need to tap the batteries (sometimes) for them to roll down. Version 4: Added dedicated standalone models. Improved grip when stacking AAA on-top of AA. Added small ramp on the side to prevent batteries to accidentally slide out. Added slot for gripping batteries directly from front. Version 5: Improved ramp. Gridfinity (v6 of sorts) Added gridfinity version for AA & AAA. Not stackable.
3D Printing Log
Parameterized coin cell battery holder by Albert_dH
A coin cell battery holder parameterized for the number and size of cells and wall thicknesses. Print to hold the cells at the bottom of their slots by friction, and push them up via the bottom slot and then grab the sides from the top. This design is chunkier than some but it is going to live and work in a toolbox so the robustness is a feature. If you want to build a multi-cell battery look here http://www.thingiverse.com/thing:267438 . 30 volts in the size of a D-Cell! One end is marked with a hole to keep track of relative state of charge or whatever.
3D Printing Log

Orleans Board Game Organizer

Orleans Organizer by MrFuFu
I love this game. I hate how fiddly it is during setup. The components are a nightmare if all you have for organization is plastic baggies. One of my friends upgraded to little tupperware containers, but those are still a pain to fiddle with. Fortunately for you, I got sick of it, and made this handy organizer. It comes with little castle themed bins for all the serfs and knights. Each bin has either two or three bays inside of it. There are also two bins that are crate themed for the resources The bays are sloped so that you can easily draw out components. Each bin has a slide away top that snaps into place, so setup and teardown is as easy as placing the bins and sliding off the tops. There is also an organizer for the tiles that drive the gameplay at the top of the board. Plenty of room in the box for all, when the game is packed away. Components to print: 1 Orleans-3tray.stl (Grey) 1 Orleans-3TrayLid.stl (Grey) 2 Orleans-2Tray.stl (Grey) 2 Orleans-2TrayLid.stl (Grey) 1 Orleans-TileTray.stl 1 Orleans-3ResourceTray.stl (Brown) 1 Orleans-3ResourceTrayTall.stl (Brown) 2 Orleans-3ResourceTrayLid.stl (Brown) Every component is built to optimize gameplay and seamlessly transition from storage to play. So, boot up your printer, toss out those plastic baggies, and upgrade that copy of Orleans. Enjoy!
3D Printing Log
3D Printing Log

Curved Honeycomb Vase

I printed this to try out "Spiral vase" mode, where it prints in one continous line (instead of printing one layer at a time.)

Curved honeycomb vase by eggnot
F.A.Q You can sell your prints on Etsy etc. Don’t ask me for a permission, instead read a License on a left (it’s CC - Attribution SA) I don’t need your cut. Instead if you like a model or you making a profit out of it - donate me a small amount. License is for a 3d/STL file and NOT for a PHOTO / other content (you can’t sell your prints using my photo, do your own photo of your print). DESCRIPTION: Just a couple of modifiers to give Honeycomb vase(by radus) more stable bottom. Also i think it looks more organic. Done in Blender 3d, .blend file is attached. [sotvl_Spiral-Vase.stl] is a solid shape. you should print it in “Spiralize Contour”(Cura) or “Spiral Vase”(Slic3r). Ts is not waterproof, as it will be small holes on a way up from bottom. So, it is not good for water, but soil is ok. [sotvl_thick 1,2mm] - with a proper thickness calculation. 1mm and 2mm thick respectfully. probably waterproof... but not tested by myself with a print yet. Slice and print as a usual thing, not in vase mode. [sotvl_thick-Blender.stl] is thick/thin shape. should be ok for usual print and waterproof, but need more testing with prints. At current state, it seems it less reliable compared to sotvlthick 1,2mm. [sotvl.blend] - source Blender3d file, shape and thickness can be changed there. (for advanced users)
3D Printing Log

Filament Spool Switcher & Winder

This machine can be used to wind filament onto a new spool.

Bambu Lab P1 / X1 / X1C / X1CC Filament Spool Switcher & Winder on Printables

Turntable for 3D Scanning

I ended up using this for airbrushing.

Simple Programmable Turntable for 3D Scanning (Photogrammetry) by guppyk
Just a simple turntable for use in 3d scanning (actually photogrammetry) or anything else that you can think of. This is an easy print and all you need is a stepper motor, three ball bearings, and an Arduino (together for considerably less than USD 10). Stepper motor 28BYJ-48 (5V 4 Phase) + ULN2003 Driver Board (should be less than USD 2 together) Arduino (once again less than USD 2 - I have been using the Arduino Nano for most of my projects but you can of course just as well use an Uno) Four 608 (ZZ or RS or 2RS) ball bearings (once again < USD 2) Put the stepper in the mount in the center of the case, connect it to the Arduino via driver board, stick the ball bearings on the four axes, stick the feet in, and add the turn table. You are (almost) there. All you need is a few lines of code adapted to your needs (which could be continuous turns, moving stepwise, a stop after every 10 degrees or....). The nice thing about using an Arduino is that it is fully programmable. If you are not familiar with writing code for the Arduino, no problem, just enter “arduino 28BYJ-48” in Google. There are lots of good tutorials (and code you can copy and paste) on the net. For Photogrammetry (i.e. 3D scanning without a laser) all you need is a decent camera (your mobile phone camera will do) and software (I use Meshroom - simple, free, works great). You won’t even need a tripod. Have your object turn 360 degrees and take 30-50 pictures. Do this again from a higher viewpoint. Have the object lie flat on its back/front and repeat. Once again, it’s simple and there are lots of good tutorials on the net. Hope you like it. Enjoy! ...and as usual, take care when handling electronic equipment and no warranties whatsoever ;-)
3D Printing Log
3D Printing Log

Tablet Wall Mount

Lenovo Tab M10 Plus second gen wall mount case by mikedhoore
Wall mount case for a lenovo M10 plus second gen tablet
3D Printing Log

LED Strip Channel Holders for Vegepod

I designed and printed these clips to hold an LED strip grow light.

Pendant Lamps

I printed 8 of these for lights around our house. They look really nice.

Pimp your pendant lamp! by justinwille9666
Pimp your light with these easy to print cubic lamp shades.&nbsp;Print Settings:line width: 0.6mm (works fine with 0.4 nozzle)spiral vase: onbottom layers: 7layer height: 0.16&nbsp;They are working with every lamp with an external thread around 4cm &nbsp;example: https://www.amazon.de/Linkind-Lampenaufh%C3%A4ngung-H%C3%B6henverstellbar-Pendelleuchte-Lampenhalterung/dp/B094HY8VC6/ref=asc_df_B094HY8VC6/?tag=googshopde-21&linkCode=df0&hvadid=526495320941&hvpos=&hvnetw=g&hvrand=15052909721952127031&hvpone=&hvptwo=&hvqmt=&hvdev=c&hvdvcmdl=&hvlocint=&hvlocphy=9116154&hvtargid=pla-1379022261744&psc=1&th=1&psc=1&nbsp;
3D Printing Log

Glass Sphere Lamp Adapters

I printed these adapters so that an existing light socket would fit into a new spherical glass lampshade.

Angled Holder for Nintendo Switch Dock

This dock holder makes it a easier to take out my Nintendo Switch from the TV cabinet.

Bolt Thumb Screws for Drill Press Vise

I use these to quickly reposition or remove a vise from my drill press.

Alien Egg Chair

This was designed for a chicken egg, but I scaled it up to fit an ostrich egg. Now my wife can display her ostrich egg on a shelf in her office.

Egg Chairs by DaveMakesStuff
Keep your eggs safe in these comfy chairs. Or scale them up to hold melons or small children. See here for video: https://youtu.be/pjC-_G7KGnA There are four sizes of chairs to ensure that even your little eggs get a good view. Original size files are intended for resin printing, but they can be scaled up for FDM printing. This download includes one chair. See here to download the set: https://than.gs/m/912766 Oh, and I was just kidding about using the Egg Chairs for small children. Don’t do that.
3D Printing Log

Cat Key Hook

Cat key hook by aarruti
A simple hook for keyring where the cat come out of the box when the tail is pulled. Due to problems on the platform I had to create a new account to upload this model again. Do not hesitate to make many cycles of opening and closing the box to break-in the mechanism. MY PRINT SETTINGS: PLA Resolution : 0.28mm Infill : 20% Support : on Cover.stl and cat.stl
3D Printing Log

Vinyl Record Wall Brackets

Vinyl Records Wall Bracket Holder - minimalistic by 3DSiegel
Hey everyone, a standard vinyl record weighs on average 120g. For engineering, we don´t need such designs like these: https://german.alibaba.com/product-detail/wooden-wall-mount-vinyl-record-shelf-on-wall-phono-album-lp-display-shelf-record-rack-62047627390.html Thinking more minimalstic, I created a model wich weighs only 14g (100% infill). Attach the model with 2 countersunk head screws or use some glue. Note: Print the model with the long side in direction of the z-axis, so the most bending stiffness is along the printing lines. Thank you and have some fun with the prints! Cheers Marlon
3D Printing Log

Fluxx Card Game Box

Improved fit Fluxx box w/ Firefly, Nature and Holiday lids by randerson_1983
Made slight changes to Wizzer2801’s deck box file, removed little artefact on side of box (looks like from the X poking through) and have added bumps as spacers onto where the lid is placed. Having printed 4 of these, i found the lid was loose every time. This design fixed that for me. Using rounded bumps, if you find the lid too tight now, it should be easy to sand a little off to get your perfect fit. I have also uploaded lids I made for Firefly Fluxx, Nature Fluxx and Holiday Fluxx. Enjoy. Many thanks to Wizzer for the sharing the original designs! Much love.
3D Printing Log
3D Printing Log

Replacement Pool Vaccum Adapter

My cousin asked me to fix this thing for his pool vacuum.

Vaccuum Hose Adapters

I designed some adapters for my shop vac so that I could extend the hose. I also printed adapters for my circular saw and cyclonic separator.

Rubik's Cube Tissue Box

Tissue Box Rubik’s Cube by McCheezy
Hey guys, I designed a Rubik’s cube tissue box. If you don’t have OCD, you can mix the color plates ;-) You can also use it for other things like a money box. Edit: A user asked for stp-files. Enjoy!
3D Printing Log
PLA was a bad choice. The tissue box started warping and the color pieces fell off when my wife parked her car in the sun. I might try printing this again using ASA filament (UV resistant.) I might also print the color pieces slightly smaller and super glue them (instead of hammering them in.)

Fairy Door & Window

Fairy Door medieval hinges by Prosta
Lizard wizards thing with hinge change
3D Printing Log
0:00
/0:11

Raspberry Pi 4 Cases

I really like this Raspberry Pi case design.

Raspberry Pi 4 Case - Slider Case by dtnavida better airflow by berat45
I’ve modded the Raspberry Pi 4 Case by dtnavida so air can flow through the case to prevent overheating
3D Printing Log

NodeMCU ESP-32S Case

I've printed lots of these cases for ESP-32s around my house running ESPresense.

NodeMCU ESP-32S Case by jknorr
A case for the NodeMCU ESP-32S. This case was designed for development boards with a width of ~25,7mm and a length of ~48,43mm (see photos). Inspired by: https://www.thingiverse.com/thing:3195951
3D Printing Log

QuinLED Dig Uno Case

QuinLED Dig Uno v3.1 on Printables

3D Printing Log

Car Water Bottle Holder

I designed this water bottle holder for my car in OpenSCAD.

Benchy

The "Hello World" of 3D printing!

Other Stuff

Bambu Lab filament swatches by Foxart
I reverse engineered the filament swatches that come with the A1 mini from pictures from youtube video’s.&nbsp;They are an perfect fit with the “Swatch Display Board” by Bambu Lab: https://makerworld.com/en/models/14863#profileId-14645&nbsp;I also made a version with PRUSAMENT, POLYMAKER,REPRAPWORLD and SUNLU on the back (printing with a smaller nozzle is recommend for these)&nbsp;Special Thanks to Bryan Vines for the clear video of these and the temporary cover photo!Check him out he’s great: https://www.youtube.com/@BV3D&nbsp;Enjoy!
3D Printing Log
Grandma’s Favorite Filament Clip by extrutim
Over 90 000 downloads and over 20 000 likes speaks for itself, a very popular filament clip now for you, here!&nbsp;A simple filament clip which prevents the filament from unwinding reliably!I&#39;ve tested many filament clips in the past, but couldn&#39;t find one that I was 100% satisfied with.Out of this need I have designed this small clip!&nbsp;This is the easiest way to attach the clip: Hold the end of the filament between your thumb and index finger, and press down on the previous winding with your middle finger. This way you can loosen the previous winding a bit to make it easier to get underneath with the clip to attach it. Do it a few times and it will be done in a few seconds.&nbsp;Important:Make sure your filament is not over extruded. This can cause the clip to not work as well as it could.I recommend regular PLA, Silky PLA has a poorer layer adhesion which can cause the clip to break.&nbsp;Tip: 2.85mm filament? Just scale the clip in your slicer to 160%.The most important features in short:Only requires about 1g of filament and prints in about 7min.Does not attach to the spool. This makes it compatible with any filament spool and they can still be stacked easily.Has a grip for easier handling.A &#34;scoop&#34; to get under the previous winding better.Bends the filament just slightly and therefore doesn&#39;t damage it.A separate version with a hole in the grip to hang it up.The different clips explained separately:&nbsp;The classic: Unchanged because the vast majority are perfectly satisfied with this clip.The stronger clip: If you use Silky PLA or another filament with poorer layer adhesion, this scoop will be more sturdy.The clip for beasty filament: Filaments like PC are very slippery and stiff at the same time. The previous turn is clamped much stronger and prevents slipping.The closed clips: If the filament is fed into a Bowden tube these clips can stay on the filament. The hole is shaped so that the filament when it is straight simply slips through, if it is wound on the spool it holds the filament by its bending.There are these two versions, depending on which one you like better in handling.&nbsp;Remix? Please remember to select the same license as from this model when remixing.&nbsp;You can find the original upload here, of course I would be very happy about a like and a follow there!Commercial use: Even if the license forbids this I agree if you show this model to your audience in a video etc. or use it if you run a business. Only selling the files or the physical model is prohibited. Please remember to name me as the author and link to this page.
3D Printing Log
Windows 95 Start Menu Button by sabertail
A replica of the Windows 95 start button. The STL model is 16 cm in the wide dimension and about 6.4 cm in the other. The black parts of the icon are 0.4 mm higher than the colored parts. I printed most of it with gray filament, switched to black filament for the last couple layers, and then painted the colors on. Turning on the “ironing” setting if your slicer has one will produce a better finish. You might be able to print inlays for the colored bits and glue them on, so I’ve included STLs for them. I have not tried this myself, though, so no guarantees.
3D Printing Log
Yoshi by InventingJ
My first organic and multi color model :) Please tell me if i need to do anything differently ;) (it would help me alot.) Ps. Fusion 360 file included !.. And and and.. Yoshi-Solid (repaired) is for single extrusion :) Enjoy !
3D Printing Log
Kurzgesagt Duck by easyrider1984
Assemble by hot glue after printing
3D Printing Log
Snowflake by CreativeTools
A snowflake to hang on your Christmas tree Thing video http://www.youtube.com/watch?v=HszUA4tW9go By Creative Tools Home - Things - GooglePlus - Twitter - Facebook - Youtube - Instructables - Instagram - Flickr - Vimeo - LinkedIn
3D Printing Log
The “Why do I need all this USB & SD media?” Holder by ecarlisle
Overview File this under the “yet another” category, but yes, I wanted to model one too. I have a bunch of media and dongles and wanted a nice rectangular “plot” to arrange them on. Though this isn’t a remix, this was definitely inspired by Lalo_Solo’s USB SD and MicroSD holder for wide USB sticks. Prior to making this model I used two of his model, mirrored one, and glued the two together on the lengthier side. This will hold: 24 USB-A devices of fairly-wide variety (see photo) 16 SD cards 29 MicroSD cards Dimensions Length: 124mm Width:8 4mm Height: 18mm Estimated Resources (using Cura 5.2.1): Print Time: 17hrs, 5min (with 50mm/s print speed) Material Use: 124g, 41.46m (I generally print with 3-line walls. Decreasing the wall thickness will decrease the filament used) Related Content: Edit on TinkerCad View on my blog
3D Printing Log
Monthly Pill Organiser (Individual Sliders) by ndbroadbent
I modified this design so that it has individual lids for each space. If you print 4 lids, you can slide them up and down to open up the different spaces. You can start with all 4 lids at the top and with an empty row of spaces at the bottom, then slide one lid down each day to reveal the next space. I think that this design makes it more usable since the lids are self-contained and don’t stick out when you slide them up. The trade-off is that you only have 4 usable rows instead of 5, since you need an empty row to slide the lids into at the start. I personally printed this at 120% scale, but you can choose your own scale that fits your needs. ORIGINAL SUMMARY: With this pill organiser you’re able to store and organise up to 35 days of pills. The wells in this are designed to be larger to hold bigger and/or more medications. This is inspired by https://www.thingiverse.com/thing:758586 but built from the ground up myself. All credit for the idea goes to LoboCNC. I needed to make a new version of it for myself as the original one was hilariously small for the pills I take every day. Each compartment is 18mm wide, 18mm deep, and 24mm long. The whole thing overall is 145mm W x 160mm L x 21mm D You will need to print 2 each of the S lid and T lid, then one each of everything else. This has been designed with 0.35mm clearance. Print Settings Printer: Artillery/Evnovo Sidewinder X1 Rafts: No Supports: No Resolution: 0.2 Infill: honestly anything is fine
3D Printing Log
Wire Gauge by DIYhans
I searched for a wire gauge to print but nothing found so I made it myself. The model is exact according to the AWG standard (American Wire Gauge) Sizes are from AGW-0 to AWG-30 but it is the accuracy of your printer how accuracy the sizes are. The gauge number refers to the size of the diameter cut-out next to it. I printed it in PLA but the finest AWG 25-30 are pretty closed. Its also a good print for testing your printer and settings Use: With electric wire, remove the plastic insulation because you only measure the core The horizontal gap at the outermost point is the diameter which is referred to by the gauge number. This is where the wire is placed to determine its size. The circular section acts as a run through for wire that is capable of fitting through the gap. It allows the wire to be easily removed after passing through the gap. When googling “wire gauge” you can find other information and the sizes of the AWG standard. I appreciate if you upload your print
3D Printing Log
Fin Vases Square by DaveMakesStuff
The radial fins on this vase creates interesting affects when printed with multcolor filament. Be sure to print in “Vase” or “Spiralized” mode! See here for video: https://youtu.be/t0Jmu4c5U6Y This vase is part of a set of three. Download the full set here: https://than.gs/m/914327 See here other multicolor vase designs: Stinkhorm Vase https://than.gs/m/912791
3D Printing Log
Puzzle Cube (easy print no support) by WildRoseBuilds
FREE FILE HAS MOVED HERE: https://www.printables.com/model/338890-puzzle-cube-easy-print-no-support https://www.youtube.com/watch?v=F_T_tMMpWjQ This puzzle was heavily inspired by a gif of pacificpuzzleworks slideways puzzle cube. He has since made a thingiverse account and shared his files here: https://www.thingiverse.com/thing:3073646 3 identicle parts that slide together in a satisfying way to create a cube. Once assembled it needs to be held and moved in a specific direction to seperate. clearance between the parts is around .3mm allowing for smooth movement without binding. Since these parts have faces that slide on eachother printing in a higher resolution might be beneficial to the tactile feel. this design is intended to be printed without supports utilizing the bridge functions of your printer. i have left some extra tolerance at the bridge location to account for some sagging. Bridge length is 22mm. Cube size at default scale is 45mm. puzzle mechanics by: https://www.instagram.com/pacificpuzzleworks/
3D Printing Log
Lissajous Bookmark by skippa
150x20x.9 mm I completely reworked the code, made bookmark much thinner and of a better section. Let me know if you would like to see a different size / thickness / version. Fully customizable Scala source code: https://github.com/mikea/3d-bookmark
3D Printing Log
Air Spinner by walter
Update 2018-04-21: Added two additional versions I had no idea what this was for when I uploaded it. I didn’t think it would be useful for anything other than as a 3D print demo, I just made it to satisfy my curiosity. But if you check out comments below, guttyr discovered you can spin it up by blowing on it, and it can be used by speech therapists to help special needs kids get better at breath support and control. Different parts of the spinner will spin depending where you blow on it, I’m still figuring which locations and angles work best. Maybe it’ll help me too as I’m frequently out of breath when I’m at altitude or underwater. It can be printed with a 0.5mm extrusion width and 2 perimeters without infill. Printed in Atomic Filament Granite Grey PLA and Octave Precision Gold PLA* New versions printed in Atomic Filament Starry Night PLA and 3D Solutech Transparent Blue PETG* *affiliate links
3D Printing Log
Nautilus Gears by MishaT
Nautilus gears based on logarithmic spirals. Gear profiles generated based on research by Ágnes Dabi, Zsigmond Istvan Varju, Dr. Laczik Balint et. al. at the Budapesti Muszaki es Gazdasagtudomanyi Egyetem. Agnes, Dabi (2005). Változó áttételű fogaskerék tervezés (Doctoral dissertation). Budapesti Műszaki és Gazdaságtudományi Egyetem The gear profiles were generated using this Maple script for which full credit goes to the original authors:http://www.maplesoft.com/applications/view.aspx?SID=95483&view=html&L=G Rendered animation of the gears: http://www.youtube.com/watch?v=dtkEyZwuwH4 Don’t own a 3D printer? Now available for purchase at Shapeways (http://shpws.me/Kdit) I’m not going to upload the SolidWorks file because it is frankly a mess of different experimentation, but I uploaded the DXF which should be easy enough to modify with most CAD software. Update: No more breaking pins! I’ve replaced the pins with a simple press fit design. Print two of the Connector Bar v2 or the Curved Connector Bar v2 (same idea, just curved for aesthetics) and snap them together! On a well calibrated printer they should snap together easily and hold tightly with friction. If they aren’t sticking together just add a drop of glue! Warning, these bars are one time use, they will be very hard to pull apart without breaking the pin. I will keep the original bars on for reference.
3D Printing Log
Small Spade/Shovel for plants by Quackulla
a small spade for use with houseplants and such
3D Printing Log
Fridge Scissors Holder with Magnets by ndbroadbent
This is my first attempt at a scissors holder with magnets for our fridge. I’ve included the OpenSCAD file with the source code, so you can tweak the dimensions for your own scissors. I’m planning to design a bigger version with larger magnets since the small magnets aren’t quite strong enough to completely stop it from sliding around on the fridge, although it’s still usable as is.
3D Printing Log
Sunglasses Car Sun Visor Clip by trevorlong
I designed this clip to clip my sunglasses to my cars sun visor when not in use. It works very well for my sunglasses. Update: For places that get hotter PLA will likely melt a bit and cause the model to bend. Comments typically recommend Nylon or ABS (thank you, everybody). I also posted a new version not necessarily to replace this but its a different design that should be better at holding the sunglasses and not warping quite as much. Head to printables to grab the Fusion 360 file and presliced GCode:https://www.printables.com/model/220058-sunglasses-car-sun-visor-clip V2:https://www.thingiverse.com/thing:4299084
3D Printing Log
Simple Bookend by Chuanyee223
Simple book end design that is similar to existing sheet metal bent ones. Base Thickness of 2mm. I have no 3d printer yet thus im not sure how think can it print. Part of A Model A Week collection.Trying to get myself used to FreeCAD thus creating this collection. Hope to hear feedbacks from you guys!
3D Printing Log
Car Trash - Poubelle de voiture by wrcalm307
Cet objet utile a été créé à partir de la poubelle créé par Heliox. Les seules modifications concernent le diamètre du cul de la poubelle pour mieux s’encastrer dans les compartiments dans les voitures destinés aux canettes en aluminium. Les parties 2 et 3 sont identiques à la poubelle d’Heliox. La partie_1car_1 fonctionne pour la Peugeot 307 et le Citroën Berlingot ; La partie_1car_2 fonctionne pour la Peugeot 206 ; La partie_1car_3 fonctionne pour la Toyota Yaris. Cette liste sera mise à jour en fonction des informations que je recevrai. N’hésitez surtout pas à indiquer quel numéro de partie 1 vous imprimez et pour quel voiture. Cela pourrait beaucoup aidé les autres utilisateurs de Thingiverse. This useful object was created from the trash created by Heliox. The only modifications concern the diameter of the bottom of the bin to better fit into the compartments in cars for aluminum cans. Parts 2 and 3 are identical to the Heliox trash. Part_1car_1 works for the Peugeot 307 and the Citroën Berlingot ; Part_1car_2 works for the Peugeot 206 ; Part_1car_3 works for the Toyota Yaris. This list will be updated according to the information I will receive. Do not hesitate to indicate which part number 1 you are printing and for which car. This could have helped a lot of other Thingiverse users. This is a remix from https://www.thingiverse.com/thing:2755175 using the mount for https://www.thingiverse.com/thing:2477180 Is the only case I found for this aliexpress camera
3D Printing Log
Portable Cable Organizer / Winder by squinn
A portable cable organizer which is setup as an easy print-in-place and includes a knob on the side for conveniently winding up the cable when you’re ready to pack it away.This model is an easy print that requires no supports, and three different sizes are provided to accommodate cables of different lengths. If you’re not sure which to choose, I’d recommend starting with the “medium” size.&nbsp;After printing, you’ll want to place the cable within the groove at its halfway point, close the lid (which is intentionally designed to close tightly), wind up the cord clockwise using the handle, and then extend by simply grabbing the cable by both ends.&nbsp;Update 2023-09-13:&nbsp;Alternative smooth-sided versions of all three sizes have now been added, and also the handle design was slightly adjusted to add a small fillet and chamfer to decrease the bridge distance. Here’s a close-up picture of the updated handle on the knurled and smooth-sided versions:&nbsp;
3D Printing Log
Paper towel holder by Nazar78
A remix from @Maniac1st https://www.thingiverse.com/thing:4786948/files with the following changes: Enlarged to snuggly fit a 43mm diameter spool hub. Changed to stopper pinch type instead of the need to bend frames while fitting paper towels. Shortened the cutter as an optional detachable clip-on (screws no longer needed) to fit a 230mm length spool hub. Misc: Print both parts number 1 and 2 twice, then the optional cutter part number 3 once if required. The cutter can be printed on a 230mm bed else align the cutter 45 degrees to the bed also take note of its flat surface. The cutter has been modified to fit loosely in the holder slot and should not fall off or removed easily. But if the printing is not perfect that you have difficulties gliding the sheets between the openings, just force the cutter holes into the holder circle tabs. To install, face the cutter’s flat side to the front with its saw like edges downwards, rotate the cutter 90 degrees side-by-side “parallel” to the holder, slide the thinner edge into the holder slot then rotate it back into “perpendicular” position. Do the same for the other side.
3D Printing Log
Novation Launchpad Pro 45 degree stand by tdeagan
This is a 45 degree stand for the Novation Launchpad Pro.
3D Printing Log
Airplane Phone Holder by Faretra17
**17 Aug 2023 Update*** Resized the slide join to make the 2-part option fit better. 29 Jul 2023 Update So, I have used this phone holder a lot (in 2023 I have flown 32 legs and 42,236 miles) and I really like it--save one thing, the shape takes up space in my backpack. So I embarked on making it a two piece holder so that it would lay a little more flat in my bag. This is my second attempt at making a connection and it works! I have some fine tuning to do, but overall I am happy. I am uploading the parts separately so you can print them or resize them as you want. The print quality on this one is a B- because I printed it quickly. Here are the settings I used for the two-piece: Ender 5+ Esun PLA+ .6 nozzle Both pieces printed on their sides with a 250mm brim (I have the orientated how I like to print them) CHEP Extra Fast Cura profile (speed 80) Temp - 195 bed 70 It’s a work in progress! In the photos, the green is a one piece and the silver is the two piece. Original Post Notes This is a remix of https://www.thingiverse.com/thing:5225016 I wanted a seatback holder for flying and I found this model. I made two small modifications in Tinkercad: I widened the area between the front and back support to hold a wider cased phone. I raised the front support slightly to provide a higher front edge to hold the phone. Photos are on an Airbus 320 of an iPhone 11 (the one with “Star Wars”) with a case that holds credit cards and an iPhone 13 with a standard case. Side Notes: I left the original designer logo on the bottom; it is their design, so they deserve the credit. It held my Kindle Fire as well. It doubles as a desk holder very nicely!
3D Printing Log
]]>
<![CDATA[Migrating from Hugo to Ghost]]>I haven't been able to write any blog posts since I got an M2 MacBook. I was using an old version of Hugo and got it running in a Docker container, but the Docker container only ran on my old Intel Mac. It was too painful to update

]]>
https://madebynathan.com/2024/04/19/new-blog-who-dis/6621f954cab1a83ac77b039fFri, 19 Apr 2024 05:45:22 GMT

I haven't been able to write any blog posts since I got an M2 MacBook. I was using an old version of Hugo and got it running in a Docker container, but the Docker container only ran on my old Intel Mac. It was too painful to update my hugo theme to support the latest version, and I couldn't figure out how to get it to run on my new Mac. So I didn't write any blog posts for a while.

I was using Ghost for my company blog and I really loved the editor. It's so much nicer than editing Markdown files in VS Code, especially when it comes to embedding screenshot images and videos. I loved being able to take a screenshot and just drag it into my blog post, instead of messing around with image resizing, file paths, Markdown image syntax, etc. So I decided to set up a Ghost instance on my home Proxmox server.

Migrating from Hugo to Ghost
Proxmox Admin

I found this really helpful post on the Ghost Forum that helped me build an archive of all my old posts and import them into the Ghost database:

Migration from Hugo to Ghost
Well, I don’t know how to write all what I did to this work, but I finally made this. I modified this script - https://github.com/saltfactory/node-jekyll-to-ghost to help. Because the script is very old, I needed to solve many small problems of patters and sanitization to get the correct final json. Every time I tried to import the json to ghost, I discovery some errors pattern. I solved that one by one. This post (Ghost and Markdown: Getting everything consistent on the backend) describe in…
Migrating from Hugo to Ghost

See my reply for the JS script that ended up (mostly) working for me. I still had to spend a few hours fixing minor issues, getting syntax highlighting to work, and converting some image slideshows to Ghost galleries.

You can run Ghost in production and use it to serve a blog dynamically, but I didn't want to open up my home server to the public internet. I also didn't want to give up all the benefits of a static site:

  • Extremely fast and 100% cached
  • No need to worry about traffic spikes or DDoS attacks
  • No need to worry about security updates

Some downsides:

  • You can't use Ghost's subscription and commenting features
  • It takes a little bit more time and effort to publish a new blog post

I've turned off Ghost's subscription features and I'm using Disqus for comments.

I found a tool that can generate a static site from a Ghost blog:

GitHub - SimonM0/ghost-static-site-generator: Generate a static site from ghost and deploy using a CI
Generate a static site from ghost and deploy using a CI - SimonM0/ghost-static-site-generator
Migrating from Hugo to Ghost

I wrote a little script that will fetch all the HTML and assets, make a few changes and add a few things, commit the changes, and push to my GitHub pages repo.

#!/bin/bash
set -e

if ! [ -d "static" ]; then
  git clone [email protected]:ndbroadbent/ndbroadbent.github.io.git static
  git checkout gh-pages
fi
rm -rf static/*
node src/index.js --domain https://ghost.ndbroadbent.com --productionDomain https://madebynathan.com

# Replace all remaining instances of https://ghost.ndbroadbent.com with https://madebynathan.com in static files
grep -rl "https://ghost.ndbroadbent.com" static | xargs sed -i '' 's/https:\/\/ghost.ndbroadbent.com/https:\/\/madebynathan.com/g'

echo madebynathan.com > static/CNAME
cp pubkey_38E63C0A.txt static/
cp -R sudoblock static/

cd static || exit
git add .
git commit -m "Update static files"
git push origin gh-pages

I always like to use Cloudflare, even though GitHub pages already has a CDN:

Migrating from Hugo to Ghost
Cloudflare Dashboard

Cloudflare provides a little more flexibility, so I can set up custom redirect rules, force SSL, etc. They also have a nice analytics dashboard.

I stopped using Google Analytics a while ago. Now I use Plausible.io for analytics on all of my websites. I use their hosted cloud platform for my blogs and personal sites, and I self-host my company instance on Render.

Migrating from Hugo to Ghost
Plausible Analytics Dashboard

This blog post is my first real test run on my self-hosted Ghost instance, and I've really enjoyed it! It's such a game changer to have a WYSIWYG editor where I can drag-and-drop images. I love using Ghost as a headless CMS and generating a static site on GitHub pages + Cloudflare. I think it's the best of both worlds.

I'm excited to write some more blog posts about 3D printing, home automation, and all the other stuff I've been up to lately.

]]>
<![CDATA[Organizing 1,700 Resistors in a Ring Binder]]>I used a ring binder and card sleeves to organize 1,700 through-hole resistors.

You can use this PDF to make your own ring binder:


The template code and generated PDF document are released

]]>
https://madebynathan.com/posts/2022-10-30-e24-resistor-pack-ring-binder/6621e803cab1a83ac77b00a5Sun, 30 Oct 2022 04:07:28 GMT

I used a ring binder and card sleeves to organize 1,700 through-hole resistors.

You can use this PDF to make your own ring binder:


The template code and generated PDF document are released under the MIT license. You can find a copy of the MIT license at the bottom of this page.


What Are Resistors?

Resistors are a fundamental component in electronics. They are used to limit the current flowing through a circuit. Resistors have colored bands that represent their value. The first two bands represent the first two digits of the resistance, and the third band represents the "multiplier" value, or power of 10. For example, a 10KΩ resistor has a brown band, a black band, and an orange band. The first two bands are brown (1) and black (0), which is 10. The third band is orange (1,000Ω), so the resistance is 10 x 1,000 = 10,000Ω.

Organizing 1,700 Resistors in a Ring Binder

The "tolerance" value is the fourth band. This is the maximum deviation from the nominal resistance. For example, a 10KΩ resistor with a 5% tolerance can have a resistance between 9,500Ω and 10,500Ω.


Organizing 1,700 Resistors in a Ring Binder

The E24 Series

The E24 series is a logarithmic series of 24 values for each power of 10: 1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1.

You can multiply each value in the series by the multiplier (power of 10) to get the 24 resistance values for each order of magnitude. For example, these are the first ten resistor values with a brown multiplier band (10Ω): 100Ω, 110Ω, 120Ω, 130Ω, 150Ω, 160Ω, 180Ω, 200Ω, 220Ω, 240Ω.


How I Organized 1,700 Resistors

I bought a resistor pack that included 1,700 resistors in the E24 series, in sets of 10 (170 different values.) I bought 1/4 W carbon film resistors with a 5% tolerance.

Organizing 1,700 Resistors in a Ring Binder

It's very useful to have a wide range of resistors for breadboard circuits and prototype PCBs. It's not so useful when they're all mixed together in a single bag. The resistors I bought didn't have any labels or markings on the paper strips, so I had to read the colored bands or use a multimeter to find the resistance.

For my first attempt at organizing them, I sorted them by the multiplier band (0.1Ω, 1Ω, 10Ω, etc.), and put them in labeled drawers:

Organizing 1,700 Resistors in a Ring Binder

This didn't really help at all. I still needed to sort through 24 different values to find the one I was looking for. It got even worse once I started pulling out individual resistors to use in breadboard circuits. Instead of 24 sets of 10, I could have up to 240 individual resistors to sort through.

Ring Binder Design

I had some spare card sleeves, and I realized that I could use these to create a 3x3 grid of pockets on an A4 ring binder sheet.

I used DocSpring to create the layout for all the pages. DocSpring is an API for filling out and generating PDFs. You can upload an existing PDF form, or create your own PDF templates using HTML and CSS. DocSpring's HTML/CSS templates support the Liquid template language, so I wrote some Liquid code to calculate the resistor values and generate all the pages for the E24 series.

(Disclaimer: I'm the founder of DocSpring.)

Organizing 1,700 Resistors in a Ring Binder Organizing 1,700 Resistors in a Ring Binder

This template didn't need any fields, so I didn't need to use the DocSpring API. I just downloaded the generated PDF from the Preview tab.

I included a resistor graphic that shows the colored bands for each value. This was invaluable when I was sorting resistors into sleeves.

Organizing 1,700 Resistors in a Ring Binder

I used Sleeve Kings 63.5mm X 88mm Card Sleeves for the 3x3 grid of pockets.

Organizing 1,700 Resistors in a Ring Binder

I cut them to make them a little shorter, and stuck them onto ring binder sheets using a glue stick. Then I sorted all the resistors into sleeves, which felt like doing a jigsaw puzzle. It was a fun activity for a rainy Sunday afternoon.

I'm pretty happy with how this turned out, and I think my version is even better than the expensive ring binders I found for sale. The PDF and code are MIT licensed, so anyone is more than welcome to use this for personal or commercial purposes.

This ring binder system makes it much easier to see when I need to order more resistors. (I've got some more 330, 360, 1K, and 1.1K ohm resistors on the way!)



How To Organize Your Own Resistors

Option 1: Buy Card Binder Sheets

After publishing this blog post, I found out that you can buy card binder sheets that already come with 9 pockets.
You can purchase these on Amazon.

Organizing 1,700 Resistors in a Ring Binder


I found another option that has some flaps at the top of each pocket.
This would prevent the resistors from falling out if you drop the binder or tip it upside down. I'll probably use this option next time I need to organize electronic components. It would also be very handy for SD cards and USB sticks.

Organizing 1,700 Resistors in a Ring Binder

Supplies

Instructions

  1. Print the PDF
  2. Cut out the cards on each page
  3. Insert the cards into the pockets
  4. Insert resistors in front of the cards in each pocket

Option 2: Make DIY Card Binder Sheets

Supplies

Instructions

  1. Print the PDF
  2. Insert pages into ring binder sheets
  3. Use glue stick to glue the card sleeves to the outside of the ring binder sheets
  4. Insert resistors into card sleeves

Option 3: Raaco storage drawers

@impulse7 posted a comment on Hacker News where they shared their own solution to this problem. They created PDF labels to organize resistors in Raaco storage drawers. They have shared their PDF generation code on GitHub. This is a great option if you have plenty of space in your workshop.

Organizing 1,700 Resistors in a Ring Binder

Option 4: Buy A Finished Ring Binder With Sorted Resistors

If you want to skip all the work and just buy a pre-made ring binder, you can buy one from an electronics supplier such as RS Components. This will save a lot of time, but they can be quite expensive.

Organizing 1,700 Resistors in a Ring Binder

$504.52 New Zealand dollars = $323.72 USD

I found a few cheaper options but they were still hundreds of dollars. So I thought it would be fun to make my own ring binder.



P.S. Digi-Key's Resistor Color Code Calculator was very useful. It's a great tool for quickly looking up resistor values.

Organizing 1,700 Resistors in a Ring Binder

]]>
<![CDATA[Delete Plex TV Shows and Movies After Watching]]>Plex-Cleaner is a Python script that can clean up your Plex directory by deleting movies and TV shows after you've watched them. This will stop your disk from filling up with lots of old media files over time. You can run this script on your server (or Raspberry

]]>
https://madebynathan.com/posts/2022-10-10-delete-plex-tv-shows-and-movies-after-watching/6621e803cab1a83ac77b00a4Mon, 10 Oct 2022 00:36:15 GMT

Plex-Cleaner is a Python script that can clean up your Plex directory by deleting movies and TV shows after you've watched them. This will stop your disk from filling up with lots of old media files over time. You can run this script on your server (or Raspberry Pi, or wherever you run Plex Media Server.)

I like to put things in the /opt directory on my servers.

  • Run git clone https://github.com/ndbroadbent/Plex-Cleaner.git /opt

  • Run python3 PlexCleaner.py --dump Cleaner.conf to create a new configuration file

  • Configure an authentication token in Cleaner.conf, under the "Token" key.

  • Call python3 PlexCleaner.py to test it out.

The script will run in test mode and won't delete anything if your Cleaner.conf contains "test": true, or if you call python3 PlexCleaner.py --test.

  • After everything looks good in the logs, set "test": false in Cleaner.conf.

You'll probably want to run this script regularly as a cron job. Run crontab -e to edit your crontab, then add the following line to run the script every day at 4am:

0 4 * * * /usr/bin/python3 /opt/Plex-Cleaner/PlexCleaner.py


I always like to set up monitoring for any scheduled scripts so that I get a notification if when they stop working. healthchecks.io is my favorite monitoring tool and they have a generous free tier. (No affiliation, they're just an awesome service.)

To set up monitoring with healthchecks.io, you can call the run_plex_cleaner.sh script from my fork. This script will ping healthchecks.io on success or failure. healthchecks.io will also send you a notification if it doesn't receive any ping at the expected time (e.g. if your server has been turned off.)

  • Sign up for a free healthchecks.io account.
  • Create a new check. Choose the "Cron" schedule and enter your cron expression, e.g. 0 4 * * *.
  • Make sure you also set the correct Time Zone in the options.
  • Save the healthchecks.io check ID to a healthchecksio_id file in the Plex-Cleaner directory
  • Set the log file option in Cleaner.conf so that it writes logs to a file:
"LogFile": "/opt/Plex-Cleaner/plexcleaner.log",
  • Set up this cron job entry (instead of the one above):
0 4 * * * /opt/Plex-Cleaner/run_plex_cleaner.sh

Now you'll get an email alert whenever something goes wrong:

  • The script exits with an error
  • The plexcleaner.log log file contains any ERROR entries
  • The script doesn't run at all
]]>
<![CDATA[Can you plug a SATA drive into a SAS controller?]]>Yes.

SATA and SAS use very similar connectors, but a SATA connector has a gap in the middle. This means that you can physically plug a SATA drive into a SAS connector, but you can't plug a SAS drive into a SATA controller (because it won't

]]>
https://madebynathan.com/posts/2022-10-07-can-you-plug-a-sata-drive-into-a-sas-controller/6621e803cab1a83ac77b00a3Fri, 07 Oct 2022 07:29:33 GMTYes. Can you plug a SATA drive into a SAS controller?

SATA and SAS use very similar connectors, but a SATA connector has a gap in the middle. This means that you can physically plug a SATA drive into a SAS connector, but you can't plug a SAS drive into a SATA controller (because it won't fit.) SAS controller software can support SATA drives, but SATA controllers don't support SAS drives (even if you have an adapter.)

Why do I have a SAS controller?

I was running Home Assistant and Plex Media Server on a Raspberry Pi 4 Model B. I kept adding more and more Home Assistant add-ons (which run in Docker containers), so it started to get a bit slow. It took a long time to restart Home Assistant, and we started to notice some speed and reliability issues.

I already had a server rack in my closet, so I wanted to get a proper server to put in it. I didn't need anything too fancy. It just needed to be a little bit faster than a Raspberry Pi, so I found a 10 year old IBM server for $249 NZD ($160 USD.) I found it on TradeMe, which is similar to eBay in New Zealand.

  • Model: IBM System X3250 M4 E3-1270v2
  • CPU: Intel Xeon E3-1270v2 4-core, 8-thread Processor
  • Memory: 8GB DDR3 Ram
  • Storage: 4x 2.5" SAS / SATA drive bays, 1x 240GB SAS hard drive
  • Controller: LSI SAS2004 IR SAS / SATA HBA
  • Power: 2x 460w power supplies

The new server has been working great, and Home Assistant is noticeably faster. The 10-year-old Intel Xeon E3-1270v2 CPU has a CPU Mark benchmark score of 6429, which is 8x better than the Broadcom BCM2711 processor in a Raspberry Pi 4B (834.)

Can you plug a SATA drive into a SAS controller?

The only problem is that the server came with a 320GB SAS hard-drive. It was a bit too small, and it made a lot of clicking noises. I wanted to replace it with a 1TB SATA SSD, which would be faster and silent. I just wasn't sure if my old server would be compatible with a modern SATA SSD.

I did a bit of research, and it seemed like it would work, so I bought a new Samsung 870 EVO 1TB SSD. It was the same size and had the same screw holes as the old 2.5" SAS drive, so I was able to swap the drives and use the same drive bracket. I put in the new drive and installed Debian 11 (with LVM), and everything worked great!

Conclusion: The latest Samsung SATA SSDs are still compatible with SAS controllers in servers that were made in 2012.

]]>
<![CDATA[Creating a new favicon with text-to-image AI]]>It's been a while since I wrote a blog post about creating a favicon.ico file for your website or blog. Things have changed a bit since I wrote that blog post in May 2010.

I've been updating the CSS for my blog recently, and I

]]>
https://madebynathan.com/2022/10/01/how-to-create-a-favicon-with-stable-diffusion-and-dalle-2/6621e803cab1a83ac77b00a2Sat, 01 Oct 2022 18:41:13 GMT

It's been a while since I wrote a blog post about creating a favicon.ico file for your website or blog. Things have changed a bit since I wrote that blog post in May 2010.

I've been updating the CSS for my blog recently, and I wanted to update the favicon. Here's the old green square icon that I was using before:

Creating a new favicon with text-to-image AI

I wanted something a bit more interesting, so I tried using some of the new text-to-image AI tools that have been getting a lot of attention lately. I used Midjourney and DALL·E 2. (Midjourney uses Stable Diffusion.)


I played around with some different prompts in Midjourney and DALL·E 2, and I iterated on a few different ideas. I enjoy spending time in Midjourney's shared Discord channels (e.g. #general-*), where you can see what other people are doing and get some inspiration for prompts.

Creating a new favicon with text-to-image AI

Here's a few examples of the prompts that I was trying:


website favicon logo, circuit board PCB design, vector, SVG, blue purple gradient, hexagon, bolt and tools icon


small favicon logo for a blog website, circuit board pattern, electronics, vector, epic ultra wide aerial shot from atmosphere, cool gradients, ultra high contrast, blue background, psychedelic color, vortex, hyperrealism, intricate details, cinematic lighting

Here's some of the images that I generated using DALL·E 2:

Creating a new favicon with text-to-image AI

And here's some from Midjourney:

Creating a new favicon with text-to-image AI

I eventually found some shapes and colors that looked pretty cool, so I generated some variations using the Midjourney Discord Bot.

Creating a new favicon with text-to-image AI

Eventually I settled on this one. It kind of looks like an abstract "N". I tweaked the colors and contrast a little bit in GIMP.

Creating a new favicon with text-to-image AI

I used realfavicongenerator.net to generate a favicon package with lots of different sizes and (mostly unnecessary) features.

Creating a new favicon with text-to-image AI

They provide this HTML to include in my <head> tag:

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="msapplication-TileColor" content="#603cba" />
<meta name="theme-color" content="#ffffff" />

So here's the new favicon:

Creating a new favicon with text-to-image AI

P.S. Here's one I didn't end up using, in case you want it:

Creating a new favicon with text-to-image AI

Wet Bectolon. Crdoruf Ptaogoatuy

(wetbectolon.com is available!)

]]>
<![CDATA[Automating my Kitchen Rangehood Fan and Light]]>

I originally posted this write-up on the Home Assistant Community Forums. I thought I would post it here as well, since I haven't written anything on this blog for a while. I've been getting more serious about Home Automation lately, so I might start writing some

]]>
https://madebynathan.com/posts/2022-09-30-automating-my-kitchen-rangehood/6621e803cab1a83ac77b00a1Fri, 30 Sep 2022 10:21:05 GMT Automating my Kitchen Rangehood Fan and Light

I originally posted this write-up on the Home Assistant Community Forums. I thought I would post it here as well, since I haven't written anything on this blog for a while. I've been getting more serious about Home Automation lately, so I might start writing some more blog posts and making a few videos.

I figured out how to control the light and fan in the rangehood above my stove. I learned a lot from this project, and I wanted to share some of my experiences.

  • I figured out how to read the state of 4 buttons and light up 4 LEDs with only 5 wires
  • I discovered some powerful circuit simulation software
  • I used optocouplers for the first time (instead of relays)
  • I wrote some C++ code for a custom ESPHome component
  • I bought an oscilloscope

Introduction

I wanted to be able to control the light and extractor fan above my stovetop, so I decided to automate it using an ESP32. This would be a similar concept to the Raspberry Pi Microwave project that I built many years ago: I would put a "proxy" circuit between the buttons and the main board that controls the light and fan. The circuit would simulate button presses to control the main board, and it would read the state of the original buttons so that they would still work normally. The circuit would add WiFi connectivity so that the buttons could be controlled remotely and via automations in Home Assistant.

I still use Raspberry Pis, but now I prefer using ESP32 and ESP8266 chips. ESPHome makes it so much easier to build little devices like this, and the OTA (over-the-air) updates are really convenient. I love all the built-in components that you can easily add to your YAML configuration files.

Here's a photo of the rangehood, with some of my tools. You can see the main controller board and the button board hanging out.

Automating my Kitchen Rangehood Fan and Light

This is the button board, which has 4 buttons, and an LED for each button:

Automating my Kitchen Rangehood Fan and Light

How to read 4 buttons and light 4 LEDs with only 5 wires

I wanted to preserve the original functionality of the rangehood buttons, so that you wouldn't even know there's an ESP32 chip inside. This button board was the first obstacle. If there were only 4 buttons, then that would be quite easy. You can just attach them directly to GPIO pins with an internal pull-up resistor. The LEDs were a bit confusing at first, but it was a fun puzzle to solve.

I took a photo of the PCB and traced it using different colors, so I could where each of the wires was going:

Automating my Kitchen Rangehood Fan and Light

I found that button has a 1K ohm resistor, and each LED has a 148 ohm resistor.

Circuit simulation software

I'm a software developer, so I really like having fast feedback loops and the ability to try lots of ideas quickly to see if something works. I started wondering if it might be possible to do this with circuits. I wanted to see if I could figure this out with trial and error and use some kind of circuit simulation software.

I found TinkerCad, and my mind was blown! Now I had a virtual Arduino wired up to a virtual breadboard. I recreated this button/LED board inside TinkerCad. I could set up virtual multi-meters to see how much current was flowing through LEDs, and easily figure out values for resistors.

Automating my Kitchen Rangehood Fan and Light

This is so awesome! It even tells you when too much current is going through an LED:

Automating my Kitchen Rangehood Fan and Light

Here's a link to my TinkerCad project where you can run the circuit simulation.

I started playing around with some code in an Arduino sketch. I figured out how to light up the LEDs. I figured out how to read the buttons. But I couldn't figure out how to do them both at the same time. If I wanted to light up the LEDs, then I'd need to be using 3.3V on the shared wire. But if I wanted to read the buttons, then the shared wire needed to be connected to GND.

Then I finally had a breakthrough. Whenever I had worked with GPIO pins in the past, I had just assumed that "high" and "low" meant "on" and "off". But I realized that "high" literally just means 5V (or 3.3V), and "low" literally just means GND. So you can just change the direction of a circuit if you set your output pins to normally "high", and you swap the GND pin with a 3.3V pin.

So instead of needing to choose between the 3.3V pin and the GND pin, I could use a GPIO pin on the shared wire and toggle it between "high" and "low". I set it to "low" whenever I needed to read the buttons, and set it to "high" whenever I needed to light up the LEDs.

I got something working in my virtual Arduino. The other side of the circuit was quite easy (to simulate the button presses.) I used some optocouplers as relays, where you send current through an IR LED and it turns on a transistor on the other side, but it keeps both of the circuits separated. Later on I realized that I should have been looking at "solid state relays", which are optocouplers that are specifically designed for this purpose and can switch much higher voltages and currents.

I tried it out with a real Arduino, and it worked!

Automating my Kitchen Rangehood Fan and Light

It was a pretty cool experience to simulate a whole Arduino circuit inside my browser, and then see it work in real life.

https://everycircuit.com is also a really cool option for circuit simulation:

Automating my Kitchen Rangehood Fan and Light

It can handle some things that TinkerCad can't do, such as astable multivibrator circuits where you need to inject a little noise to get it started. (TinkerCad just crashes with an "infinite loop" error.)

Custom C++ ESPHome Component

Alright, on to the next step. I've got something working with an Arduino, but how do I port this to ESPHome and get it working over WiFI?

I needed to set an GPIO pin to output mode for a while, briefly switch it to input mode, read the state of a button, and then set it back to output mode again. I couldn't figure out how to do this in a YAML configuration file for ESPHome, so I decided to write a custom component using C++.

The ESPHome documentation is pretty good, and I was able to get something working. Here's my YAML configuration and my custom C++ module: https://gist.github.com/ndbroadbent/63aa5f105e21631bee4ff9a62c9b1608

The most important difference between Arduino and ESPHome is that a component's loop() function is only called once every 16 milliseconds. (Arduino restarts the loop instantly.) This was actually perfect for me, since it meant that I could read the buttons once every 16ms, and leave the LEDs on before I exit the loop.

I ran out of pins on my ESP8266 (Wemos D1 Mini)

I should have made sure that everything worked on a breadboard. Instead, I started to get a bit impatient, and I jumped straight to soldering a prototype PCB. I soldering some pin headers for my ESP8266 development board, and then started with one input, and one optocoupler for the output. I tested it and it was all working, so I kept going.

Then I checked the ESP8266 pinout and realized that I had run out of GPIO pins.

Automating my Kitchen Rangehood Fan and Light

I tried to get away with using some of the yellow "OK" ones, but the boot started failing (I guess I was pulling some of the pins high or low.) I needed 4 pins to control the optocoupler outputs, and 5 for the button/LED board. That's 9 GPIO pins, and the ESP8266 only had 7. I thought it had more!

This can be solved with shift registers. You only need 3 GPIO pins to control a 74HC595 8-bit shift register and get 8 digital outputs. You only need one additional GPIO pin if you want to add a CD4021BE shift register (parallel-in, serial-out) and get 8 digital inputs. This is because the input and output registers can share the same clock and latch pins. You can then daisy-chain both of these to get as many inputs and outputs as you need (or use bigger shift registers with more pins), and use only 4 GPIO pins.

Anyway, I switched to using an ESP32 development board which has 18 usable GPIO pins, and a few more with caveats. I used breadboard jumper wires to wire it up.

My resistors were too big

I had put 1k resistors on the optocoupler outputs, to mimic the original button/LED board. What I didn't realize is that the optocoupler itself seemed to add about 500 ohms of resistance, so the resistance was slightly too high, and the rangehood controller board couldn't reliably read the simulated button presses.

So I unsoldered them and switched to 560 ohm resistors. Should have tested on a breadboard.

I bought a USB oscilloscope

After doing a bunch of unsoldering and resoldering, putting random hookup wires all over the place, and swapping out ESP dev boards, I ended up with the ugliest prototype PCB you've ever seen. Of couse, stuff started breaking and one of my outputs wasn't working properly or reliably. It seemed like there was a problem with one of my optocouplers, and it was a real pain to figure out what was broken since I had only had a multimeter.

I realized that a oscilloscope would be really useful, and I should have bought one a long time ago. I bought a USB BitScope 10. It's pretty cool!

Automating my Kitchen Rangehood Fan and Light Automating my Kitchen Rangehood Fan and Light

This helped me figure out where some things needed to be resoldered. One of the optocouplers was only working when I pushed on it with my finger. I originally thought it might have been a broken chip or something to do with capacitance, but it was just a broken PCB trace and some dodgy soldering.

I'm still learning how to use the BitScope software and have barely scratched the surface of what it can do. This is going to be extremely useful for future projects, especially for reverse engineering how stuff works. (P.S. You'll need their pre-release version for the latest version of Mac OS.)

WiFi was very weak on my "Duinotech Wearable ESP32 Development Board"

I initially switched to a Duinotech Wearable ESP32 Development Board that I had bought a while ago. I got everything working, but then it really struggled to connect to WiFi and would cut out regularly, and my entities would become unavailable. Even though I had a Ubiquity access point only 10 meters away in the same room.

I found a few other people who seemed to have problems with WiFi as well, but they might be for different reasons:

Then I found the "WiFi Power Save Mode" section in the ESPHome documentation:

  • NONE (least power saving, Default for ESP8266)
  • LIGHT (Default for ESP32)

So I tried:

wifi:
  power_save_mode: none
  output_power: 20

I think this seemed to help a little bit, but it still wasn't very reliable. I had ordered some more electronics stuff and threw in another ESP32 Development Board. I tried this out once it arrived and it was an instant improvement. I just threw away the board with poor WiFi. I also ordered a bunch of shift registers so I can get back to using ESP8266 boards (adafruit huzzuh feathers), and they seem to have much better WiFi as well.

I also ordered a few extra Wemos D1 Mini Pros that support external antennas. They haven't arrived yet, but I might try these out for car presence detection. I've been struggling with WiFi range for this as well.

Putting it all together

I put everything into a little black box. Connected all the wires up and stuck it inside the rangehood. I chopped the power cable for the rangehood and added a screw terminal, and wired up a USB charger to power the ESP32 board.

So now I've got the fan and light in Home Assistant. (And the physical buttons still work as well.)

Automating my Kitchen Rangehood Fan and Light

I've set up an entity controller to turn on the light.

Next steps

The rangehood controller board has a piezo buzzer that beeps every time a button is pressed. That's pretty annoying. I might try to desolder or destroy the buzzer.

I want to put an air quality sensor in the kitchen and automatically turn on the extractor fan based on AQI. I've ordered some ZigBee air quality meters on AliExpress, and they should arrive in a few weeks.

Update from Sep 30, 2022: I've put the air quality sensor in the kitchen, and have set it up to turn on the rangehood fan when the PM 2.5 level is above 12 µg/m³. (It usually hovers around 6 µg/m³.) It's been working really well!

Automating my Kitchen Rangehood Fan and Light

I also bought a current clamp sensor that can measure AC current. I want to set this up for the stovetop so I can detect when it's on and automatically turn on the fan (in advance, instead of waiting for the AQI to get bad.) It would be easier if I could use an energy monitoring wall plug, but it looks like the stovetop is wired directly into the circuit breaker, and it uses a lot of power so I don't want to mess around with those wires. I'll just separate them and put a clamp around one of them. I'll follow this guide to set it all up and get it working on an ESP32.

Automating my Kitchen Rangehood Fan and Light

I have this power meter that I'll use to calibrate it.

I also want to learn how to make a proper PCB design in KiCad and order a cool purple PCB from OSH park.

I'm really enjoying this self-directed crash course in electronics. It's really fun to learn so much while working on practical projects that we can use every day in our house.

Thanks for reading, it was fun to write up everything I learned. If you have any questions, please feel free to ask in the comments!

]]>
<![CDATA[Docker Saved My Hugo Blog]]>2024 UPDATE: I've migrated from Hugo to Ghost.
The following Docker solution broke when I started using a M2 MacBook. I wasn't able to run the older version of Hugo in a Docker container (even with Rosetta.)

I haven't written any blog posts for

]]>
https://madebynathan.com/posts/2021-12-05-how-docker-saved-my-blog/6621e803cab1a83ac77b00a0Sun, 05 Dec 2021 02:15:59 GMT2024 UPDATE: I've migrated from Hugo to Ghost.
The following Docker solution broke when I started using a M2 MacBook. I wasn't able to run the older version of Hugo in a Docker container (even with Rosetta.)

Docker Saved My Hugo Blog

I haven't written any blog posts for a while. One reason is that I've been hard at work on DocSpring for the last few years, and I haven't had a lot of time to work on personal projects. But the main reason is that my blog uses an older version of Hugo, which is a "static site generator" [1].

I switched from Jekyll to Hugo in 2017, and the current version of Hugo at the time was 0.21. I found a cool theme called hugo-sustain. Everything was great for a few years.

Time passed. One day, I tried to update a post or write a new post (I can't remember which.) I realized that my build and develop scripts were broken. I was a new computer at that point, and I had updated my macOS version. I installed the latest version of hugo and saw a bunch of interesting and confusing error messages when it tried to compile my old themes and layouts. I tried to downgrade hugo to version 0.21, and it crashed with a segfault (it was built for an older version of macOS.) I cloned the hugo repository and tried to compile it from source, but my Go version was too new, so it failed to compile. Finally, I downgraded my Go version to an older version that was released around the same time in 2017. I held my breath as I tried to compile hugo one last time. Go tried to fetch all of the required dependencies, and crashed with a bunch of 404 errors. Apparently some of the packages had been renamed and moved around, and the older versions had been removed from the Go package index.

So I gave up for a while. Instead of generating my blog from the source, I switched to editing the static files directly. Sometimes I would need to correct a typo or adjust some styles, so I'd go into the generated ./public directory and manually modify the raw HTML and CSS.

Time passed. One day, I started to notice some activity on a blog post that I had written 11 years ago. This post is about a GIMP plugin called deskew that makes it easy to scan old photos in batches on a scanner and automatically rotate them. I had dropped this plugin file in my Google Drive and had pasted a link to the file. The link worked great for 10 years, and people were able to download the file without any issues. But eventually Google changed something and the link was no longer working. I started to receive emails from people who were requesting access to this file.

Docker Saved My Hugo Blog

I manually shared the file a few times. Then I decided to download the file and check it in to the blog repo. I started going into the ./public directly to update the HTML, but I decided it was time to have another crack at this Hugo problem and fix my blog.

Should I switch to Ghost? I've loved using Ghost for the DocSpring blog. It's a really nice blogging platform that I self-host on Digital Ocean for $5/mo, and I enjoy the WYSIWYG writing experience a little more than editing plain Markdown files. (Images are a bit annoying.) But I didn't want to migrate all my posts over to ghost.org and get locked in, or spend $5/mo for the rest of my life. I just want some static HTML/CSS that I can put on GitHub Pages forever.

Should I upgrade to the latest version of Hugo and spend hours fixing up the themes and tweaking all my posts until everything is working again? No thanks. Hugo runs on my local machine and produces static HTML and CSS content. It's a pure function. There are no security vulnerabilities to watch out for. As far as I'm concerned, Hugo version 0.21 is "finished software." It generates my blog, and I'm happy with my blog. I will continue to be happy with my blog for many years to come. I don't need the latest and greatest features. I just want something stable that I can use over the next few decades without the constant grind of updating packages, breaking things, and debugging random issues. Give me Hugo 0.21 from May 2017!

I was even tempted to throw everything away and start from scratch with something old and stable. Preferably written in Bash, C, or Perl. There's a lot of cool new languages out there but they often "move fast and break things." The POSIX standard was created 33 years ago in 1988, so I could still run some shell scripts that are over 30 years old. (I asked Hacker News for some examples: Ask HN: What is the oldest Posix script that I can still run in a modern shell?.)

I had a sudden burst of inspiration:

Docker!

I could run Hugo in a Docker image! If I can get Hugo 0.21 running in a Docker image, then I can save that Docker image into a *.tar.gz file and store it right in my git repo. Then I have a static hugo binary that comes packaged with everything it needs to run in a consistent environment, and I can run it anywhere (Linux, Mac OS, Windows.)

I found a Dockerfile in this docker-alpine-hugo repo, and I just needed to change 0.55.3 to 0.21. Everything worked on the first try! [2]

How I use Docker

Instead of running hugo, I run a ./hugo wrapper script that runs hugo inside a Docker container:

#!/bin/bash
docker run --rm -v "${PWD}:/src" hugo-alpine hugo "$@"

I have a build_docker script [3] that builds the Docker image and saves it to hugo-alpine.tar.gz:

#!/bin/bash
set -euo pipefail

echo "Building Dockerfile..."
docker build . -t hugo-alpine
echo "Saving image to hugo-alpine.tar.gz"
docker save hugo-alpine > hugo-alpine.tar.gz

If I'm on a new computer, I can just run docker load -i hugo-alpine.tar.gz to load the hugo-alpine image into Docker.

I have a dev script that starts the hugo server and makes it available on port 1313:

#!/bin/bash
docker run --rm -v "${PWD}:/src" -p "1313:1313" hugo-alpine hugo --watch serve --bind 0.0.0.0

Finally, I have a deploy script that generates the static site into ./public, then pushes the result to a gh-pages branch:

#!/bin/bash
set -euo pipefail

if [ ! -d public/.git ]; then
  rm -rf public
  REMOTE="$(git remote get-url origin)"
  git clone "${REMOTE}" public
  (cd public && git checkout gh-pages)
fi

docker run --rm -v "${PWD}:/src" hugo-alpine hugo

cd public
git add -A
git commit -m "$(date)"
echo "Pushing build..."
git push

cd ..
echo "Pushing source..."
git push

You can view the source code for my blog here: https://github.com/ndbroadbent/ndbroadbent.github.io


I'm very happy with this workaround. Now I'm back in business, and I can update or write new blog posts to my heart's content. This new Docker-based setup should last me for the next few decades, if not longer. I still love how Hugo is super fast and generates my entire blog in about 6 seconds (even version 0.21!) I'm in no hurry to switch to anything else.


  1. A static site generator converts a folder full of Markdown files into a plain HTML/CSS website that you can host for free on GitHub Pages or Netlify. ↩︎

  2. I think it's generally much easier to get older Linux packages running, especially when it's a single Go binary with no dependencies. I wish it was this easy on Mac! ↩︎

  3. Hopefully I never have to run this again! ↩︎

]]>
<![CDATA[Flashing a Kogan Smart Kettle with Tasmota]]>https://madebynathan.com/2021/08/19/kogan-smart-kettle/66234002cab1a83ac77b0805Thu, 19 Aug 2021 12:00:00 GMT

I bought a wifi-connected kettle and flashed it with a custom firmware.

Kogan Smart Kettle
Just Tasmota it with AND it works - platform: mqtt name: “Kettle Power” state_topic: “stat/Kettle/POWER” command_topic: “cmnd/Kettle/POWER” payload_on: “ON” payload_off: “OFF” optimistic: false qos: 0 now with MY DUM TV remote Pressing the record button can toggle the the kettle - id: IR remote Toggle Kettle alias: IR remote Toggle Kettle trigger: - entity_id: sensor.last_ir platform: state to: ’190A332′ condition: [] action: - data:…
Flashing a Kogan Smart Kettle with Tasmota

This is a "Tuya" product which uses an ESP32 chip. Tuya provides hardware and software for a lot of white-labelled products, and it's a very open platform with a lot of documentation. This means that a lot of off-the-shelf devices can be flashed to run custom firmwares such as Tasmota and ESPHome.

We used to be able to use a tool called tuya-convert, which would hack devices wirelessly and flash a custom firmware over-the-air (OTA). I tried tuya-convert, but I got this error:

Your device's firmware is too new.
Tuya patched the PSK vulnerability that we use to establish a connection.
You might still be able to flash this device over serial.

So I had to open it up, connect some wires, and flash it via serial. I used the GPIO pins on a Raspberry Pi.

It worked! I flashed the kettle with Tasmota and saw data coming into MQTT.

Flashing a Kogan Smart Kettle with Tasmota

I set up a flow in Node-RED to monitor and control the temperature setting on the kettle.

Flashing a Kogan Smart Kettle with Tasmota

Hyper Text Coffee Pot Control Protocol

I was worried that I might accidentally ask the kettle to brew coffee, so I implemented support for the Hyper Text Coffee Pot Control Protocol. I did this by returning the HTTP status: 418 I'm a teapot.

(I guess it's not a teapot, but it's certainly not a coffee machine.)

418 I’m a teapot - HTTP | MDN
The HTTP 418 I’m a teapot client error response code indicates that the server refuses to brew coffee because it is, permanently, a teapot. A combined coffee/tea pot that is temporarily out of coffee should instead return 503. This error is a reference to Hyper Text Coffee Pot Control Protocol defined in April Fools’ jokes in 1998 and 2014.
Flashing a Kogan Smart Kettle with Tasmota

The kettle now responds to an API request at /bc (which stands for "brew coffee"), and will respond with status 418.

~/code/Tasmota $ curl -v 192.168.1.113/bc
*   Trying 192.168.1.113...
* TCP_NODELAY set
* Connected to 192.168.1.113 (192.168.1.113) port 80 (#0)
> GET /bc HTTP/1.1
> Host: 192.168.1.113
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 418
< Content-Type: text/plain
< Content-Length: 12
< Connection: close
<
* Closing connection 0
I'm a teapot
Respond to /bc (“brew coffee”) endpoint with 418 I’m a teapot · ndbroadbent/Tasmota@bbcf57f
Alternative firmware for ESP8266 with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at - Respond to /bc (“brew coffee”) endpoint with 418 I’m a teapot · ndbroadbent/Tasmota@bbcf57f
Flashing a Kogan Smart Kettle with Tasmota

The commit that adds this important functionality

FAQ

  • Q: Why would you want to flash your kettle with a custom firmware?
    • A: The original Tuya app uses a cloud service, and I don't like relying on third-party services. Tasmota is fully local and doesn't make any requests to the public internet. This means that I don't need to worry about hacks, leaked data, or the company going out of business and shutting down the app.
  • Q: Ok but why do you have a smart kettle anyway?
    • A: Honestly, because I thought it would be funny. But my wife does like to have it turn it on automatically when she gets out of bed.
]]>
<![CDATA[What I Learned While Making a Game With React Native]]> .blogpost h1 { font-size: 28px; margin-bottom: 20px; margin-top: 40px; }

I used React Native to build a cross-platform game for iOS, Android, Windows, and the web. SudoBlock is a cross between Sudoku, jigsaw puzzles, and Tetris.

You can find SudoBlock on the web, App Store, Google Play, and the Microsoft Store.

React

]]>
https://madebynathan.com/posts/2018-02-12-what-i-learned-while-making-a-game-with-react-native/6621e803cab1a83ac77b009fMon, 12 Feb 2018 04:34:00 GMT .blogpost h1 { font-size: 28px; margin-bottom: 20px; margin-top: 40px; } What I Learned While Making a Game With React Native

I used React Native to build a cross-platform game for iOS, Android, Windows, and the web. SudoBlock is a cross between Sudoku, jigsaw puzzles, and Tetris.

You can find SudoBlock on the web, App Store, Google Play, and the Microsoft Store.

What I Learned While Making a Game With React Native

React Native only supports iOS and Android, but I used react-native-web for the browser, and react-native-windows for Windows desktop and phone. The UWP app can also run on Xbox One and HoloLens. I also experimented with react-native-macos and react-native-appletv, but they're not being maintained.


Here's some of the things I learned while building SudoBlock:

You should probably use a game engine

I've heard good things about Godot and Unity.
These game engines support iOS, Android, Windows, and Linux. Unity supports
many other platforms.

Making a simple game was a great way to learn React Native, but it's not the best tool for the job.
However, people have started working on some game libraries for React Native, such as react-game-kit and react-native-game-engine.

It's not the easiest way to make a game, but it's also not impossible.
The built-in Animated library is great,
and I also used react-native-animatable.
I used a library to play sounds.
I wrote native code to integrate with iOS Game Center and Google Play Game Services.
I used libraries to integrate with InApp Billing on Android,
and in-app purchases on iOS.
I also wrote native code for ads and in-app purchases on Windows.
There's a RN library for particle effects
(although you'd have to add support for Android),
and react-game-kit provides a way to manage sprites and animations.

I want to make some more simple 2D games, and I'm going to stick with React Native for now. I can fork SudoBlock and reuse a lot of the code that I've already written.

If your goal is to quickly build a cross-platform mobile game, then I'd recommend learning Godot or Unity.

Don't worry about supporting Windows

This is a no-brainer. No one uses Windows Phone and Microsoft have abandoned it.
I wanted to explore and learn new things, so I decided to do it anyway. I enjoyed the process
of installing Windows, working with Visual Studio, and writing some C#.
I also figured out how to write cross-platform npm scripts using scripty.

react-native-windows gives you a UWP app that can
run on Windows Phone, tablets, desktop, Xbox One, HoloLens, and other Windows platforms. But:

  • Nobody uses Windows Phone.
  • Mobile games don't usually make sense on an Xbox.
  • If your game runs in a browser, then you probably don't need a desktop app.

React Native might be better than Electron for desktop applications

When I was running SudoBlock as a Windows desktop application, I realized that
React Native could be a better choice than Electron.
Electron apps are notorious for being huge and using a lot of memory (e.g. Slack and Spotify.)
They have to package and load an entire WebKit browser.
React Native apps are much smaller and use far less memory, because they only need a JavaScript engine.
You can also use responsive design, so that a single codebase works on desktop, mobile, and the web. The only problem is that react-native-macos
is unmaintained and out of date, so it would be great if a company sponsored development.

You'll probably write some native code

Some people are attracted to React Native because they've heard that you can write a mobile
app with only JavaScript. In practice, this is only true for extremely simple applications.
Most of your code will be written in JavaScript, but you'll probably have to write some native code.
At the very least, you must be prepared to fix some bugs in third-party libraries.

I started contributing to react-native-admob, and sent a pull request to allow multiple test devices. That was my introduction to native code in React Native, and I had to work with JavaScript, Objective-C, and Java.

I also did a lot of work on react-native-blur. When I first tried to use it, it was completely broken on Android, and there were lots of problems on iOS.
It took a lot of work to get everything running. I could have just skipped the blur and used a darkened overlay, but I enjoyed the work and learned a lot.

I also had to write native code to integrate with iOS Game Center and Google Play Game Services,
and for ads and in-app purchases on Windows. I also wrote a small library to manage vibrations and haptic feedback across iOS, Android, Windows, and the web (using the Vibration API.)

There will be bugs

React Native is pretty stable, but there's a lot of unmaintained libraries,
and most libraries don't have any tests. React Native is a bit like jQuery, in that it smooths over a lot of quirks and inconsistencies and provides a consistent API. But there's some tricky edge cases,
and I often had to read the React Native source code to figure out why something was happening.

Some examples:

Android was particularly unstable. Not just React Native, but Android itself.
I didn't have too many problems with iOS.

React Native vs. iOS / Swift

I wrote an iOS app with Swift a few years ago, and I've actually had a much better experience with React Native.
When I was working with UIKit, I remember constantly fighting with things like layout, contraints, and font rendering. I uncovered some actual bugs, and found long threads on the Apple forums that were being ignored.
It was really nice to let React Native handle all of the rendering. I had no rendering issues on iOS or Android,
and just a few problems that I fixed on Windows.

Swift was also very unstable at the time, and Xcode upgrades took a lot of effort.
My Obj-C code still compiles a year later on the latest version of Xcode. If I was using Swift,
I think it would take at least a day to upgrade to Swift 4.1 and update all of the third-party libraries.
I believe Swift is more stable now, and I love the language, so I might start using it again on future projects.

I had a lot of headaches with React Native, but it wasn't as bad as Swift v1 and UIKit.

Marketing is really hard

  • I tested Facebook ads with $50. I reached about ~7,000 people and got ~50 clicks. One person
    ended up buying the game for $2.99, so I made $2. You can't spend $50 to make $2.

  • I posted on Reddit a few times:

  • A German website
    published an article about SudoBlock.

  • I tried to capitalize on #covfefe,
    which didn't work at all. But I repurposed that new code into an Emojidoku mode.

  • I found a game publisher who was going to handle all the marketing and split the revenue.
    They even promised to get the game featured on the App Store.
    We signed the contract and I took the apps down for a while, but the publisher fell off the radar and stopped replying to my emails.

  • I finally got around to writing this blog post.

Other Notes

  • I switched from Sublime Text to VS Code near the beginning of the project.
    VS Code is awesome. It's super fast and very customizable.

  • I set up Flow and started using Immutable.js.
    I love having static type checking for JavaScript.

  • I used Airbnb's eslint config, and spent about a day
    fixing all the issues. Every time I saw a rule that I didn't understand, I looked it up to understand their reasoning. I read through a lot of great discussions on Github. This was a great way to learn more about
    JavaScript, and especially some of the new ES6 features.

  • I starting doing some functional programming with lodash/fp and ramda. I had fun refactoring some code in a more functional style.

  • I really enjoyed working with redux-saga, which helped me clean up a lot of messy code.

  • I learned a lot about Reactive programming. This post is amazing: The introduction to Reactive Programming you've been missing. I started playing with RxJS and
    redux-observable.

  • I set up CodePush, so that I could push JS changes without releasing a new version to the App Store. The setup guide is very helpful.

  • I had to debug some memory issues on Android, and this article was really helpful: React Native Android App Memory Investigation

  • I learned about the webpack DLL plugin, which made development a lot faster. You can compile everything in node_modules as a separate bundle. You only need to do that once, so it saves a lot of time.

  • I released a boilerplate project with my webpack config for react-native-web.

  • I learned about the Babel AST while working on an issue in a Babel plugin, related to react-native-web.

  • I wrote a script that stripped unused glyphs from icon fonts, to reduce the app size.

  • I tested the app while simulating a slow network connection in Chrome. This revealed a bug where the counter started ticking before everything had finished loading.

  • I discovered that it takes a huge amount of effort to actually launch a game. Once I had a playable game, it was another 2 months before everything else was finished. Things like in-app purchases, ads, analytics, high scores, achievements, tutorials, app store listings, screenshots, icons, social media accounts, etc.



This was about 3 months of work, and I was in a state of flow most of the time. I learned a lot of new things, and I really enjoyed the whole process.
The game has only made about $50 so far, but I have some more ideas for grid-based games, and
I can reuse a lot of the SudoBlock code. I'm also a freelancer, so this is the only way I can pick up new skills.

Thanks for reading! If you have any questions, please leave a comment on Hacker News.



  • I'm currently working on DocSpring, which is an API for filling out PDFs.
]]>
<![CDATA[Raspberry Pi Microwave]]>A few months ago, I was inspired by this post on Reddit, titled: Food items should have QR codes that instruct the microwave exactly what to do. Like high for 2 minutes, let stand 1 minute, medium 1 minutes..

I thought this was a pretty cool idea, and that it

]]>
https://madebynathan.com/2013/07/10/raspberry-pi-powered-microwave/6621e803cab1a83ac77b009eWed, 10 Jul 2013 23:51:47 GMT

A few months ago, I was inspired by this post on Reddit, titled: Food items should have QR codes that instruct the microwave exactly what to do. Like high for 2 minutes, let stand 1 minute, medium 1 minutes..

I thought this was a pretty cool idea, and that it would be a fun project for a Raspberry Pi. I agreed with the people who thought using UPC barcodes would be better, since products already have them, so I went with a barcode scanner + online product database.

Here's a summary of the features that I've added to my microwave:

  • Re-designed touchpad
  • Nicer sounds
  • Clock is automatically updated from the internet
  • Can be controlled with voice commands
  • Can use a barcode scanner to look up cooking instructions from an online database
  • There weren't any online microwave cooking databases around, so I made one: https://microwavecookingdb.com
  • The microwave has a web page so you can control it from your phone (why not), and set up cooking instructions for products
  • Tweets after it's finished cooking something (See https://twitter.com/rbmicrowave)

Demo Video

Using a Raspberry Pi to cook a Raspberry Pie

Here's the recipe I followed.

Hardware

I used a microwave with a touchpad, and discovered that the touchpad was a button matrix. I took photos of the touchpad and traced the wires, so that I could tell which pins corresponded to which buttons.

I initially wanted to put everything in a case outside the microwave, but I decided that it would be more challenging and fun to try and fit everything inside. Here's all the PCB revisions, before I settled on a design that would fit neatly on top of the microwave's original PCB.

I used shift registers and optocouplers to control the touchpad pins. To listen for touchpad presses, an output shift register scans one line at a time on the first touchpad layer, and an input shift register listens for connections to the second layer.

I unsoldered the touchpad connector from the original circuit board, and replaced it with a row of pin headers. I then used the original touchpad connector on my PCB, so that my circuit acts as a kind of proxy for button presses.

Here's the final product after transferring toner, etching, drilling, and soldering. (I had to use the ribbon cables to save space.)

And here's how it fits on top of the microwave controller:

When I peeled off the old touchpad overlay, it became wrinkled and ugly, so I thought I may as well have a go at redesigning the interface. My goal was to get rid of the features I don't really use, and make the basic functions more convenient. The top two rows of buttons are now dedicated to "one touch" cooking times, for either "high" or "medium" power. You can also set the time and power manually.

Raspberry Pi Microwave

You might have noticed that I started the project with the intention of using an Arduino Nano plugged into a Raspberry Pi USB port. This was because I was a) familiar with the Arduino, b) not familiar with the Raspberry Pi GPIO, and c) thought it would make testing and debugging a bit easier, since I could just plug the Arduino into my laptop.

However, it turns out that my Raspberry Pi had some issues with the arduino's FTDI chip if the Raspberry Pi was turned on while the Arduino was plugged in. It wouldn't recognize the Arduino until I unplugged it, and then plugged it back in again.

So I decided to make an Arduino Nano => Raspberry Pi GPIO adapter, and port my Arduino code to the Raspberry Pi GPIO using the WiringPi library.

The Raspberry Pi is powered by a USB hub, which is also plugged into the Raspberry Pi's USB port. To power the hub, I wired up a power adapter to the microwave's power source. There's also a USB powered speaker, USB microphone, wifi adapter, and barcode scanner.

Microwave Software

All the software running on the Raspberry Pi is hosted at: https://github.com/ndbroadbent/raspberry_picrowave.

There are 4 main components:

Microwave Daemon

This runs the code that listens for touchpad button presses, and controls the microwave. It also accepts TCP connections so that other programs can send commands or request information about the microwave's status.

Barcode Instructions

This program listens to the barcode scanner, and requests product information from the Microwave Cooking Database. It also runs the cooking programs.

Voice Control

I used PocketSphinx for voice recognition, which worked very well with my small corpus. I embedded Ruby in the pocketsphinx_contiunous C program, so that it would be easier to script voice commands and send commands to the microwave daemon. It turns out that the acoustics of my kitchen seem to mess up the recognition, so it won't be used very often.

Sinatra App

There's a simple sinatra web application that lets you control the microwave from your phone or computer. This may not be a big selling point. It uses a JavaScript EventSource to push updates to the browser, so you could have hundreds of users connected to your microwave at once.

If any barcodes are scanned that can't be found on the Microwave Cooking Database, this webpage will display the unknown barcodes and provide a link to add the new product.

Microwave Cooking Database

I couldn't find any existing websites with a database of microwave cooking instructions, so I made one.

Raspberry Pi Microwave

UPDATE: It used to be live at https://www.microwavecookingdb.com/, but the domain has now expired. Sorry!

If cooking instructions are posted for a 1000W microwave, you can request the instructions for a 700W microwave, and the cooking times will be automatically adjusted.

So if you're also planning on making an internet connected microwave with a barcode scanner, please feel free to sign up and add some products.

Thanks for reading!

I'd be interested to hear if you build something similar!

]]>