Tap Light Focus Timer System

I’ve been procrastineering on a “sticky note timer” which would incorporate an e-ink display, be portable, updatable via WiFi, show me what I should be working on, and flash lights at me to give me a sense of movement / time passing / and urgency.  Sometimes I use the word “procrastineering” to refer to when I start to spiral on a project and end up in analysis paralysis.  But, I think it is more appropriately used when I’m doing a deep dive on a project when I really have something much more important / urgent I should be working on.

A long time ago I added a few components to an off the shelf dollar store tap light and turned it into a game buzzer.  While the sticky note timer project was marinating  / incubating1 in the back of my brain, I realized that maybe I don’t need or even want something that high-tech.  Maybe what I need is something dead simple?  As cool as the sticky note timer project is – and it really is neat – there’s a lot of pieces to the puzzle and a fair bit of maintenance that goes along with it once its finished.  You have to connect to it, upload a list, set up timers, etc.

I finally decided on something not so easily adjustable, but still flexible in it’s simplicity.  Rather than making the setup (adding / updating / uploading lists to a timer) something I have to do in order to start the timer, what if I made it part of the timing?

First, let’s look at what the setup.  A dollar store tap light which includes a lot of handy parts – a battery holder, a push button switch, several springs, and a simple and at attractive enclosure.

This slideshow requires JavaScript.

On the far left is a basic off the shelf dollar store tap light.  Next to it are two others I had previously modified to work as game / timer buzzers2  The last picture is the wiring diagram, except that I wired the ATTiny chip to the positive wire coming from the button switch.  Whenever I hit the button, it will toggle the circuit on and off.

Using some parts from my electronics bin3, I cobbled together a prototype on a breadboard that would do the following when the button was hit:

  • Turn orange for 1 minute and beep 3 times in the last 3 seconds
  • Beep once more and turn green for 12 minutes, then fade from yellow through orange over the last 3 minutes
  • Flash red and beep three times after 15 minutes had lapsed (12 minutes of green and 3 minutes of color fading)
  • Turn off, go to a low power mode, and then wake up long enough to flash blue every 8 seconds
  • After 5 minutes, it would flash green and beep twice
  • Then keep doing this 8 second blue flash and green light plus beep every 5 minutes
Animation of LED timer button

You’re probably wondering – what’s with all these timers and lights and beeps?  Here’s how I use them:

  • Place and slap the button to get going
    • I put my phone on my desk and the timer right on top of my phone.  It’s a big 4″ diameter timer and covers the phone pretty well.  I can’t pick up my phone without seeing this timer ticking down.  This is a huge difference between a phone app and a physical thing standing between me and my phone.  There are some web browser based apps – but these don’t really work for me.  Either I have to keep that window open and on top or … I’ll forget it exists.  This timer is right there, front and center, on my desk and lit up no matter where my desktop might take me.
    • Plus, it’s actually a little therapeutic to slap the tap light.  Pushbutton switches like this are built to take a bit of abuse and the physical action of hitting the light is a lot of fun.
  • Orange for 1 minute
    • This is the replacement for the “maintain / update a list.”  Instead of having to fuss with a list, I’ve dumped myself directly into work.  I’m suddenly racing the clock for 60 seconds to write all the things I want to try and accomplish in the next 15 minutes.  Maybe it’s a few emails, make some phone calls, or write / edit a document.  After 57 seconds, the buzzer will beep three times to let me know that the 15 minute timer is about to start.
    • Or, if you already have a particular task to work on, you could use this time to follow a process like Steven Kotler’s suggestions on tactical transitions to a a flow state4.  His three step process is:
      • Anchor your body
        • Practice box breathing.5  You could box breathe 3 times in one minute and have a few second left over to psych yourself up.
      • Focus your mind
        • Write down one clear goal.
      • Trigger your ritual
        • Recite a mantra, perform a gesture, start a “work” playlist
  • Green for 15 minutes
    • It’s go time!  Whatever I wrote down, now I’m in a race to work on those things – and those things only.  I can’t let new emails, calls, etc, distract me – that buzzer is going off in 15 minutes.  As the timer closes in on 15 minutes, with just 3 minutes to go, it turns yellow and fades to orange.  If I look up / down and see this, I know I’m in the home stretch and I’ve got to start moving fast to wrap things up.
  • Red alert!
    • Once the 15 minutes is up the light flashes red and beeps to let me know I’m off the hook.  Now, if I’ve already hit peak productivity, I could keep going.  If I got sidetracked, it’s an alert for me to restart the timer and get back to it.
  • Blue flashes, 5 minute green flash and beeps
    • These blue flashes happen once every 8 seconds6 just to keep the timer present in my vision so it doesn’t just appear into the mess on my desk.
    • If I finished out the 15 minute block of work time and I don’t stop the timer, the 5 minute timer is my reminder to return to my desk, reset the timer, and get going again.
    • If I ended up working past my 15 minute block of work time, the 5 minute beeps still give me a sense of how much time has passed.7
    • Importantly – if I get distracted by a sidequest, one of the beeps every 5 minutes is bound to catch my attention and remind me I’m supposed to restart the timer and get back to work.

So… does it work?  For me, yes!  Here’s why:

  • The hardest part of getting started is getting started.  My tendency is to want to collect all the stuff I’d need, get real comfy, make a list, look up some documents, etc.  This system short circuits all that.  I just need to be able to slap the big button sitting on top of my phone.  If I can manage that, I get 60 seconds to collect myself and then it’s time to rock and roll.  That’s enough time to take some deep breaths, start a playlist, or just sit quietly before I get started.
  • It covers up my biggest distraction.  Unlike an app on the phone or my desktop computer, I can literally cover up my phone with this big damn button.  I won’t see any notifications and if I want to pick up my phone, I have to actually look at and ouch the button – which is itself a reminder to get back to work.
  • It plays into a sense of play, urgency, and my own overdeveloped sense of competitiveness.  I enjoy hitting the timer to turn it on – and I want to beat that 15 minute timer.
  • The 5 minute timer acts like a built in break timer.  If I can get through 15 minutes of work, I can goof off, write a blog post, and without doing anything else that 5 minute timer can bring me back.
  • It includes a “failsafe” to bring me back to the timer if I get distracted by a sidequest.  If I miss the 15 minute timer, there’s another 5 minute timer around the corner.  Even between timers, there’s an intermittent flash of blue light to grab my attention.

The only meaningful “downside” to this timer button for me is there’s no pause button.  However, this isn’t exactly bad.  It helps me really hone in on what’s important and what’s interesting.  If a family member asks me for something or a call comes in, I just need to weigh the benefit of addressing the intrusion against having to restart the timer.  And realistically, if I pause the timer, I’m going to need some time to drop back into “flow” anyhow.

Sticky Note Timer
  1. Ah, just what I need! A new project!
  2. Sticky Note Timer, parts arrived!
  3. Seeed Studio XIAO ESP32C3 and a small sticky note display
  4. Brainstorming More E-Ink Stuff
  5. Smol Fonts for E-Ink Displays
  6. Tap Light Focus Timer System
  1. Fermenting?  Festering? []
  2. The older ones would flash orange a few times to alert you the game was going to start, turn green, fade from yellow to red, then flash red and buzz after 15 seconds. []
  3. I used an ATTiny45 because I had one, but it’s not much more expensive to use an Adafruit Trinket, a buzzer, a RGB/neopixel LED, and some wire.  In a subsequent version, I also used a small prototyping board like the Adafruit Perma Proto Boards []
  4. It’s the second slide []
  5. TLDR:  Breathe in slowly through the nose for 4 seconds, hold for 4 seconds, breathe out slowly through the mouth for 4 seconds, hold for 4 seconds, repeat []
  6. Because that’s the longest the little microchip can do between “deep sleep” to conserve battery life []
  7. I may adjust the program so the first five minutes is 1 beep, second five minutes is two beeps, etc []

Prusa Lack Stack, LED Lighting, CircuitPython Tweaks

Much like those recipes on the internet where the author tells you their life story or inspiration, I’ve got a lot to share before I get to the punchline of this blog post (a bunch of CircuitPython tweaks).  Edit:  On second thought:

  • Keep the lines of code <250
  • Try using mpy-cross.exe to compress the *.py to a *.mpy file

This is a bit of a winding road, so buckle up.

Admission time – I bought a Prusa1 about three years ago, but never powered it on until about a month ago.  It was just classic analysis paralysis / procrastineering.  I wanted to set up the Prusa Lack enclosure – but most of the parts couldn’t be printed on my MonoPrice Mini Delta, which meant I had to set up the Prusa first and find a place to set it up.  But, I also wanted to install the Pi Zero W upgrade so I could connect to it wirelessly – but there was a Pi shortage and it was hard to find the little headers too.  Plus, that also meant printing a new plate to go over where the Pi Zero was installed, a plate that I could only print on the Prusa, but I didn’t have a place to set it up…

ANYHOW, we’ve since moved, I set up the Prusa (without the Pi Zero installed yet), printed a Prusa Lack stack connector to house/organize my printers.  Unlike the official version, I didn’t have to drill any pilot holes or screw anything into the legs of the Lack tables.

Once the Lack tables were put together, I set about putting in some addressable LEDs off Amazon. I found a strip that had the voltage (5V for USB power), density (60 LED’s per meter), and the length (5 meters) I wanted at a pretty good price <$14, shipped.  I did find one LED with a badly soldered SMD component which caused a problem, but I cut the strip to either side of the it, then soldered it back together.  Faster and less wasteful than a return at the cost of a single pixel and bit of solder.

The Lack stack is three tables tall, keeps extra filament under the bottom of the first table, my trusty Brother laser printer on top of the first table, my trusty Monoprice Mini Delta (Roberto) on top of the second table, and the Prusa (as yet unnamed Futurama robot reference… Crushinator?) on top.  Since I don’t need to illuminate the laser printer, I didn’t run any LED’s above it.  I did run a bunch of LED’s around the bottom of the third printer…  this is difficult to explain, so I should just show a picture.

When Adafruit launched their QtPy board about four years ago, I picked up several of them.  I found CircuitPython was a million times easier for me to code than Adafruit, not least of which because it meant I didn’t have to compile, upload, then run – I could just hit “save” in Mu and see whether the code worked.  I also started buying their 2MB flash chips solder onto the backs of the QtPy’s to a ton of extra space.  Whenever I put a QtPy into a project, I would just buy another one (or two) to replace them.  There’s one in my Cloud-E robot and my wife’s octopus robot.  Now, there’s one powering the LED’s in my Lack Stack too.

I soldered headers and the 2MB chip into one of the QtPy’s, which now basically lives in a breadboard so I can experiment with it before I commit those changes to a final project.  After I got some decent code to animate the 300 or so pixels, I soldered an LED connector directly into a brand new QtPy and uploaded the code – and it worked!

Or, so I thought.  The code ran – which is good.  But, it ran slowly, really slowly – which was bad.  The extra flash memory shouldn’t have impacted the little MCU’s processor or the onboard RAM – just given it more space to store files.  The only other difference I could think of was that the QtPy + SOIC chip required a different bootloader from the stock QtPy bootloader to recognize the chip.  I tried flashing the alternate “Haxpress” bootloader to the new QtPy, but that didn’t help either.  Having exhausted my limited abilities, I turned to the Adafruit discord.

I’ll save you from my blind thrashing about and cut to the chase:

  • Two very kind people, Neradoc and anecdata, figured out the reason the unmodified QtPy was running slower was because the QtPy + 2MB chip running Haxpress “puts the CIRCUITPY drive onto the flash chip, freeing a lot of space in the internal flash to put more things.”
    • This bit of code shows how to test how quickly the QtPy was able to update the LED strip.
      • from supervisor import ticks_ms
      • t0 = ticks_ms()
      • pixels.fill(0xFF0000)
      • t1 = ticks_ms()
      • print(t1 – t0, “ms”)
    • It turns out the stock QtPy needed 192ms to update 300 LED’s.  This doesn’t seem like a lot, until you realize that’s 1/5th of a second, or 5 frames a second.  For animation to appear fluid, you need at least 24 frames per second.  If you watched a cartoon at 5 frames per second, it would look incredibly choppy.
    • The Haxpress QtPy with the 2MB chip could update 300 LED’s at just 2ms or 500 frames per second.  This was more than enough for an incredibly fluid looking animation.
    • Solution 1:  Just solder in my last 2MB chip.  Adafruit has been out of these chips for several months now.  My guess is they’re going to come out with a new version of the QtPy which has a lot more space on board.
      • Even so, I’ve got several QtPy’s and they could all use the speed/space boost.  I’m not great at reading/interpreting a component’s data sheet, but using the one on Adafruit, it looks like these on Digikey would be a good match.
  • The second item was a kept running into a “memory allocation” error while writing animations for these LED’s.  This seemed pretty strange since just adding a single very innocuous line of code could send the QtPy into “memory allocation” errors.
    • Then I remembered that there’s a limit of about 250 lines of code.  Just removing vestigial code and removing some comments helped tremendously.
    • The next thing that I could do would be to compress some of the animations from python (*.py) code into *.mpy files which use less memory.  I found a copy of the necessary compression/compiler program on my computer (mpy-cross.exe), but it appeared to be out of date.  I didn’t save the location where I found the file, so I had to search for it all over again.  Only after giving up and moving on to search for “how many lines of code for circuitpython on a microcontroller” did I find the location again by accident..  Adafruit, of course.  :)
    • I’m pretty confident I will need to find the link to the latest mpy-cross.exe again in the future.  On that day, when I google for a solution I’ve already solved, I hope this post is the first result.  :)

The animations for the Lack table are coming along.  I’ve got a nice “pulse” going, a rainbow pattern, color chases, color wipes, and a “matrix rain” / sparkle effect that mostly works.

Animated GIF

I started this blog post roughly 7 months ago2 by the time I finally hit publish.  After all that fuss, ended up switching from CircuitPython (which I find easy to read, write, maintain, update) to Arduino because it was able to hold more code and run more animations.  Besides the pulse animations, rainbow patterns, color chases, color wipes, and a matrix rain, it’s also got this halo animation, some Nyan cat inspired chases, and plays the animations at a lower brightness for 12 hours a day (which is intended to be less harsh at night).  I could probably add a light sensor, but I don’t really want to take everything apart to add one component.

  1. The i3 MK3S+! []
  2. January 7, 2025 []

[2025] Google Pixel Boot Loop Fixes

In the 7 years since I wrote a blog post about rescuing my Google Pixel from a boot loop people have started reaching out to me desperately looking for a way to fix their phones.  This particularly horrible glitch happens at the worst time – when your phone storage is completely full of pictures and videos.  In my case, we were on vacation and not near wifi when I’d happened to fill up the phone storage and it got stuck in a boot loop.1

Google Support was adamant there was no way to recover my data and my options were to factory wipe the phone myself or send it to them so they could do it.  Of the resources found back in 2018, almost nothing survived Google’s march of “progress” and destruction of their own older resources.  In this case the links to Google’s own Pixel support forums and links to resources no longer work – and there are no working Archive.org / Way Back Machine links.

Anyhow, if you’re stuck in the same situation as I was – without the resources and links I had back then, perhaps if you dig around you can still find a way?

“If you have a problem, if no one else can help, and if you can find them, maybe you can…”

Before you get started – a warning.  I don’t currently have this problem and am trying to piece together how I fixed my problem 7 years ago on an older phone, using current guides that are no longer accessible.  I haven’t verified any of these links and resources, I’m just some rando on the internet who is trying to help you out because some other internet randos helped me out a long time ago.  Google has a nasty habit of deleting their own resources and shuffling things around.  I don’t know the first thing about installing new operating systems on phones and following any of these links or suggestions might permanently damage your systems.  But, as I mentioned before…  I tried this because Google Support was beyond unhelpful and I was completely out of options.

You’ve been warned

The basic framework for the fix was:

  1. Get the phone to “Recovery Mode” so at least isn’t not boot looping, overheating, and chewing up your battery.
    1. If you have an unlocked phone, or a locked phone from Google which you could theoretically unlock over a terminal, you should be able to get the phone “Safe Mode” where it will be able to turn on and access the operating system, but with limited other apps useable.
  2. Find and install the latest Android ADB (Android Debug Bridge) and FastBoot (an Android diagnostic tool)
    1. I say “latest,” but I’m not an expert and am not currently having this problem.  Perhaps it’s best to use the version which most closely matches your phone?  Anyhow, I installed ADB on the root of my PC and then created a path to it with “SET PATH=%PATH%;c:\adb” so the operating system would know it could access those resources.
  3. Try to find a “Rescue OTA” (Android Rescue Over-the-Air update) for your phone model.
    1. This would essentially be the same update that you might get when you let your phone download and install an update over night via WiFi – with the only difference that you’ve downloaded it onto your PC and are going to try to shove it back into the phone over a cable.
  4. Try to “sideload” the OTA update back into the phone using ADB / Fastboot (I don’t remember the specific steps to do this – but since these resources are constantly being worked on, I assume someone has written a guide).

If this post helped you out or you found some resources helpful, please let me know so I can update this post and help others.

Good luck!

  1. It was also overheating – which might have been a contributing factor the boot loop – or caused by the constant booting and looping []

Capstan Drives as alternatives to Planetary Gears?

Sometimes I hate the algorithm and sometimes it shows me cool new robotics / mechanics / gadgets and makersAaed Musa has been working on something called a “Capstan Drive” which is a rope driven alternative to gears.  By removing gears and  teeth and replacing them with rope you cut down on noise, eliminate backlash, high torque, low inertia, and low cost – with the major costs being low range of movement and a vertical path for the rope to travel over.  Aaed’s video is well worth a watch and blog well worth reading.  But… if you want to get a sense of how the Capstan drive works…

Capstan drive in action

The benefit of a planetary gear is that it’s a very vertically compact method for increasing rotational speed at the cost of complexity.  With a Capstan Drive (I don’t know if this is supposed to be capitalized) the rope needs to be wrapped around the thinner shaft several times to prevent slippage.  As Aaed notes:

One question that I had when first exploring this reducer was “why doesn’t the rope slip if it’s just wrapped around the smaller drum?”. The answer to that question lies in the capstan equation. With each turn of rope on a drum, the amount of friction increases exponentially. With 3-5 turns of rope, there is enough friction for slipping to not be an issue.

Aaed indicated he was using Dyneema DM20 cord as it has almost no stretch to it.  I wonder if something like fishing line would work?

DIY Lightsaber Build
  1. TwistSabers
  2. DIY Lightsaber Thoughts
  3. Wait, haven’t I worked on this before?!
  4. Considering the design elements of a DIY light saber
  5. More Musings on Lightsabers, Mechanical Components
  6. Slow Progress…
  7. Capstan Drives as alternatives to Planetary Gears?

Fixing a coiled zipper that won’t close

I have a favorite soft pencil case made from faux leather that I’ve been using for more than 20 years, but the zipper had gotten finicky and started to not close.  It started having a problem zipping closed on just one side, but today it wouldn’t close at all and the slide was just moving back and forth without closing anything at all.

After a quick search, I found a video by UCAN Zipper USA with a solution that fixed it immediately.  The narrator said the problem was the zipper started to “open a little bit” with repeated use.  I suspect the slider on my pencil case opened a little by vigorous use or sometimes by accidentally zipping it over something that had been caught in the zipper teeth.

The solution was quite simple:

  • Inspect the closing side of the zipper to see whether one side is more “open” or riding higher than the other.
  • Using pliers, gently clamp that side down just a little, then try to open/close the zipper.  If it doesn’t quite engage yet, clamp down a little more.
Gently clamp the rear / closing side of the zipper where it appears to be loose / open / ride higher

That’s it!  It worked like a charm for me.  While this worked for a coiled zipper, I suspect it would also work for a molded tooth zipper as well.

Slow Progress…

… is still progress.

I designed a planetary gear assembly, more to see whether parts this small would even turn out than to actually make a working component.  The gears are about 3 mm thick, but half of that is the larger part.  I forgot that you can’t have a two-level gear mesh against another identical gear, so these didn’t move at all.

A test planetary gear assembly

I reprinted the parts, this time increasing the center hole size and also removing the teeth off the larger side.  It kinda works, but it’s very finnicky.  This might be a side effect of these gears being very thin and the teeth very small.  I think it’s probably worth sacrificing gear ratio in favor of larger, more consistent teeth.

Small improvements

The OpenSCAD code is a mess, lots of vestigial code remains, lots of non-working parts are commented out, and it all just needs more comments in general.  I hate looking at it.  But, as one of my favorite memes goes…

I mean, he’s got a point
DIY Lightsaber Build
  1. TwistSabers
  2. DIY Lightsaber Thoughts
  3. Wait, haven’t I worked on this before?!
  4. Considering the design elements of a DIY light saber
  5. More Musings on Lightsabers, Mechanical Components
  6. Slow Progress…
  7. Capstan Drives as alternatives to Planetary Gears?

Thermal QR Code Sticker Success!

I could not be happier with how this little thermal label printer turned out!  The highest use case I had for it was to create small QR codes I could stick in my various maker notebooks so that I could easily connect specific pages in my notebooks back to blog posts, essentially being able to embed unlimited digital resources into a simple page.

This slideshow requires JavaScript.

Basically, I arranged the QR codes and text in Inkscape, exported to a flat JPG, saved to my phone, and then printed.

The failed prints you see were printed at Dense, Medium, and then Light, but all came out useless. I realized it was because I had exported the image at 72 DPI, which meant that once the image was exported to either PNG or JPG, the image had gray aliasing between what should have been sharp black and white edges.  This caused the printer to treat the grays as black, which meant the black areas were obscuring the lighter areas, making it harder to scan the images.

I exported at 900 DPI and it printed on “Light” flawlessly. Each QR code sticker is only 12.5mm square, I can fit 8 of them per sticker sheet, and each includes a short label, and can be read by my phone very easily.  Now, I don’t think a 900 DPI image is required to print fine details, but I figured why the hell not give it a shot?

The first website QR code generator I tried was actually a sneaky website.  Rather than creating a QR code for the destination, it ran the URL’s through their own URL shortener, then output that QR code.  I chose that generator since it permits you to select the desired error correction level, but the result was basically useless to me.  If I wanted a QR code pointing to a short-code, I would have pointed it at my own short URL service.  While an unshortened URL will create a larger or more dense QR code, it has the benefit of being somewhat transparent.  When you scan an unshortened URL, your scanning app can show you the destination that would be hidden by a URL shortener.  I ended up using this website to generate the QR codes which allows you to specify the URL, choose from various error correction levels, and then download in a variety of formats.

I was able to pack detailed, unshortened, URLs into just 12.5 mm square plus 4.5 point font labels.  I might be able to print smaller than this, but I don’t have any pressing need to do that.  I’ve seen some suggestions a QR code should be printed at least 10mm square, and this is just above that limit.  However, I suspect those guidelines are for commercial use, whereas these codes are likely to be rarely scanned and don’t need to be optimized for widespread use – just for my own personal benefit.

Thermal Sticker Printer
  1. QR Codes and Avatars
  2. Sticker Printer
  3. Thermal QR Code Sticker Success!

Prelude to Protractors

I was flipping through my smaller notebook and remembered I’d already posted about a credit card sized design for a protractor and ruler.  I decided to connect this to my recent other design and turn it into a short series.  This design predates the one I most recently made and shared on this site, thus the title.

While I posted a writeup to Instagram, for some reason I didn’t put anything here?!  Other websites go away over time and even if mine doesn’t last forever, well, at least it’s still mine.  Thus, here’s the photos:

This slideshow requires JavaScript.

And, just in case1 Instagram completely evaporates, here’s the writeup I posted:

A DIY protractor / ruler / template card.

I needed a quick and convenient way to make straight (ish) lines and angles that I could keep in my small notebook.

The little card is about the size of a playing card and acts like a 5mm increment ruler, 10 degree protractor, and can make it easy to draw a grid.

This all started because I was working on an electronics project, needed some resistors and haven’t memorized the color chart, decided to draw a color chart in my notebook, needed a grid / ruler, decided to design my own after seeing a neat metal one on Kickstarter.

OpenSCAD -> Inkscape -> Print -> tape to card -> craft knife -> drawing

Now I have a little template measuring tool that will let me draw circles, angles, lines, grids, and dots. I’m very happy with this. :)

I may try to lasercut one from a thin sheet of plastic

Enjoy!

Small Rulers and Protractors
  1. Inkscape Protractor and Rulers
  2. Prelude to Protractors
  1. God willing []

More Musings on Lightsabers, Mechanical Components

Other Lightsabers

After doing so many web / Youtube searches and watching so many videos on the topic of lightsabers, the algorithm quickly caught up to me and started showing me similar things.  There was one excellent video by Cleo Abram going behind the scenes at Disney to talk about how their incredible designer / engineer / imagineer Lanny Smoot invented a realistic looking lightsaber.  Another excellent video was by HeroTech going over his designs for building a DIY lightsaber with sounds, swift extension, and retraction.

This slideshow requires JavaScript.

Lightsaber Dimensions

There are now so many entirely “cannon” lightsabers out there that there’s no way to know what the “real” dimensions of a lightsaber should be.  Yoda and the younglings from Revenge of the Sith likely had shorter, thinner lightsabers, Kylo Ren probably had the chonkiest, Darth Maul had the longest, etc.  I think it probably comes down to what’s the most satisfying for the user to hold.  When it comes to a DIY lightsaber where the blade is stored inside the hilt, the blade length is going to be the number of segments multiplied by the difference of the hilt length and any overlap necessary to keep the segments steady.  If we’re going with three blade segments, we can then work backwards from what would be a comfortable grip size to determine what we can fit into the hilt.

From the TwistSaber kickstarter videos, I would guesstimate the diameter of the hilt is around 2″ or 50mm.  TwistSaber core slots into their hilts, so the entire mechanism of planetary gear, screw core, and blade slides must all be thinner than the inner diameter of the hilt.

Planetary Gears

It took me an embarrassingly long time to play with the MCAD library to produce involute gears.  Once I was able to generate gears, I was banging my head against the idea of how to create properly meshing gears – that is, until Pete Wildsmith swooped in with the assist.  He pointed me in the direction of Mattias Wandel’s excellent page on the topic of meshing gears.  What I learned were these items:

  1. There is a very specific relationship to make a planetary gear where the planet gears are evenly spaced and mesh properly with both the sun and ring gears.  The number of teeth in the sun gear must be an integer multiple of the number of planet gears.  And, in turn, the number of teeth in the ring gear must be an integer multiple of the number of teeth in the sun gear.
    1. To increase the gear ratio from ring to sun gear, I needed to minimize the sun gear teeth and maximize the ring gear teeth, this meant the number of planet gears had to be minimized to keep the number of sun teeth down.  However, I liked the idea of three planet teeth basically surrounding the sun gear, keeping it aligned.  Thus, I arrived at a constant for the number of planet gears; three.  From here, the choice is whether to give the sun gear a multiple of 2 or 3 of the number of planet gears.  I chose a multiple of 3 because having only 6 teeth looked fairly weak and I didn’t like the idea of putting so much pressure on those teeth.  Thus, the sun gear has 9 teeth.  In order to get sufficient rotations of the sun gear from a half rotation of the ring gear, I chose a multiplier of 7 for the ring gear.
    2. Thus, we have 3 planet gears, a sun gear with 9 teeth, and ring gear with 63 teeth.
  2. The number of meshing teeth to a planet gear in the above setup is derived by subtracting the sun gear teeth from the ring gear teeth, and dividing this by two.
    1. In our instance, it would be (63 – 9)/2 = 27 teeth
  3. I learned the hard way, through trial and error, that apparently all meshing gears required the same “circular_pitch.”
    1. All this seems to do is scale the entire gear up or down in size.  Fortunately, I don’t have to understand how the library works in order to wield it’s magic.  I just fiddled with the circular pitch until the set of gears were the approximate size I needed.
  4. When orienting the gears together, I wasn’t sure how far to place the planet gear from the sun gear.  Luckily, Matthias provides this answer.  The offset of the planetary gear is calculated as (circular_pitch / π) * (Sun Teeth + Planet Teeth) / 2

Design

When I design certain mechanisms, I like to try and design the components in the smallest and most extreme ways – so the OpenSCAD designs can be modified to build something larger and less extreme.  By “most extreme ways,” I mean the design gets tested for very thin parts, very steep or low angles.  The plan is that if I could design very thin shorter parts and they appear to work, I could print them quickly to test them, iterate, and then try them at full scale.  This is why I have some half-baked cryptex designs that are absurdly small – they were designed intended to be parametric. 1

After a long and interesting search I couldn’t find the goggle components pictured in a prior post, and decided to just buckle down, tinker with some old designs on spiral telescoping parts, scale them to fit in the goggles, and start printing a new set.  Of course, as anyone knows, there is no surer way to summon a lost object than to order/manufacture a new one.  Maybe 30 minutes into the print job, I discovered the goggles printed in copper plastic sitting on a shelf.

This slideshow requires JavaScript.

It was an interesting search because I found bags of prototypes of other projects, including some thin segments of spiral telescoping parts, which gave me something to play with and be inspired by while I tinkered.

I’d like to put these designs to work building a working telescoping, planetary gear operated, set of goggles.  Who knows?  If I stuck a lens in them, perhaps a Frensel lens, they might even work as a magnifying device.  And, if not, I’ll probably try to find a way to shoehorn some LED’s into them.

One other thing that’s been eating at me.  There are essentially four blade segments.  These are the three we see throughout construction videos, plus the casing which the outermost blade segment slides along.  There are very few videos of the entire assembly working with a cutout view, but there are definitely only three actual spiral core pieces.  And, yet, when the blade is extended, we can see the tip of the blade extend out further than the outermost spiral core piece.  This means, from the hilt to the top the lightsaber is one hilt plus three blade segments long. 2  Then there’s the three central spiral cores, but if they’re fully extended and the center blade segment extends beyond the spiral core… how?

Although I haven’t seen any part of the schematics or operation to demonstrate this, I think the central blade segment might have a spiral section within it.  Unrelatedly… does this mean that all the blade and spiral segments could possibly be printed in place at the very same time?

Can LED’s be fit into an extending lightsaber?

One of my all time favorite Simpson’s clips where Skinner’s mother berates a grocery store clerk, “I want everything in one bag… and I don’t want the bag to be heavy!”

It’s certainly possible to make a realistic looking lightsaber, but it’s not likely to be sturdy enough for performance / battles.  Cleo’s video has Mr. Smoot looking mighty apprehensive that she might attempt to more than very gently gesture with the lightsaber.  You could make a lightsaber that has great sounds, great blade, great lights, but the blade won’t retract.  You could make a super dangerous plasma lightsaber capable of cutting things… with 4,000 degrees Fahrenheit, but it sure won’t be portable.

I do wonder whether it would be possible to add lights to this kind of a lightsaber.  I think it might work if there was a ring LED around the planetary gear / base of the central spiral core.  Perhaps LED’s could be placed along the inside of the blade segments, but I’m not sure how you’d route power to these things as they slid along.  Perhaps through the use of copper tape or conductive maker tape.  I think these are doable, but would require a lot of testing, calibration, and probably thicker blade segments or very thin LED’s.

DIY Lightsaber Build
  1. TwistSabers
  2. DIY Lightsaber Thoughts
  3. Wait, haven’t I worked on this before?!
  4. Considering the design elements of a DIY light saber
  5. More Musings on Lightsabers, Mechanical Components
  6. Slow Progress…
  7. Capstan Drives as alternatives to Planetary Gears?
  1. I created a working prototype, it’s about half the size of a roll of lifesavers, and then got distracted by something.  While I’d like them to be parametric, and perhaps they are, I have a feeling some odd choices in there would prevent it from being truly parametric in the way much better designer/programmers are able to accomplish []
  2. Setting aside overlap, etc []

Considering the design elements of a DIY light saber

I like to think about projects in discrete parts, trying to solve one part, then moving onto another section.  In the case of this DIY lightsaber build, I’ve been burning some brain cells thinking about this project.  Just by looking at the publicly available images of the TwistSaber, what can I infer about it’s construction?

Planetary Gears

TwistSaber Gears

I would guesstimate the gears are probably about 8 mm in height.  When I want to make a very sturdy part, I’ll use a 3 mm thickness.  However, these gears look extra chonky, so let’s go crazy.  Making further, and more in depth, guesses…  Let’s see what happens when we toss the above image into Inkscape and try to lay some star shaped polygons on it.

This slideshow requires JavaScript.

I would estimate the ring gear has 58 teeth, the planetary gears appear to have 20 teeth, and the sun gear to have 10 teeth.  When you’re dealing with printing with tight tolerances and thick (0.4 mm) extrusions, you can’t make the teeth too small, but you need enough teeth so permit smooth operation.  In any case, we can count on some sweet OpenSCAD gear library magic to help us design these planetary gears.

Screw Threads

Since we’re already talking about the planetary gears, let’s think about the spiral core rotations and screw thread.  If the 58 tooth ring gear goes through a half rotation, it will rotate the 20 tooth planetary gears by 26 teeth, causing just over 2 rotations of the 10 tooth central sun gear.  The math should math like this:

  • ((ringTeeth / planetaryTeeth)) * (0.5 rotations) * (planetaryTeeth / sunTeeth) =
  • (58 / 20) * 0.5 * (20 / 10) =
  • (58 / 20) * 0.5 * (20 / 10) =
  • 58 * 0.5  / 10 =
  • 29 / 10 = 2.9

This tells us the half turn of the hilt should cause nearly 3 turns of the central spiral core.  If we had a zero degree spiral around the central core, the screw thread would not be a spiral but rather a straight vertical line.  If we had an absolutely crazy spiral, like a million degrees of turn, the screw thread would be nearly horizontal.  We’re going to need a slope for the screw thread that causes 2.9 revolutions over 200 mm.

Screw Core

The three central screw segments have some interesting design elements.

This slideshow requires JavaScript.

By tracing the image of the screw threads, in alternating yellow and red, we can see the path of the screw threads on the camera facing side of the tube.  However, by duplicating these tracing and flipping them along a horizontal axis, we can see this means there’s just two screw threads.  In an earlier post I had wondered at the optimal number of screw threads.  You want sufficient separate threads to work to actuate the core evenly, but not so many that they introduce unnecessary friction.

We already know from various videos and GIFs the screw core is attached to the hilt at the thinnest of the three segments.  It’s interesting then that the two larger tubes have flared ends with rounded notches on one side.  Although I don’t have a photo or still frame to show this, I suspect these are meant to lock against the base of the blades.  My working theory is you insert the core into the nested blade segments, and then pull them back so they click into the base of the blades.

Here’s my thinking…  let’s assume the spiral core pieces do not connect to the blades segments at all – except at the very bottom and very top.  When you rotate the spiral core center, the other two core segments could extend – but might do so unevenly based upon how much friction there might be between any two adjacent parts.  If the spiral core pieces do connect to the blade segments, then each of the three blade segments should actuate at the same rate (rather than whichever one has the least friction).

I need to give this more thought – I have an idea, which if correct might be a simpler way to design this mechanism for 3D printing.  (It would be probably impossible for injection molding though…

Blade Segments

The blade segments are interesting in their own right.  There’s no clear picture of how many rails exist within these blade parts.  However, we might be able to extrapolate this from the portions we can see.  In the second of these two screen shots, you can see two and a half sets of rail alignment nubs.  If there is an equal number on the reverse, then perhaps there are five alignment rails inside each blade?

This slideshow requires JavaScript.

One nice thing about OpenSCAD is the use of parameters.  There’s no reason I couldn’t design a similar device, but specify the blade segments should only be 20 mm tall, and then print out an incredibly stubby light saber.  If the mechanism work, then I could just adjust the blade segment height from 20 mm to 250 mm and try printing it again.

DIY Lightsaber Build
  1. TwistSabers
  2. DIY Lightsaber Thoughts
  3. Wait, haven’t I worked on this before?!
  4. Considering the design elements of a DIY light saber
  5. More Musings on Lightsabers, Mechanical Components
  6. Slow Progress…
  7. Capstan Drives as alternatives to Planetary Gears?