<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title>blog.tommy.sh</title>
	<subtitle>Handcrafted Electronic Musical Instruments (and the adventures in making them)</subtitle>
	
	<link href="https://blog.tommy.sh/feed/feed.xml" rel="self"/>
	<link href="https://blog.tommy.sh/"/>
	<updated>Sun, 18 May 2025 17:00:00 PDT</updated>
	<id>https://blog.tommy.sh/</id>
	<author>
		<name>Tommy</name>
		<email>hello@tommy.sh</email>
	</author>
	
	<entry>
		<title>Hello, F0</title>
		<link href="https://blog.tommy.sh/posts/hello-f0/"/>
		<updated>Thu, 04 May 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/hello-f0/</id>
		<content type="html">&lt;p&gt;Say hello to the F0!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/f0.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/f0-1200.jpg&quot; alt=&quot;Hello, F0&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The F0 is a minimalist, analog, square wave synthesizer with chunky 3D-printed piano key overlays, 9V battery power, and a “Feathergrain” (from which we get the F in F0) box enclosure.&lt;/p&gt;
&lt;p&gt;Because space inside the enclosure was tight and I wanted mostly just to validate a new button layout design, it is admittedly a very spartan Minimum Viable Product (MVP), but it sets a nice baseline for later iterations.&lt;/p&gt;
&lt;h2 id=&quot;quick-overview&quot; tabindex=&quot;-1&quot;&gt;Quick overview&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/open-overview.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/open-overview-1200.jpg&quot; alt=&quot;Open, from the top&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The heart of the F0 is a Voltage Controlled Oscillator (VCO) from a CD4046 chip. A VCO, as its name suggests, is a machine that creates a frequency determined by some input voltage. Here, a 9v battery feeds a 5v regulator to create a constant reference voltage, which is then dispersed across buttons, diodes, and trim potentiometers (13 of each) to make &lt;a href=&quot;https://en.wikipedia.org/wiki/Voltage_divider&quot;&gt;voltage dividers&lt;/a&gt;. The potentiometers tune each note, the diodes prevent the notes’ voltages from contaminating each other, and the button switches ensure that the voltage only passes when the user intends for the note to be played.&lt;/p&gt;
&lt;p&gt;The F0 only has one VCO, which means it can only play one note at a time and is therefore a monophonic instrument. (In contrast, the &lt;a href=&quot;https://www.instagram.com/p/BL7JwIQjtfo/&quot;&gt;POLY1&lt;/a&gt; I made awhile ago is polyphonic and all of its notes can be played simultaneously.) While there’s only one octave of keys from C to C, the tuners support five full octaves.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(For more info on the chip and its VCO capabilities, read this &lt;a href=&quot;http://hackaday.com/2015/08/07/logic-noise-4046-voltage-controlled-oscillator-part-one/&quot;&gt;Logic Noise article&lt;/a&gt; on Hackaday.)&lt;/small&gt;&lt;/p&gt;
&lt;h2 id=&quot;key-buttons&quot; tabindex=&quot;-1&quot;&gt;Key buttons&lt;/h2&gt;
&lt;p&gt;Manually laying out and soldering a dozen to a couple dozen of those voltage divider circuits is a painstaking and error-prone endeavor, so the first task was to design a Printed Circuit Board (PCB) to make it easier.&lt;/p&gt;
&lt;p&gt;I envisioned a modular system that would allow daisy-chaining any number of PCBs together to sum into a desired number of notes. Since each board wouldn’t know where in the musical scale it was, its layout must be agnostic to disposition; the same position should serve natural/accidental/white/black keys equally.&lt;/p&gt;
&lt;p&gt;If that weren’t enough, I also imagined that the same system could be used for both monophonic and polyphonic instruments. As such, the buttons are on a separate PCB from the diodes and tuning potentiometers I described above.&lt;/p&gt;
&lt;p&gt;Here are the fabrication previews of what I came up with for the tuning PCB (top) and buttons PCB (bottom):&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/eagle-tuning_pcb.png&quot; alt=&quot;Tuning PCB&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/eagle-buttons_pcb.png&quot; alt=&quot;Buttons PCB&quot; /&gt;&lt;/p&gt;
&lt;p&gt;You can see that the header pins at the top and bottom of the two boards mate, and the horizontal pins on the buttons PCB mirror to match any siblings.&lt;/p&gt;
&lt;p&gt;The A, A#, B, C pin labels basically denote potentiometer pins. The NC (Normally Closed), CM (Common), and CO (Commonly Open) labels are for the switches themselves, though my understanding in the design was incorrect so, for now, they’re unused cruft.&lt;/p&gt;
&lt;p&gt;The 2x6 grid of rectangles below the pins is for the note buttons; the top row is for accidental notes and the bottom is for naturals. I haphazardly decided there should be 6 columns of notes.&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(While I was at it, I made another version that used a different kind of button but observes the same chaining mechanisms. I’m hoping this will be used in the F1…)&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;So anyway, the F0 uses two and half of these PCB combos. They’re held together and under their respective keys with a 3D-printed cradle support.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/pcbs.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/pcbs-1200.jpg&quot; alt=&quot;PCBs&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lessons learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This PCB system takes up way too much space. It’s basically ⅔ of the enclosure’s floor space, which is not acceptable aesthetically (the PCBs are cool but mostly repetition -- they shouldn’t be the machine’s internal focal point) nor practically (I want more room to do other stuff!)&lt;/li&gt;
&lt;li&gt;Too much of the impressive parts of this system like the 3D-printed supports or the ribbon cable connections aren’t visible and so can’t be admired when the enclosure is open. I am of the opinion that hard work should either be recognized or obviated.&lt;/li&gt;
&lt;li&gt;The horizontal daisy-chaining isn’t useful at this small scale. If an MVP piano has a full octave of notes, so should each individual board.&lt;/li&gt;
&lt;li&gt;If I ever expect anyone else to do this, I need to make the assembly much simpler and cut out as much fiddly ribbon cable soldering as possible, even if it means the boards aren’t as modular as I’d intended&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;buttons%2C-meet-keys&quot; tabindex=&quot;-1&quot;&gt;Buttons, meet keys&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/key-overlays-detail.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/key-overlays-detail-1200.jpg&quot; alt=&quot;Closeup of key overlays&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With the buttons in place, the next step is to lay some key overlays on top to make the experience closer to that of a real piano. I explored a couple different mounting options, but, for the F0, the overlays are bolted into a rectangular window cut into the top of the enclosure. When the lid closes, they simply sit atop their respective buttons.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/key-overlays-top-inside.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/key-overlays-top-inside-1200.jpg&quot; alt=&quot;Bottom view of key overlays&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(Designing these key overlays was a lot of fun and something I’ve been kind of noodling on outside of software &lt;a href=&quot;https://www.instagram.com/p/7Op2yTAnoS/&quot;&gt;for some time&lt;/a&gt;. A separate writeup is in the works.)&lt;/small&gt;&lt;/p&gt;
&lt;h2 id=&quot;the-rest-of-the-electronics&quot; tabindex=&quot;-1&quot;&gt;The rest of the electronics&lt;/h2&gt;
&lt;p&gt;So the buttons provide tuned voltages to the VCO, which makes sound that’s amplified by a simple headphone amplifier, and that’s sent to the speaker. A switched potentiometer plays dual roles of setting the volume and turning the machine on and off, and a thick 10mm LED makes sure the user knows when it’s on.&lt;/p&gt;
&lt;p&gt;The PCBs were professionally fabricated by a third-party service, but the rest of the circuitry is on &lt;a href=&quot;https://en.wikipedia.org/wiki/Perfboard&quot;&gt;perforated board&lt;/a&gt;. Thus the discrepancy in board color and style.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/side-speaker.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/side-speaker-1200.jpg&quot; alt=&quot;The rest of the electronics&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(One problem I didn’t totally figure out for this project is what I’ve learned is called “VCO frequency pulling/pushing”: changing the volume inadvertently changes voltages and consequently shifts frequencies, making the instrument subtly musically inaccurate.)&lt;/small&gt;&lt;/p&gt;
&lt;h2 id=&quot;enclosure&quot; tabindex=&quot;-1&quot;&gt;Enclosure&lt;/h2&gt;
&lt;p&gt;The store-bought box enclosure gets the job done but is a glaring concession in what would otherwise be an entirely custom piece of work.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/enclosure-speaker-hinge.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/enclosure-speaker-hinge-1200.jpg&quot; alt=&quot;Enclosure hardware detail&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lessons here:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Light wood is easy to cut but is too brittle and breaks too easily. It just feels cheap.&lt;/li&gt;
&lt;li&gt;Too many holes (most noticeably, the giant window for the key overlays) make for a lousy speaker cabinet. Even if the speaker were better, there’d still be no low end&lt;/li&gt;
&lt;li&gt;I wanted the volume knob to have a flush exposed height with the LED, so it’s not mounted to the enclosure like I’d typically do. Instead, it’s mounted to the circuit board and the enclosure top has a knob-sized hole to fit over top. This makes the hinged lid difficult to close&lt;/li&gt;
&lt;li&gt;Designing my own hinges really felt like reinventing the wheel, but that’s okay!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Down the line, I’d like to make my own enclosures. Not yet though.&lt;/p&gt;
&lt;h2 id=&quot;getting-3d&quot; tabindex=&quot;-1&quot;&gt;Getting 3D&lt;/h2&gt;
&lt;p&gt;I had to model the key overlays, PCB supports, speaker grill, and enclosure hinges, so I might as well throw them all together.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/hello-f0/feather-assembly.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/hello-f0/feather-assembly.gif&quot; alt=&quot;Assembling the F0 in 3D&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A cool side effect of having the full instrument as a 3D model is that I can use it to make a &lt;a href=&quot;https://www.instagram.com/p/BTCZmxCFK0C/&quot;&gt;stencil&lt;/a&gt; for cutting holes on the real enclosure.&lt;/p&gt;
&lt;h2 id=&quot;what-does-it-sound-like%3F!&quot; tabindex=&quot;-1&quot;&gt;What does it sound like?!&lt;/h2&gt;
&lt;p&gt;Here’s a video of the F0 getting tuned up and playing a haphazard blues scale.&lt;/p&gt;
&lt;iframe src=&quot;https://player.vimeo.com/video/216404721&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/216404721&quot;&gt;Hello, F0&lt;/a&gt;
&lt;p&gt;In the end, given the F0 is an MVP w ith limited musical use, I don’t think I’ll try to sell it and will instead keep it around for reference and plunking. It’s got its imperfections, but I’m pretty happy with how it came out.&lt;/p&gt;
&lt;p&gt;Stay tuned for more!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Animation Easing in OpenSCAD</title>
		<link href="https://blog.tommy.sh/posts/animation-easing-in-openscad/"/>
		<updated>Sun, 14 May 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/animation-easing-in-openscad/</id>
		<content type="html">&lt;p&gt;OpenSCAD provides a &lt;code&gt;&lt;a href=&quot;https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/The_OpenSCAD_User_Interface#Animation&quot;&gt;$t&lt;/a&gt;&lt;/code&gt; variable as a representation of the animation’s progress. It starts at 0, increases to 1, and immediately loops back to 0. The movement is called linear because each step is equal across the timeline.&lt;/p&gt;
&lt;p&gt;Things in real life, however, hardly ever move exactly linearly. Consider a bouncing ball or a felled tree or your swaying arms as you walk. Gravity accelerates each, increasing its speed as it falls; if it comes back up, like the ball or a swaying arm, it decelerates to zero velocity at the apex when the cycle repeats.&lt;/p&gt;
&lt;p&gt;Motion designers call the math of how an object moves between two states an &lt;a href=&quot;https://medium.com/motion-in-interaction/animation-principles-in-ui-design-understanding-easing-bea05243fe3&quot;&gt;easing function&lt;/a&gt;. I won&#39;t pretend to fully understand how they all work mathematically, but I luckily don&#39;t have to; because their definitions don’t change across different programming languages, porting from one to another is relatively straightforward.&lt;/p&gt;
&lt;h2 id=&quot;demo&quot; tabindex=&quot;-1&quot;&gt;Demo&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/animation-easing-in-openscad/animation-easing-functions.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/animation-easing-in-openscad/animation-easing-functions.gif&quot; alt=&quot;Animation easing functions&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;code&quot; tabindex=&quot;-1&quot;&gt;Code&lt;/h2&gt;
&lt;script src=&quot;https://gist.github.com/rocktronica/d4d9fb71773bde1d9a2cacf8be4c06b6.js?file=easing-functions.scad&quot;&gt;&lt;/script&gt;
&lt;p&gt;&lt;small&gt;(Demo code available &lt;a href=&quot;https://gist.github.com/rocktronica/d4d9fb71773bde1d9a2cacf8be4c06b6&quot;&gt;here&lt;/a&gt;. Based on &lt;a href=&quot;http://gizma.com/easing/&quot;&gt;Easing Equations&lt;/a&gt; by Robert Penner.)&lt;/small&gt;&lt;/p&gt;
&lt;h3 id=&quot;usage&quot; tabindex=&quot;-1&quot;&gt;Usage&lt;/h3&gt;
&lt;p&gt;Simply include the file and wrap &lt;code&gt;$t&lt;/code&gt; in any of its functions.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;include &amp;lt;easing-functions.scad&amp;gt;;

translate([ease_in_cubic($t) * x, 0, 0]) { ... }
rotate([0, 0, 360 * ease_in_out_cubic(undulate($t)]) { ... }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Unless the starting and finishing states are identical (like cyclically rotating from 0 to 360 degrees), you’ll want a timing variable that fully goes back and forth, from 0 to 1 and back down to 0. The demo above does this by doubling the absolute distance from the midpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function undulate(t) = abs((t - .5) * 2);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/animation-easing-in-openscad/sequencer-animation.gif&quot; alt=&quot;Sequencer animation using easing&quot; /&gt;&lt;/p&gt;
&lt;p&gt;In the end, it may seem like an oxymoron to fret over realism in CAD software specifically designed more for machine parts than lifelike art, but I&#39;ve found that if it&#39;s a trivial amount of effort to make any artificial thing more believable as a &lt;em&gt;real thing&lt;/em&gt;, it&#39;s worth it.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Chord Synth</title>
		<link href="https://blog.tommy.sh/posts/chord-synth/"/>
		<updated>Tue, 23 May 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/chord-synth/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/outside_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/outside_finished-1200.jpg&quot; alt=&quot;Chord Synth&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Inspired by a chord organ I had in high school, my &#39;chord synth&#39; is a lo-fi analog interpretation with twelve oscillators, sixteen chords, and a wild jungle of routing jumper wires.&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;organization&quot; tabindex=&quot;-1&quot;&gt;Organization&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/modules_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/modules_finished-1200.jpg&quot; alt=&quot;Boards&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The internals try to follow the &lt;a href=&quot;https://en.wikipedia.org/wiki/Single_responsibility_principle&quot;&gt;principle of single responsibility&lt;/a&gt;. Counter-clockwise from top-left in the photo:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#board-1-oscillators&quot;&gt;&lt;strong&gt;An oscillator board&lt;/strong&gt;&lt;/a&gt; for the notes&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#board-2-buttons&quot;&gt;&lt;strong&gt;A buttons board&lt;/strong&gt;&lt;/a&gt; for user input&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#board-3-router&quot;&gt;&lt;strong&gt;A router&lt;/strong&gt;&lt;/a&gt; for connecting each button to its three notes&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#board-4-chassis&quot;&gt;&lt;strong&gt;A &amp;quot;chassis&amp;quot; board&lt;/strong&gt;&lt;/a&gt; for the amplifier and its volume, battery, and other components that are connected directly to the cigar box&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Each board has input and output header pins and is connected to its siblings with &lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/ribbon_cable.jpg&quot;&gt;ribbon cable&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;board-1%3A-oscillators&quot; tabindex=&quot;-1&quot;&gt;&lt;a id=&quot;board-1-oscillators&quot;&gt;Board 1: Oscillators&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Oscillation is &amp;quot;movement back and forth at a regular speed&amp;quot;. In electronic circuits, that movement is of a voltage, and tuning its timing and applying it to a speaker results in an audible frequency: a note!&lt;/p&gt;
&lt;p&gt;So the heart of the this instrument is twelve oscillators, one for each note in a complete octave starting at &lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#footnote-0&quot;&gt;C#&lt;/a&gt;: C#, D, D#, E, F, F#, G, G#, A, A#, B, C&lt;/p&gt;
&lt;p&gt;Why so many, instead of just one? The answer is &lt;a href=&quot;https://en.wikipedia.org/wiki/Polyphony&quot;&gt;polyphony&lt;/a&gt;: with one circuit per note, each can be played at the same time. Obviously, since a chord is comprised of multiple notes, a monophonic (one note at a time) solution wouldn&#39;t do.&lt;/p&gt;
&lt;h4 id=&quot;oscillator-circuit&quot; tabindex=&quot;-1&quot;&gt;Oscillator circuit&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/oscillators_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/oscillators_finished-1200.jpg&quot; alt=&quot;Oscillators&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Borrowed from an 80s toy called the &lt;a href=&quot;http://makezine.com/projects/make-38-cameras-and-av/magicalmusical/&quot;&gt;Magical Musical Thing&lt;/a&gt;, each oscillator circuit is based around a CD4049 Hex Inverter.&lt;/p&gt;
&lt;p&gt;Like its name implies, the CD4049 has six inverting logic gates. If you give it a positive voltage (aka 1), it returns ground (aka 0); give it 0 and it returns 1. If you daisy-chain an odd number of inverters, they loop forever and make what&#39;s called a &lt;a href=&quot;https://en.wikipedia.org/wiki/Ring_oscillator&quot;&gt;ring oscillator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The board rigs up 12 of these:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Power for each CD4049 is provided by the red wires, which are connected by ribbon cable to the router board&lt;/li&gt;
&lt;li&gt;Three of the 6 inverters on the CD4049 make a square wave, tuned by a 5k trimming potentiometer and a fixed capacitor&lt;/li&gt;
&lt;li&gt;The other three inverters make a &lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth/#footnote-1&quot;&gt;simple amplifier&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;When any oscillator is on, its output is summed through a mixing resistor to a common output in the green wire&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;i%2Fo&quot; tabindex=&quot;-1&quot;&gt;I/O&lt;/h4&gt;
&lt;p&gt;(from left to right)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;12:&lt;/strong&gt; discrete powers from router&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2:&lt;/strong&gt; summed oscillators, ground&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;board-2%3A-buttons&quot; tabindex=&quot;-1&quot;&gt;&lt;a id=&quot;board-2-buttons&quot;&gt;Board 2: Buttons&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;inside-and-i%2Fo&quot; tabindex=&quot;-1&quot;&gt;Inside and I/O&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/buttons_inside_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/buttons_inside_finished-1200.jpg&quot; alt=&quot;Buttons, inside&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The buttons are DPDT, Double Pole Double Throw. One pair connects power to an output pin for the router. The other connects power to a &amp;quot;playing&amp;quot; status LED.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;3:&lt;/strong&gt; power, ground, &amp;quot;playing status&amp;quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;16:&lt;/strong&gt; chords to router&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;outside&quot; tabindex=&quot;-1&quot;&gt;Outside&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/button_overlays_outside_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/button_overlays_outside_finished-1200.jpg&quot; alt=&quot;Button overlays, outside&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The buttons are pressed indirectly by means of overlays: cut, sanded, and painted dowels loosely fastened to the chassis by &lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/button_overlays_inside_finished.jpg&quot;&gt;rubber band&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&quot;aside-%231%3A-practicality&quot; tabindex=&quot;-1&quot;&gt;Aside #1: Practicality&lt;/h4&gt;
&lt;p&gt;The twelve notes generated by the oscillator board can be exhaustively combined to play all possible chords, but for simplicity I pared the options down to just the chord progressions of the keys that I like to play in:&lt;/p&gt;
&lt;table&gt;
    &lt;colgroup&gt;
        &lt;col /&gt;
        &lt;col /&gt;
        &lt;col /&gt;
        &lt;col /&gt;
        &lt;col /&gt;
        &lt;col /&gt;
    &lt;/colgroup&gt;
    &lt;thead&gt;
        &lt;tr&gt;
        	&lt;th&gt;I&lt;/th&gt;
        	&lt;th&gt;ii&lt;/th&gt;
        	&lt;th&gt;iii&lt;/th&gt;
        	&lt;th&gt;IV&lt;/th&gt;
        	&lt;th&gt;V&lt;/th&gt;
        	&lt;th&gt;vi&lt;/th&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
        	&lt;td&gt;&lt;strong&gt;C Major&lt;/strong&gt;&lt;/td&gt;
        	&lt;td&gt;Dm&lt;/td&gt;
        	&lt;td&gt;Em&lt;/td&gt;
        	&lt;td&gt;F&lt;/td&gt;
        	&lt;td&gt;G&lt;/td&gt;
        	&lt;td&gt;Am&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        	&lt;td&gt;&lt;strong&gt;D Major&lt;/strong&gt;&lt;/td&gt;
        	&lt;td&gt;Em&lt;/td&gt;
        	&lt;td&gt;F#m&lt;/td&gt;
        	&lt;td&gt;G&lt;/td&gt;
        	&lt;td&gt;A&lt;/td&gt;
        	&lt;td&gt;Bm&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        	&lt;td&gt;&lt;strong&gt;E Major&lt;/strong&gt;&lt;/td&gt;
        	&lt;td&gt;F#m&lt;/td&gt;
        	&lt;td&gt;G#m&amp;#42;&lt;/td&gt;
        	&lt;td&gt;A&lt;/td&gt;
        	&lt;td&gt;B&lt;/td&gt;
        	&lt;td&gt;C#m&amp;#42;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        	&lt;td&gt;&lt;strong&gt;G Major&lt;/strong&gt;&lt;/td&gt;
        	&lt;td&gt;Am&lt;/td&gt;
        	&lt;td&gt;Bm&lt;/td&gt;
        	&lt;td&gt;C&lt;/td&gt;
        	&lt;td&gt;D&lt;/td&gt;
        	&lt;td&gt;Em&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
        	&lt;td&gt;&lt;strong&gt;A Major&lt;/strong&gt;&lt;/td&gt;
        	&lt;td&gt;Bm&lt;/td&gt;
        	&lt;td&gt;Em&lt;/td&gt;
        	&lt;td&gt;D&lt;/td&gt;
        	&lt;td&gt;E&lt;/td&gt;
        	&lt;td&gt;F#m&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;small&gt;( Asterisks denote casualties of scarcity. :( )&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;That sums to 16 chords via 16 buttons: C, D, E, F, F#, G, A, B; with rows for major and minor versions.&lt;/p&gt;
&lt;h4 id=&quot;aside-%232%3A-technicality&quot; tabindex=&quot;-1&quot;&gt;Aside #2: Technicality&lt;/h4&gt;
&lt;p&gt;Musicians will object that each chord is not necessarily in &lt;a href=&quot;https://en.wikipedia.org/wiki/Inversion_(music)#Chords&quot;&gt;root position&lt;/a&gt; -- the chord triad notes of root, third, and fifth will be arranged arbitrarily, depending on oscillator availability. For example, its C Major&#39;s notes go E (third), G (fifth), and then C (root).&lt;/p&gt;
&lt;p&gt;Because satisfying the desire for each chord to always have its root be the lowest note would increase the oscillators required from 12 to 20, I found it was an easily allowable quirk of the instrument to not have &amp;quot;nice&amp;quot; chords and to instead enforce its own inversions.&lt;/p&gt;
&lt;h3 id=&quot;board-3%3A-router&quot; tabindex=&quot;-1&quot;&gt;&lt;a id=&quot;board-3-router&quot;&gt;Board 3: Router&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/router_inside_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/router_inside_finished-1200.jpg&quot; alt=&quot;Router&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This was a crazy thing to make and looks like spaghetti, but all it really does is connect power from the buttons to the oscillators.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The ribbon cable at the top is from the buttons board. Each of its pins represents one chord and will carry voltage if the user presses its respective button.&lt;/li&gt;
&lt;li&gt;That pin&#39;s voltage is split across three diodes to prevent bleed and fed into a horizontal 3-pin female header.&lt;/li&gt;
&lt;li&gt;From there, color-coded jumper wires connect one-way power...
&lt;ul&gt;
&lt;li&gt;Black wire = root&lt;/li&gt;
&lt;li&gt;Green wire = third&lt;/li&gt;
&lt;li&gt;Red wire = fifth&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;...to a vertical 6-pin female header, which serves as a collecting power bus for each oscillator.&lt;/li&gt;
&lt;li&gt;And the ribbon cable at the bottom takes that power to the oscillator board.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;i%2Fo-1&quot; tabindex=&quot;-1&quot;&gt;I/O&lt;/h4&gt;
&lt;p&gt;(from top to bottom)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;16:&lt;/strong&gt; power from button board&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(internal) 3 * 16:&lt;/strong&gt; button -&amp;gt; chord&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(internal) 6 * 8:&lt;/strong&gt; chord -&amp;gt; oscillators&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;12:&lt;/strong&gt; power to oscillator board&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;board-4%3A-chassis&quot; tabindex=&quot;-1&quot;&gt;&lt;a id=&quot;board-4-chassis&quot;&gt;Board 4: Chassis&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/amp_battery_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/chord-synth/amp_battery_finished-1200.jpg&quot; alt=&quot;Amp and battery&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Okay, so this one isn&#39;t exactly observing the single responsibility principle, but I found it helpful to lump them all together: anything that the other boards aren&#39;t doing, this one should do. This meant that this board was the arbiter for power, ground, and anything directly attached to the chassis.&lt;/p&gt;
&lt;p&gt;On the left, a simple LM386 amplifier makes things loud for the speaker (not pictured) or the mono 1/4&amp;quot; jack. When a cable&#39;s plugged into the jack, it conveniently switches off the built-in speaker.&lt;/p&gt;
&lt;p&gt;On the right, 9 volts are supplied with the built-in battery or with a &amp;quot;wall wart&amp;quot; -- 9v is the voltage of most guitar pedals so adapters are super common.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/chord-synth/power_volume_inside.jpg&quot;&gt;Fastened to the lid&lt;/a&gt;, a 10k potentiometer with switch does double duty of setting volume and toggling power and two LEDs indicate statuses for &amp;quot;On&amp;quot; and &amp;quot;Playing&amp;quot; (from the buttons board).&lt;/p&gt;
&lt;h4 id=&quot;i%2Fo-2&quot; tabindex=&quot;-1&quot;&gt;I/O&lt;/h4&gt;
&lt;p&gt;(clockwise from top left; direct = connected directly to board without headers)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;(direct) 2:&lt;/strong&gt; audio output and ground to jack/speaker&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(direct) 2:&lt;/strong&gt; power (via switch on volume potentiometer) and ground&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;(direct) 3:&lt;/strong&gt; &amp;quot;on&amp;quot; LED power, &amp;quot;playing&amp;quot; LED power, and ground&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3:&lt;/strong&gt; power to, ground to, and &amp;quot;playing&amp;quot; status from buttons board&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2:&lt;/strong&gt; ground to and summed output from oscillator board&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;final-product&quot; tabindex=&quot;-1&quot;&gt;Final product&lt;/h2&gt;
&lt;iframe src=&quot;https://player.vimeo.com/video/218830057&quot; width=&quot;640&quot; height=&quot;640&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/218830057&quot;&gt;Chord Synth&lt;/a&gt;
&lt;hr /&gt;
&lt;h3 id=&quot;footnotes&quot; tabindex=&quot;-1&quot;&gt;Footnotes&lt;/h3&gt;
&lt;p&gt;&lt;a id=&quot;footnote-0&quot;&gt;0:&lt;/a&gt;&lt;br /&gt;
C# was an accident. It was just the lowest note I could get with the components I had on hand.&lt;/p&gt;
&lt;p&gt;&lt;a id=&quot;footnote-1&quot;&gt;1:&lt;/a&gt;&lt;br /&gt;
Admittedly, because I&#39;m amplifying the summed output later, I could have had each chip serve as two oscillators. In practice, I didn&#39;t like the layout and having one chip per oscillator was a simpler mental model for me to wire up.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Early Experiments With 3D Printed Light Pipes</title>
		<link href="https://blog.tommy.sh/posts/early-experiments-with-3d-printed-light-pipes/"/>
		<updated>Sun, 04 Jun 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/early-experiments-with-3d-printed-light-pipes/</id>
		<content type="html">&lt;p&gt;One of the problems with my &lt;a href=&quot;https://blog.tommy.sh/posts/hello-f0&quot;&gt;F0 synth&lt;/a&gt; was its power indicator LED. It was so bright, you basically couldn’t look at it straight on without being blinded!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/ow-my-eyes.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/ow-my-eyes-1200.jpg&quot; alt=&quot;Ow, my eyes!&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(Ow, my eyes!)&lt;/p&gt;
&lt;p&gt;There are a couple solutions to an overly bright LED, the obvious being to limit its supplied voltage, but another idea is to use a light pipe: a component that redirects light from one place to another.&lt;/p&gt;
&lt;p&gt;Additionally and importantly, it can act as a sort of lampshade, diffusing a concentrated bright bulb over a larger surface area.&lt;/p&gt;
&lt;p&gt;But what are the ideal dimensions for something like that?&lt;/p&gt;
&lt;h2 id=&quot;making-the-light-pipe-model&quot; tabindex=&quot;-1&quot;&gt;Making the light pipe model&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/model-cross-section.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/model-cross-section.gif&quot; alt=&quot;Model cross section&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My light pipe test model is essentially a cube with a hole in the bottom, except:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The hole is an exact negative of the LED, including its domed top and base lip. The fidelity ensures maximum contact between the light source and the diffusion medium&lt;/li&gt;
&lt;li&gt;I left out any tolerance or “wiggle room” that you’d normally add/remove to address natural inaccuracies from the filament extrusion process. It’s an intentionally snug fit.&lt;/li&gt;
&lt;li&gt;An inner chamfer on the LED cutout slopes out at the bottom to make initial component insertion easier and forgives something called &lt;a href=&quot;https://all3dp.com/1/common-3d-printing-problems-troubleshooting-3d-printer-issues/#elephant-foot&quot;&gt;“elephant foot,”&lt;/a&gt; where the bottom layers of a 3D print flare outwards due to the weight of the print on the printer’s heated bed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The LED I’m using is a &lt;a href=&quot;https://smile.amazon.com/uxcell-Common-Cathode-Emitting-Diodes/dp/B005VMDROS&quot;&gt;clear 5mm RGB LED&lt;/a&gt;, always positioned at the bottom of the cube, regardless of the cube’s height.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/led.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/led-1200.jpg&quot; alt=&quot;LED&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;spanning-the-gamut&quot; tabindex=&quot;-1&quot;&gt;Spanning the gamut&lt;/h2&gt;
&lt;p&gt;The LED measured 5mm wide by 8.7mm tall and each test model is a perfect cube with equal height/width/length, so it’s important to note that the top and side of each cube don’t have the same distance from the LED.&lt;/p&gt;
&lt;table&gt;
    &lt;thead&gt;
        &lt;tr&gt;
            &lt;td&gt;Cube width/length/height&lt;/td&gt;
            &lt;td&gt;Ceiling depth from LED&lt;/td&gt;
            &lt;td&gt;Side wall depth from LED&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
        &lt;tr&gt;&lt;td&gt;9.7&lt;/td&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;4.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;11.7&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;6.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;13.7&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;8.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;15.7&lt;/td&gt;&lt;td&gt;7&lt;/td&gt;&lt;td&gt;10.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;17.7&lt;/td&gt;&lt;td&gt;9&lt;/td&gt;&lt;td&gt;12.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;19.7&lt;/td&gt;&lt;td&gt;11&lt;/td&gt;&lt;td&gt;14.7&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt;21.7&lt;/td&gt;&lt;td&gt;13&lt;/td&gt;&lt;td&gt;16.7&lt;/td&gt;&lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/gamut-dimensions.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/gamut-dimensions.png&quot; alt=&quot;LED&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For easier testing, I let each cube touch its neighbor(s). This probably has some effect on light dispersion, but it’s got to be nominal.&lt;/p&gt;
&lt;h2 id=&quot;print-settings&quot; tabindex=&quot;-1&quot;&gt;Print settings&lt;/h2&gt;
&lt;p&gt;Most 3D prints aren’t completely solid but instead have a kind of honeycomb internal pattern, called an infill, to increase print time and minimize waste.&lt;/p&gt;
&lt;p&gt;However, initial fit tests at the default 20% infill cast visible (albeit interesting!) inner shadows on the print’s walls. Solidifying infill to 100% removed those shadows and made distribution more even.&lt;/p&gt;
&lt;p&gt;Here’s 20% infill on the left and 100% on the right:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/infill-test.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/infill-test-1200.jpg&quot; alt=&quot;20% infill vs 100%&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The filament I’m using is &lt;a href=&quot;https://smile.amazon.com/gp/product/B00MB3CV6K/ref=oh_aui_detailpage_o00_s00&quot;&gt;3D Solutech’s Natural Clear PLA&lt;/a&gt;, chosen for Amazon Prime availability and it being made in the US.&lt;/p&gt;
&lt;h2 id=&quot;final-result&quot; tabindex=&quot;-1&quot;&gt;Final result&lt;/h2&gt;
&lt;p&gt;Hard to resist making a little sequencer with a 555 timer and 4017 decade counter:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/gamut-60.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/gamut-60.gif&quot; alt=&quot;Gamut lit as sequence&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All together now:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit-1200.jpg&quot; alt=&quot;Lit gamut&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And final detail shots, adjusted for brightness:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit-angle.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit-angle-1200.jpg&quot; alt=&quot;Lit angle&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit-top.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/early-experiments-with-3d-printed-light-pipes/lit-top-1200.jpg&quot; alt=&quot;Lit top&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;observations&quot; tabindex=&quot;-1&quot;&gt;Observations&lt;/h2&gt;
&lt;p&gt;None of the cubes had perfectly even lighting. The third (13.7mm) through fifth (17.7) presented the fairest compromises.&lt;/p&gt;
&lt;p&gt;Other circumstance-specific observations and takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Topside LED diffusion starts to get even at a top depth around 7mm but develops a kind of radial gradient around 11mm.
&lt;ul&gt;
&lt;li&gt;An even top needs a 7-11mm ceiling. Ceilings deeper than that result in reduced and increasingly unevenly distributed light&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The LED doesn’t push much sideways light from its base, as evidenced by the dark blotches at the bottom of each cube across the series
&lt;ul&gt;
&lt;li&gt;The LED could be brought out a couple millimeters if this part of the pipe must be well lit&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;There isn’t much diagonal light either, as evidenced in the darkened top side corners from the third cube (13.7mm) model and onward&lt;/li&gt;
&lt;li&gt;Those darkened top side corners start to creep down on the 17.7 cube and onward
&lt;ul&gt;
&lt;li&gt;If the light pipe is anything but a cylinder, its width/length shouldn’t extend farther than 17.7, especially if it needs to be tall&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://www.fictiv.com/hwg/fabricate/how-to-3d-print-light-pipes&quot;&gt;Further reading abounds&lt;/a&gt;, as do other variables I could tweak in future tests:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Filament / printer&lt;/li&gt;
&lt;li&gt;LED selection&lt;/li&gt;
&lt;li&gt;Fit / tolerance&lt;/li&gt;
&lt;li&gt;Infill vs wall thicknesses&lt;/li&gt;
&lt;li&gt;Finishing, sanding, or other finishing processes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But, for now, I feel like I know enough to be dangerous.&lt;/p&gt;
&lt;p&gt;(Dangerous with light pipes!)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Uploading to OctoPrint by Command Line</title>
		<link href="https://blog.tommy.sh/posts/uploading-to-octoprint-by-command-line/"/>
		<updated>Tue, 20 Jun 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/uploading-to-octoprint-by-command-line/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://octoprint.org/&quot;&gt;OctoPrint&lt;/a&gt; is a web interface for 3D printers, letting you manage prints and monitor progress without a constant USB connection between the printer and your computer. It is a lovely piece of software and I happily support it on &lt;a href=&quot;https://www.patreon.com/foosel&quot;&gt;Patreon&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But, for reasons I don’t entirely understand and despite &lt;a href=&quot;https://github.com/foosel/OctoPrint/issues/455&quot;&gt;conversation to the contrary&lt;/a&gt;, uploading large files (1mb+) through the normal drag-and-drop interface routinely fails, crashing the Raspberry Pi it runs on and requiring a hard unplug-and-replug reboot.&lt;/p&gt;
&lt;p&gt;One workaround is to manually upload the file with &lt;a href=&quot;https://linux.die.net/man/1/scp&quot;&gt;scp&lt;/a&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;scp ~/path/to/your/file.gcode pi@octopi.local:~/.octoprint/uploads
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because I have to do that so often and can’t memorize the incantation, I wrote a wrapper bash script to help. It additionally limits the bandwidth speed to avoid stalling, compresses to speed things up, and temporarily stops the OctoPrint server to free up the Pi’s memory.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/rocktronica/7fa8865a643476b4e049c61992684b14.js&quot;&gt;&lt;/script&gt;
&lt;h2 id=&quot;usage&quot; tabindex=&quot;-1&quot;&gt;Usage&lt;/h2&gt;
&lt;p&gt;Those configuration variables should be fine defaults for default setups; adjust to suit your needs. Then run like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sh upload_to_octoprint.sh ~/path/to/your/file.gcode
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;https://asciinema.org/a/udqYfel4jNhycAo8zuZT4NxC1&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/uploading-to-octoprint-by-command-line/asciinema.png&quot; alt=&quot;asciicast&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;known-issues&quot; tabindex=&quot;-1&quot;&gt;Known issues&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;OctoPrint sanitizes filenames when uploading via GUI but doesn’t for manual uploads. As such, files with spaces in their names won’t show up. A more resilient script would do its own sanitation or, better yet, loudly fail&lt;/li&gt;
&lt;li&gt;If any SSH connection fails, it should immediately quit instead of blindly continuing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Still, pretty handy.&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Designing Potentiometer Knobs</title>
		<link href="https://blog.tommy.sh/posts/designing-potentiometer-knobs/"/>
		<updated>Tue, 25 Jul 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/designing-potentiometer-knobs/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-etc.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-etc-1200.jpg&quot; alt=&quot;An assortment of 3D-printed potentiometer knobs&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Who needs to buy new potentiometer knobs when you can make your own? Armed with patience, calipers, and a 3D printer, this is quite doable. (Note: this advice will also apply to rotary switches and encoders!)&lt;/p&gt;
&lt;h2 id=&quot;different-knobs-for-different-potentiometer-shafts&quot; tabindex=&quot;-1&quot;&gt;Different knobs for different potentiometer shafts&lt;/h2&gt;
&lt;p&gt;A well-fit knob matches a potentiometer (affectionately referred to as “pot”) and its shaft. Thankfully, there are only a handful of types:&lt;/p&gt;
&lt;table class=&quot;potentiometer-shaft-types&quot;&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-splined.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-splined-600.jpg&quot; alt=&quot;Splined / knurled shaft potentiometer&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;td&gt;&lt;strong&gt;Splined / Knurled&lt;/strong&gt;&lt;br /&gt;This type of pot has vertical grooves lining the outside of its shaft. These ensure a solid grip with whatever’s mounted to it.&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-plain.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-plain-600.jpg&quot; alt=&quot;Plain / solid shaft potentiometer&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;td&gt;&lt;strong&gt;Plain / Solid&lt;/strong&gt;&lt;br /&gt;No features on this type, just a clean cylinder.&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr&gt;
		&lt;td&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-flatted.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/pot-flatted-600.jpg&quot; alt=&quot;Flatted / &#39;D&#39; shaft potentiometer&quot; /&gt;&lt;/a&gt;&lt;/td&gt;
		&lt;td&gt;&lt;strong&gt;Flatted / “D Shaft”&lt;/strong&gt;&lt;br /&gt;These are like the plain shafts but have a cutout. When viewed from the top, they make a “D” shape.&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;Why would anybody even want to &amp;quot;reinvent the wheel&amp;quot; when commercial potentiometer knobs are &lt;a href=&quot;https://www.ebay.com/b/Potentiometer-Knobs/58163/bn_7684862&quot;&gt;plentiful and readily available&lt;/a&gt;?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Control uniformity&lt;/strong&gt;&lt;br /&gt;
A project may use different types of pots side-by-side, each with different dimensions or shaft types, and fitting store-bought knobs may not match. By making knobs that internally match different specifications but have identical outward appearances, you can abstract away the underlying technical differences and have a consistent interface for the user.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom position markings&lt;/strong&gt;&lt;br /&gt;
I recently made an instrument with D shaft pots, all mounted at odd angles to the enclosure, and I wanted their “0” positions to point in a way that my store-bought knobs wouldn’t allow. By making my own, I was able to have a custom rotation degree that wouldn&#39;t otherwise be possible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And, of course, there’s always “it’s fun to understand how things work by making them”, which is usually the only excuse that I need.&lt;/p&gt;
&lt;h3 id=&quot;basic-design&quot; tabindex=&quot;-1&quot;&gt;Basic design&lt;/h3&gt;
&lt;p&gt;The simplest theoretical potentiometer knob is 1) a body with 2) a cavity for the shaft and 3) some way to mark position.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-basic.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-basic.png&quot; alt=&quot;The simplest possible potentiometer knob CAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All the following examples fit that basic archetype but improve upon it to suit their respective shaft types.&lt;/p&gt;
&lt;h3 id=&quot;splined&quot; tabindex=&quot;-1&quot;&gt;Splined&lt;/h3&gt;
&lt;p&gt;The splines on these shafts need something to hold onto. Supply that with “shims”, thin strips of sacrificial material that wedge between the splines to hold the knob in place.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-splined.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-splined.png&quot; alt=&quot;Splined shaft potentiometer knob CAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With enough shims, you can effectively make a negative model of the pot shaft and its splines, but an odd handful is more than sufficient and resilient to different spline counts.&lt;/p&gt;
&lt;p&gt;One caveat about this approach is that the shims will wear out as its moved to different pots or reapplied to new rotation degrees.&lt;/p&gt;
&lt;h3 id=&quot;plain&quot; tabindex=&quot;-1&quot;&gt;Plain&lt;/h3&gt;
&lt;p&gt;Without something to hold onto, the shims from above won’t work as well here.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-tension_screw.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-tension_screw.png&quot; alt=&quot;Plain shaft potentiometer knob CAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Instead, loosen the inner fit but tighten externally with a machine screw and &lt;a href=&quot;https://www.fastenal.com/products/details/11125984&quot;&gt;threaded insert&lt;/a&gt;. The inserts I used were made specifically for thermoplastic, and assembly is as simple as pushing the insert into its cavity with the clean tip of a hot soldering iron.&lt;/p&gt;
&lt;p&gt;Unlike a typical wood screw, the machine screw has a flat end to butt against the shaft, and the insert will hold the screw without stripping the plastic, even after repeated positioning and tightening.&lt;/p&gt;
&lt;p&gt;For a flush look, if the wall is deep enough, match the insert cutout’s depth to its height and widen the remainder of the cavity to fit and hide the screw’s head. The screw will otherwise stick out, which may be a look that you like anyway.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-tension_screw.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-tension_screw-1200.jpg&quot; alt=&quot;Potentiometer knobs with tension screws: threaded inserts and machine screws&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Shims aren’t a bad idea here but aren&#39;t absolutely necessary. The tension screw is doing most of the work.&lt;/p&gt;
&lt;h3 id=&quot;flatted&quot; tabindex=&quot;-1&quot;&gt;Flatted&lt;/h3&gt;
&lt;p&gt;This one’s easy enough. You’re essentially making the negative of the &amp;quot;D&amp;quot; shaft.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-flatted.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-flatted.png&quot; alt=&quot;Flatted shaft potentiometer knob CAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The advantage of a flatted knob is that rotational force is applied directly to the shaft without fear of stripping plastic, screw, or shaft itself. Supplement tightness with shims or a tension screw.&lt;/p&gt;
&lt;h2 id=&quot;mounting-concerns&quot; tabindex=&quot;-1&quot;&gt;Mounting concerns&lt;/h2&gt;
&lt;p&gt;You’ll notice two things if you try to print one of the above examples and push it onto a pot:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Even if the inner diameter perfectly matches the shaft, it will be almost impossibly tight when you first put it on. Counteract that with a 45° entrance slope called a chamfer. I used this same technique for &lt;a href=&quot;https://blog.tommy.sh/posts/early-experiments-with-3d-printed-light-pipes&quot;&gt;LED light pipes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Depending on how it’s mounted, there can about a ¼” of vertical space from the pot’s fastening washer and nut below the knob, making it look like it isn’t pushed on all the way. If the knob is wide enough, you can get rid of that vertical space by providing a recess cavity for the mounting hardware.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-recess_chamfer.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/cad-recess_chamfer.png&quot; alt=&quot;Potentiometer knob with bottom recess and chamfer CAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;marking-position&quot; tabindex=&quot;-1&quot;&gt;Marking position&lt;/h2&gt;
&lt;p&gt;With the fit snug and securely tightened, the only remaining requirement for a pot knob is to let the user know how “turned” the pot is. I do this with a simple bar in a contrasting color.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-markers.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-markers-1200.jpg&quot; alt=&quot;Potentiometer knob position markers&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And there you have it, custom potentiometer knobs!&lt;/p&gt;
&lt;p&gt;You can download the OpenSCAD &lt;code&gt;pot_knob()&lt;/code&gt; module I used for this post’s examples &lt;a href=&quot;https://gist.github.com/rocktronica/03296b011a62f017e908382a4929c86b&quot;&gt;here&lt;/a&gt;. Please let me know if you find it useful or have any questions or suggestions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-256.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/designing-potentiometer-knobs/knobs-638-128.gif&quot; alt=&quot;Custom potentiometer knobs!&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;style&gt;
section.content .custom_page .potentiometer-shaft-types {
    table-layout: auto;
}

section.content .custom_page .potentiometer-shaft-types img {
    max-width: 100%;
}

section.content .custom_page .potentiometer-shaft-types td {
    vertical-align: top;
    padding-right: 10px;
}

section.content .custom_page .potentiometer-shaft-types td:first-of-type {
     max-width: 300px;
}
&lt;/style&gt;
&lt;h2 id=&quot;updates&quot; tabindex=&quot;-1&quot;&gt;Updates&lt;/h2&gt;
&lt;h3 id=&quot;update-november-21%2C-2022&quot; tabindex=&quot;-1&quot;&gt;Update November 21, 2022&lt;/h3&gt;
&lt;p&gt;Fixed missing &lt;code&gt;standard_pot_flat_cutout&lt;/code&gt; module in the &lt;a href=&quot;https://gist.github.com/rocktronica/03296b011a62f017e908382a4929c86b&quot;&gt;knob.scad OpenSCAD code&lt;/a&gt;. Thanks for the headsup, Ross!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Quick Tip: Changing Colors on 3D Prints</title>
		<link href="https://blog.tommy.sh/posts/quick-tip-changing-colors-on-3d-prints/"/>
		<updated>Thu, 24 Aug 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/quick-tip-changing-colors-on-3d-prints/</id>
		<content type="html">&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-changing-colors-on-3d-prints/sequencer-layers.jpg&quot; alt=&quot;Some fun color changes in a recent 3D print&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Changing filament in the middle of a print is an easy way to get multi-color effects without a multi-extruder 3D printer.&lt;/p&gt;
&lt;p&gt;One way to do it is to sit by your machine and, when the moment is right, pause and change the spool.&lt;/p&gt;
&lt;p&gt;Another way is programmatic. The process varies across printers and slicing software, but for my Prusa, I use their &lt;a href=&quot;http://www.prusaprinters.org/color-print/&quot;&gt;ColorPrint&lt;/a&gt; web app. With Slic3r&#39;s layers panel open as a reference, I just put the millimeter height into ColorPrint and it injects a &amp;quot;filament change&amp;quot; command into the G-code at that specific layer.&lt;/p&gt;
&lt;p&gt;My first experiments with the technique mirrored the model&#39;s appearance; I put a filament change as soon as the next layer was supposed to be a new color. Seems logical!&lt;/p&gt;
&lt;p&gt;Using some slider knobs as an example, that meant going from 13mm (white) to 13.2mm (black).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-changing-colors-on-3d-prints/slicer-sliders-13.gif&quot; alt=&quot;13mm&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-changing-colors-on-3d-prints/slicer-sliders-13-2.gif&quot; alt=&quot;13.2&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The printer complies but with an unfortunate side effect: after the filament is changed, the nozzle returns to its last extruding position &lt;em&gt;and then&lt;/em&gt; moves wherever the new layer actually starts, leaving a trail of of accidental, oozed filament in its wake. This sticks to the previous layer and needs to be scraped or finished off, marring the surface.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-changing-colors-on-3d-prints/bad-layer-change.jpg&quot; alt=&quot;Bonded stringing on poorly changed filament&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The solution is to change the filament one layer &lt;em&gt;after&lt;/em&gt; where you would otherwise want it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The one layer of difference (.2mm, in my case) isn&#39;t aesthetically noticeable and is just enough vertical room to prevent plastic bonding from the odd positioning behavior. Any stringing is easily cut or melted away.&lt;/p&gt;
&lt;p&gt;Admittedly, this is a workaround on what has got to be a bug in ColorPrint, but it&#39;s easy and works pretty well for me.&lt;/p&gt;
&lt;p&gt;Happy filament-changing!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Quick Tip: Avoid 3D-Printed Supports with Sacrificial Bridge</title>
		<link href="https://blog.tommy.sh/posts/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/"/>
		<updated>Tue, 05 Sep 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/posts.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/posts.jpg&quot; alt=&quot;3D-printed PCB posts&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A lot of my designs have bridges with holes in them, like this post with a locking cavity for a hex nut:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/post-before.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/post-before.png&quot; alt=&quot;A post before DFM&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If printed &lt;em&gt;without&lt;/em&gt; supports, the material at the top of the cavity has nothing to sit on and falls inward if it does anything but go straight across. Not the end of the world, but really not ideal, especially for a part that needs to be perfectly calibrated.&lt;/p&gt;
&lt;p&gt;And printing &lt;em&gt;with&lt;/em&gt; supports can be counter-intuitively even messier, because the supports are hard to remove at such small dimensions and tight spaces.&lt;/p&gt;
&lt;p&gt;A cheap way to get the best of both worlds is to make your own support: a sacrificial, solid bridge over the cavity to ground the otherwise floating layers above. Here it is highlighted in red:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/post-after.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge/post-after.png&quot; alt=&quot;A post with DFM&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After printing, drill out the excess plastic or carefully melt it back with a hot soldering iron.&lt;/p&gt;
&lt;p&gt;This process of designing for easier manufacturing is called, you guessed it, &lt;a href=&quot;https://en.wikipedia.org/wiki/Design_for_manufacturability&quot;&gt;Design For Manufacturability&lt;/a&gt; or DFM for short. It can be a pretty dry subject for DIYers but there are some &lt;a href=&quot;https://www.fictiv.com/blog/posts/design-guidelines-for-prototyping-with-pla&quot;&gt;good articles&lt;/a&gt; in the right places.&lt;/p&gt;
&lt;p&gt;Easy!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>OKAY Synth</title>
		<link href="https://blog.tommy.sh/posts/okay-synth/"/>
		<updated>Wed, 27 Sep 2017 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/okay-synth/</id>
		<content type="html">&lt;p&gt;Hey! Check this out&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/235418217&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/235418217&quot;&gt;Oskitone OKAY&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It&#39;s a monophonic, analog, square-wave synthesizer, and I&#39;m calling it... OKAY!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monophonic:&lt;/strong&gt;&lt;br /&gt;
Only one note at a time can be played. This is opposed to “polyphonic,” where multiple simultaneous notes can be played.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analog:&lt;/strong&gt;&lt;br /&gt;
There are no computers, microcontrollers, sound samplers, or anything digital involved. The sound you hear is the sound of a speaker being abused by discrete electronic components like capacitors and resistors and logic chips.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Square-wave:&lt;/strong&gt;&lt;br /&gt;
When its output is viewed on an oscilloscope, its wave resembles a square. It’s a “hard” sounding wave type, great for bass lines, and commonly associated with chiptune music and old video games.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With a name like &amp;quot;OKAY&amp;quot; you might guess that functionality is intentionally limited. There’s just one octave of keys, a volume/power control, and an octave rotary switch to select from six different octaves. But what the OKAY lacks in features, it makes up for in accessibility; it uses standard, off-the-shelf electrical components and can be put together in about an afternoon.&lt;/p&gt;
&lt;h2 id=&quot;how-it&#39;s-made&quot; tabindex=&quot;-1&quot;&gt;How it&#39;s made&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/assembly.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/assembly.gif&quot; alt=&quot;OKAY assembly&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;3d-printed&quot; tabindex=&quot;-1&quot;&gt;3D Printed&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/okay-build.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/okay-build.gif&quot; alt=&quot;Build it up and tear it down&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unlike the &lt;a href=&quot;https://blog.tommy.sh/posts/hello-f0&quot;&gt;F0&lt;/a&gt; which had a store-bought box, the OKAY is entirely 3D-printed beyond its electronics. The enclosure, keys, speaker grill, and everything else were all designed in OpenSCAD and lovingly printed on a Prusa i3 MK2.&lt;/p&gt;
&lt;p&gt;The 3D models are available on &lt;a href=&quot;https://www.thingiverse.com/thing:2556995&quot;&gt;Thingiverse&lt;/a&gt; and &lt;a href=&quot;https://www.myminifactory.com/object/46203&quot;&gt;MyMiniFactory&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&quot;electronics&quot; tabindex=&quot;-1&quot;&gt;Electronics&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/open.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/open.jpg&quot; alt=&quot;Under the hood of the OKAY Synth&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Under the hood, it’s powered by an LM555 timer (astable mutlivabratory), CD4040 ripple-carry binary counter/divider (frequency divider), and an LM386 power amplifier. All are the standard circuits you&#39;ll see diagramed in their datasheets.&lt;/p&gt;
&lt;p&gt;The 555 timer chip is the heart of the OKAY and was chosen for its ubiquity. It’s well documented, well loved, and has been around forever. It’s so omnipresent that it’s hard to talk about any kind of timer circuit without somebody saying “Just use a 555!”&lt;/p&gt;
&lt;h3 id=&quot;modular-pcbs&quot; tabindex=&quot;-1&quot;&gt;Modular PCBs&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/pcbs.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/pcbs.jpg&quot; alt=&quot;OKAY&#39;s modular PCBs&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The OKAY employs a modular approach to its PCBs. Instead of one monolithic board, the instrument’s tasks are split into four smaller boards, each with their own responsibility. (I’ve used this approach in my other instruments too: &lt;a href=&quot;https://blog.tommy.sh/posts/hello-f0&quot;&gt;F0&lt;/a&gt;, &lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth&quot;&gt;Chord Synth&lt;/a&gt;, &lt;a href=&quot;https://www.instagram.com/p/BL7JwIQjtfo/&quot;&gt;POLY1&lt;/a&gt;.)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Power bus&lt;/strong&gt; &lt;em&gt;(bus 0.1.1)&lt;/em&gt;&lt;br /&gt;
Switches and distributes power from the 9v battery to the other boards and LED&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timer and divider&lt;/strong&gt; &lt;em&gt;(555_4040 0.1.1)&lt;/em&gt;&lt;br /&gt;
Oscillator and frequency divider, provides 12 octave output&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Keybed&lt;/strong&gt; &lt;em&gt;(SPST_VR 0.2.2 15)&lt;/em&gt;&lt;br /&gt;
Trimming potentiometers and pushbuttons set the 555&#39;s frequency&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amp&lt;/strong&gt; &lt;em&gt;(386 0.1.1)&lt;/em&gt;&lt;br /&gt;
Standard headphone amplifier circuit&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What that modularity loses us in assembly speed it gains us in clarity, extension, reuse, and hacking.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It’s obvious what each chip is doing, with clear input and output across the boards.&lt;/li&gt;
&lt;li&gt;Adding another octave of keys, amplifier + speaker, octave changer, or some other effect will just be adding a new PCB into the pipeline and altering the 3D model to fit. That kind of customization would be impossible if everything were on one PCB.&lt;/li&gt;
&lt;li&gt;All of the boards can be repurposed for other roles like standalone amps, metronomes, and other noise machines&lt;/li&gt;
&lt;li&gt;All boards also expose the full functionality of their circuit instead of just what’s required for the OKAY. The amp, for example, has pads to make it distort; the oscillator outputs 12 octaves even though you’ll only use 6. If you&#39;re making your own OKAY, you can hack it to do whatever you want.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;development&quot; tabindex=&quot;-1&quot;&gt;Development&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/okay-rotate-128.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/okay-rotate-128.gif&quot; alt=&quot;Rotate OKAY rotate&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The OKAY isn&#39;t just its electronics. I put &lt;em&gt;a lot&lt;/em&gt; of thought into its design:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Made to be opened&lt;/strong&gt;&lt;br /&gt;
Why pour your heart into something just to hide it away? The enclosure has beefy hinges and buckle clasps that are designed to stand heavy use. Once it&#39;s opened, the electronics are displayed with pride.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gratuitous color-changes&lt;/strong&gt;&lt;br /&gt;
I don’t have a 3D printer that can print in multiple colors, but I was able to get multiple colors on the keys, OKAY text, speaker, knobs, and control labels by &lt;a href=&quot;https://blog.tommy.sh/posts/quick-tip-changing-colors-on-3d-prints&quot;&gt;carefully changing the filament at defined places&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dovetail joints, but maybe not where you’d expect&lt;/strong&gt;&lt;br /&gt;
I tried various key mounting strategies, like &lt;a href=&quot;https://twitter.com/rocktronica/status/895080742287425536&quot;&gt;fixing them directly above the keybed PCB&lt;/a&gt; or screwing into threaded inserts, but I ended up mounting them to the enclosure&#39;s top with a &lt;a href=&quot;https://www.instagram.com/p/BYY0KqADId4/&quot;&gt;dovetail joint&lt;/a&gt;. A similar dovetailed tab holds the OKAY text in place. This minimizes gluing and speeds assembly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Screwed-in PCBs&lt;/strong&gt;&lt;br /&gt;
Early versions of the OKAY tried to glue or snap the PCBs into place, but they’d quickly come undone when I wanted to run wires under them. My solution was to &lt;a href=&quot;https://blog.tommy.sh/posts/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge&quot;&gt;hollow a nut locking cavity into each of the PCB posts&lt;/a&gt; and screw the PCBs into place.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key cantilever redesign&lt;/strong&gt;&lt;br /&gt;
The keys are basically the same as the ones I used for the F0, but I &lt;a href=&quot;https://twitter.com/oskitone/status/900507403359211521&quot;&gt;rewrote their cantilevers&lt;/a&gt; (the springy part between where it’s fixed to the enclosure and where you press down) to make them feel more stable and have a consistent resistance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a id=&quot;key-peg-plungers&quot;&gt;Peg key plungers&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
The keybed PCB&#39;s trim potentiometers are taller than its pushbuttons, so the keys can&#39;t lay directly on top like they could with the F0. Instead, &amp;quot;plungers&amp;quot; (the black cylinders you see in the photos above) descend from the keys and make up for the height difference. They&#39;re held in place by &lt;a href=&quot;https://www.instagram.com/p/BYWXvRSjOOE/&quot;&gt;snap-in pegs&lt;/a&gt; .&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom knobs&lt;/strong&gt;&lt;br /&gt;
Even though the two control knobs look the same, &lt;a href=&quot;https://blog.tommy.sh/posts/designing-potentiometer-knobs&quot;&gt;they’re individually fitted to their components&lt;/a&gt;; one fits a knurled shaft rotary switch and the other uses a tension screw on a shorter shaft potentiometer. Both mimic guitar knobs and hide their component&#39;s mounting hardware with a recessed cavity on the bottom&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Speaker mounting grill&lt;/strong&gt;&lt;br /&gt;
To keep the enclosure as small as possible, the speaker is actually mounted to the outside and held in place by its grill. Under the enclosure’s top, the nuts are locked in place by hex cavities, which reduced the required length of the screw and allowed me to use the same size throughout the whole kit.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Battery holder&lt;/strong&gt;&lt;br /&gt;
Early iterations taped the battery in place, but, by substituting for a shallower speaker, I was able to make room for a dedicated snap-in holder for the 9v battery.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;get-it-now!&quot; tabindex=&quot;-1&quot;&gt;Get it now!&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/top.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/top.jpg&quot; alt=&quot;OKAY Synth&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can purchase the OKAY right now at &lt;a href=&quot;http://www.oskitone.com/&quot;&gt;oskitone.com&lt;/a&gt;. It comes in three flavors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.oskitone.com/product/okay-synth&quot;&gt;Fully assembled&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Ready to go! Lovingly put together and tuned by yours truly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.oskitone.com/product/okay-synth-diy-kit&quot;&gt;DIY Kit, Complete Edition&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
With all electronics components, enclosure, keys, and manual included.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;http://www.oskitone.com/product/okay-synth-diy-kit&quot;&gt;DIY Kit, BYOP Edition&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
Only the electronics components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what%E2%80%99s-next%3F&quot; tabindex=&quot;-1&quot;&gt;What’s next?&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-synth/heyyy.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-synth/heyyy.gif&quot; alt=&quot;heyyy.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I hope folks like the OKAY, because there&#39;s plenty more planned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;More keys please&lt;/strong&gt;&lt;br /&gt;
Oh, this will happen! The SPST_VR PCB has mirrored output headers for daisy-chaining, and it can be trimmed to make arbitrary key counts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Polyphony&lt;/strong&gt;&lt;br /&gt;
I&#39;m no stranger to making &lt;a href=&quot;https://www.instagram.com/p/BL7JwIQjtfo/&quot;&gt;polyphonic&lt;/a&gt; &lt;a href=&quot;https://blog.tommy.sh/posts/chord-synth&quot;&gt;instruments&lt;/a&gt; and the OKAY won&#39;t be immune. I&#39;ve made some progress on a 6*556 12 oscillator PCB, but the board itself is big enough to require a completely different enclosure design. Expect the polyphonic to be the OKAY&#39;s older sibling!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Different colors?&lt;/strong&gt;&lt;br /&gt;
The new ones are in yellow, and I&#39;ve got a &lt;a href=&quot;http://www.oskitone.com/product/okay-synth-unbranded&quot;&gt;couple older models in blue and black&lt;/a&gt;. &lt;a href=&quot;http://www.oskitone.com/contact&quot;&gt;Contact me&lt;/a&gt; if you want to buy one in a different color. Of course, if you print it yourself, you can make it any color you like.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Different wave types&lt;/strong&gt;&lt;br /&gt;
This is easier said than done without greatly increasing the complexity and number of circuits, but I do have something planned. Stay tuned.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Effects&lt;/strong&gt;&lt;br /&gt;
Remember how the PCBs are modular? That will make it easy (well, not prohibitively difficult) to add effects like high-pass or low-pass filters, portamento pitch gliding, &lt;a href=&quot;https://www.instagram.com/p/BQybPTtFwXF/&quot;&gt;octave doubling&lt;/a&gt;, etc, without completely remaking the entire instrument&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Different text&lt;/strong&gt;&lt;br /&gt;
I don&#39;t have a way to automate this yet, but, just like the having a different color, it&#39;s of course very possible. If you&#39;re interested in getting an OKAY with different text (most 3-5 character words work just fine), &lt;a href=&quot;http://www.oskitone.com/contact&quot;&gt;contact me&lt;/a&gt; and we&#39;ll work it out.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Follow along via &lt;a href=&quot;https://www.instagram.com/oskitone/&quot;&gt;Instagram&lt;/a&gt;, &lt;a href=&quot;https://twitter.com/oskitone&quot;&gt;Twitter&lt;/a&gt;, or &lt;a href=&quot;http://www.oskitone.com/mailing-list&quot;&gt;email&lt;/a&gt; to learn when the OKAY updates. As a token of gratitude, please enjoy a video of two early model OKAYs having a duet:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/229000638&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/229000638&quot;&gt;OKAY Duet&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Making Time-lapse Videos with an iPhone by Command Line</title>
		<link href="https://blog.tommy.sh/posts/making-time-lapse-videos-with-an-iphone-by-command-line/"/>
		<updated>Mon, 01 Jan 2018 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/making-time-lapse-videos-with-an-iphone-by-command-line/</id>
		<content type="html">&lt;p&gt;Here’s how I make the time-lapse videos for my Oskitone projects. It’s certainly not for everybody, but if your phone is the best camera you own and you’re not shy of the command line, maybe it could work for you!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/making-time-lapse-videos-with-an-iphone-by-command-line/setup-big.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/making-time-lapse-videos-with-an-iphone-by-command-line/setup-big-1200.jpg&quot; alt=&quot;Example setup&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href=&quot;https://github.com/rocktronica/timelapse&quot;&gt;https://github.com/rocktronica/timelapse&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;how-it-works&quot; tabindex=&quot;-1&quot;&gt;How it works&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://itunes.apple.com/us/app/ipcamera-high-end-network/id570912928&quot;&gt;IPCamera&lt;/a&gt; app turns iPhone into a webcam, accessible on local network.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;capture.sh&lt;/code&gt; script repeatedly downloads its image. (It’s basically three lines of shell but with some nice help info.) You stop this process when you’re done capturing.&lt;/li&gt;
&lt;li&gt;A followup &lt;code&gt;compile.sh&lt;/code&gt; script uses &lt;a href=&quot;https://ffmpeg.org/ffmpeg.html&quot;&gt;ffmpeg&lt;/a&gt; to convert those images into an MP4 video for Twitter and Instagram and &lt;a href=&quot;https://www.lcdf.org/gifsicle/man.html&quot;&gt;gifsicle&lt;/a&gt; for various GIF sizes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://asciinema.org/a/gDSaVXLvGOExDgtnQBArzTSau&quot;&gt;&lt;img src=&quot;https://asciinema.org/a/gDSaVXLvGOExDgtnQBArzTSau.png&quot; alt=&quot;See it in action&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;notes-on-cameras&quot; tabindex=&quot;-1&quot;&gt;Notes on cameras&lt;/h2&gt;
&lt;h3 id=&quot;phone-cameras&quot; tabindex=&quot;-1&quot;&gt;Phone cameras&lt;/h3&gt;
&lt;p&gt;The IPCamera app starts a little server on the phone, providing a live video feed and basic camera controls with a web GUI as long as the app stays open. Inspecting its GUI from a computer’s browser, you’ll find its live video endpoint is “/live”. I emailed the author of the app and learned there’s a hidden “/photo” endpoint which returns a static JPG instead of a video stream.&lt;/p&gt;
&lt;p&gt;While I haven’t tried other apps or other phones, they ought to be similar. As long as it can provide a JPG URL, it will work.&lt;/p&gt;
&lt;h3 id=&quot;other-options&quot; tabindex=&quot;-1&quot;&gt;Other options&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/rocktronica/camcamcam&quot;&gt;Camcamcam&lt;/a&gt;: this is a wrapper I wrote around iSight and Raspberry Pi camera to take &lt;a href=&quot;https://github.com/rocktronica/feedergif&quot;&gt;GIFs of my cat eating her food&lt;/a&gt; when I&#39;m away&lt;/li&gt;
&lt;li&gt;Live public feeds: I&#39;ll let you find these!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;other-thoughts&quot; tabindex=&quot;-1&quot;&gt;Other thoughts&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rigging&lt;/strong&gt;&lt;br /&gt;
I use a gooseneck clamping phone holder, which I bolted onto a woodworking clamp when the original cheap one broke. It&#39;s scrappy but works great.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lighting, lighting, lighting&lt;/strong&gt;&lt;br /&gt;
My desk faces a large window, which makes this an easy step in non-winter months.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use the right framing&lt;/strong&gt;&lt;br /&gt;
For clearer, instructional type shots, try a high eye-level angle. For moodier shots, go tight and/or to an angle.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Editorialize&lt;/strong&gt;&lt;br /&gt;
Unless you want the output to be accurate to time, remove unnecessary shots of blurry movement or when you’ve stepped away from the work. No one will be the wiser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Removing photos&lt;/strong&gt;&lt;br /&gt;
If the delay wasn’t long enough and you want to, say, only use every other photo, you can remove them before running compile.sh. In the capture folder, try &lt;code&gt;ls | awk &#39;NR%2==0&#39; | xargs echo rm | sh&lt;/code&gt;, where 2 is n.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;examples&quot; tabindex=&quot;-1&quot;&gt;Examples&lt;/h2&gt;
&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Let&#39;s make a synth together. OKAY DIY Kits are coming soon! &lt;a href=&quot;https://t.co/GsQWnPtfb2&quot;&gt;pic.twitter.com/GsQWnPtfb2&lt;/a&gt;&lt;/p&gt;— Oskitone (@oskitone) &lt;a href=&quot;https://twitter.com/oskitone/status/911776145351127040?ref_src=twsrc%5Etfw&quot;&gt;September 24, 2017&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/218223767&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/218223767&quot;&gt;Sequencer PCB assembly timelapse&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Trying out some time-lapse PCB soldering &lt;a href=&quot;https://t.co/IPlRFFsaEI&quot;&gt;pic.twitter.com/IPlRFFsaEI&lt;/a&gt;&lt;/p&gt;— Tommy (@rocktronica) &lt;a href=&quot;https://twitter.com/rocktronica/status/851833536822689792?ref_src=twsrc%5Etfw&quot;&gt;April 11, 2017&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/248386639&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/248386639&quot;&gt;SPST_VR 0.2.2 Assembly&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;Making an instructional soldering timelapse gif and found this dumb meta timelapse gif I apparently made and kept &lt;a href=&quot;https://t.co/oGFjz4fIYf&quot;&gt;pic.twitter.com/oGFjz4fIYf&lt;/a&gt;&lt;/p&gt;— Tommy (@rocktronica) &lt;a href=&quot;https://twitter.com/rocktronica/status/943919979585351680?ref_src=twsrc%5Etfw&quot;&gt;December 21, 2017&lt;/a&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;
&lt;script async=&quot;&quot; src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;
&lt;h2 id=&quot;code&quot; tabindex=&quot;-1&quot;&gt;Code&lt;/h2&gt;
&lt;p&gt;Everything is on Github and MIT licensed. Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/rocktronica/timelapse&quot;&gt;https://github.com/rocktronica/timelapse&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>OKAY 2 Synth</title>
		<link href="https://blog.tommy.sh/posts/okay-2-synth/"/>
		<updated>Thu, 18 Jan 2018 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/okay-2-synth/</id>
		<content type="html">&lt;p&gt;The long awaited Oskitone OKAY 2 Synth is finally done and ready to share! It looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/okay-2.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/okay-2-1200.jpg&quot; alt=&quot;Oskitone OKAY 2 Synth&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And it sounds like this:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/250683009&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/250683009&quot;&gt;Oskitone OKAY 2&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just like the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-synth&quot;&gt;first OKAY Synth&lt;/a&gt;, the OKAY 2 is an analog, monophonic, square wave synthesizer. It uses the very same modular PCBs, octave and volume controls, and speaker as the OKAY 1, and all of it was designed &lt;a href=&quot;http://tommy.sh/&quot;&gt;by me&lt;/a&gt; in &lt;a href=&quot;http://www.openscad.org/&quot;&gt;OpenSCAD&lt;/a&gt; and &lt;a href=&quot;https://www.autodesk.com/products/eagle/overview&quot;&gt;EAGLE&lt;/a&gt; as usual.&lt;/p&gt;
&lt;p&gt;The biggest noticeable difference is that it now has &lt;em&gt;two octaves of keys instead of just one&lt;/em&gt;!&lt;/p&gt;
&lt;h2 id=&quot;new-features&quot; tabindex=&quot;-1&quot;&gt;New features&lt;/h2&gt;
&lt;p&gt;Of course, there are less noticeable but still important changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Completely redesigned key mounting&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/open.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/open-1200.jpg&quot; alt=&quot;OKAY 2, opened&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://images.bigcartel.com/product_images/203612090/2017-09-21+12.48.01.jpg?auto=format&amp;amp;fit=max&amp;amp;h=1000&amp;amp;w=1000&quot;&gt;OKAY 1&#39;s keys are mounted to the enclosure top&lt;/a&gt;, and its buttons are separately mounted to the enclosure bottom.&lt;/p&gt;
&lt;p&gt;More keys, however, means a wider keybed, which naturally starts to lose structural integrity as it grows -- plastic alone can only be so rigid. In the center of the instrument, the enclosure top and anything mounted to it want to &lt;em&gt;bow up and away&lt;/em&gt; from the enclosure bottom and anything mounted to it. Because piano keys effectively act as levers, that bowing unfixed the lever&#39;s &lt;em&gt;fulcrum&lt;/em&gt; (the fixed point at the back of the keys) and made playing unreliable.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;So how could I design it in such a way as to be both mechanically reliable and aesthetically/functionally accessible?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/cradle.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/cradle-1200.jpg&quot; alt=&quot;OKAY 2, opened&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The answer is to mount the keys and buttons together onto a separate &amp;quot;cradle&amp;quot; piece that nestles into the enclosure bottom. (&lt;a href=&quot;https://www.instagram.com/p/Bcp-cpJlRwe/?taken-by=oskitone&quot;&gt;Here&#39;s an instagram video of the proof of concept&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;With the removable key cradle, the tuning trimpots can be soldered to the bottom side of the PCB, which would otherwise be unreachable, obviating the OKAY 1&#39;s &lt;a href=&quot;https://blog.tommy.sh/posts/okay-synth#key-peg-plungers&quot;&gt;actuator pegs&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Key travel distance improvements&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/keys.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/keys-1200.jpg&quot; alt=&quot;OKAY 2 keys close up&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The OKAY 2&#39;s keys now have a front lip that gets held down when the enclosure is latched closed; this ensures they&#39;re as close the buttons as possible, minimizing vertical travel distance on key press. The key&#39;s back clearance has also been minimized so the keys are held down there too, especially the unlipped accidentals.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Audio out jack&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/back.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/back-1200.jpg&quot; alt=&quot;OKAY 2 1/4&amp;quot; audio jack output&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I teased a &lt;a href=&quot;https://www.instagram.com/p/BcFx7RtFTXi/?taken-by=oskitone&quot;&gt;prototype Oskitone amp&lt;/a&gt; on Instagram, but it&#39;s an awkward product to have when the flagship OKAY 1 can&#39;t hook up to it. The OKAY 2 has a dedicated 1/4&amp;quot; audio out jack, which will automatically mute the built-in speaker when something&#39;s plugged into it.&lt;/p&gt;
&lt;p&gt;After tuning a couple OKAY 2s, my ears were happier with this upgrade!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Built-in display stands&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/stand.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/stand-1200.jpg&quot; alt=&quot;OKAY 2 built-in pencil/pen stand&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wanted an easy way to display this thing on a shelf or on my desk. I considered making a separate stand and &lt;a href=&quot;https://twitter.com/rocktronica/status/929070643273875456&quot;&gt;even spent a day designing an integrated &amp;quot;kickstand&amp;quot; hinge&lt;/a&gt;, but instead I went even simpler: prop up the OKAY 2 by sticking a writing utensil into one of three angled holes on the enclosure bottom.&lt;/p&gt;
&lt;p&gt;This idea, as well as the &amp;quot;OSKITONE&amp;quot; brand engraving, were borrowed from the prototype amp linked above.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;and-un-features&quot; tabindex=&quot;-1&quot;&gt;And un-features&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/prototypes.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/prototypes-1200.jpg&quot; alt=&quot;Early OKAY 2 prototypes&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;small&gt;&lt;em&gt;Prototype builds: draft print with longer/broken(!) keys and two speakers, the same design assembled and not totally broken, and the aaalllmost final design&lt;/em&gt;&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;Dieter Rams said &amp;quot;Less, but better.&amp;quot; It wasn&#39;t always an easy decision, but here&#39;s what the OKAY 2 &lt;em&gt;doesn&#39;t&lt;/em&gt; have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Power jack&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I built a prototype unit with a 9v input power jack, the same ones &lt;a href=&quot;https://www.instagram.com/p/BbKwSm_FhpZ/?taken-by=oskitone&quot;&gt;I had for the prototype amp&lt;/a&gt; and that guitarists use with guitar pedals. It was nice to have but not imperative and increased cost, so I removed it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stereo&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I also played with the idea of having two amplifiers or two separate octaves with individual amps and speakers. It was interesting and didn&#39;t require any new PCBs, but I still scrapped it for simplicity&#39;s sake. &lt;a href=&quot;https://www.instagram.com/p/BafJpOsFT5G/?taken-by=oskitone&quot;&gt;I even scrapped having two speakers wired together&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Longer keys, different action, or other playability changes&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Remember how I said piano keys act as levers? I learned about something called mechanical advantage, which is a measure of how easy a lever&#39;s &lt;em&gt;load&lt;/em&gt; is to move relative to the &lt;em&gt;effort&lt;/em&gt; required to move it. Musicians might call this &amp;quot;action&amp;quot; or even &amp;quot;playability&amp;quot;.&lt;/p&gt;
&lt;p&gt;On one early design, I &lt;a href=&quot;https://www.instagram.com/p/BaaLUnvlB15/?taken-by=oskitone&quot;&gt;calculated and animated the keys&#39; mechanical advantage as their underlying buttons moved on the Y axis&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Pretty interesting! ... but I abandoned it when I switched to the cradle key mounting design, deciding to to &lt;em&gt;fix one real problem rather than optimize a non-problem&lt;/em&gt;. The OKAY 2 has the same size keys and playability of the OKAY 1 -- just more of them.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;making-the-okay-2&quot; tabindex=&quot;-1&quot;&gt;Making the OKAY 2&lt;/h2&gt;
&lt;p&gt;After writing about &lt;a href=&quot;https://blog.tommy.sh/posts/making-time-lapse-videos-with-an-iphone-by-command-line&quot;&gt;how I make time-lapse videos&lt;/a&gt;, I made a time-lapse video of soldering and assembling a hot pink OKAY 2. It&#39;s cool; check it out!&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/250560891&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/250560891&quot;&gt;Making an OKAY 2 Synth&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;availability&quot; tabindex=&quot;-1&quot;&gt;Availability&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/duet.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/duet-1200.jpg&quot; alt=&quot;Oskitone OKAY 2 Synth in Hot Pink and Aqua Blue&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now available at Oskitone.com, &lt;a href=&quot;http://www.oskitone.com/product/okay-2-synth&quot;&gt;fully assembled&lt;/a&gt; or as a &lt;a href=&quot;http://www.oskitone.com/product/okay-2-synth-diy-kit&quot;&gt;DIY soldering kit&lt;/a&gt;, available with and without the 3D printed parts.&lt;/p&gt;
&lt;p&gt;The STL model files are on &lt;a href=&quot;https://www.thingiverse.com/thing:2760653&quot;&gt;Thingiverse&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;oskitone-irl!!&quot; tabindex=&quot;-1&quot;&gt;Oskitone IRL!!&lt;/h2&gt;
&lt;p&gt;On the day I put the OKAY 2 on the store, I gave my first ever real life elevator pitch at a meetup called the &lt;a href=&quot;https://www.meetup.com/Hardware-Developers-Didactic-Galactic&quot;&gt;Hardware Developers Didactic Galactic!&lt;/a&gt;. I wore my most confident shirt and was really nervous but I think people liked it. There&#39;s no video of my 2min talk but I did get a &lt;a href=&quot;https://twitter.com/SupplyframeHW/status/951675543442808833&quot;&gt;nice video on Twitter&lt;/a&gt; from just after the main talks.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;en&quot; dir=&quot;ltr&quot;&gt;this is OKAY 2 available on &lt;a href=&quot;https://twitter.com/tindie?ref_src=twsrc%5Etfw&quot;&gt;@tindie&lt;/a&gt; &lt;a href=&quot;https://twitter.com/hashtag/HDDG?src=hash&amp;ref_src=twsrc%5Etfw&quot;&gt;#HDDG&lt;/a&gt; &lt;a href=&quot;https://t.co/8We1GVoToQ&quot;&gt;https://t.co/8We1GVoToQ&lt;/a&gt;&lt;/p&gt;— Supplyframe Hardware (@SupplyframeHW) &lt;a href=&quot;https://twitter.com/SupplyframeHW/status/951675543442808833?ref_src=twsrc%5Etfw&quot;&gt;January 12, 2018&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/p&gt;
&lt;h2 id=&quot;thanks-for-reading&quot; tabindex=&quot;-1&quot;&gt;Thanks for reading&lt;/h2&gt;
&lt;p&gt;I put a lot of time into the &lt;a href=&quot;http://www.oskitone.com/product/okay-2-synth&quot;&gt;OKAY 2&lt;/a&gt;, I&#39;m proud of it, and I like it a lot.&lt;/p&gt;
&lt;p&gt;I hope you like it too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/okay-2-synth/pretty.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/okay-2-synth/pretty-1200.jpg&quot; alt=&quot;OKAY 2&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Build-A-Build-A-Synth</title>
		<link href="https://blog.tommy.sh/posts/build-a-build-a-synth/"/>
		<updated>Mon, 05 Feb 2018 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/build-a-build-a-synth/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://build.oskitone.com/&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/build-a-build-a-synth/build.oskitone.png&quot; alt=&quot;build.oskitone&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here’s a web app I’ve been fiddling with recently to help visualize (and, ahem, sell!) custom synthesizer based on the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-synth&quot;&gt;OKAY Synth&lt;/a&gt; and the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-2-synth&quot;&gt;OKAY 2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It’s built in &lt;a href=&quot;https://reactjs.org/&quot;&gt;React&lt;/a&gt; with &lt;a href=&quot;https://github.com/zeit/next.js/&quot;&gt;Next.js&lt;/a&gt;, uses &lt;a href=&quot;https://getbootstrap.com/&quot;&gt;Bootstrap&lt;/a&gt; styling via &lt;a href=&quot;http://reactstrap.github.io/&quot;&gt;Reactstrap&lt;/a&gt;, and renders its preview onto &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas&quot;&gt;canvas&lt;/a&gt; with &lt;a href=&quot;https://konvajs.github.io/&quot;&gt;Konva&lt;/a&gt;. It’s also the first time I’ve used any of that stack, so I expect to be thoroughly embarrassed by my code if/when I revisit it in six months.&lt;/p&gt;
&lt;p&gt;Try it out: &lt;a href=&quot;http://build.oskitone.com/&quot;&gt;build.oskitone.com&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;tinker-tinker&quot; tabindex=&quot;-1&quot;&gt;Tinker tinker&lt;/h2&gt;
&lt;p&gt;For now, the parameters are mostly fixed to those used for the real life OKAYs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The vanity text is always in the Open Sans font, matching the OSKITONE wordmark&lt;/li&gt;
&lt;li&gt;There’s only one speaker size, but I made “None” an option for anybody who only wants audio out jack&lt;/li&gt;
&lt;li&gt;Functionality is assumed to match the OKAY and OKAY 2, so there are always two knobs for the Octave and Volume controls&lt;/li&gt;
&lt;li&gt;Key dimensions are fixed to match preexisting builds&lt;/li&gt;
&lt;li&gt;Enclosure dimensions similarly adapt to key, text, and component dimensions based on fixed gutter and spacing parameters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can even do things that I can’t physically do, like use colors I don’t have or effect dimensions bigger than I can 3D-print. If you do either, you’ll get a warning when you try to purchase.&lt;/p&gt;
&lt;p&gt;Speaking of which…&lt;/p&gt;
&lt;h2 id=&quot;how-to-sell-a-thing-that-doesn%E2%80%99t-exist%3F&quot; tabindex=&quot;-1&quot;&gt;How to sell a thing that doesn’t exist?&lt;/h2&gt;
&lt;p&gt;There are two legit caveats worth talking about:&lt;/p&gt;
&lt;p&gt;The first is that the preview isn’t as accurate as I’d like. It’s an abstraction of a theory of a thing, a twice removed and two-dimensional reimplementation of a three-dimensional model of an eventual physical good. (Woof, that’s a mouthful. See below.)&lt;/p&gt;
&lt;p&gt;The second is that my store wasn’t made to do stuff like this. The platform I’m using, Big Cartel, is more for selling goods (ex: clothing) than services (ex: tailoring). I could get around that by having one product with all N permutations as options, but that’d be a rat’s nest to implement without a programmatic way to create them on the site. (Hacks abound, no doubt, but I’ll spare you the details.)&lt;/p&gt;
&lt;p&gt;So the workaround for now is to pass the design off to the contact form on the main Oskitone site for the user to submit. I can then follow up over email with a real 3D render and price. It’s a kludge, for sure, but it should work well enough to test the idea.&lt;/p&gt;
&lt;h2 id=&quot;could-be-better&quot; tabindex=&quot;-1&quot;&gt;Could be better&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/build-a-build-a-synth/diff.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/build-a-build-a-synth/diff.jpg&quot; alt=&quot;Diffing between this preview, the 3D render, and the finished print&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Obviously missing details on speaker grill, knob labels, and enclosure hinges&lt;/li&gt;
&lt;li&gt;Text has looser kerning, is missing stroke, and isn’t maximized to its available space&lt;/li&gt;
&lt;li&gt;Dimensions may or may not be exactly accurate&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;what%E2%80%99s-next&quot; tabindex=&quot;-1&quot;&gt;What’s next&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Real 3D model previews (There will be a LOT that will go into this, worthy of a new blog post. Hopefully I can get to it. Stay tuned.)&lt;/li&gt;
&lt;li&gt;More color options on different parts&lt;/li&gt;
&lt;li&gt;New instrument designs?!?!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;URL:&lt;/strong&gt; &lt;a href=&quot;http://build.oskitone.com/&quot;&gt;http://build.oskitone.com/&lt;/a&gt;&lt;br /&gt;
&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href=&quot;https://github.com/rocktronica/build-oskitone&quot;&gt;https://github.com/rocktronica/build-oskitone&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Prototype Post-Mortem: Four-Step Octaved Sequencer</title>
		<link href="https://blog.tommy.sh/posts/prototype-post-mortem-four-step-octaved-sequencer/"/>
		<updated>Mon, 19 Mar 2018 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/prototype-post-mortem-four-step-octaved-sequencer/</id>
		<content type="html">&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/260509940&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/260509940&quot;&gt;Four-Step Octaved Sequencer&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;background&quot; tabindex=&quot;-1&quot;&gt;Background&lt;/h2&gt;
&lt;p&gt;The first version of this sequencer idea was a collaboration with an artist named &lt;a href=&quot;http://rasterstache.com/&quot;&gt;Rasterstache&lt;/a&gt;. It &lt;a href=&quot;https://www.instagram.com/p/BUYLmsnFh-S/?taken-by=rocktronica&quot;&gt;displayed at Maker Faire&lt;/a&gt; and eventually made its way to the popular Chicago band OK Go:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;twitter-video&quot; data-lang=&quot;en&quot;&gt;&lt;p lang=&quot;und&quot; dir=&quot;ltr&quot;&gt; &lt;a href=&quot;https://t.co/NmKWoNfnOg&quot;&gt;pic.twitter.com/NmKWoNfnOg&lt;/a&gt;&lt;/p&gt;— OK Go (@okgo) &lt;a href=&quot;https://twitter.com/okgo/status/926837086199668736?ref_src=twsrc%5Etfw&quot;&gt;November 4, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; src=&quot;https://platform.twitter.com/widgets.js&quot; charset=&quot;utf-8&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;/p&gt;
&lt;h3 id=&quot;a-look-inside&quot; tabindex=&quot;-1&quot;&gt;A look inside&lt;/h3&gt;
&lt;p&gt;Inside that robot figure is a really pretty, one-off, hand-wired circuit I made on &lt;a href=&quot;https://en.wikipedia.org/wiki/Perfboard&quot;&gt;perfboard&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/insta-perf.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/insta-perf.jpg&quot; alt=&quot;Handmade 4-Step Octaved Sequencer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(IIRC, blue wires are IO (in/out) between chips, red/black are power/ground, and all IO to/from the board connected with those black headers. I was apparently big into headers at the time; I think I&#39;d do that differently if I did it now.)&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;Here&#39;s its description that I sent to the artist:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I&#39;m calling it a &amp;quot;4-Step Octaved Sequencer&amp;quot;, and it&#39;s some kind of musical instrument or noise art machine or even a crude analog synthesizer. There are similar instruments, but I haven&#39;t seen one exactly like it -- It is definitely an original, one-off piece of DIY engineering.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;In music, a &lt;a href=&quot;https://en.wikipedia.org/wiki/Music_sequencer&quot;&gt;sequencer&lt;/a&gt; is a piece of equipment that repeats through a series of notes to make a melodic, looping riff. You&#39;re hearing sequencers all the time if you listen to electronic music. Anyway, this one has four steps.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;It&#39;s &amp;quot;octaved&amp;quot; because its output is actually two &lt;a href=&quot;https://en.wikipedia.org/wiki/Square_wave&quot;&gt;square waves&lt;/a&gt; mixed together; the main frequency is divided to make an octave lower, and the two are added together for a thicker, richer sound.&lt;/p&gt;
&lt;p&gt;An extra neat thing is that, like the rest of my work, this is a fully analog (ie, NOT digital) machine. There are no computers, microcontrollers, sound samplers, or any technology basically from after the 1970s involved. The sound you hear is the sound of a speaker being abused by electricity which has been manipulated by discrete electronic components like capacitors and resistors and logic chips. It is super old school (and unnecessarily complicated) stuff.&lt;/p&gt;
&lt;p&gt;For the curious, the &lt;a href=&quot;https://en.wikipedia.org/wiki/Integrated_circuit&quot;&gt;IC chips&lt;/a&gt; are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a 4017 counter to count and iterate through each sequencer step&lt;/li&gt;
&lt;li&gt;a 556, which has two 555 timers to 1) set the tempo for the 4017 and 2) make the main (high) pitch&lt;/li&gt;
&lt;li&gt;a 4040 divider to make the aforementioned octave below the main pitch&lt;/li&gt;
&lt;li&gt;and a 386 amplifier to take the summed octaves&#39; output and drive the speaker&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;The two octaves I mentioned are easier to see on an oscilloscope. This was the breadboard proof-of-concept before soldering:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/260865648&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;
&lt;a href=&quot;https://vimeo.com/260865648&quot;&gt;Four-Step Octaved Sequencer breadboard&lt;/a&gt; from &lt;a href=&quot;https://vimeo.com/oskitone&quot;&gt;oskitone&lt;/a&gt; on &lt;a href=&quot;https://vimeo.com/&quot;&gt;Vimeo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Besides the 4017 counter to count through the steps, the circuit is identical to the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-synth&quot;&gt;OKAY Synth&#39;s&lt;/a&gt;: potentiometer(s) set frequency on a 555 timer, which is divided by a 4040 to make octaves, and then sent to a 386 amp.&lt;/p&gt;
&lt;h3 id=&quot;from-perfboard-to-pcb&quot; tabindex=&quot;-1&quot;&gt;From perfboard to PCB&lt;/h3&gt;
&lt;p&gt;A couple months later, I designed a PCB version (my second PCB design ever) and had a handful fabricated. The only difference in the PCB from the original perfboard is that I increased its octave outputs from 2 to 4 and made them switchable.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-schematic.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-schematic.png&quot; alt=&quot;Four Step Octaved Sequencer schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.instagram.com/p/BVX9UFPFIMd/?taken-by=rocktronica&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/insta-pcb.jpg&quot; alt=&quot;Four Step Octaved Sequencer PCB&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Check out the &amp;quot;tommy.sh&amp;quot; branding in the corner. This was before I before I&#39;d decided on &amp;quot;Oskitone&amp;quot; and bought the domain name.&lt;/p&gt;
&lt;h3 id=&quot;and-pcb-to-product-idea&quot; tabindex=&quot;-1&quot;&gt;And PCB to product idea&lt;/h3&gt;
&lt;p&gt;Then I designed it into a 3D model, the subject of my &lt;a href=&quot;https://blog.tommy.sh/posts/animation-easing-in-openscad&quot;&gt;post on bringing realistic animations to OpenSCAD&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/animation-easing-in-openscad&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/animation-easing-in-openscad/sequencer-animation.gif&quot; alt=&quot;Sequencer animation&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fast forward to today, where the subject of &lt;em&gt;this post&lt;/em&gt; is the 3D-printed and assembled version of that model, which sat unfinished for months while I worked on the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-2-synth&quot;&gt;OKAY Synths&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&quot;in-review&quot; tabindex=&quot;-1&quot;&gt;In review&lt;/h2&gt;
&lt;h3 id=&quot;signs-of-things-to-come&quot; tabindex=&quot;-1&quot;&gt;Signs of things to come&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-1200.jpg&quot; alt=&quot;Sequencer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When making the OKAYs, I&#39;d make a bunch of fit tests and prototypes before getting to a &amp;quot;finished&amp;quot; build. What&#39;s interesting to me about this sequencer prototype is that, because I spent too long designing it without printing any fit tests and then abruptly stopped working on it, it&#39;s a fully formed snapshot of what I was thinking about (warts and all) at the time.&lt;/p&gt;
&lt;p&gt;And there are some fun parts about it that I really do like, a lot of which would make its way into my other work.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Labels&lt;/strong&gt;&lt;br /&gt;
The tempo, volume, and octave controls have corresponding cute, little, 3D-printed label pieces. I&#39;ve always liked this approach more than embossing/engraving text into the enclosure itself or using some sticky label tape. It&#39;s a physical, tactile thing that just makes me feel good. If you&#39;re working and printing in 3D, then I say go all out.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-color print&lt;/strong&gt;&lt;br /&gt;
Here&#39;s where I perfected the &lt;a href=&quot;https://blog.tommy.sh/posts/quick-tip-changing-colors-on-3d-prints&quot;&gt;technique of changing filament midway through a print&lt;/a&gt; to get those sharp color changes, which I now use gratuitously. It&#39;s an easy hack that any printer can do.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LED light pipes&lt;/strong&gt;&lt;br /&gt;
Each step has an LED pressed into a 3D-printed semi-transparent cube called a light pipe. Its dimensions are based on my experiments in &lt;a href=&quot;https://blog.tommy.sh/posts/early-experiments-with-3d-printed-light-pipes&quot;&gt;designing light pipes&lt;/a&gt;. I&#39;m sure I&#39;ll find another project to use this idea on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom potentiometer knobs&lt;/strong&gt;&lt;br /&gt;
These are the first time I made &lt;a href=&quot;https://blog.tommy.sh/posts/designing-potentiometer-knobs&quot;&gt;custom potentiometer knobs&lt;/a&gt; to fit D or smooth shaft pots.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Slider potentiometers&lt;/strong&gt;&lt;br /&gt;
The original robot collaboration had a slider for tempo, and I liked it so much I made the four step pitches use them instead of knobs. Sliding is funner than turning, I think. Of course, I put custom caps on them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pushbuttons&lt;/strong&gt;&lt;br /&gt;
The OKAY synths use a rotary switch to select just one octave, but it&#39;s technically possible to select multiple and mix them together. The sequencer does this with latching pushbuttons. Press once to add the octave to the mix; press again to remove it. They&#39;re capped with ABCD letter caps.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;hard-lessons-learned-hard&quot; tabindex=&quot;-1&quot;&gt;Hard lessons learned hard&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-open.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-open-1200.jpg&quot; alt=&quot;Sequencer, opened&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;connections%2C-glue%2C-parts-count&quot; tabindex=&quot;-1&quot;&gt;Connections, glue, parts count&lt;/h4&gt;
&lt;p&gt;I wanted the enclosure to be able to be either 3D-printed or laser cut from plastic or plywood, so &lt;a href=&quot;https://twitter.com/rocktronica/status/867104216266940416&quot;&gt;I designed it to have discrete top, sides, and bottom&lt;/a&gt;. That necessitated all internal supports to also be separate pieces.&lt;/p&gt;
&lt;p&gt;And all of these things had to be glued into place with heavy duty industrial strength glue. This was a &lt;em&gt;literal headache&lt;/em&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Labels and speaker grill glue onto enclosure top&#39;s top&lt;/li&gt;
&lt;li&gt;The enclosure top&#39;s bottom glues to the enclosure sides&lt;/li&gt;
&lt;li&gt;The black slider base, speaker wall, octave switches platform, and knobs bases glue into the enclosure top&lt;/li&gt;
&lt;li&gt;Light pipes glue into slider base&lt;/li&gt;
&lt;li&gt;PCB glues into enclosure bottom&lt;/li&gt;
&lt;li&gt;Octave button caps glue onto buttons&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Lesson 1:&lt;/em&gt; When designing for easy assembly, the priority of connection types should go snaps, then screws, then glue. Glue is the worst and should be a last resort. There is no glue in the OKAY 2.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 2:&lt;/em&gt; If you must use glue, have the pieces &lt;a href=&quot;https://www.fictiv.com/hwg/assemble/how-to-design-assemblies-to-be-self-locating-and-self-fixturing?utm_medium=twitter&amp;amp;utm_source=social&quot;&gt;self-locate&lt;/a&gt; for effortless, perfect positioning without an external jig.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 3:&lt;/em&gt; Design with one type of manufacturing in mind. The enclosure would have been so much simpler as two pieces instead of three, and all of the supports could have been baked into it as well. Keep parts count low!&lt;/p&gt;
&lt;h4 id=&quot;enclosure-closure&quot; tabindex=&quot;-1&quot;&gt;Enclosure closure&lt;/h4&gt;
&lt;p&gt;So the enclosure&#39;s top glues to its sides, but how does the bottom attach? With screws. And not very well.&lt;/p&gt;
&lt;p&gt;The sides, which are one solid piece of four walls, have pocket wells for &lt;a href=&quot;https://www.fastenal.com/products/details/11125984&quot;&gt;threaded inserts&lt;/a&gt;, which get melted into the plastic with a hot soldering iron. These take screws through matching holes in the enclosure bottom corners. I unfortunately got a trace amounts of melted plastic in the inserts&#39; threads during installation, making them hard to screw into.&lt;/p&gt;
&lt;p&gt;I also thought I could make a better fit by nestling a tiny lip on the sides to a tiny grooved cavity on the bottom, but it was too small to print well and basically just resulted in a tiny gap.&lt;/p&gt;
&lt;p&gt;The end result is an enclosure that&#39;s hard to open and can&#39;t even close properly anyway.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 1:&lt;/em&gt; Make sure threaded inserts stay clean of foreign material. A good way for the design to help this is to have both ends of the insert&#39;s containing walls be open. If there&#39;s plastic at the opposite end, the soldering iron will pierce it and draw it back up into the threads.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 2:&lt;/em&gt; Integral features like the fitting lip grooves shouldn&#39;t be at a scale so small they&#39;re within the tolerance limits of the manufacturing machine.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 3:&lt;/em&gt; Make fit tests before making the whole thing!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 4:&lt;/em&gt; Users shouldn&#39;t have to disassemble a device to do routine work like change its battery. Make it easy to open and admire.&lt;/p&gt;
&lt;h4 id=&quot;space-and-size&quot; tabindex=&quot;-1&quot;&gt;Space and size&lt;/h4&gt;
&lt;p&gt;The dimensions of the instrument were derived from the dimensions of the components. Four pushbuttons set the width of the side control panel, which set the knobs&#39;s diameters and speaker size. To make it worse, I also didn’t factor in vertical room for cables, so the whole thing is jam packed and can hardly close.&lt;/p&gt;
&lt;p&gt;It is a needlessly tight and finicky fit. Seemed like any time I touched it during final assembly a new thing would break.&lt;/p&gt;
&lt;p&gt;Oh, also, the small knob diameter meant that the volume&#39;s tightening screw sticks out. I hadn&#39;t considered that before printing the whole thing.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson:&lt;/em&gt; &lt;a href=&quot;https://en.wikipedia.org/wiki/Make_Room!_Make_Room!&quot;&gt;Make room! Make room!&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;%22musicality%22-(aka-%22musical-utility%22)&quot; tabindex=&quot;-1&quot;&gt;&amp;quot;Musicality&amp;quot; (aka &amp;quot;musical utility&amp;quot;)&lt;/h4&gt;
&lt;p&gt;Potentiometers have some natural variance in their resistance, just because of &lt;a href=&quot;http://www.geofex.com/Article_Folders/potsecrets/potscret.htm&quot;&gt;the way that they work&lt;/a&gt;. For most typical uses, like, say, a volume or pan control, that ~5% variance is an unnoticeable non-issue. It is, however, very noticeable when they&#39;re used for something that requires high precision like frequencies for musical notes and &lt;em&gt;even more noticeable&lt;/em&gt; when used adjacently -- controls that seem to be in identical positions should have identical effects.&lt;/p&gt;
&lt;p&gt;The sequencer&#39;s pitch oscillator uses resistance supplied by slider potentiometers to determine frequency. It&#39;s fun but imperfect, making the instrument more about noise than music.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson:&lt;/em&gt; Musical instruments need to keep tune and be consistent.&lt;/p&gt;
&lt;h4 id=&quot;sound&quot; tabindex=&quot;-1&quot;&gt;Sound&lt;/h4&gt;
&lt;p&gt;Ugh, why is this little speaker so pitiful? Even if I boosted the amp, you can hardly hear any bass.&lt;/p&gt;
&lt;p&gt;And at volumes higher than 50% the octaves don&#39;t mix evenly. The low octaves basically override the higher ones. My naive mixer of resistors was, indeed, naive.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 1:&lt;/em&gt; Bigger speakers are better speakers.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Lesson 2:&lt;/em&gt; Multiple sounds want multiple amplifiers.&lt;/p&gt;
&lt;h2 id=&quot;what&#39;s-next%3F&quot; tabindex=&quot;-1&quot;&gt;What&#39;s next?&lt;/h2&gt;
&lt;p&gt;Someday I&#39;ll clean it all up and have some kind of sequencer project on the &lt;a href=&quot;http://www.oskitone.com/&quot;&gt;Oskitone&lt;/a&gt; store, but it won&#39;t be this one. This one will go on my shelf as a reminder of how far I&#39;ve come.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-pcba.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/sequencer-pcba-1200.jpg&quot; alt=&quot;Sequencer PCB&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;del&gt;In the meantime, I&#39;ve got a couple of the &amp;quot;tommy.sh&amp;quot; branded PCBs left. &lt;a href=&quot;http://www.oskitone.com/contact&quot;&gt;Holler&lt;/a&gt; if you want one.&lt;/del&gt;&lt;/p&gt;
&lt;h3 id=&quot;update-april-5%2C-2018&quot; tabindex=&quot;-1&quot;&gt;Update April 5, 2018&lt;/h3&gt;
&lt;p&gt;I put the remaining handful of &lt;a href=&quot;http://www.oskitone.com/product/four-step-octaved-sequencer-kit&quot;&gt;prototype PCBs on the store&lt;/a&gt;, promptly sold all of them, and am &lt;a href=&quot;https://twitter.com/oskitone/status/981698242688704512&quot;&gt;ordering more&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/1.1.2-pcb.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/prototype-post-mortem-four-step-octaved-sequencer/1.1.2-pcb.png&quot; alt=&quot;1.1.2 PCB&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you want the STLs to 3D-print your own just like the prototype, that&#39;s not a great idea! As this blog post attempted to explain, the design has way too many problems for me to feel good about putting my name on it and telling other people to make it.&lt;/p&gt;
&lt;p&gt;Stay tuned!&lt;/p&gt;
&lt;h3 id=&quot;update-january-17%2C-2021&quot; tabindex=&quot;-1&quot;&gt;Update January 17, 2021&lt;/h3&gt;
&lt;p&gt;Open-sourced the PCB: &lt;a href=&quot;https://github.com/oskitone/four-step-octaved-sequencer&quot;&gt;https://github.com/oskitone/four-step-octaved-sequencer&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;update-march-12%2C-2026&quot; tabindex=&quot;-1&quot;&gt;Update March 12, 2026&lt;/h3&gt;
&lt;p&gt;...and made its OshPark project public so you can buy the PCB direct from them with my blessing: &lt;a href=&quot;https://oshpark.com/shared_projects/xo5nRkSm&quot;&gt;https://oshpark.com/shared_projects/xo5nRkSm&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Adventures in Self-Watering Planters (Part 1)</title>
		<link href="https://blog.tommy.sh/posts/adventures-in-self-watering-planters-part-1/"/>
		<updated>Fri, 10 Apr 2020 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/adventures-in-self-watering-planters-part-1/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/self-watering-planters.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/self-watering-planters-1200.jpg&quot; alt=&quot;Adventures in Self-Watering Planters&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Well folks, I never could have guessed it, but I (apparently!) have opinions about plant planters and made a variation of a self-watering planter that fits into household glass jars.&lt;/p&gt;
&lt;p&gt;Keep reading to learn how I made it or to make your own!&lt;/p&gt;
&lt;h2 id=&quot;whyyyyy&quot; tabindex=&quot;-1&quot;&gt;Whyyyyy&lt;/h2&gt;
&lt;p&gt;I’m not much of a green thumb, but I like plants. They make me feel good. When the world is scary and unknown, growing a cute little plant in a cute little planter is a very welcome distraction.&lt;/p&gt;
&lt;p&gt;I also like low-maintenance, which is why I’m interested in self-watering planters. Unlike typical planters that take water at the top and drain at the bottom, self-watering planters keep a reservoir of water at the bottom and draw it up into the soil automatically as the soil dries out.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/capillary-action.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/capillary-action-1200.jpg&quot; alt=&quot;Capillary action in action&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notice the string in the water. It defies gravity and pulls water up via capillary action. Later, as the plant grows, its roots will extend into the water and help out too.&lt;/p&gt;
&lt;p&gt;(You might be asking, if the plant’s so thirsty, why not submerge the whole thing in water? Because that will cause the soil to grow mold and the roots to rot, harming the plant!)&lt;/p&gt;
&lt;h2 id=&quot;why-i-made-my-own&quot; tabindex=&quot;-1&quot;&gt;Why I made my own&lt;/h2&gt;
&lt;p&gt;There are two problems in a lot of the designs I’ve seen:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The lower reservoir container is opaque and prevents easily seeing the water level, causing more regular checking and maintenance&lt;/li&gt;
&lt;li&gt;The reservoir is too small, requiring more refilling&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Glass jars as reservoirs remedy both issues. They’re clear so it’s easy to gauge water level, and they come in sizes big enough to hold a lot of agua.&lt;/p&gt;
&lt;h2 id=&quot;nailing-the-design&quot; tabindex=&quot;-1&quot;&gt;Nailing the Design&lt;/h2&gt;
&lt;h3 id=&quot;reverse-engineering-a-jar-lid&quot; tabindex=&quot;-1&quot;&gt;Reverse-Engineering a Jar Lid&lt;/h3&gt;
&lt;p&gt;Fortunately or unfortunately, my house is filled with jars that fit lids like this, so that&#39;s what my design uses:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/lid-and-jar.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/lid-and-jar-1200.jpg&quot; alt=&quot;Lid and jar&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Getting a good fit on a jar meant making a lid, from scratch. Luckily, for a simple part like this, it’s relatively straightforward:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Measure&lt;/strong&gt;&lt;br /&gt;
I broke out the digital calipers and measured everything that seemed crucial: inner diameter of lid, outer diameter of jar mouth, lid lug length/height (see more on the naming here in the appendix below)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recreate minimum test&lt;/strong&gt;&lt;br /&gt;
With those dimensions, I made a simple ring with six small lugs evenly distributed inside. I didn’t need to make the whole design yet, because I’m only testing the fit. Pro tip: the smaller the test, the tighter the feedback loop, and the faster you can iterate.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repeat&lt;/strong&gt;&lt;br /&gt;
First it was too tight, then it was too loose, then the lugs would jam up, etc, so I just kept updating the design until I got it right. The trick here is patience. (Good variable names and a log of the iterations and their outcomes helped too!)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/fit-tests.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/fit-tests-1200.jpg&quot; alt=&quot;A whole bunch of fit tests...&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;what-else-does-it-need%3F&quot; tabindex=&quot;-1&quot;&gt;What else does it need?&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/cross-section.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/cross-section-1200.jpg&quot; alt=&quot;Cross section of self-watering planter design&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After the lid was fit and snug, I added other features, all of which are accessible as variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adjustable height pot&lt;/strong&gt;&lt;br /&gt;
The pot’s height is variable and can tower over the jar and/or plunge into it&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Drainage holes at bottom of pot&lt;/strong&gt;&lt;br /&gt;
Holes at the bottom of the pot let water drain out and hold the capillary string in place.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skirts at bottom&lt;/strong&gt;&lt;br /&gt;
These are purely aesthetic walls that extend over the exposed jar threads for a flush, tidy look.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;design-for-manufacturing&quot; tabindex=&quot;-1&quot;&gt;Design for Manufacturing&lt;/h3&gt;
&lt;p&gt;In a nutshell, Design For Manufacturing (or DFM) means making a product easy to be made. For 3D-printing, that mostly means eliminating supports: the non-model scaffolding that gets torn away after a print is done.&lt;/p&gt;
&lt;p&gt;Here&#39;s how it gets 3D-printed:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/sliced.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/adventures-in-self-watering-planters-part-1/sliced.gif&quot; alt=&quot;A GIF of the 3D model how the printer will print it&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It’s upside down! Printing it rightside up would need supports all around the lid and skirt&lt;/li&gt;
&lt;li&gt;The lid lugs are just wide enough for its ends to rest on the rim&lt;/li&gt;
&lt;li&gt;The drainage holes use a &lt;a href=&quot;https://blog.tommy.sh/posts/quick-tip-avoid-3d-printed-supports-with-sacrificial-bridge&quot;&gt;sacrificial bridge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The diameter differences between the outer tower and inner pot are transitioned with a 45 degree funnel&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;next-steps&quot; tabindex=&quot;-1&quot;&gt;Next steps&lt;/h2&gt;
&lt;p&gt;Other stuff and followup ideas to think about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The filament I used is made out of corn and is technically compostable, so it very probably isn’t the best choice for something around water? Something for me to keep an eye on!&lt;/li&gt;
&lt;li&gt;Making it work with mason jars and their threads… or no threads at all and let it rest on top of any container!&lt;/li&gt;
&lt;li&gt;What does it need to be a plant hanger? Simplest version is quick holes for hooks to latch into, but it’d need to be strong enough to not break under the weight...&lt;/li&gt;
&lt;li&gt;Could multiple pots share one jar? Or vice versa?&lt;/li&gt;
&lt;li&gt;The taller the tower, the higher the center of balance. And the tower could be made to be much wider than the jar. Both require thinking about legs or other supports to make sure the thing doesn’t tip over.&lt;/li&gt;
&lt;li&gt;Terrariums?!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;make-your-own!&quot; tabindex=&quot;-1&quot;&gt;Make Your Own!&lt;/h2&gt;
&lt;p&gt;3D models are available on Thingiverse: &lt;a href=&quot;https://www.thingiverse.com/thing:4276363&quot;&gt;https://www.thingiverse.com/thing:4276363&lt;/a&gt;.&lt;br /&gt;
OpenSCAD code: &lt;a href=&quot;https://gist.github.com/rocktronica/9ee5183306b35a14765a4ea627cf7887&quot;&gt;https://gist.github.com/rocktronica/9ee5183306b35a14765a4ea627cf7887&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h3 id=&quot;appendix%3A-types-of-lids&quot; tabindex=&quot;-1&quot;&gt;Appendix: Types of lids&lt;/h3&gt;
&lt;p&gt;I’ve learned that there are &lt;a href=&quot;https://www.fillmorecontainer.com/blog/2013/10/03/how-to-measure-jars-and-lids-for-the-perfect-match/&quot;&gt;two styles of jar closures&lt;/a&gt;: “continuous thread” (abbreviated as “CT”) and “lug”. The easiest way to differentiate them is by their lids: CT lids have threads that directly match the threads on the mouth of the jar, and lug lids simply have a number of lugs or little ridges extending inwards from the bottom of the lid.&lt;/p&gt;
&lt;p&gt;Unlike the lids, the respective jars themselves from these two types may be indistinguishable.&lt;/p&gt;
&lt;p&gt;Anyway, it turns out that the technical name for the lid I made is “82 lug lid” and it is very common for the brands of jelly and salsa that we apparently go through a lot of in my house. :)&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Unfocus</title>
		<link href="https://blog.tommy.sh/posts/unfocus/"/>
		<updated>Thu, 23 Apr 2020 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/unfocus/</id>
		<content type="html">&lt;p&gt;I wrote a script called &lt;a href=&quot;https://github.com/rocktronica/unfocus&quot;&gt;Unfocus&lt;/a&gt; to prevent me from wasting too much time reading the news and Twitter. I wish that weren&#39;t necessary, but wataryagonnado, huh?&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;~/.unfocus.sh 15
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Which lets me bum around for 15 minutes. After that, I&#39;m greeted by:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/unfocus/unfocus-twitter.png&quot; alt=&quot;Unfocus&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Nice! 😅&lt;/p&gt;
&lt;h2 id=&quot;how&#39;s-it-work&quot; tabindex=&quot;-1&quot;&gt;How&#39;s it work&lt;/h2&gt;
&lt;p&gt;A popular trick to prevent visiting a website is to convince your computer that its domain resolves to localhost. This can be done by manually editing the /etc/hosts file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1    site-you-do-not-want-to-visit.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is that, if you ever want a little taste of what you&#39;re missing, you have to manually edit again to unblock and remember to edit again when you&#39;re ready to re-block...&lt;/p&gt;
&lt;p&gt;Anyway, this tool tries to do that for you.&lt;/p&gt;
&lt;h2 id=&quot;give-it-a-go&quot; tabindex=&quot;-1&quot;&gt;Give it a go&lt;/h2&gt;
&lt;p&gt;For now, the default blocked sites are: twitter, netflix, google news, and HN; but it&#39;s configurable.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code:&lt;/strong&gt; &lt;a href=&quot;https://github.com/rocktronica/unfocus&quot;&gt;https://github.com/rocktronica/unfocus&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>Quick Tip: Hone In On the Perfect Fit with a &quot;Goldilocks Array&quot;</title>
		<link href="https://blog.tommy.sh/posts/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/"/>
		<updated>Mon, 11 May 2020 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/goldilocks-array.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/goldilocks-array-1200.jpg&quot; alt=&quot;Testing a servo shaft against different cavity iterations with a &amp;quot;goldilocks array&amp;quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Designing 3D-printed parts that need to &lt;em&gt;perfectly&lt;/em&gt; match the dimensions of something else can be arduous, because it&#39;ll often mean meticulously designing-then-printing-then-trying each individual iteration, ad infinitum.&lt;/p&gt;
&lt;p&gt;A trick I like (and I&#39;m sure this is old news to many folks) is to combine an array of those tests into one big combo test. Then, just like Goldilocks, all you have to do is move your part around the array until you find the best fit.&lt;/p&gt;
&lt;p&gt;The time gained in skipping the back-and-forth from your printer more than makes up for the extra time it spends being printed.&lt;/p&gt;
&lt;h2 id=&quot;example&quot; tabindex=&quot;-1&quot;&gt;Example&lt;/h2&gt;
&lt;p&gt;In the picture above, I&#39;m designing a horn to for a servo shaft, and my &amp;quot;goldilocks array&amp;quot; has two axes: cavity diameter on the horizontal X axis and shim count (borrowed from my adventures in &lt;a href=&quot;https://blog.tommy.sh/posts/designing-potentiometer-knobs/&quot;&gt;making potentiometer knobs&lt;/a&gt;) on the vertical Y axis.&lt;/p&gt;
&lt;h3 id=&quot;model&quot; tabindex=&quot;-1&quot;&gt;Model&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/openscad-model.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/openscad-model.png&quot; alt=&quot;Model of the goldilocks array in OpenSCAD&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;openscad-code&quot; tabindex=&quot;-1&quot;&gt;OpenSCAD Code&lt;/h3&gt;
&lt;p&gt;The concept is agnostic to implementation but I think is eloquent in code.&lt;/p&gt;
&lt;script src=&quot;https://gist.github.com/rocktronica/9bf386b416345a472ef2b871b6a45c42.js&quot;&gt;
&lt;/script&gt;
</content>
	</entry>
	
	<entry>
		<title>buttonpusher: a Machine that Pushes Buttons</title>
		<link href="https://blog.tommy.sh/posts/buttonpusher/"/>
		<updated>Thu, 11 Jun 2020 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/buttonpusher/</id>
		<content type="html">&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/427842316&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;I made a machine to automate some of the boring parts of Animal Crossing, and it is very satisfying to me.&lt;/p&gt;
&lt;p&gt;Like my other projects, &amp;quot;buttonpusher&amp;quot; was designed in &lt;a href=&quot;https://www.openscad.org/&quot;&gt;OpenSCAD&lt;/a&gt; and 3D-printed. The code controlling it is &lt;a href=&quot;https://circuitpython.org/&quot;&gt;CircuitPython&lt;/a&gt;, running on an &lt;a href=&quot;https://www.adafruit.com/product/3505&quot;&gt;Adafruit Metro M0 Express&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code, circuit, and 3D models to make your own:&lt;/strong&gt; &lt;a href=&quot;https://github.com/rocktronica/buttonpusher&quot;&gt;https://github.com/rocktronica/buttonpusher&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;how-it-works%2C-briefly&quot; tabindex=&quot;-1&quot;&gt;How it works, briefly&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/parts.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/parts.jpg&quot; alt=&quot;The parts of buttonpusher&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The Nintendo Switch&#39;s Joy-Con slides into a matching rail.&lt;/li&gt;
&lt;li&gt;A servo rotates a hammer arm that swings over to press the &amp;quot;A&amp;quot; button.&lt;/li&gt;
&lt;li&gt;Menu and progress are displayed on a 16x2 character LCD.&lt;/li&gt;
&lt;li&gt;A rotary encoder allows for sequence and count menu selection.&lt;/li&gt;
&lt;li&gt;A small tactile switch lets the user halt any running sequence or navigate back in the menu.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The sequences on it are hardcoded for Animal Crossing, but it could be easily extended for other games or usages, as long as the only button required to push is &amp;quot;A&amp;quot; and the timings are fixed.&lt;/p&gt;
&lt;h2 id=&quot;lessons-abound&quot; tabindex=&quot;-1&quot;&gt;Lessons abound&lt;/h2&gt;
&lt;p&gt;Yes, this is &amp;quot;Yet Another Unnecessary Thing,&amp;quot; but it was a good excuse to get familiar with some unfamiliar tech like rotary encoders and LCD character displays. &lt;a href=&quot;https://blog.tommy.sh/posts/prototype-post-mortem-four-step-octaved-sequencer/&quot;&gt;Per usual&lt;/a&gt;, I got some nice takeaways too.&lt;/p&gt;
&lt;h3 id=&quot;lesson-1%3A-don&#39;t-lose-force&quot; tabindex=&quot;-1&quot;&gt;Lesson 1: Don&#39;t lose force&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/prototype-to-done-ish.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/prototype-to-done-ish.jpg&quot; alt=&quot;prototype vs &amp;quot;done&amp;quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The first version was made out of &lt;a href=&quot;https://en.wikipedia.org/wiki/Foamcore&quot;&gt;foamcore board&lt;/a&gt;, masking tape, and craft wood. It didn&#39;t have a menu or display and needed to have its code updated to switch the sequence or count. Still, &lt;a href=&quot;https://www.instagram.com/p/B--teotBIE7/&quot;&gt;it worked pretty well&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;It used a wooden lever to push the button, and I think that made me think the servo was underpowered and not strong enough to push the button all the way down.&lt;/p&gt;
&lt;p&gt;But I was wrong! The servo was indeed strong enough -- it was just losing torque through various design flaws that were fixed in the eventual 3D-printed version:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Joy-Con controller mount is extra tight fit so there&#39;s no room to wiggle&lt;/li&gt;
&lt;li&gt;A stool under the Joy-Con provides an opposing force when the hammer fully descends&lt;/li&gt;
&lt;li&gt;And walls on opposite side of the servo prevent it from rocking back and away from the Joy-Con&lt;/li&gt;
&lt;li&gt;The hammer arm first connects to a stock servo horn before its axle -- this avoids fine wear-and-tear and eventual slipping from the 3D-printed plastic&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/1-horn_and_mount-2.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/1-horn_and_mount-2.jpg&quot; alt=&quot;buttonpusher horn and mount&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We basically want to keep the connections between the servo, its horn/arm, and the Joy-Con as fixed and rigid as possible. Any looseness is a loss of force that would otherwise be used to push the button.&lt;/p&gt;
&lt;h3 id=&quot;lesson-2%3A-use-what-ya-got&quot; tabindex=&quot;-1&quot;&gt;Lesson 2: Use what ya got&lt;/h3&gt;
&lt;p&gt;Speaking of that hammer arm...&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/buttonpusher-pushin-buttons.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/buttonpusher-pushin-buttons.gif&quot; alt=&quot;An arm for a horn for an axle&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&#39;d intended for the arm to attach directly to the servo axle (&lt;a href=&quot;https://blog.tommy.sh/posts/quick-tip-hone-in-on-the-perfect-fit-with-a-goldilocks-array/&quot;&gt;and even spent a good amount of time dialing in the exact fit for its cavity&lt;/a&gt;) but it ultimately didn&#39;t work because the &amp;quot;teeth&amp;quot; on my 3D-printed part quickly wore out and lost their grip on the axle.&lt;/p&gt;
&lt;p&gt;Instead, I modeled one of the &lt;a href=&quot;https://github.com/rocktronica/buttonpusher/blob/master/openscad/lib/horns.scad#L3&quot;&gt;injection-molded propeller horns that came with the servo&lt;/a&gt; and used &lt;em&gt;it&lt;/em&gt; as the cavity for the arm. With cheap plastic, bigger is better.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative 1:&lt;/strong&gt; Screw the arm horn tight into the servo, but I was worried about stripping it out while iterating on the design&lt;br /&gt;
&lt;strong&gt;Alternative 2:&lt;/strong&gt; Upgrade the plastic, which I just wasn&#39;t jazzed about&lt;/p&gt;
&lt;h3 id=&quot;lesson-3%3A-save-your-memory&quot; tabindex=&quot;-1&quot;&gt;Lesson 3: Save your memory&lt;/h3&gt;
&lt;p&gt;With all that CircuitPython code, I found myself quickly running out of memory on the Metro M0 Express and needed to compile all the &lt;code&gt;.py&lt;/code&gt; Python files into &lt;code&gt;.mpy&lt;/code&gt; MicroPython bytecode files that consume less memory when deployed.&lt;/p&gt;
&lt;p&gt;To make that easier, I wrote &lt;a href=&quot;https://github.com/rocktronica/circuitpython_tools&quot;&gt;&lt;code&gt;circuitpython_tools&lt;/code&gt;&lt;/a&gt;, a work-in-progress shell script that watches for local changes then automatically compiles and deploys to the board, saving me &lt;strong&gt;LOTS&lt;/strong&gt; of time.&lt;/p&gt;
&lt;p&gt;(The novelty of automating things while making a thing that automates things was not lost on me!)&lt;/p&gt;
&lt;h3 id=&quot;lesson-4%3A-consider-footprint-when-choosing-a-microcontroller-board&quot; tabindex=&quot;-1&quot;&gt;Lesson 4: Consider footprint when choosing a microcontroller board&lt;/h3&gt;
&lt;p&gt;When I added menu controls and the LCD display, I had to upgrade the board to something with more IO pins.&lt;/p&gt;
&lt;p&gt;And the only board I had around and fit the bill was a Metro M0 Express. It has a pin layout like the Arduino Uno: two rows of pin headers and (I learned the hard way) irregularly spaced pins on one side that don&#39;t match standard .1&amp;quot; perfboard spacing.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/1-metro-2.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/1-metro-2.jpg&quot; alt=&quot;Metro M0 Express&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The electronic components connect to that board by a one-off PCB (a &amp;quot;shield&amp;quot; in Arduino parlance) that I hand-soldered. Because I 1) wanted to solder to both sides of the shield, 2) didn&#39;t have a double-sided perfboard big enough, and 3) had to work around the Arduino&#39;s unfortunate pin spacing, my shield uses right-angle headers and ribbon cable to connect to the character LCD. It&#39;s then supported by &lt;a href=&quot;https://github.com/rocktronica/buttonpusher/blob/master/3d-models/standoff.stl&quot;&gt;crude 3D-printed standoffs&lt;/a&gt; where the headers &lt;em&gt;should&lt;/em&gt; have been.&lt;/p&gt;
&lt;p&gt;Here&#39;s the shield stacked on top, without the character LCD:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/1-perfboard-2.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/1-perfboard-2.jpg&quot; alt=&quot;The one-off perfboard&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For future projects like this, I&#39;ll save some headaches and go for a smaller board with a standard pin spacing. Good lesson.&lt;/p&gt;
&lt;h2 id=&quot;et-cetera&quot; tabindex=&quot;-1&quot;&gt;Et cetera&lt;/h2&gt;
&lt;h3 id=&quot;other-stuff-i&#39;m-proud-of&quot; tabindex=&quot;-1&quot;&gt;Other stuff I&#39;m proud of&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/rocktronica/buttonpusher/commit/b657c0f2c79eed136f34a4f24cf04cca0b025076&quot;&gt;The math to calculate percent completed and timing&lt;/a&gt; is, I think!, pretty cool. It tries to honor the prescribed sequence timing by automatically making up for variances in servo/LCD update times, while updating the display in realtime.&lt;/li&gt;
&lt;li&gt;Design For Manufacturing, or ways the models avoid supports when printing:
&lt;ul&gt;
&lt;li&gt;The cavity in the Joy-Con mount has super small columns distributed across its length. These easily break away when assembling.&lt;/li&gt;
&lt;li&gt;The hammer head has a flat side so it can print laying down without supports.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The servo clicks into a cavity of its negative and doesn&#39;t need screws. Not that I&#39;m opposed to that, it just wasn&#39;t necessary...&lt;/li&gt;
&lt;li&gt;The Python code is &lt;a href=&quot;https://pypi.org/project/black/&quot;&gt;blackened&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;open-questions&quot; tabindex=&quot;-1&quot;&gt;Open questions&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Are there uses for this outside of novelty hacking? Assistive technology?&lt;/li&gt;
&lt;li&gt;How could it work with different controllers or game systems?&lt;/li&gt;
&lt;li&gt;Can it push &lt;em&gt;more&lt;/em&gt; buttons?&lt;/li&gt;
&lt;li&gt;The servo could probably be replaced with a solenoid and lever. (Not a question, I guess.)&lt;/li&gt;
&lt;li&gt;What would an enclosure look like? Could the arm retract into it somehow? How about a battery pack to work without the USB cable?&lt;/li&gt;
&lt;li&gt;What if it had Joy-Con mounts on both sides? Or if it mounted in between the Switch&#39;s screen and controller?&lt;/li&gt;
&lt;/ul&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;appendices&quot; tabindex=&quot;-1&quot;&gt;Appendices&lt;/h2&gt;
&lt;h3 id=&quot;appendix-a%3A-visualizing-progress&quot; tabindex=&quot;-1&quot;&gt;Appendix A: Visualizing progress&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/buttonpusher/development-032.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/buttonpusher/development-032.gif&quot; alt=&quot;Developing the 3D models&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While procrastinating on writing this blog post, I &lt;a href=&quot;https://gist.github.com/rocktronica/4f33efbbfde3ced727244d89aca57553&quot;&gt;hacked out some quick scripts&lt;/a&gt; to visualize the design&#39;s evolution from its git commits. You can see the Joy-Con mount getting fine-tuned, iterations on how the servo attaches and is supported, its horns and arms, its abandoned lever idea when I thought the servo was too weak, and tweaks on the final screw mounts.&lt;/p&gt;
&lt;h3 id=&quot;appendix-b%3A-is-this-a-hack%3F&quot; tabindex=&quot;-1&quot;&gt;Appendix B: Is this a hack?&lt;/h3&gt;
&lt;p&gt;While showing this project to friends, an interesting topic came up: Is this hacking?&lt;/p&gt;
&lt;p&gt;I&#39;d argue that it&#39;s not. There&#39;re no modifications to the original Nintendo hardware nor its software. The machine is physically doing a job no different from my thumb, and it&#39;s not even smart about it: the sequence timings are programmed beforehand, and it has no feedback loop to know if they&#39;re completed successfully.&lt;/p&gt;
&lt;p&gt;But it&#39;s easy to imagine versions of this &amp;quot;machine that pushes buttons&amp;quot; idea that creep closer to something Nintendo would disapprove of, where, in each step, the human interaction is abstracted futher away from its consequences:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;What if the button pushes weren&#39;t mechanical? The button&#39;s pins could be soldered to relays or maybe a &lt;a href=&quot;https://en.wikibooks.org/wiki/Practical_Electronics/IC/4066&quot;&gt;4066 chip&lt;/a&gt;, allowing its circuit to be closed electronically without any physical movement.&lt;/li&gt;
&lt;li&gt;Another version skips soldering entirely and has the code directly interface with the console to emulate button presses.&lt;/li&gt;
&lt;li&gt;The Switch&#39;s video output could be analyzed in realtime, and &lt;a href=&quot;https://en.wikipedia.org/wiki/Optical_character_recognition&quot;&gt;OCR&lt;/a&gt; could be used to read the dialog text. Instead of it being programmed beforehand with the sequence&#39;s timings, it could adapt automatically just like a human would.&lt;/li&gt;
&lt;li&gt;Soon enough, the game has an API and a bot could be trained to play it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;(Beyond #1, I have no idea how to do any of that.)&lt;/p&gt;
&lt;p&gt;If those ideas are laid out in a spectrum with buttonpusher at the front, it seems to me that the definition of hacking is an arbitrary line that we all draw somewhere. &amp;quot;This is okay and this is not.&amp;quot;&lt;/p&gt;
&lt;p&gt;Just some thoughts!&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>POLY555 Synth</title>
		<link href="https://blog.tommy.sh/posts/poly555-synth/"/>
		<updated>Sun, 27 Dec 2020 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/poly555-synth/</id>
		<content type="html">&lt;p&gt;I made a new Oskitone synth: the POLY555!&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/495255208&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s an analog, 20 note &lt;a href=&quot;https://en.wikipedia.org/wiki/Polyphony&quot;&gt;&lt;em&gt;poly&lt;/em&gt;phonic&lt;/a&gt;, square wave synthesizer based on the &lt;a href=&quot;https://en.wikipedia.org/wiki/555_timer_IC&quot;&gt;&lt;em&gt;555&lt;/em&gt; timer chip&lt;/a&gt;. The enclosure and keys are 3D-printed, its models were programmed in OpenSCAD, and its PCB was designed in Kicad.&lt;/p&gt;
&lt;h2 id=&quot;a-little-history&quot; tabindex=&quot;-1&quot;&gt;A little history&lt;/h2&gt;
&lt;p&gt;The monophonic (one note at a time) &lt;a href=&quot;https://blog.tommy.sh/posts/okay-2-synth/&quot;&gt;OKAY synths&lt;/a&gt; I made a couple years ago also used the 555 timer as their oscillator, as a sort of homage to the ubiquitous chip&#39;s long history within the electronics community. When I showed one to folks in the scene, &amp;quot;the best 555 synth ever&amp;quot; was an easy, understandable pitch.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/poly555_and_okay_2-1.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/poly555_and_okay_2-1-638.jpg&quot; alt=&quot;POLY555 + OKAY 2&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But the first question I always got was &amp;quot;How can it play more than one note?&amp;quot;. To that I&#39;d pop the hood and explain that since it has only one 555 to make one oscillator to make one note, to have more notes and still use the 555 I&#39;d need... more 555s!&lt;/p&gt;
&lt;p&gt;And while there are more economical ways to get analog polyphony (at the least, the &lt;a href=&quot;https://en.wikipedia.org/wiki/555_timer_IC#556_dual_timer&quot;&gt;556&lt;/a&gt; immediately comes to mind), I kept with discrete 555s because I thought it&#39;d be fun to take this train of thought to its logical, if inconvenient!, extreme.&lt;/p&gt;
&lt;p&gt;(I consider the POLY555 to be a &lt;a href=&quot;https://en.wikipedia.org/wiki/Spiritual_successor&quot;&gt;spiritual successor&lt;/a&gt; to the OKAYs, which I haven&#39;t abandoned yet but absolutely need to give some TLC...)&lt;/p&gt;
&lt;h2 id=&quot;features&quot; tabindex=&quot;-1&quot;&gt;Features&lt;/h2&gt;
&lt;table class=&quot;details&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/timers-0.jpg&quot;&gt;
                &lt;img alt=&quot;volume wheel&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/timers-0-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Exposed circuitry&lt;/strong&gt;&lt;br /&gt; Obviously, right?! The 20 555 timer circuits are lovingly displayed in all their glory beneath a piece of plexiglass to protect them from dust. Each circuit also has an LED that lights up when it&#39;s supplied power. BTW, I chose 20 and picked their notes so they&#39;d line up nicely in a grid!&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/volume_wheel.jpg&quot;&gt;
                &lt;img alt=&quot;volume wheel&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/volume_wheel-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Thumbwheel volume control&lt;/strong&gt;&lt;br /&gt; Just like an old &lt;a href=&quot;https://en.wikipedia.org/wiki/Walkman&quot;&gt;Walkman&lt;/a&gt;, volume is controlled by a small wheel on the side. Instead of using a thumbwheel potentiometer, the wheel is 3D-printed and mounts to a pot identical to the timers’ tuners.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/power_switch.jpg&quot;&gt;
                &lt;img alt=&quot;power switch&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/power_switch-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Power switch on bottom&lt;/strong&gt;&lt;br /&gt; The power switch is similarly hidden away in a recessed cavity on the bottom of the enclosure with engraved binary labels.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/pencil_stand.jpg&quot;&gt;
                &lt;img alt=&quot;pencil stand&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/pencil_stand-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;&lt;strong&gt;Pencil stand&lt;/strong&gt;&lt;br /&gt; Jam a writing utensil in there to prop it up like a picture frame. Admire it! It&#39;s cool!&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;h2 id=&quot;how-does-it-work&quot; tabindex=&quot;-1&quot;&gt;How does it work&lt;/h2&gt;
&lt;h3 id=&quot;schematic&quot; tabindex=&quot;-1&quot;&gt;Schematic&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/poly_555.svg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/poly_555.svg&quot; alt=&quot;POLY555 main schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From left to right:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A sliding power switch connects the 9v battery&#39;s power to an on/off indicator LED, a 7805 voltage regulator, and a 386 amplifier.&lt;/li&gt;
&lt;li&gt;Regulated 5v is distributed across 20 tactile switch buttons, each of which is connected to a corresponding timer circuit, seen below.&lt;/li&gt;
&lt;li&gt;Those timers&#39; outputs bus to a standard linear trimmer pot &lt;a href=&quot;https://sound-au.com/project01.htm&quot;&gt;tricked into having a logarithm sweep&lt;/a&gt;, before going to the 386 amp&#39;s input.&lt;/li&gt;
&lt;li&gt;The 386 drives our speaker!&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;timer-circuit&quot; tabindex=&quot;-1&quot;&gt;Timer circuit&lt;/h4&gt;
&lt;p&gt;All 20 555 circuits share the same circuit but have unique component IDs.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/555_astable-Sheet60F4E92A-cropped.svg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/555_astable-Sheet60F4E92A-cropped.svg&quot; alt=&quot;POLY555 555 schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Again, from left to right:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An LED puts on a little light show&lt;/li&gt;
&lt;li&gt;C1 is a &lt;a href=&quot;http://neilwebber.com/notes/2017/03/18/555-timer-chip-and-the-importance-of-bypass-capacitors/&quot;&gt;bypass cap&lt;/a&gt; for stability&lt;/li&gt;
&lt;li&gt;This 555 circuit is called an astable multivibrator (oscillator) and is modified to have a 50/50 duty cycle... in other words, a square wave!&lt;/li&gt;
&lt;li&gt;The oscillator&#39;s frequency is determined by the C2 cap and the resistors R3 and RV1. RV1 is the 1k trimmer potentiometer for tuning.&lt;/li&gt;
&lt;li&gt;The chip&#39;s output passes through a &amp;quot;mixing&amp;quot; 10k resistor before leaving. This prevents the 555s from &amp;quot;sinking&amp;quot; each other, which would sound more like modulation (like, a lower frequency superseding a higher one) than mixing together harmoniously.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;3d-printed-parts&quot; tabindex=&quot;-1&quot;&gt;3D-printed parts&lt;/h3&gt;
&lt;p&gt;Outside of the electronics and plexiglass, the rest of the POLY555 is 3D-printed.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/assembly_parts-1.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/assembly_parts-1-690-032.gif&quot; alt=&quot;Animation of POLY555&#39;s 3D-printed part assembly&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enclosure bottom&lt;/li&gt;
&lt;li&gt;Mounting rail for the keys to rest on&lt;/li&gt;
&lt;li&gt;Keys&lt;/li&gt;
&lt;li&gt;Volume wheel&lt;/li&gt;
&lt;li&gt;Enclosure top&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;design-for-manufacturing&quot; tabindex=&quot;-1&quot;&gt;Design for Manufacturing&lt;/h4&gt;
&lt;p&gt;Per usual with 3D-printed stuff, there are various tricks to get it to print nicely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Floating screw holes &lt;em&gt;don’t&lt;/em&gt; have supports or the sacrificial bridge technique I previously wrote about. Instead, &lt;a href=&quot;https://hackaday.com/2020/05/17/look-ma-no-support-for-my-floating-holes/&quot;&gt;the cavity is first laid out as short, increasingly tighter rectangles, and the final cylinder cavity sits on that&lt;/a&gt;. Cool trick: &lt;a href=&quot;https://github.com/oskitone/poly555/blob/master/openscad/lib/supportless_screw_cavity.scad&quot;&gt;it&#39;s an OpenSCAD module&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Wherever possible, 45 degree angles are used to obviate supports: the key endstop, on/off switch exposure, volume wheel brace.&lt;/li&gt;
&lt;li&gt;And where right angles won&#39;t work and supports can’t be avoided, they&#39;re baked into the models themselves so folks at home don’t have to have their slicer do it: plexiglass window pane supports, enclosure hitches&lt;/li&gt;
&lt;li&gt;Exported STLs are oriented on the bed how they ought to be printed, with help from a &lt;a href=&quot;https://github.com/oskitone/poly555/blob/master/make_stls.sh&quot;&gt;shell script&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The engraved &amp;quot;OSKITONE&amp;quot; and &amp;quot;POLY555&amp;quot; enclosure texts are 3D-printed with the text side &lt;em&gt;down&lt;/em&gt;. A &lt;a href=&quot;https://www.instagram.com/p/CFLXBmpj1tK/&quot;&gt;chamfer&lt;/a&gt; helps to alleviate some of the &amp;quot;elephant foot&amp;quot; that happens on the a print&#39;s first few layers.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;lessons-learned-from-the-okay&quot; tabindex=&quot;-1&quot;&gt;Lessons learned from the OKAY&lt;/h2&gt;
&lt;h3 id=&quot;better-tuning&quot; tabindex=&quot;-1&quot;&gt;Better tuning&lt;/h3&gt;
&lt;p&gt;The POLY555 is both easier to tune and stays in tune longer than the OKAYs. Here&#39;re the OKAY 2&#39;s tuners on the key&#39;s flip side:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/okay_2_tuners-0.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/okay_2_tuners-0-638.jpg&quot; alt=&quot;OKAY 2&#39;s tuners&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;That PCB is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Resistor_ladder&quot;&gt;resistor ladder&lt;/a&gt;. The further left on the keyboard the user plays, the more the resistance from the ladder, and the lower the note. So if one pot strayed out of tune, all the notes below it would too.&lt;/li&gt;
&lt;li&gt;The pots have 20 turns, which is great for high precision but painful on the wrist&lt;/li&gt;
&lt;li&gt;Should any of the buttons start to fail and introduce their own resistance, that gets added, causing an accidental vibrato.&lt;/li&gt;
&lt;li&gt;The 555s are sensitive to voltage changes. As the battery runs low, so do the frequencies.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of that is fixed with the POLY555, where the tuning pots are independant and need less turning, the power buttons are separate from the tuning paths, and a regulator ensures constant voltage.&lt;/p&gt;
&lt;h3 id=&quot;hopefully-easier-to-put-together&quot; tabindex=&quot;-1&quot;&gt;Hopefully easier to put together&lt;/h3&gt;
&lt;p&gt;Believe it or not, I think the POLY555 is easier (or at least more straightforward) to solder than the OKAY. Here&#39;s the inside of the OKAY 2 again for reference:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/okay_2_open-0.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/okay_2_open-0-638.jpg&quot; alt=&quot;OKAY 2 internals&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Multiple PCBs connected with ribbon cable&lt;/li&gt;
&lt;li&gt;&amp;quot;Floating&amp;quot; components that don&#39;t mount to the PCB and also require wiring&lt;/li&gt;
&lt;li&gt;Some component footprints aren&#39;t actually the right size and require bending leads... yikes!&lt;/li&gt;
&lt;li&gt;Optional or multi-purpose pads that were intended to engender hacking but were mostly ignored&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The POLY555 suffers from none of that, and the end result is that its assembly should hopefully feel a lot closer to the &lt;a href=&quot;https://en.wikipedia.org/wiki/Paint_by_number&quot;&gt;Paint-By-Number&lt;/a&gt; kind of thing that, for better or wose, folks expect from an electronics kit.&lt;/p&gt;
&lt;h3 id=&quot;narrowing-the-gap-between-expected-and-actual-complexity&quot; tabindex=&quot;-1&quot;&gt;Narrowing the gap between expected and actual complexity&lt;/h3&gt;
&lt;p&gt;The OKAYs were so adorable that they were cursed with looking much simpler than they actually were, which was good because I got sales but bad because (I&#39;m almost certain) fewer folks got them assembled successfully in the end (which, IMHO, is the true heuristic for a product&#39;s success. I&#39;ve no interest in being a &amp;quot;&lt;a href=&quot;https://www.dictionary.com/browse/shelfware&quot;&gt;shelfware&lt;/a&gt;&amp;quot; designer).&lt;/p&gt;
&lt;p&gt;So in addition to hopefully making the POLY555 easier to assemble, I&#39;m also &lt;em&gt;intentionally making it look difficult&lt;/em&gt; by showcasing its circuitry. By celebrating the complexity instead of abstracting it away, I&#39;m hopeful the kind of folks who are able to will self-select into purchasing and get to the finish line.&lt;/p&gt;
&lt;p&gt;We&#39;ll see!&lt;/p&gt;
&lt;h3 id=&quot;assembly-guide&quot; tabindex=&quot;-1&quot;&gt;Assembly guide&lt;/h3&gt;
&lt;p&gt;The OKAY kits shipped with their assembly guides printed out and folded into &lt;a href=&quot;https://en.wikipedia.org/wiki/Zine&quot;&gt;zines&lt;/a&gt;, and some even had &lt;a href=&quot;https://www.instagram.com/p/BZ1lQ4IDc3E/&quot;&gt;makeshift-letterpressed&lt;/a&gt; covers. There&#39;s no doubt a lot of old school charm to that, but it was hard to ensure folks got the best instructions with black ink on dead trees.&lt;/p&gt;
&lt;p&gt;So the POLY555&#39;s assembly guide is all online, complete with schematics and hacking ideas: &lt;a href=&quot;https://oskitone.github.io/poly555/&quot;&gt;https://oskitone.github.io/poly555/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/assembly-guide.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/assembly-guide.png&quot; alt=&quot;Assembly guide&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;key-endstop&quot; tabindex=&quot;-1&quot;&gt;Key endstop&lt;/h3&gt;
&lt;p&gt;Exhibiting at Maker Faire a couple years ago was like a whirlwind tour of stress testing. If enough force is applied to the keys (Thanks, kids! 😬), they’ll push beyond their buttons and break at the the cantilevers where they mount.&lt;/p&gt;
&lt;p&gt;So the POLY555&#39;s enclosure has an endstop that fits into a matching cavity on the keys, preventing them from both being pushed too far down &lt;em&gt;and&lt;/em&gt; from being pulled up. The endstop cavity on the keys is just tall enough for the travel distance required to actuate the switches before hitting the endstop.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/key_hitch_cross_section.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/key_hitch_cross_section.png&quot; alt=&quot;Profile cross-section showing the key endstop&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Time will tell if that&#39;ll suffice, but it&#39;s definitely a step in the right direction.&lt;/p&gt;
&lt;h2 id=&quot;prototyping&quot; tabindex=&quot;-1&quot;&gt;Prototyping&lt;/h2&gt;
&lt;p&gt;Prototypes in various stages of scrapping:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/prototypes-6.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/prototypes-6-638.jpg&quot; alt=&quot;Group shot of the POLY555 prototypes&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;^ Dig the cutesy 13 note version!&lt;/p&gt;
&lt;h3 id=&quot;abandoned-ideas&quot; tabindex=&quot;-1&quot;&gt;Abandoned ideas&lt;/h3&gt;
&lt;p&gt;A recurring theme you&#39;ll see in these is that the idea showed promise but just wasn&#39;t worth how much effort it required. I&#39;m sure I&#39;ll revisit one or two in a future project, where the work-to-reward ratio is better.&lt;/p&gt;
&lt;table class=&quot;details&quot;&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/coarse_and_fine_tuners.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: course and fine tuners&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/coarse_and_fine_tuners-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Course and fine tuners&lt;/strong&gt;&lt;br /&gt;
            The first PCB used two pots summed together for each timer circuit: one with a 3/4 turn for big, &quot;coarse&quot; changes and another with 20 turns for more precise, &quot;fine&quot; control. In practice, I found I was only using one of them while tuning and the other could just be a fixed resistor.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/speaker_under_pcb-3.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: speaker on bottom&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/speaker_under_pcb-3-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Speaker on bottom&lt;/strong&gt;&lt;br /&gt;
            The first prototype tried a wide, flat speaker &lt;em&gt;under&lt;/em&gt; the PCB, exposed through the enclosure&#39;s bottom. I didn&#39;t like that it required the instrument to be raised to prevent muting, nor that the sound was, at best, misdirected.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/speaker_under_keys-2.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: keys as speaker grill&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/speaker_under_keys-2-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Keys as speaker grill&lt;/strong&gt;&lt;br /&gt;
            After the speaker on the bottom, I tried hiding it under the keys and using them as a grill. I do still kind of like this idea, but, like the one above, it requires that the speaker is flat and dinky. I decided if you’re going to spend a long time making something, it should have a bigger sound than what a flat speaker can give, so I moved the speaker out from under the keys and into a sidepanel to the right of the window.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/hinges_and_clasp.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: hinges and clasps&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/hinges_and_clasp-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Hinges and clasps&lt;/strong&gt;&lt;br /&gt;
            The OKAYs used hinges and clasps to make them easy to pop open and display the internals — not nearly as important when there’s a big window built right in.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/engraving_lightpipe-1.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: lit branding&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/engraving_lightpipe-1-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Lightpipe branding&lt;/strong&gt;&lt;br /&gt;
            With the speaker in a sidepanel, I tried to showcase the on/off LED indicator with a &lt;a href=&quot;https://blog.tommy.sh/posts/early-experiments-with-3d-printed-light-pipes/&quot;&gt;3D-printed lightpipe&lt;/a&gt;. As much as I would’ve liked to have drawn more attention to the POLY555’s branding, &lt;a href=&quot;https://www.instagram.com/p/CFfZUwZDR8n/&quot;&gt;the results weren&#39;t worth the effort&lt;/a&gt;.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/engraving_led-0.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: Lit, engraved branding&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/engraving_led-0-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Lit, engraved branding&lt;/strong&gt;&lt;br /&gt;
            Another idea was to use a super bright LED to light the engraved branding text from underneath. I tried a handful of different LED diffusions, brightnesses, and dispersion angles without satisfaction. Probably needs a lightpipe that 3D-printing alone can&#39;t make.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/key_hitch_dovetail-1.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: dovetailed, hitch endstop&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/key_hitch_dovetail-1-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Dovetailed, hitch endstop&lt;/strong&gt;&lt;br /&gt;
            You can see in some of the pics above that I was trying a key endstop that&#39;d extend up from the enclosure bottom and hitch into both natural and accidental keys. I even briefly had this piece connect to the enclosure with dovetail joints. Abandoned for unnecessary complexity.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/tongue_and_groove-1.jpg&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: tongue-and-groove enclosure lips&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/tongue_and_groove-1-250.jpg&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Tongue-and-groove enclosure lips&lt;/strong&gt;&lt;br /&gt;
            The enclosure’s top and bottom were briefly held together by &lt;a href=&quot;https://www.instagram.com/p/CEp-fIOjtON/&quot;&gt;matching tongues and grooves&lt;/a&gt;. They were abandoned for not being strong enough.
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/handle.png&quot;&gt;
                &lt;img alt=&quot;Abandoned idea: handle&quot; src=&quot;https://blog.tommy.sh/content/poly555-synth/handle.png&quot; /&gt;
            &lt;/a&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;strong&gt;Handle&lt;/strong&gt;&lt;br /&gt;
            Ha!
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;h2 id=&quot;get-(or-make!)-your-own&quot; tabindex=&quot;-1&quot;&gt;Get (or make!) your own&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/poly555-synth/kit.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/poly555-synth/kit-638.jpg&quot; alt=&quot;POLY555 DIY Electronics Kit&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Like the OKAYs, the POLY555 is available for purchase assembled or as a DIY electronics kit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Buy the &lt;a href=&quot;https://www.oskitone.com/product/poly555-synth&quot;&gt;POLY555 Synth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Buy the &lt;a href=&quot;https://www.oskitone.com/product/poly555-synth-diy-kit&quot;&gt;POLY555 Synth DIY Kit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For the DIY kits, the &lt;a href=&quot;https://www.thingiverse.com/thing:4676728/files&quot;&gt;3D models are shared on Thingiverse&lt;/a&gt; for folks with ~20 hours and access to a 3D printer.&lt;/p&gt;
&lt;h3 id=&quot;open-source&quot; tabindex=&quot;-1&quot;&gt;Open-Source&lt;/h3&gt;
&lt;p&gt;Unlike the OKAYs, I&#39;m also open-sourcing all the OpenSCAD code used to generate the 3D models, as well as the Kicad PCB project, which I wasn&#39;t doing before: &lt;a href=&quot;https://github.com/oskitone/poly_555&quot;&gt;https://github.com/oskitone/poly_555&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The code is generously licensed. Please reach out to me if you do anything interesting with it or have any questions!&lt;/p&gt;
&lt;h2 id=&quot;what&#39;s-next%3F&quot; tabindex=&quot;-1&quot;&gt;What&#39;s next?&lt;/h2&gt;
&lt;p&gt;Um, probably nothing to do with 555 timers. 😅&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/487720782&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;style&gt;
section.content .custom_page .details {
    table-layout: auto;
}

section.content .custom_page .details img {
    max-width: 100%;
}

section.content .custom_page .details td {
    vertical-align: top;
    padding-right: 10px;
}

section.content .custom_page .details td:first-of-type {
     width: 40%;
}

section.content .custom_page .details img {
    display: inline;
}
&lt;/style&gt;
</content>
	</entry>
	
	<entry>
		<title>Oskitone Makes an Atari Punk Console</title>
		<link href="https://blog.tommy.sh/posts/oskitone-makes-an-atari-punk-console/"/>
		<updated>Sun, 28 Feb 2021 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/oskitone-makes-an-atari-punk-console/</id>
		<content type="html">&lt;p&gt;A decapitated robot head? An extraterrestrial communicator? A specter summoner?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/apc.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/apc-638.jpg&quot; alt=&quot;Oskitone APC&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nope (and yep!), it&#39;s an APC!&lt;/p&gt;
&lt;p&gt;Just like the other Oskitone projects, it&#39;s a 3D-printed electronic musical ~instrument, designed in Kicad and and OpenSCAD, &lt;a href=&quot;https://github.com/oskitone/apc&quot;&gt;Open-Source&lt;/a&gt;, and just plain ol&#39; annoying fun.&lt;/p&gt;
&lt;p&gt;Here it is in action:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/519619777&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;As usual, this blog post details all the nooks and crannies that can&#39;t fit on the store&#39;s product page!&lt;/p&gt;
&lt;h2 id=&quot;byproducts&quot; tabindex=&quot;-1&quot;&gt;Byproducts&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/By-product&quot;&gt;Byproducts&lt;/a&gt; are secondary, unintended goods from the production of some primary good. You know a couple already:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bran from flour, molasses from sugar&lt;/li&gt;
&lt;li&gt;Gasoline and plastic shopping bags from oil&lt;/li&gt;
&lt;li&gt;Leather, gelatin, and lots of surprising stuff from meat&lt;/li&gt;
&lt;li&gt;Duraflame logs from pencils&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the APC is kind of a byproduct of the &lt;a href=&quot;https://blog.tommy.sh/posts/poly555-synth&quot;&gt;POLY555&lt;/a&gt;!&lt;/p&gt;
&lt;h3 id=&quot;how-pcbs-are-priced&quot; tabindex=&quot;-1&quot;&gt;How PCBs are priced&lt;/h3&gt;
&lt;p&gt;When you send a Printed Circuit Boards (PCB) design off to a manufacturer, you&#39;re billed by the square inch of the smallest rectangle it can fit on. A 4&amp;quot; circle is priced as a 4&amp;quot;x4&amp;quot; square, etc.&lt;/p&gt;
&lt;p&gt;Now. to make room for the speaker and battery, the POLY555&#39;s PCB design is shaped like an &amp;quot;L&amp;quot;. Flashback to this early version and feign shock at all of the empty space in the top right!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/poly555_pcb_l_shape.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/poly555_pcb_l_shape-638.jpg&quot; alt=&quot;An early POLY555 PCB in its &amp;quot;L&amp;quot; shape, highlighting its wasted space&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Getting small batches of big PCBs like this made domestically for the prototype phase isn&#39;t cheap, and my wallet is sensitive. Leaving that top right corner vacant means I&#39;m literally paying for nothing; the factory drills it out and throws it away.&lt;/p&gt;
&lt;p&gt;So what am I to do? I reach for my well worn copy of &lt;a href=&quot;https://www.sparkfun.com/products/11131&quot;&gt;Timer, OpAmp &amp;amp; Optoelectronic Circuits &amp;amp; Projects&lt;/a&gt;, turn to its most dog-eared page, hastily Kicad the circuit, and throw together an untested board design with some jelly bean components I have before sending the design off for fabrication.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/poly555_pcb_with_apc.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/poly555_pcb_with_apc-638.jpg&quot; alt=&quot;The same PCB as above, but now with all of its space used.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nice, it (mostly!) worked! Now I&#39;m fully utilizing the area that I&#39;m paying for: the POLY555 &amp;quot;L&amp;quot;s will go to their kits, which I was feverishly trying to bring to market at the time, and the smaller APC corner rectangles will break off and &lt;em&gt;eventually&lt;/em&gt;, &lt;em&gt;hopefully&lt;/em&gt; be made into something cool.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fun fact:&lt;/strong&gt; Connecting multiple board designs into one bigger board is called &amp;quot;panelizing&amp;quot;. Here I&#39;ve done it with little tabs that snap apart when bent, &lt;a href=&quot;https://www.instagram.com/p/CGD1r6Mjl1D/&quot;&gt;which is fun to do&lt;/a&gt;!&lt;/p&gt;
&lt;h2 id=&quot;yet-another-atari-punk-console&quot; tabindex=&quot;-1&quot;&gt;Yet another Atari Punk Console&lt;/h2&gt;
&lt;p&gt;The circuit in question was originally described as a &amp;quot;Sound Synthesizer&amp;quot; or &amp;quot;Stepped Tone Generator&amp;quot; by Forrest M. Mims III in Radio Shack books in the early 1980s and later came to be known as the &amp;quot;Atari Punk Console&amp;quot; (aka APC). People liked it enough that they kept making it, and now it&#39;s some kind of classic. For many folks, &lt;a href=&quot;https://www.instagram.com/p/iW11X5AnnJ/&quot;&gt;author included!&lt;/a&gt;, an APC is one of their first forays into electronics.&lt;/p&gt;
&lt;p&gt;If you google it, you&#39;ll find &lt;a href=&quot;https://hackaday.com/2015/09/17/the-ubiquitous-atari-punk-console/&quot;&gt;&lt;em&gt;countless&lt;/em&gt; varieties of this circuit&lt;/a&gt;. It&#39;s small enough to fit into any kind of makeshift enclosure, and its simplicity and flexibility make it an ideal subject for modifications.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/atari-punk-console-kit-serp.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/atari-punk-console-kit-serp-638.jpg&quot; alt=&quot;Googling &amp;quot;atari punk console kit&amp;quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In case it&#39;s not obvious, the market differentiation for the Oskitone APC is its design.&lt;/p&gt;
&lt;h3 id=&quot;how-does-it-work%3F&quot; tabindex=&quot;-1&quot;&gt;How does it work?&lt;/h3&gt;
&lt;p&gt;In short, it uses two 555 timers (like what I&#39;ve used in the &lt;a href=&quot;https://blog.tommy.sh/posts/poly555-synth&quot;&gt;POLY555&lt;/a&gt;, the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-2-synth&quot;&gt;OKAY 2&lt;/a&gt;, and the &lt;a href=&quot;https://blog.tommy.sh/posts/okay-synth&quot;&gt;original OKAY Synth&lt;/a&gt;) but often housed together in one chip called a 556. One timer is an astable oscillator making a square-ish wave; its output feeds into the other 555, wired up as a monostable &amp;quot;one-shot&amp;quot; (a circuit that, when triggered, outputs &lt;em&gt;one&lt;/em&gt; pulse of arbitrary length).&lt;/p&gt;
&lt;p&gt;Atari Punk Consoles are &amp;quot;played&amp;quot; (term used generously) with two potentiometers. One on the astable controls its frequency, and another on the monostable controls its length.&lt;/p&gt;
&lt;p&gt;The schematic for the Oskitone APC is pretty much lifted straight from the original Mims diagram with minor pot value changes, a switch, and an LED for on/off indication.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/schematic.svg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/schematic.svg&quot; alt=&quot;Oskitone APC schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;pcb&quot; tabindex=&quot;-1&quot;&gt;PCB&lt;/h2&gt;
&lt;p&gt;The final PCB design looks like this:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/apc_pcbs.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/apc_pcbs-638.jpg&quot; alt=&quot;The final APC PCB, shown blank and fully soldered&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The corner holes are for mounting screws, which are a good bet on any PCB but I ended up not using.&lt;/p&gt;
&lt;h3 id=&quot;picking-the-right-components&quot; tabindex=&quot;-1&quot;&gt;Picking the right components&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The little 1k trim potentiometer on the right is for volume. The first version of the PCB (see above) also used it for the playing pots, but I swapped them for much sturdier pots that&#39;ll do a better job standing up to aggressive playing.&lt;/li&gt;
&lt;li&gt;The speaker isn&#39;t great for bass, but it &lt;em&gt;is&lt;/em&gt; self-enclosed and easy to solder because it requires no hookup wire. Tidy! (I also had 100 of them from overzealous parts sourcing, just waiting for a project...)&lt;/li&gt;
&lt;li&gt;The 5mm LED, toggle switch, 1k trimpot, and battery snap are all used in the POLY555. The fewer unique components needed, the more economical to make -- sometimes the best things to use are the things you already have!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;product-design&quot; tabindex=&quot;-1&quot;&gt;Product design&lt;/h2&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/518376799&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Believe it or not, because of the APC-PCB-as-byproduct-of-POLY555 thing, the rest of the APC was designed months later. I probably had 100 &amp;quot;final&amp;quot; APC PCBs on hand before sitting down to really think about what it would look like as a finished object.&lt;/p&gt;
&lt;p&gt;Working around that fixed PCB constraint was an interesting &amp;quot;freedom in constraint&amp;quot; design challenge. I&#39;m sure, if given the opportunity for revision, I&#39;d nudge things around and delay the release, but would it have been worth it? &lt;em&gt;Who knows?!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/3d-printed-parts.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/3d-printed-parts.png&quot; alt=&quot;The APC&#39;s different parts for 3D-printing&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;wheel-knobs&quot; tabindex=&quot;-1&quot;&gt;Wheel knobs&lt;/h3&gt;
&lt;p&gt;The APC&#39;s knobs are more like little K&#39;Nex wheels than traditional potentiometer knobs. Without the enclosure, here&#39;s how they fit onto the pots:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/wheel_on_pcb.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/wheel_on_pcb-638.jpg&quot; alt=&quot;APC wheel on PCB&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And with the enclosure, with a closeup of the switch clutch:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/switch_clutch_and_wheel.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/switch_clutch_and_wheel-638.jpg&quot; alt=&quot;APC switch clutch demo&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On top, raised spheres act as combination position markers and &lt;a href=&quot;https://en.wikipedia.org/wiki/Brodie_knob&quot;&gt;brodie knobs&lt;/a&gt;, so the user can manipulate each pot using just their thumb. With the other fingers naturally wrapping to the back of the APC, it feels a lot like holding a joystick game controller.&lt;/li&gt;
&lt;li&gt;The wheels are exposed out of the enclosure&#39;s sides too, so you can roll it against your palms as another way to play. The exact amount of exposure and the friction ridges match the switch clutch.&lt;/li&gt;
&lt;li&gt;The pots I&#39;m shipping with the kits have knurled shafts that are locked onto with little shims in the wheel&#39;s inner cavity, as described in my old blog post about &lt;a href=&quot;https://blog.tommy.sh/posts/designing-potentiometer-knobs&quot;&gt;designing custom potentiometer knobs&lt;/a&gt;. There are no heat-set inserts to apply or screws to tighten.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Design for Manufacturing:&lt;/strong&gt; the pot cavities are generously chamfered for easier assembly and to make up for &amp;quot;elephant&#39;s foot&amp;quot; during printing, where the plastic expands on the first few layers due to weight and heat and can negatively impact fit tolerances.&lt;/p&gt;
&lt;h3 id=&quot;switch-clutch&quot; tabindex=&quot;-1&quot;&gt;Switch clutch&lt;/h3&gt;
&lt;p&gt;The APC has a plain, stock switch to toggle its power. Instead of letting it poke out through the enclosure&#39;s &lt;em&gt;top&lt;/em&gt;, it&#39;s abstracted by a piece I&#39;m calling a &lt;a href=&quot;https://twitter.com/oskitone/status/1357745179155853312&quot;&gt;&amp;quot;switch clutch&amp;quot;&lt;/a&gt; that sits next to the switch, clutches its actuator, and is activated through the enclosure&#39;s &lt;em&gt;side&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Here it is in detail without the enclosure:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/switch_clutch_demo.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/switch_clutch_demo-638.jpg&quot; alt=&quot;APC switch clutch demo&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;(That chipped corner is Artifact 1 of the PCB design. When the switch is in the off position, the clutch juts into the inner wall of the wheel&#39;s cavity, and that little cavity prevents obstruction to make it all work.)&lt;/p&gt;
&lt;p&gt;A piece like this seems superfluous, but it frees up the enclosure top to show off the speaker grill, makes it much easier for the user to toggle the switch, and ties it together with the wheels. I like it!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design for Manufacturing:&lt;/strong&gt; Two narrow walls with a one-layer-height gap of air before contact support the piece while 3D-printing and &lt;a href=&quot;https://twitter.com/oskitone/status/1367957529406316545&quot;&gt;break off clean&lt;/a&gt; when done.&lt;/p&gt;
&lt;h3 id=&quot;enclosure&quot; tabindex=&quot;-1&quot;&gt;Enclosure&lt;/h3&gt;
&lt;p&gt;The enclosure&#39;s outer dimensions are derived from the PCB, its components, and battery, including the battery&#39;s orientation. Here are some early iterations with the battery rotated a different way and shallower speaker grills:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/false_grill_designs.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/false_grill_designs-638.jpg&quot; alt=&quot;Iterations on the false grill designs&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Design for Manufacturing:&lt;/strong&gt; See the sort of quilty aperture pattern in those wheel well cavities? Those are me trying to perfect &lt;a href=&quot;https://hackaday.com/2020/05/17/look-ma-no-support-for-my-floating-holes/&quot;&gt;floating holes that can print without supports&lt;/a&gt;. As evidenced by the inconsistencies you might also see in them, they were tricky to get right because of 1) the required wheel diameter to have them expose out the enclosure&#39;s sides and 2) the super tight clearance between the speaker and internal wheel well walls. That difficulty is Artifact 2 of designing the PCB in isolation before the rest of the APC.&lt;/p&gt;
&lt;p&gt;I really like the final design and its asymmetrical cocked eyebrows. It&#39;s a weird, darling little thing with a lot of personality.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/apc_store.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/apc_store-638.jpg&quot; alt=&quot;Oskitone APC&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The enclosure&#39;s top and bottom slide together with &lt;a href=&quot;https://en.wikipedia.org/wiki/Tongue_and_groove&quot;&gt;tongue and groove joints&lt;/a&gt;, which were &lt;a href=&quot;https://www.instagram.com/p/CEp-fIOjtON/&quot;&gt;originally written for the POLY555&lt;/a&gt; before being abandoned for not being strong enough.&lt;/li&gt;
&lt;li&gt;The PCB nestles perfectly into the enclosure top, and rails on the enclosure bottom hold it into place. Again, no screws needed.&lt;/li&gt;
&lt;li&gt;The pot wheels sit in two, deep wells that extend over the sides for additional wheel access.&lt;/li&gt;
&lt;li&gt;A false grill covers 2/3 of the enclosure&#39;s top, entirely for aesthetics (the self-enclosed speaker doesn&#39;t need it), and wraps around the wheels. It obscures the speaker below by being extra deep and having two layers of grills at different angles. (Look close at the pic above and see if you can see the speaker cavity. Then compare to the yellow prototypes above. Huge difference!)&lt;/li&gt;
&lt;li&gt;The grill also wraps around the power LED cavity and an access hole for the volume potentiometer. (I&#39;d considered using the POLY555&#39;s thumbwheel but decided it wasn&#39;t worth it.)&lt;/li&gt;
&lt;li&gt;The non-grill space on the top is engraved with make and model text, and the bottom has &lt;a href=&quot;https://twitter.com/oskitone/status/1359292512234479617&quot;&gt;a big &amp;quot;OSKITONE&amp;quot; vanity wordmark&lt;/a&gt;, similar to previous Oskitone synths.&lt;/li&gt;
&lt;li&gt;Engravings on the sides mark on/off switch positions and a &amp;quot;V&amp;quot; for &amp;quot;Volume&amp;quot; access.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/side_engravings.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/side_engravings-638.jpg&quot; alt=&quot;APC&#39;s side engravings&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;get-or-make-your-own&quot; tabindex=&quot;-1&quot;&gt;Get or Make Your Own&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/kit_labels.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/kit_labels-638.jpg&quot; alt=&quot;APC kit labels&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Lots of folks have asked me to make something for younger makers or those new to electronics. While I&#39;m sure an annoying noise toy isn&#39;t, uh, &lt;em&gt;exactly&lt;/em&gt; what they wanted, I&#39;m hopeful this gets at least a little bit closer.&lt;/p&gt;
&lt;p&gt;It takes less than thirty minutes to put together:&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/519225741&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;The Oskitone APC is available &lt;a href=&quot;https://www.oskitone.com/product/apc&quot;&gt;fully assembled&lt;/a&gt; or as a &lt;a href=&quot;https://www.oskitone.com/product/apc-diy-electronics-kit&quot;&gt;DIY electronics kit&lt;/a&gt;. Like the POLY555 before it, it&#39;s fully &lt;a href=&quot;https://github.com/oskitone/apc&quot;&gt;Open-Source&lt;/a&gt;, from the PCB to the OpenSCAD code for the 3D models, to the documentation.&lt;/p&gt;
&lt;h2 id=&quot;what&#39;s-next%3F&quot; tabindex=&quot;-1&quot;&gt;What&#39;s Next?&lt;/h2&gt;
&lt;p&gt;Hopefully nothing to do with 555 timers. I mean it this time!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/apc-10-60-838-450-32.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/apc-10-60-838-450-32.gif&quot; alt=&quot;Oskitone APC CAD rotation&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/518375593&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;appendices&quot; tabindex=&quot;-1&quot;&gt;Appendices&lt;/h2&gt;
&lt;h3 id=&quot;appendix-a%3A-making-stls-in-the-command-line%2C-in-parallel&quot; tabindex=&quot;-1&quot;&gt;Appendix A: Making STLs in the command line, in parallel&lt;/h3&gt;
&lt;p&gt;In the OpenSCAD code, there&#39;s one top-level &lt;code&gt;apc&lt;/code&gt; module that encapsulates its children. Toggling different parts of the APC is done with arguments:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;apc(
  (show_enclosure_top = true),
  (show_enclosure_bottom = true),
  (show_pcb = true),
  (show_wheels = true),
  (show_switch_clutch = true),
  (show_battery = true),
  (show_dfm = true)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That works fine but is super laborious if you want to export an STL of each part individually, especially when you&#39;re making a lot of iterations during development. The APC&#39;s code borrows again from the POLY555 with its &lt;a href=&quot;https://github.com/oskitone/apc/blob/main/make_stls.sh&quot;&gt;&lt;code&gt;make_stls.sh&lt;/code&gt;&lt;/a&gt; shell script to automate that.&lt;/p&gt;
&lt;p&gt;Here&#39;s how it works:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using the &lt;a href=&quot;https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment&quot;&gt;OpenSCAD CLI&lt;/a&gt; &lt;code&gt;-D&lt;/code&gt; flag to override variables for each &lt;code&gt;show_...&lt;/code&gt; argument, iterates through a list of the model parts, setting each flag to false except for the part in question and exporting it as an STL.&lt;/li&gt;
&lt;li&gt;The STL&#39;s filename is prefixed with the timestamp and hash of the last relevant git commit. This way, there&#39;s never any confusion about which exact version of the code the STL is from, and the timestamp ensures they&#39;re sorted. (I think we&#39;re all familiar with terrible filenames like &lt;code&gt;xyz-final&lt;/code&gt;, &lt;code&gt;xyz-final2&lt;/code&gt;, &lt;code&gt;xyz-for_real_this_time_please&lt;/code&gt;. This is a million times better than that.)&lt;/li&gt;
&lt;li&gt;The STLs also render out in parallel to save time and in binary format to save space.&lt;/li&gt;
&lt;li&gt;When all are done, it zips them up into one file. Convenient!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It&#39;s also got a lot of neat things useful for development, like the ability to query for a subset of models to export, customizable folders and prefixes (as shown above), etc.&lt;/p&gt;
&lt;a name=&quot;self-hosting&quot;&gt;
&lt;h3 id=&quot;appendix-b%3A-self-hosting-stls&quot; tabindex=&quot;-1&quot;&gt;Appendix B: Self-hosting STLs&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update (Aug 2024):&lt;/strong&gt; Abandoned. It was a good idea but I wanted to use the GitHub Pages spot for documentation. Changed in commit &lt;a href=&quot;https://github.com/oskitone/apc/commit/ce413f2974140d3f657cee66c98740648b2fd8dd&quot;&gt;ce413f2974&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I&#39;m trying a new thing with the APC where I&#39;m hosting the STL files of the 3D models myself instead of using Thingiverse like I&#39;d normally do. To do that, there&#39;s also a &lt;a href=&quot;https://github.com/oskitone/apc/blob/main/downloads/deploy.sh&quot;&gt;&lt;code&gt;downloads/deploy.sh&lt;/code&gt;&lt;/a&gt; script that:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Optionally runs &lt;code&gt;make_stls.sh&lt;/code&gt; to make new STL files and zip&lt;/li&gt;
&lt;li&gt;Runs a Python script that generates a utilitarian &amp;quot;Downloads&amp;quot; web page for them using a &lt;a href=&quot;https://mustache.github.io/&quot;&gt;Mustache&lt;/a&gt; template.&lt;/li&gt;
&lt;li&gt;Deploys to &lt;a href=&quot;https://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt; for hosting by committing and pushing to a special &lt;code&gt;gh-pages&lt;/code&gt; branch.&lt;/li&gt;
&lt;li&gt;After a couple minutes, &lt;a href=&quot;https://oskitone.github.io/apc/&quot;&gt;oskitone.github.io/apc&lt;/a&gt; is automatically updated with all the latest files for download.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/downloads_page.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/downloads_page.png&quot; alt=&quot;&amp;quot;Downloads&amp;quot; page&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;What&#39;s great is that because the &lt;a href=&quot;https://twitter.com/oskitone/status/1364285024128786433&quot;&gt;binary STL files are 75% smaller than their ASCII counterparts &lt;em&gt;and&lt;/em&gt; the ZIP collects them and compresses even more&lt;/a&gt;, the final download sizes aren&#39;t much different from a typical blog post&#39;s images (haha woops sry) and should be &lt;a href=&quot;https://docs.github.com/en/github/working-with-github-pages/about-github-pages&quot;&gt;well within the bandwidth limits&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What&#39;s also great is that I can deploy new 3D models with one command, using code I wrote that works as expected and is pleasant for me to use.&lt;/p&gt;
&lt;h3 id=&quot;appendix-c%3A-parametric-wheel-knobs&quot; tabindex=&quot;-1&quot;&gt;Appendix C: Parametric wheel knobs&lt;/h3&gt;
&lt;p&gt;I liked writing the &lt;a href=&quot;https://github.com/oskitone/apc/blob/main/openscad/wheels.scad&quot;&gt;wheel&lt;/a&gt; module, and it&#39;s adaptable to a lot more than how it&#39;s currently being used for the APC.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/apc/wheels.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/apc/wheels-032.gif&quot; alt=&quot;I&#39;ve got wheels of polished steel. I&#39;ve got tires to grab the road.&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In addition to all the different dimensions and grips and brodie knob counts, eagle-eyed viewers may also see the little ridge inside the pot cavity from when I was thinking about using D-shaft pots. Minutiae!&lt;/p&gt;
&lt;/a&gt;</content>
	</entry>
	
	<entry>
		<title>Scout</title>
		<link href="https://blog.tommy.sh/posts/scout/"/>
		<updated>Sun, 15 Aug 2021 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/scout/</id>
		<content type="html">&lt;p&gt;It&#39;s time for a new Oskitone synth... the Scout!&lt;/p&gt;
&lt;p&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/587660426&quot; width=&quot;640&quot; height=&quot;360&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s called the &amp;quot;Scout&amp;quot; because it&#39;s the first Oskitone synth to use a microcontroller, specifically the ATmega328 -- just like the Arduino Uno.&lt;/p&gt;
&lt;p&gt;From the readme:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;scout&lt;/strong&gt; (&lt;em&gt;/skout/&lt;/em&gt;):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;em&gt;One sent to obtain information&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Jean Louise “Scout” Finch, of Atticus Finch&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The first synth from Oskitone to venture into the big ol&#39; world of microcontrollers&lt;/em&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The Scout is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Beginner-friendly:&lt;/strong&gt; All components are through-hole (instead of surface mount) for easier soldering, and full assembly takes about 45min. Standalone, battery-powered, doesn&#39;t need a computer or external speakers to work. Fun!&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3D-Printable:&lt;/strong&gt; Besides the electronics and nuts and bolts, all parts are 3D-printed. And with a total width of ~160mm (about 6.3&amp;quot;), the Scout can fit on smaller, &amp;quot;Mini&amp;quot; (18x18x18cm) size print beds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hackable:&lt;/strong&gt; Arduino-compatible and fully open source! Hook up an &lt;a href=&quot;https://www.adafruit.com/product/70&quot;&gt;FTDI Serial TTL-232 cable&lt;/a&gt; (sold separately) to update its code using the Arduino IDE.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimally featured:&lt;/strong&gt; 1.5 octaves of keys, a volume knob, on/off switch, speaker, headphone jack. Monophonic square wave with fixed glide and octave.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to it being the first microcontroller-controlled instrument from Oskitone, the Scout would also make a fine introductory DIY instrument for the budding electronics hobbyist. (Some experience soldering and a general familiarity with how electricity works are recommended though!)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Like my previous work, I designed the Scout&#39;s PCB in Kicad and everything else in OpenSCAD, specifically for 3D-printing. The Scout is available assembled or as a DIY kit, with and without the 3D-printed parts; and it&#39;s fully Open Source!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/scout-12.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/scout-12-638-032.gif&quot; alt=&quot;Spit-roasted Scout&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This blog post is a semi-deep dive into why I made it, how it works, and its features and how they were decided.&lt;/p&gt;
&lt;h2 id=&quot;chasing-product%2Fmarket-fit&quot; tabindex=&quot;-1&quot;&gt;Chasing &lt;a href=&quot;https://en.wikipedia.org/wiki/Product/market_fit&quot;&gt;product/market fit&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/poly555_scout_apc.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/poly555_scout_apc-638-90.jpg&quot; alt=&quot;Photo of the POLY555, Scout, and APC next to each other&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Where the POLY555 looked complex and &lt;em&gt;was complex&lt;/em&gt; to put together, the Scout tries to do the same but at the other end of the spectrum: look simple and &lt;em&gt;be simple&lt;/em&gt; to put together. Its target demographics are folks new to electronics, parents looking for a fun project to do with their kids, and STEAM class educators and workshoppers — all demos that I&#39;m not currently serving well for piano-like instruments. (Which takes the APC out of the running. Sorry, APC!)&lt;/p&gt;
&lt;p&gt;Defining that target upfront meant gleefully stripping away requirements wherever I could:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Instead of 555 timers or complicated analog circuits for the oscillators, it&#39;s all software. There&#39;re way fewer discrete components to solder, no byzantine schematics to scratch your head over, and absolutely no manual tuning of notes like on Oskitone instruments of yore.&lt;/li&gt;
&lt;li&gt;More piano notes is great but it necessitates both more stuff to solder &lt;em&gt;and a bigger 3D-printer to fit all of them&lt;/em&gt;! I narrowed the key count to the max that would fit on very common 18cm wide printer beds.&lt;/li&gt;
&lt;li&gt;I prototyped but abandoned controls for octave and glide. Instead, they&#39;re pulled to the top in the Arduino code and made to be extra inviting to experiment with.&lt;/li&gt;
&lt;li&gt;Similarly, there&#39;re no controls for other typical synth options like wave type, filter, envelope, etc. Arguably those operations are &lt;a href=&quot;https://twitter.com/oskitone/status/1370146415725346819&quot;&gt;what make a synth a synth&lt;/a&gt;, but they&#39;re unnecessary for the target demo. Also no MIDI or Control Voltage support. Ditching all of that leaves out technical &lt;em&gt;and cognitive&lt;/em&gt; complexity.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In startup parlance, the Scout is a &lt;a href=&quot;https://en.wikipedia.org/wiki/Minimum_viable_product&quot;&gt;Minimum Viable Product&lt;/a&gt;. I hope people like it, I hope it inspires them to play around with electronics and code and music, and I hope it will serve as a good foundation for me for future Oskitone synths.&lt;/p&gt;
&lt;h2 id=&quot;how-does-it-work%3F&quot; tabindex=&quot;-1&quot;&gt;How does it work?&lt;/h2&gt;
&lt;h3 id=&quot;electronics&quot; tabindex=&quot;-1&quot;&gt;Electronics&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;The heart of the operation is an ATmega328 microcontroller. It&#39;s programmed to play a simple &lt;a href=&quot;https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/&quot;&gt;tone&lt;/a&gt; and light an LED whenever a key is pressed.&lt;/li&gt;
&lt;li&gt;The 17 notes&#39; keys are mapped to switches that are set up as a matrix. (Instead of using 17+ GPIO pins they only use 9 [4 rows of 5 columns = 20 possible keys]. There are drawbacks to this approach but none that matter for a monophonic instrument.)&lt;/li&gt;
&lt;li&gt;The tone from the microcontroller goes through a potentiometer for volume, a headphone jack for audio output, and finally to an LM386 amp chip to drive a small speaker.&lt;/li&gt;
&lt;li&gt;Power for the ATmega and LM386 is supplied by three AAA batteries.&lt;/li&gt;
&lt;li&gt;A UART header allows for uploading new code to the ATmega328.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All of that is reflected on the schematic:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/schematic_annotated.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/schematic_annotated.png&quot; alt=&quot;Scout Rev A Schematic, annotated&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the PCB:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/pcb_annotated.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/pcb_annotated.png&quot; alt=&quot;Scout Rev A PCB, annotated&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To encourage hacking, the ATmega&#39;s unused pins are pulled onto an unpopulated &amp;quot;HACK&amp;quot; header. There&#39;s one digital pin, five analog, two unused switches from the keyboard matrix, plus VCC and GND.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/pcb_finished.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/pcb_finished-638-90.jpg&quot; alt=&quot;Scout Rev A PCB, annotated&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;3d-printed-parts&quot; tabindex=&quot;-1&quot;&gt;3D-printed parts&lt;/h3&gt;
&lt;p&gt;The electronics fit snuggly inside a snap-together enclosure, along with keys and some other odds and ends, all 3D-printed.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/scout_3d_printed_parts.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/scout_3d_printed_parts.png&quot; alt=&quot;Scout PCB, assembled&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;battery-holder&quot; tabindex=&quot;-1&quot;&gt;Battery holder&lt;/h4&gt;
&lt;p&gt;All previous Oskitone machines used 9v batteries, but 9 volts is too high for the ATmega328 and would require a regulator to bring it down, costing more BOM and space. The Scout instead uses 3 AAA batteries for power, in a custom container that clips into the enclosure.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/battery_holder.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/battery_holder-638-90.jpg&quot; alt=&quot;Close-up photo of the battery holder, with and without its battery contacts&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://twitter.com/oskitone/status/1390111892899655680&quot;&gt;Making this was fun!&lt;/a&gt; I&#39;d never paid much attention to how batteries fit into things before, but all the battery-powered devices in my house got a new level of scrutiny while I was designing the Scout&#39;s.&lt;/p&gt;
&lt;p&gt;Sure does make me want to spin off a custom battery pack company!&lt;/p&gt;
&lt;p&gt;(For those curious, AAA was chosen over the more typical AA for size reasons, as 3 AAs would be a little too big to fit under the keys without making them longer, which I tried but didn&#39;t like. There&#39;re also off-the-shelf battery containers that I could&#39;ve used and did prototype with, but they also have size and cost caveats.)&lt;/p&gt;
&lt;h4 id=&quot;enclosure&quot; tabindex=&quot;-1&quot;&gt;Enclosure&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/enclosure_top_asssembled.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/enclosure_top_asssembled-638-90.jpg&quot; alt=&quot;Scout enclosure top, assembled&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/enclosure_bottom_asssembled.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/enclosure_bottom_asssembled-638-90.jpg&quot; alt=&quot;Scout enclosure bottom, assembled&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The enclosure expands on those of previous Oskitone projects, with some humble upgrades:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In addition to the screws through the middle to hold everything tightly together, the two halves snap together on the sides, cutting down on metal hardware and obviating trickier printed closures. Fine-tuning this took awhile but was worth it. It&#39;s very satisfying!&lt;/li&gt;
&lt;li&gt;The big, gratuitous text engraving technique is borrowed from the POLY555 and APC. For the label text near the volume knob and on the sides, a new &amp;quot;placard&amp;quot; style engraving prints better and more legibly at small font sizes.&lt;/li&gt;
&lt;li&gt;The &amp;quot;pencil stand&amp;quot; feature from the OKAY2 and POLY555 has resurfaced, &lt;a href=&quot;https://twitter.com/oskitone/status/1414737938403913742&quot;&gt;with a minor upgrade for better fit&lt;/a&gt;. Jam a writing utensil in there to prop the Scout up for display.&lt;/li&gt;
&lt;li&gt;The enclosure top prints upside down with its face on the print bed. To support the front lip under the keys, there&#39;s a breakaway support built into the model.&lt;/li&gt;
&lt;li&gt;The front inner lip facing the keys has a rail that acts as a key endstop, hopefully preventing extra damage to the keys when they&#39;re played aggressively.&lt;/li&gt;
&lt;li&gt;Hidden components! The speaker sits under the keys and uses the them like a speaker grill, and the LED shines through the enclosure top.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/enclosure_cross_section.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/enclosure_cross_section.png&quot; alt=&quot;Annotated OpenSCAD cross-section showing key endstop, battery fixture?, snaps&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h5 id=&quot;abandoned-enclosure-ideas&quot; tabindex=&quot;-1&quot;&gt;Abandoned enclosure ideas&lt;/h5&gt;
&lt;p&gt;One of the biggest things I worked on for the Scout was how to make its enclosure assemble more easily and look better than the POLY555&#39;s but without losing any of the structural/mechanical integrity needed for the keys. It&#39;s a difficult thing to get right and hard to articulate in words, but it&#39;s funny how hands kind of intuitively know when something doesn&#39;t feel good.&lt;/p&gt;
&lt;p&gt;An early prototype design:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/spin-dccebfe6-24-638-064.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/spin-dccebfe6-24-638-064.gif&quot; alt=&quot;Early Scout prototype model with lightpipe, more screws, a bottom-mounted POW switch&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I tried earnestly to make the enclosure like the APC&#39;s and have it slide together with tongue-and-groove joints, but it was complicated by the fact that the batteries/speaker and PCB had to be wired together but attached to different halves.&lt;/li&gt;
&lt;li&gt;I also tried thicker walls, thinking they&#39;d make for stronger joints. But they were so strong that they lacked the necessary material &amp;quot;give&amp;quot; to bend, needed for the snap. Good lesson!&lt;/li&gt;
&lt;li&gt;That green rectangle was going to be a lightpipe for the LED, a perennial but elusive idea. Also tried circular and heart-shaped exposures for the LED.&lt;/li&gt;
&lt;li&gt;I did briefly have &lt;a href=&quot;https://twitter.com/oskitone/status/1388305196137156609&quot;&gt;the power switch on the enclosure bottom like the POLY555&lt;/a&gt; but abandoned it for aesthetic reasons.&lt;/li&gt;
&lt;li&gt;To let folks know the battery size and count before they pop the Scout open, there was briefly a &amp;quot;AAA*3&amp;quot; placard engraving on the bottom, before I removed it for not being worth the potential print failure (that small text is the easiest part of the print to mess up).&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;keys&quot; tabindex=&quot;-1&quot;&gt;Keys&lt;/h4&gt;
&lt;p&gt;The keys work the same as they did in previous instruments, and dimensions mostly match the POLY555&#39;s, despite myriad experiments. If it ain&#39;t broke, huh?&lt;/p&gt;
&lt;p&gt;With the enclosure top off, we can get a good look at how the keys work with their switches.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/click.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/click.gif&quot; alt=&quot;Keys demo&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Physics teacher voice:&lt;/strong&gt; Those pieces together form a lever, allowing the user to actuate a switch with a fraction of the force that would be needed if pressing it directly. Basically, the closer the switch (the load) is to the end of the key (the fulcrum) and away from where the user presses down (the effort or force), the lower that fraction, expressed numerically in a unit called a &lt;a href=&quot;https://en.wikipedia.org/wiki/Mechanical_advantage&quot;&gt;Mechanical Advantage&lt;/a&gt; or MA.&lt;/p&gt;
&lt;p&gt;A cantilever, which is a narrow bridge of material between the key block and the mounting rail, helps it to bend at the right place.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/keys.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/keys-638-90.jpg&quot; alt=&quot;Close-up of the Scout&#39;s keys, isolated&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It continues to be remarkable to me how the slightest variation to this tiny little piece of plastic multiplies its effects to the user. Too thin a cantilever and the keys are loud and feel cheap. Too thick and they&#39;re silent but hard to press. Tenths of a millimeter make all the differences. Fine-tuning it is patient, patient work.&lt;/p&gt;
&lt;h4 id=&quot;volume-knob&quot; tabindex=&quot;-1&quot;&gt;Volume knob&lt;/h4&gt;
&lt;p&gt;The Scout&#39;s lone control is its volume, adorned with a simple knob &lt;a href=&quot;https://twitter.com/oskitone/status/1387181484151214080&quot;&gt;that&#39;s thoughtfully recessed into the enclosure&lt;/a&gt; and an accompanying &amp;quot;VOL&amp;quot; placard label.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/volume_knob.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/volume_knob-638-90.jpg&quot; alt=&quot;Volume knob. It&#39;s a nice knob!&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The volume knob&#39;s code is extended from the APC&#39;s wheels, ditching the spokes and subbing a brodie knob for a dimple.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/apc_wheel_vs_scout_knob.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/apc_wheel_vs_scout_knob.png&quot; alt=&quot;Side-by-side w/ APC wheel&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;switch-clutch&quot; tabindex=&quot;-1&quot;&gt;Switch clutch&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/switch_clutch.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/switch_clutch-638-90.jpg&quot; alt=&quot;Close-up of the switch clutch&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also borrowed from the APC is the switch clutch, which straddles the on/off power switch&#39;s actuator and exposes it outside the enclosure as a cute little grip.&lt;/p&gt;
&lt;p&gt;To aid printing, a built-in support props up the grip and snaps off when done. And to aid assembly, the piece is vertically symmetrical, so it doesn&#39;t matter which side you put in top vs bottom.&lt;/p&gt;
&lt;h2 id=&quot;get-(or-make!)-your-own&quot; tabindex=&quot;-1&quot;&gt;Get (or make!) your own&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/disassembled.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/disassembled-638-90.jpg&quot; alt=&quot;Scout, disassembled&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Oskitone Scout is available now for purchase, either assembled or as a DIY electronics kit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Buy the &lt;a href=&quot;https://www.oskitone.com/product/scout-synth&quot;&gt;Scout Synth&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Buy the &lt;a href=&quot;https://www.oskitone.com/product/scout-synth-diy-electronics-kit&quot;&gt;Scout Synth DIY Electronics Kit&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The DIY Kits can come with the 3D prints included, but folks with access to 3D printers are more than welcome to print their own! The Scout&#39;s 3D models are on Thingiverse: &lt;a href=&quot;https://www.thingiverse.com/thing:4933700&quot;&gt;https://www.thingiverse.com/thing:4933700&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All code for the Scout is Open Source and under the Creative Commons Attribution/Share-Alike license: &lt;a href=&quot;https://github.com/oskitone/scout&quot;&gt;https://github.com/oskitone/scout&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;what&#39;s-next%3F&quot; tabindex=&quot;-1&quot;&gt;What&#39;s next?&lt;/h2&gt;
&lt;p&gt;More keys, different wave types? Polyphony? MIDI? Maybe! We&#39;ll see!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/scout/scout-trick-18-6.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/scout/scout-trick-18-6-638-064.gif&quot; alt=&quot;Animation of Scout model assembly&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
</content>
	</entry>
	
	<entry>
		<title>shopdocs</title>
		<link href="https://blog.tommy.sh/posts/shopdocs/"/>
		<updated>Sat, 24 Aug 2024 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/shopdocs/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/shopdocs/keyboard_sequencer.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/keyboard_sequencer-.5.jpg&quot; alt=&quot;Photo of keyboard sequencer on breadboard with printed schematic and accompanying &amp;quot;Serial vs Parallel&amp;quot; doc&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I sometimes get the honor to be an instructor for &lt;a href=&quot;https://dogbotic.com/diy-synthesizers&quot;&gt;&amp;quot;DIY Synths for the Electronically Unacquainted&amp;quot;&lt;/a&gt;, a virtual workshop put on by the fine folks at &lt;a href=&quot;https://dogbotic.com/&quot;&gt;Dogbotic&lt;/a&gt;. For two hours a week over nine weeks, we meet on Zoom and trick antiquated logic gates into performing audio synthesis on breadboards. It is great fun.&lt;/p&gt;
&lt;p&gt;And I&#39;m open-sourcing the documents I make (and the code that makes them) for my workshop section as &lt;a href=&quot;https://github.com/rocktronica/shopdocs&quot;&gt;shopdocs&lt;/a&gt;. This blog post serves to show the project off, explain how it works, and wax a bit on what it&#39;s like pretending to be a teacher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;shopdocs on GitHub:&lt;/strong&gt; &lt;a href=&quot;https://github.com/rocktronica/shopdocs&quot;&gt;https://github.com/rocktronica/shopdocs&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Importantly, this is the source code for resources I made for my section only, not the other instructors&#39; stuff nor the real core material. Any opinions or errors they have are all mine. Obviously, it is no replacement for taking the actual workshop!)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;highlights&quot; tabindex=&quot;-1&quot;&gt;Highlights&lt;/h2&gt;
&lt;h3 id=&quot;schematic-cards&quot; tabindex=&quot;-1&quot;&gt;Schematic cards&lt;/h3&gt;
&lt;p&gt;All complex machines are composed of smaller machines, which can further be reduced and understood. That can be expressed with cards of small circuit schematics that add up into bigger circuit schematics as the workshop progresses: light an LED, add an oscillator to strobe it, add an amplifier to listen, add more oscillators, add a mixer, add filters, and so on.&lt;/p&gt;
&lt;p&gt;Because newer lessons never start over from scratch, progress is incremental and summary recaps are (I&#39;ve been told!) intuitive.&lt;/p&gt;
&lt;p&gt;&lt;video width=&quot;638&quot; height=&quot;359&quot; controls=&quot;&quot; loop=&quot;&quot; poster=&quot;https://blog.tommy.sh/content/shopdocs/short-100x.jpg&quot;&gt;
    &lt;source src=&quot;https://blog.tommy.sh/content/shopdocs/short-100x.mp4&quot; type=&quot;video/mp4&quot; /&gt;
&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;The cards are hand drawn and print on cardstock paper then cut to a 2&amp;quot; grid. Flip them over to abstract away their complexity and make a kind of high level block diagram.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/shopdocs/schematic_cards-demo.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/schematic_cards-demo.png&quot; alt=&quot;Schematic cards demo, back and front of a page&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/schematic_cards.pdf&quot;&gt;https://rocktronica.github.io/shopdocs/downloads/schematic_cards.pdf&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;keyboard-sequencer&quot; tabindex=&quot;-1&quot;&gt;Keyboard sequencer&lt;/h3&gt;
&lt;p&gt;Build an &amp;quot;LED chaser&amp;quot; light sequencer. Build an oscillator with buttons to play different notes. Make the sequencer play the notes. Optionally divide down for octaves.&lt;/p&gt;
&lt;p&gt;&lt;video width=&quot;638&quot; height=&quot;359&quot; controls=&quot;&quot; loop=&quot;&quot; poster=&quot;https://blog.tommy.sh/content/shopdocs/keyboard_sequencer-demo-poster.jpg&quot;&gt;
    &lt;source src=&quot;https://blog.tommy.sh/content/shopdocs/keyboard_sequencer-demo.mp4&quot; type=&quot;video/mp4&quot; /&gt;
&lt;/video&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/keyboard_sequencer-annotated.pdf&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/schematics/keyboard_sequencer-annotated.png&quot; alt=&quot;Keyboard sequencer schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&#39;m proud of this schematic. It accompanies a &lt;a href=&quot;https://rocktronica.github.io/shopdocs/serial-vs-parallel/&quot;&gt;&amp;quot;Serial vs Parallel&amp;quot; doc&lt;/a&gt; that explores how to wire multiple button-and-resistor combos to make a multi-note, monophonic instrument.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/shopdocs/serial-parallel-.5.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/serial-parallel-.5.png&quot; alt=&quot;Serial vs Parallel drawings excerpt&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/keyboard_sequencer-annotated.pdf&quot;&gt;https://rocktronica.github.io/shopdocs/downloads/keyboard_sequencer-annotated.pdf&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;%22randomicity%22&quot; tabindex=&quot;-1&quot;&gt;&amp;quot;Randomicity&amp;quot;&lt;/h3&gt;
&lt;p&gt;One of my favorite lessons explores the idea of randomness, what it means to people vs computers vs Las Vegas, and ways to implement it with the chips we have on hand. We build sirens, a &amp;quot;What&#39;s for lunch?&amp;quot; decider, and a Sample and Hold synth circuit:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/sample_and_hold.pdf&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/schematics/sample_and_hold.png&quot; alt=&quot;Sample and Hold schematic using the CD4093, based on work by Elliot Williams&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Adapted from Elliot Williams&#39; incredible &lt;a href=&quot;https://hackaday.com/2015/08/07/logic-noise-4046-voltage-controlled-oscillator-part-one/&quot;&gt;Logic Noise&lt;/a&gt; Hackaday series, updated to use the workshop&#39;s preferred oscillator chip. See that article for what it sounds like!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/sample_and_hold.pdf&quot;&gt;https://rocktronica.github.io/shopdocs/downloads/sample_and_hold.pdf&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;one-chip-star-tom&quot; tabindex=&quot;-1&quot;&gt;One Chip Star Tom&lt;/h3&gt;
&lt;p&gt;&lt;del&gt;A faithless recreation of&lt;/del&gt; &lt;ins&gt;A loving homage to&lt;/ins&gt; an old EHX pedal called the &lt;a href=&quot;https://shop.ehx.com/item/spacedrum/&quot;&gt;Space Drum&lt;/a&gt;, done with just one CD4093 chip.&lt;/p&gt;
&lt;p&gt;Press the button to make a funny &amp;quot;BWAOOWWM&amp;quot; space blaster sound. Adjust pots for drum decay and pitch. (A third pot can be added between booster and cap for volume control.) Doesn&#39;t need an amp!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/star_tom.pdf&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/schematics/star_tom.png&quot; alt=&quot;&amp;quot;One Chip Star Tom&amp;quot; schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Breaks enough rules to scratch heads but is simple to wire up. Makes a great candidate for a &lt;a href=&quot;https://oshpark.com/shared_projects/hIDzKlJz&quot;&gt;quick-and-dirty, untested Kicad PCB&lt;/a&gt; lesson too:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/shopdocs/space_tom-kicad.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/space_tom-kicad-.5.png&quot; alt=&quot;Space Tom PCB in Kicad&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I did an &lt;a href=&quot;https://www.instagram.com/reel/C4JjA7NPtc9/?utm_source=ig_web_copy_link&amp;amp;igsh=MzRlODBiNWFlZA==&quot;&gt;Instagram promo&lt;/a&gt; with it I like it so much, though I did accidentally draw the NAND symbol wrong. Woops!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Link:&lt;/strong&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/downloads/star_tom.pdf&quot;&gt;https://rocktronica.github.io/shopdocs/downloads/star_tom.pdf&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;open-source-license&quot; tabindex=&quot;-1&quot;&gt;Open-Source license&lt;/h2&gt;
&lt;p&gt;Text and drawing content is shared under a &lt;a href=&quot;https://creativecommons.org/licenses/by-sa/4.0/&quot;&gt;Creative Commons Attribution-ShareAlike 4.0&lt;/a&gt; license. Free to use, including commercially by other instructors or for other workshops, but please retain my attribution and this license. Code is MIT or as components allow.&lt;/p&gt;
&lt;h2 id=&quot;my-thoughts-on-teaching-a-technical-subject-to-people-with-diverse-backgrounds%2C-how-to-strike-the-right-balance-between-accessible-but-boring-and-interesting-but-overwhelming%2C-and-how-to-keep-everybody-engaged-enough-to-keep-coming-back-for-the-next-lesson&quot; tabindex=&quot;-1&quot;&gt;My thoughts on teaching a technical subject to people with diverse backgrounds, how to strike the right balance between accessible-but-boring and interesting-but-overwhelming, and how to keep everybody engaged enough to keep coming back for the next lesson&lt;/h2&gt;
&lt;p&gt;It&#39;s hard!&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;appendix%3A-how-to-use-chrome-to-make-pdfs%2C-fast&quot; tabindex=&quot;-1&quot;&gt;Appendix: How to use Chrome to make PDFs, fast&lt;/h2&gt;
&lt;p&gt;Class resources are put in a shared Google Drive folder, so everything needs to be static and downloadable. For text, that means PDF, and PDFs usually mean writing in Docs or Word or something and writing/exporting each piece of writing individually.&lt;/p&gt;
&lt;p&gt;But because I was a software engineer before I was an ad-hoc workshop instructor, the setup here goes:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Input content is written in Markdown, a minimalist markup language that reads as plain-text but compiles to have rich formatting.&lt;/li&gt;
&lt;li&gt;That markdown is converted to HTML and combined with other static PDFs (mostly KiCad schematic plots) into a little website with &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;Eleventy&lt;/a&gt;, a static site generator that coincidentally also powers this blog.&lt;/li&gt;
&lt;li&gt;A Node script uses the input listing to scrape the site and export its pages as PDF with &lt;a href=&quot;https://pptr.dev/&quot;&gt;Puppeteer&lt;/a&gt;, a browser control tool used for testing sites during development. The script&#39;s output is identical to loading the site in Chrome and manually doing &lt;code&gt;File&lt;/code&gt;-&amp;gt;&lt;code&gt;Print&lt;/code&gt;-&amp;gt;&lt;code&gt;Save as PDF&lt;/code&gt; on each page.&lt;/li&gt;
&lt;li&gt;A bash script &lt;a href=&quot;https://blog.tommy.sh/posts/oskitone-makes-an-atari-punk-console/#self-hosting&quot;&gt;copied from the APC&lt;/a&gt; deploys the site to GitHub Pages. (This wasn&#39;t necessary for the workshop, but it was trivial to do and I couldn&#39;t resist.)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/shopdocs/making_pdfs.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/shopdocs/making_pdfs.5.png&quot; alt=&quot;Making shopdocs PDFs&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you code and want to programmatically make text-heavy PDFs, this kind of Chrome-as-PDF-renderer technique is very pleasant: style/formatting changes are quick to apply globally, exporting updated PDFs is a one line command, and version control is baked in.&lt;/p&gt;
&lt;style&gt;
    img[src*=&quot;/schematics/&quot;],
    img[src*=&quot;making_pdfs&quot;] {
        box-shadow: 0 1px 2px 0px rgba(0, 0, 0, .25), 0 0 20px -10px rgba(0, 0, 0, .5);
    }

    video {
        display: block;
    }
&lt;/style&gt;
</content>
	</entry>
	
	<entry>
		<title>Fun with the Arduboy</title>
		<link href="https://blog.tommy.sh/posts/fun-with-the-arduboy/"/>
		<updated>Tue, 21 Jan 2025 16:00:00 PST</updated>
		<id>https://blog.tommy.sh/posts/fun-with-the-arduboy/</id>
		<content type="html">&lt;p&gt;I&#39;ve been having a lot of fun with this open-source game console, the &lt;a href=&quot;https://www.arduboy.com/&quot;&gt;Arduboy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/header-90.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/header-960-90.gif&quot; alt=&quot;My Arduboy&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s effectively an Arduino Leonardo in the guise of a minimalist GameBoy: 1.3&amp;quot; OLED display, D-pad+A/B buttons, and battery in a credit-card sized enclosure. Plug a cable into the USB port at the bottom there to swap the game or upload your own.&lt;/p&gt;
&lt;p&gt;I think its limited specs are a blessing in disguise. The small screen and few buttons makes it kid-friendly (well, about as much as a video game can be!), and the tight program space is an effective guard against overengineering.&lt;/p&gt;
&lt;p&gt;Maybe I&#39;m jaded from slingin&#39; websites for so long, but the tactility of my little idea on a device that fits in my pocket is deeply gratifying. The Arduboy makes for a great onramp into the world of &lt;a href=&quot;https://en.wikipedia.org/wiki/Embedded_software&quot;&gt;embedded software&lt;/a&gt;, even if you&#39;re not out to make the next Mario.&lt;/p&gt;
&lt;h2 id=&quot;games-things-i-have-made-for-it&quot; tabindex=&quot;-1&quot;&gt;&lt;del&gt;Games&lt;/del&gt; Things I have made for it&lt;/h2&gt;
&lt;p&gt;Arguably, none of these are games, despite the Arduboy being a game console. C&#39;est la vie.&lt;/p&gt;
&lt;h3 id=&quot;any-kind-of-car-and-any-kind-of-truck-(any-kind-of-any-car-and-truck)&quot; tabindex=&quot;-1&quot;&gt;Any Kind of Car and Any Kind of Truck (Any Kind of Any Car and Truck)&lt;/h3&gt;
&lt;p&gt;My first offering is &amp;quot;Any Kind of Car and Any Kind of Truck (Any Kind of Any Car and Truck),&amp;quot; made for my vehicle-obsessed child and named for an open challenge that I can draw him any kind of car and any kind of truck.&lt;/p&gt;
&lt;p&gt;Play it right now!:&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/any-kind-of-car-and-any-kind-of-truck/raw/main/any-kind-of-car-and-any-kind-of-truck.ino.hex&quot; style=&quot;
            width: 512px;
    height: 256px;
            display: block;
            text-align: center;
            background: #000 url(/content/fun-with-the-arduboy/any-kind-of-car-and-any-kind-of-truck.png);
            background-size: cover;
            image-rendering: pixelated;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        &quot; onClick=&quot;
            event.preventDefault();
            this.remove();
            document.querySelector(&#39;iframe[id=any]&#39;)
                .style.setProperty(&#39;display&#39;, &#39;block&#39;);
        &quot;&gt;
        &lt;span style=&quot;font-size: 0;&quot;&gt;Play &quot;Any Kind of Car and Any Kind of Truck&quot;&lt;/span&gt;
        &lt;span style=&quot;
            color: #000;
            background: #fff;
            border-radius: 100%;
            width: 150px;
            height: 150px;
            line-height: 150px;
            font-size: 50px;
            display: block;
            opacity: .75;
        &quot;&gt;&amp;#9658;&lt;/span&gt;
    &lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;iframe id=&quot;any&quot; style=&quot;
            display: none;
            width: 512px;
    height: 256px;
            border: none;
        &quot; src=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/any-kind-of-car-and-any-kind-of-truck/raw/main/any-kind-of-car-and-any-kind-of-truck.ino.hex&quot; title=&quot;Any Kind of Car and Any Kind of Truck&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(For this and the other emulated games here, click a couple times to activate, then use arrow and Z/X or A/S keys for buttons.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;To play:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Button B randomizes the vehicle&#39;s parameters: cab/box/wheel size, trunk/hood ratio, and the distance between wheels. The score tally increases with each randomization.&lt;/li&gt;
&lt;li&gt;Button A toggles the title and theme song, something so important it couldn&#39;t be contained to just the game&#39;s start.&lt;/li&gt;
&lt;li&gt;The direction pad moves the vehicle around and makes it jump, so I guess it&#39;s got hydraulics!&lt;/li&gt;
&lt;li&gt;A+B+Up maxes out the vehicle specs. A+B+Down minimizes them.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My sketchbook reminds me I was first thinking of making it like a mix-and-match spinning block toy:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/any_kind-sketchbook.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/any_kind-sketchbook@0.5x.jpg&quot; alt=&quot;Early sketchbook drawing of Any Kind of Car&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A two year old is kind of a great target demographic. The reward of their joy is immediate and they don&#39;t need any real complexity. Make all the buttons do something and the sounds fun, and you&#39;re good. I could have spent more time adding features to satisfy older players or do any of the code &lt;code&gt;TODO&lt;/code&gt;s to satisfy myself, but he wouldn&#39;t have noticed, so why bother?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/any-kind-of-car-and-any-kind-of-truck/raw/main/any-kind-of-car-and-any-kind-of-truck.ino.hex&quot;&gt;playable demo&lt;/a&gt;, &lt;a href=&quot;https://github.com/rocktronica/any-kind-of-car-and-any-kind-of-truck&quot;&gt;source code&lt;/a&gt;, &lt;a href=&quot;https://community.arduboy.com/t/any-kind-of-car-and-any-kind-of-truck/11831&quot;&gt;forum discussion&lt;/a&gt;&lt;/p&gt;
&lt;aside&gt;
&lt;h4 id=&quot;aside%3A-score-as-count-as-id&quot; tabindex=&quot;-1&quot;&gt;Aside: Score as count as ID&lt;/h4&gt;
&lt;p&gt;Computers are strictly logical machines, inherently bad at being naturally random. If asked to generate random numbers, they&#39;ll &lt;em&gt;always&lt;/em&gt; return the same sequence, which&#39;d feel random at first but obviously not thereafter. (Imagine the lottery numbers being the same every single week!) This kind of Random Number Generator (RNG) is called a Pseudo-Random Number Generator (PRNG); it is deterministic, predictable, a machine of input and output.&lt;/p&gt;
&lt;p&gt;The way around that determinism is to first provide the generator a &lt;em&gt;new&lt;/em&gt; number called a &amp;quot;seed&amp;quot;, which will change things around enough to output a totally new set of numbers. What&#39;s important about the seed is that it&#39;s unique when supplied, like the time of day or the &lt;a href=&quot;https://en.wikipedia.org/wiki/Lavarand&quot;&gt;shape of lava in a lava lamp&lt;/a&gt; or even radioactive entropy.&lt;/p&gt;
&lt;p&gt;I left this game&#39;s PRNG unseeded (so, a fixed null value), so the score (which, again, is just the count of how many times the vehicle has been randomized) effectively serves as an ID for the its parameter set — the monster truck shown at &lt;code&gt;SCORE: 123&lt;/code&gt; will always look the same, even after device resets or battery changes. I think that&#39;s cool!&lt;/p&gt;
&lt;p&gt;Separately, &lt;a href=&quot;https://en.wikipedia.org/wiki/Hardware_random_number_generator&quot;&gt;True Random Number Generators&lt;/a&gt; (TRNG) are RNGs on dedicated hardware that are non-deterministic without seeding. They make really, &lt;em&gt;truly&lt;/em&gt;, &lt;em&gt;&lt;em&gt;very&lt;/em&gt;&lt;/em&gt; random numbers, useful in fields like cryptography for data encryption.&lt;/p&gt;
&lt;p&gt;If your programming-language-of-choice doesn&#39;t explicitly require a seed yet still behaves expectantly random, it&#39;s almost certainly seeding under the hood and is probably not a TRNG.&lt;/p&gt;
&lt;/aside&gt;
&lt;h3 id=&quot;2d6%3A-dice-roll-distribution-visualizer&quot; tabindex=&quot;-1&quot;&gt;2D6: Dice Roll Distribution Visualizer&lt;/h3&gt;
&lt;p&gt;Speaking of randomness...&lt;/p&gt;
&lt;p&gt;Roll a six-sided die. Each of its possible values is equally likely, yes? In other words, a roll of one will occur just as often as two or three, etc. Now roll two six-sided die (&amp;quot;2D6,&amp;quot; in game parlance) and add their values. Are their sums also equally likely?&lt;/p&gt;
&lt;p&gt;The answer is no, they are not. Since the average roll from a 1D6 is 3.5 and 2D6 is twice that, the most likely roll from a 2D6 is 2 × 3.5, or seven. The likelihood of other rolls diminish as they stray from seven, with two and 12 being equally least likely.&lt;/p&gt;
&lt;p&gt;And theoretically, if you graph that, you get a kind of bell curve.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/2d6-graph.png&quot; alt=&quot;2D6&quot; /&gt;&lt;em&gt;Source: &lt;a href=&quot;https://tadeohepperle.com/dice-calculator-frontend/?d1=2d6&quot;&gt;https://tadeohepperle.com/dice-calculator-frontend/?d1=2d6&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;So this is basically a math exploration tool to roll digital dice up to a thousand times and chart their results. Does practice match theory? You can additionally change the number of dice and how many sides they have, from two-sided coin flips to twenty-sided dice. How do the number of dice and their sides change the shape of the curve?&lt;/p&gt;
&lt;p&gt;I promise it&#39;s more fun to play with than it sounds...&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/2d6/raw/main/2d6.ino.hex&quot; style=&quot;
            width: 512px;
    height: 256px;
            display: block;
            text-align: center;
            background: #000 url(/content/fun-with-the-arduboy/2d6.png);
            background-size: cover;
            image-rendering: pixelated;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        &quot; onClick=&quot;
            event.preventDefault();
            this.remove();
            document.querySelector(&#39;iframe[id=dice]&#39;)
                .style.setProperty(&#39;display&#39;, &#39;block&#39;);
        &quot;&gt;
        &lt;span style=&quot;font-size: 0;&quot;&gt;Play &quot;2D6&quot;&lt;/span&gt;
        &lt;span style=&quot;
            color: #000;
            background: #fff;
            border-radius: 100%;
            width: 150px;
            height: 150px;
            line-height: 150px;
            font-size: 50px;
            display: block;
            opacity: .75;
        &quot;&gt;&amp;#9658;&lt;/span&gt;
    &lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;iframe id=&quot;dice&quot; style=&quot;
            display: none;
            width: 512px;
    height: 256px;
            border: none;
        &quot; src=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/2d6/raw/main/2d6.ino.hex&quot; title=&quot;2D6&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To play:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The menu screens flow sequentially. Button B advances and A goes back. Use up/down for selection. Go back from the title screen for credits.&lt;/li&gt;
&lt;li&gt;The final screen shows roll results, where up/down slides between the graph and selected raw numbers. Press A to go back.&lt;/li&gt;
&lt;li&gt;Holding the &amp;quot;roll&amp;quot; button for a second to auto-roll, and hold the right button while rolling to 10x rolls. You&#39;ll hit the arbitrary 1000 rolls cap pretty fast.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unordered production notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A math utility on a 128x64px screen is a fun design challenge. How much can be shown without being cumbersome? How can I strike a balance between correct and accessible?&lt;/li&gt;
&lt;li&gt;There are lots of playful little touches like the dice spinning out of sync and bouncing windows when you&#39;ve reached their limit. It uses the same sound effects as &amp;quot;Any Kind of Car...&amp;quot;, much to my child’s confusion. It is a very game-like non-game.&lt;/li&gt;
&lt;li&gt;The Arduboy actually has two pins connected to its buzzer speaker. Some games will use these to for two tone polyphony, but sending the same tone to both pins makes it louder. This is how the HIGH/LOW/NONE sound volume control works.&lt;/li&gt;
&lt;li&gt;It is an okay dice simulator but not &lt;a href=&quot;https://community.arduboy.com/t/dice-of-fate-seventh-team-a-r-g-game/1101&quot;&gt;the most polished&lt;/a&gt;. And also not withstanding the bias caveat mentioned below...&lt;/li&gt;
&lt;li&gt;Abandoned ideas
&lt;ul&gt;
&lt;li&gt;I briefly pursued a UI where you horizontally scroll left to right, since the dialogs are sequential. Wasn&#39;t worth the memory or overhead.&lt;/li&gt;
&lt;li&gt;The code has a &lt;code&gt;drawEquilateralPolygon&lt;/code&gt; that I experimented with for other dice shapes like a four-sided die&#39;s triangle or the pentagon from a 12-sided die. Making odd shapes have text and fit together nicely was well outside of scope.&lt;/li&gt;
&lt;li&gt;The dice could animate more, bouncing into their container and off of each other before settling into place. Can you imagine?!&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Sketchbook:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/2d6-sketchbook.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/2d6-sketchbook.jpg&quot; alt=&quot;&amp;quot;Dice Roll Distribution Visualizer&amp;quot; sketchbook drawings and notes&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;aside&gt;
&lt;h2 id=&quot;aside%3A-the-prng-plays-favorites&quot; tabindex=&quot;-1&quot;&gt;Aside: the PRNG plays favorites&lt;/h2&gt;
&lt;p&gt;If the bit before on seeding the Pseudo-Random Number Generator wasn&#39;t enough for you, here&#39;s another...&lt;/p&gt;
&lt;p&gt;Arduino&#39;s underlying PRNG implementation suffers from something called a &amp;quot;modulo bias&amp;quot;, where it ever-so-slightly favors certain numbers.&lt;/p&gt;
&lt;p&gt;As I understand it, its effect on the kinds of small numbers I have as options for die side counts are nominal. I don&#39;t &lt;em&gt;think&lt;/em&gt; I see it when playing, but it&#39;s just as likely I don&#39;t understand it well enough to notice.&lt;/p&gt;
&lt;p&gt;An interesting rabbit hole for a rainy day, for sure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Further reading:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/RANDU&quot;&gt;IBM&#39;s RANDU&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://research.kudelskisecurity.com/2020/07/28/the-definitive-guide-to-modulo-bias-and-how-to-avoid-it/&quot;&gt;The definitive guide to “Modulo Bias and how to avoid it”!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/10984974/why-do-people-say-there-is-modulo-bias-when-using-a-random-number-generator&quot;&gt;Why do people say there is modulo bias when using a random number generator?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/aside&gt;
&lt;p&gt;Brute-forcing dice roll distributions feels very much like a dumb way to do a smart thing. Right up my alley!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/2d6/raw/main/2d6.ino.hex&quot;&gt;playable demo&lt;/a&gt;, &lt;a href=&quot;https://github.com/rocktronica/2d6&quot;&gt;source code&lt;/a&gt;, &lt;a href=&quot;https://community.arduboy.com/t/2d6-dice-roll-distribution-visualizer/11925&quot;&gt;forum discussion&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;songs-for-desmond&quot; tabindex=&quot;-1&quot;&gt;Songs for Desmond&lt;/h3&gt;
&lt;p&gt;My opus. From its &lt;a href=&quot;https://github.com/rocktronica/songs_for_desmond&quot;&gt;readme&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One thing nobody tells you about being a parent is that, as you go about the day taking care of your kid, you absentmindedly sing little songs about everything they do.&lt;/p&gt;
&lt;p&gt;The other thing nobody tells you is that the songs... are &lt;em&gt;good&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&amp;quot;Songs for Desmond&amp;quot; collects ours into a kind of 1 bit love letter: a 27 track album of minimalist square wave melodies, released exclusively on an Arduboy game console that he can carry around with him.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I believe it is the first kids songs album to be released on the Arduboy.&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/songs_for_desmond/raw/main/songs_for_desmond.ino.hex&quot; style=&quot;
            width: 512px;
    height: 256px;
            display: block;
            text-align: center;
            background: #000 url(/content/fun-with-the-arduboy/songs_for_desmond.png);
            background-size: cover;
            image-rendering: pixelated;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        &quot; onClick=&quot;
            event.preventDefault();
            this.remove();
            document.querySelector(&#39;iframe[id=songs]&#39;)
                .style.setProperty(&#39;display&#39;, &#39;block&#39;);
        &quot;&gt;
        &lt;span style=&quot;font-size: 0;&quot;&gt;Play &quot;Songs for Desmond&quot;&lt;/span&gt;
        &lt;span style=&quot;
            color: #000;
            background: #fff;
            border-radius: 100%;
            width: 150px;
            height: 150px;
            line-height: 150px;
            font-size: 50px;
            display: block;
            opacity: .75;
        &quot;&gt;&amp;#9658;&lt;/span&gt;
    &lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;iframe id=&quot;songs&quot; style=&quot;
            display: none;
            width: 512px;
    height: 256px;
            border: none;
        &quot; src=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/songs_for_desmond/raw/main/songs_for_desmond.ino.hex&quot; title=&quot;Songs for Desmond&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To play:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Up/down change volume&lt;/li&gt;
&lt;li&gt;Left/right change track&lt;/li&gt;
&lt;li&gt;A to stop&lt;/li&gt;
&lt;li&gt;B to play&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My sketchbook drawings on this one are more about a standalone digital music box I keep thinking about. If I ever end up making it, it&#39;ll have something to save my ears from high pitch tinny square waves. (The Arduboy&#39;s 12mm piezo is not ideal for playing 5min straight of music.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/lalo.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/lalo@0.5x.jpg&quot; alt=&quot;Lalo sketchbook drawings&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unordered production notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Intro animation is from a video of my kid walking around, converted to sprite sheet with FFmpeg and cleaned up in Pixelmator.&lt;/li&gt;
&lt;li&gt;UI is a simple music player. Instead of album art, the intro sprite is cropped to a square and synced to each song&#39;s tempo.&lt;/li&gt;
&lt;li&gt;Melodies were written to MIDI with &lt;a href=&quot;https://signal.vercel.app/&quot;&gt;Signal&lt;/a&gt;, then compiled en masse for the Arduboy with a &lt;code&gt;./compile_songs.sh&lt;/code&gt; script.&lt;/li&gt;
&lt;li&gt;Again, sound volume is accomplished with the two pin buzzer trick. I considered a bassline for the second pin but abandoned it for simplicity and file size. Doubling the music data would have pushed it over the device&#39;s program space.&lt;/li&gt;
&lt;li&gt;The internet is full of jerks. Forums (and &lt;em&gt;especially&lt;/em&gt; forums for technical topics) collect the worst of them. The &lt;a href=&quot;https://community.arduboy.com/&quot;&gt;Arduboy community&lt;/a&gt;, however, is a pleasant, encouraging oasis. It is the only forum of strangers I have joined and is a major reason I got into this at all.
&lt;ul&gt;
&lt;li&gt;One user, @Pharap, was kind enough to offer a &lt;a href=&quot;https://github.com/rocktronica/songs_for_desmond/pull/1&quot;&gt;code review&lt;/a&gt; and advice on memory saving techniques. My C++ experience is zilch, so it&#39;s good to get some other eyes in there.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Songs include the theme for the car game above and half the game ideas below.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt; &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/rocktronica/songs_for_desmond/raw/main/songs_for_desmond.ino.hex&quot;&gt;playable demo&lt;/a&gt;, &lt;a href=&quot;https://github.com/rocktronica/songs_for_desmond&quot;&gt;source code&lt;/a&gt;, &lt;a href=&quot;https://community.arduboy.com/t/songs-for-desmond/12290&quot;&gt;forum discussion&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;development-process&quot; tabindex=&quot;-1&quot;&gt;Development process&lt;/h2&gt;
&lt;p&gt;For development, I edit in my regular code editor then run a &lt;code&gt;run.sh&lt;/code&gt; script to automate the &lt;a href=&quot;https://github.com/arduino/arduino-cli&quot;&gt;Arduino CLI&lt;/a&gt; compilation, &lt;a href=&quot;https://github.com/tiberiusbrown/Ardens&quot;&gt;Ardens&lt;/a&gt; emulation, and final uploading to device. For now, each repo has its own copy of this script.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt; ./run.sh -h
CLI wrapper around Arduino and Ardens

Usage:
./run.sh -h                 Show help and exit

./run.sh compile            Compile
./run.sh emulate            Emulate
./run.sh dev                Compile and emuluate
                            Looped! Quit emulator to refresh
./run.sh deploy             Compile and upload
                            Default port: /dev/cu.usbmodem143101
./run.sh deploy -p PORT     ^ with arbitrary port
                            Run &#39;arduino-cli board list&#39; for list
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course, editing and uploading in the regular Arduino IDE also works perfectly fine, if less automated.&lt;/p&gt;
&lt;p&gt;Ardens does profiling and debugging too, but the emulating alone makes it a must-have for Arduboy development.&lt;/p&gt;
&lt;h2 id=&quot;game-idea-doodles&quot; tabindex=&quot;-1&quot;&gt;Game idea doodles&lt;/h2&gt;
&lt;p&gt;A great thing about a new tool is that you start seeing places to use it everywhere, like it becomes a creative outlet or canvas or something. &amp;quot;I wonder what this&#39;d be like as a game!&amp;quot; you say as you draw your little drawings.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/sketchbook.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/sketchbook@0.5x.jpg&quot; alt=&quot;Sketchbook drawings of Arduboy game ideas&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;This Town&#39;s Got a Lot of Construction&lt;/strong&gt;&lt;br /&gt;
Job by job, construction trucks build a city. (Theme song: track 25)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Street Sweeper&lt;/strong&gt; or &lt;strong&gt;Trash Truck&lt;/strong&gt;&lt;br /&gt;
Clean/pick up all the trash on the street before your truck runs out of gas, a la Pac-Man. (Theme song: track 16)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pixel art editor&lt;/strong&gt;&lt;br /&gt;
Simple but usable pixel art program on native hardware; output hex code displays on screen for export.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bouncing a Bouncy Ball&lt;/strong&gt;&lt;br /&gt;
Physics playground for bouncing a ball, with &lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/1518757-the_incredible_machine_2_11.gif&quot;&gt;settings like the old Incredible Machine game&lt;/a&gt;. (Theme song: track 11)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binary Trainer&lt;/strong&gt;&lt;br /&gt;
Race against the clock to convert increasingly difficult numbers between binary and decimal. Hard mode: hexadecimal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fair Share&lt;/strong&gt;&lt;br /&gt;
Cut food at an ever-growing party of impatient guests envious of unequal portions. How well can you divide a circle into three pieces, a rectangle into five, etc? &lt;a href=&quot;https://blog.tommy.sh/content/fun-with-the-arduboy/fair_share-shadow-o2x2.gif&quot;&gt;This one has some actual pixel concept art!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Higher Lower&lt;/strong&gt;&lt;br /&gt;
Two tones play — is the second one higher or lower? The more you get right, the harder it gets. No screen needed to play.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;BoyBoy&lt;/strong&gt;&lt;br /&gt;
A handhold game console with a text character display? Name is placeholder.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Who knows if I&#39;ll make any of these!&lt;/p&gt;
&lt;h2 id=&quot;what&#39;s-next&quot; tabindex=&quot;-1&quot;&gt;What&#39;s next&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;a href=&quot;https://play.date/&quot;&gt;Playdate&lt;/a&gt; from Panic is next on my list to tinker with. I have one now and like it a lot, though it&#39;s a little too fancy for unsupervised play.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.arduboy.com/shop/p/arduboy-fx&quot;&gt;ArduboyFX&lt;/a&gt;, the successor to the older version that I have, has space for more games and can do grayscale colors. I&#39;m sure I&#39;ll pick one up soon enough.&lt;/li&gt;
&lt;li&gt;Another gadget I&#39;m looking at is the &lt;a href=&quot;https://www.adafruit.com/product/4200&quot;&gt;PyBadge&lt;/a&gt; from Adafruit. It has more bells and whistles but you&#39;re on your own for the enclosure and battery. It&#39;s more a prototype board than an end-user product.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&quot;https://www.arduboy.com/shop/p/arduboy-mini&quot;&gt;Arduboy Mini&lt;/a&gt; has similar enough dimensions to the &lt;a href=&quot;https://blog.tommy.sh/posts/scout/#battery-holder&quot;&gt;Scout&#39;s battery holder&lt;/a&gt; that I&#39;m tempted to build an enclosure for the two. It could work!&lt;/li&gt;
&lt;li&gt;&lt;del&gt;Oskitone is going to put out a game...&lt;/del&gt; &lt;ins&gt;&lt;a href=&quot;https://blog.tommy.sh/posts/higher-lower/&quot;&gt;UPDATE: Oskitone put out a game.&lt;/a&gt;&lt;/ins&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;style&gt;
    aside, pre {
        background: #eee;
        border: 1px solid #ccc;
        padding: 30px 30px 10px;
        margin: 0 0 20px;
    }

    pre {
      padding: 30px;
    }
&lt;/style&gt;
</content>
	</entry>
	
	<entry>
		<title>Higher Lower</title>
		<link href="https://blog.tommy.sh/posts/higher-lower/"/>
		<updated>Sun, 18 May 2025 17:00:00 PDT</updated>
		<id>https://blog.tommy.sh/posts/higher-lower/</id>
		<content type="html">&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower.jpg&quot; alt=&quot;Higher Lower&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The latest Oskitone kit is an electronic handheld game I made called &amp;quot;Higher Lower,&amp;quot; where you have to guess if a tone is higher or lower than the previous one, and the more you get right the harder it gets to tell.&lt;/p&gt;
&lt;p style=&quot;padding:56.25% 0 0 0;position:relative;&quot;&gt;&lt;iframe src=&quot;https://player.vimeo.com/video/1075918437?badge=0&amp;amp;autopause=0&amp;amp;player_id=0&amp;amp;app_id=58479&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media&quot; style=&quot;position:absolute;top:0;left:0;width:100%;height:100%;&quot; title=&quot;Higher Lower game demo&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;script src=&quot;https://player.vimeo.com/api/player.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;It was fun to make and is fun to play!&lt;/p&gt;
&lt;h2 id=&quot;prompt&quot; tabindex=&quot;-1&quot;&gt;Prompt&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/header-960-100.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/header-960-100.gif&quot; alt=&quot;Higher Lower, animated rotation of 3D model&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The impetus for this project was Hackaday&#39;s &lt;a href=&quot;https://hackaday.io/contest/196871-tiny-games-challenge&quot;&gt;&amp;quot;Tiny Games Challenge&amp;quot;&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sometimes the tightest constraints inspire the highest creativity. The Tiny Games challenge invites you to have the most fun with the most minimal setup. Whether that’s tiny size, tiny parts count, or tiny code, we want you to show us that big fun can come in small packages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have a pet peeve about devices too small for human hands, so I interpreted the challenge as a budget on input/output. What&#39;s the least a game can do but still be fun? How few controls do we need for input? What can we do without for output?&lt;/p&gt;
&lt;p&gt;The microcontroller I targeted is the tiny ATtiny85: an 8-bit and 8-pin DIP chip long popular with hobbyists that I&#39;ve been meaning to try for awhile now.&lt;/p&gt;
&lt;p&gt;(Alas, the contest&#39;s deadline came and went without me even noticing, so &amp;quot;Higher Lower&amp;quot; was no contender. Life, huh?)&lt;/p&gt;
&lt;h3 id=&quot;design&quot; tabindex=&quot;-1&quot;&gt;Design&lt;/h3&gt;
&lt;p&gt;Sketchbook drawings of initial idea and drafts of how it could be held:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/sketchbook.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/sketchbook.jpg&quot; alt=&quot;Messy handwriting and little drawings: walkie-talkie looking devices, left/right buttons, switch cap ideas&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To figure out actual dimensions, I traced some speakers and battery packs. My toddler helped.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/drawing-parts.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/drawing-parts@0.5x.png&quot; alt=&quot;Dimensional traces of different speakers and batteries, and drawings of how they could fit together&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&quot;arduboy&quot; tabindex=&quot;-1&quot;&gt;Arduboy&lt;/h2&gt;
&lt;p&gt;The ATtiny85 can be programmed using C++ and Arduino code. Conveniently, so can my favorite DIY game console, the Arduboy.&lt;/p&gt;
&lt;p&gt;Using the &lt;a href=&quot;https://blog.tommy.sh/posts/fun-with-the-arduboy/#development-process&quot;&gt;Arduboy for development&lt;/a&gt; made for a &lt;em&gt;much&lt;/em&gt; tighter feedback loop than programming directly with the chip. And the &lt;a href=&quot;https://github.com/tiberiusbrown/Ardens&quot;&gt;Ardens emulator&lt;/a&gt; means I can work on the game with just my laptop. This is a screenshot of the proof-of-concept, made while waiting at my kid&#39;s swim practice:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/ardens-poc.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/ardens-poc.jpg&quot; alt=&quot;Higher Lower in Ardens with Display, Sound, Spectrum, and Serial Monitor windows open&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A regular Arduboy game would have something in the Display panel, but instead I&#39;m using only the Serial Monitor to print out the interval stack; this won&#39;t deploy to the final target device. In the Waveform window, you can see the different frequencies of square waves being played.&lt;/li&gt;
&lt;li&gt;The frequency intervals&#39; directions and distances are random, but their distance is waited like the &lt;a href=&quot;https://blog.tommy.sh/posts/fun-with-the-arduboy/#2d6%3A-dice-roll-distribution-visualizer&quot;&gt;Arduboy 2D6 dice emulator on I made&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Instead of using a display to present the score to the user, its count rings out audibly after each successful round, like how a grandfather clock gongs the hours to tell the time.&lt;/li&gt;
&lt;li&gt;There are no strikes for wrong guesses or other units beyond points, which I think would be hard to convey easily without a display. Any wrong guess and the game resets to the intro theme.&lt;/li&gt;
&lt;li&gt;After ten rounds/points, the game plays the intro theme in a loop, faster and faster and faster until the device resets. The next game is more difficult, and so on.&lt;/li&gt;
&lt;li&gt;Sound effects are lovingly borrowed from my &lt;a href=&quot;https://blog.tommy.sh/posts/fun-with-the-arduboy/#any-kind-of-car-and-any-kind-of-truck-(any-kind-of-any-car-and-truck)&quot;&gt;&amp;quot;Any Kind of Car&amp;quot;&lt;/a&gt; game. The theme song is ascending thirds in a C Major scale.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even though &amp;quot;Higher Lower&amp;quot; isn&#39;t an Arduboy game per se, the platform and toolset made a very compelling environment for its development.&lt;/p&gt;
&lt;p&gt;Plus, it means I can embed a stylized version of the game right here in this blog post, no special hardware required!:&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/oskitone/higher_lower/raw/main/misc/higher_lower.ino.hex&quot; style=&quot;
            width: 512px;
    height: 256px;
            display: block;
            text-align: center;
            background: #000 url(/content/higher-lower/arduboy.gif);
            background-size: cover;
            image-rendering: pixelated;
            text-decoration: none;
            display: flex;
            align-items: center;
            justify-content: center;
        &quot; onClick=&quot;
            event.preventDefault();
            this.remove();
            document.querySelector(&#39;iframe[id=higher_lower]&#39;)
                .style.setProperty(&#39;display&#39;, &#39;block&#39;);
        &quot;&gt;
        &lt;span style=&quot;font-size: 0;&quot;&gt;Play &quot;Higher Lower&quot;&lt;/span&gt;
        &lt;span style=&quot;
            color: #000;
            background: #fff;
            border-radius: 100%;
            width: 150px;
            height: 150px;
            line-height: 150px;
            font-size: 50px;
            display: block;
            opacity: .75;
        &quot;&gt;&amp;#9658;&lt;/span&gt;
    &lt;/a&gt;
&lt;/p&gt;&lt;p&gt;&lt;iframe id=&quot;higher_lower&quot; style=&quot;
            display: none;
            width: 512px;
    height: 256px;
            border: none;
        &quot; src=&quot;https://tiberiusbrown.github.io/Ardens/player.html?file=https://github.com/oskitone/higher_lower/raw/main/misc/higher_lower.ino.hex&quot; title=&quot;Higher Lower&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(Click a couple times to activate, then use up/down keys to play. The default difficulty setting in the emulated game is very easy.)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;hardware-prototype&quot; tabindex=&quot;-1&quot;&gt;Hardware prototype&lt;/h2&gt;
&lt;p&gt;Now to get the game out of the emulator and into the real world...&lt;/p&gt;
&lt;h3 id=&quot;1.-arduboy-to-digispark-dev-board&quot; tabindex=&quot;-1&quot;&gt;1. Arduboy to Digispark dev board&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&quot;https://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board&quot;&gt;Digispark&lt;/a&gt; is an ATtiny85-based development board with a built-in USB plug. I&#39;ve had a couple counterfeits (unbeknownst to me, I swear!) collecting dust for awhile so it was good to put finally put one to use.&lt;/p&gt;
&lt;p&gt;As a perhaps unnecessary exercise in refactoring and space saving, I rewrote any Arduboy-specific code to use standard Arduino functions: swapping &lt;a href=&quot;https://github.com/MLXXXp/ArduboyTones&quot;&gt;ArduboyTones&lt;/a&gt; with &lt;a href=&quot;https://docs.arduino.cc/language-reference/en/functions/advanced-io/tone/&quot;&gt;tone()&lt;/a&gt; and rewriting the button handling that &lt;a href=&quot;https://github.com/MLXXXp/Arduboy2&quot;&gt;Arduboy2&lt;/a&gt; would normally do. The pins were also remapped to the new chip using the &lt;a href=&quot;https://community.arduboy.com/t/production-arduboy-schematic/702&quot;&gt;Arduboy schematic&lt;/a&gt; as reference.&lt;/p&gt;
&lt;h3 id=&quot;2.-digispark-to-attiny85-ic-on-a-breadboard&quot; tabindex=&quot;-1&quot;&gt;2. Digispark to ATtiny85 IC on a breadboard&lt;/h3&gt;
&lt;p&gt;The next step was to go from Digispark board to bare ATtiny85 chip. I used &lt;a href=&quot;https://www.sparkfun.com/tiny-avr-programmer.html&quot;&gt;Sparkfun&#39;s Tiny AVR Programmer&lt;/a&gt; and followed their docs.&lt;/p&gt;
&lt;p&gt;This step was less intuitive but had &lt;a href=&quot;https://github.com/oskitone/higher_lower/commit/1eee15a2b742769ed656440f040587866b4c3a0d&quot;&gt;some good lessons for me&lt;/a&gt;. To get out of the Arduino IDE&#39;s menus and codify the settings that worked, I extended the shell script used for development to also handle programmer deployment.&lt;/p&gt;
&lt;h3 id=&quot;3.-breadboard-to-soldered-prototype-on-perfboard&quot; tabindex=&quot;-1&quot;&gt;3. Breadboard to soldered prototype on perfboard&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.instagram.com/p/DAMLGyvSF8H/&quot;&gt;Fun!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/prototype-top.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/prototype-top.jpg&quot; alt=&quot;Soldered perfboard prototype, top angle&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Prototype notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The 2x3 group of pins towards the top is an &lt;a href=&quot;https://en.wikipedia.org/wiki/In-system_programming&quot;&gt;ICSP&lt;/a&gt; header for the AVR programmer to plug into. Alternative options are a UART header like the Scout (requires more parts and program space on the chip) or no header at all (requires swapping the chip to update code).&lt;/li&gt;
&lt;li&gt;The &amp;quot;Skip&amp;quot; and &amp;quot;Reset&amp;quot; buttons are might-as-well for playtesting but don&#39;t make it to the final device. Resetting plays the theme song again which my kid likes a lot.&lt;/li&gt;
&lt;li&gt;The schematic for this is roughly the final one below plus the extra buttons and some different cap/resistor values.&lt;/li&gt;
&lt;li&gt;The speaker is a beefy boy left over from the OKAYs. The battery pack is the Scout&#39;s 3xAAA battery holder. The speaker fixture and base print are &lt;a href=&quot;https://blog.tommy.sh/posts/higher-lower/#parts-caf%C3%A9&quot;&gt;new parts&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/prototype-side.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/prototype-side.jpg&quot; alt=&quot;Soldered perfboard prototype, side angle&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I like soldering and prototypes and &lt;a href=&quot;https://rocktronica.github.io/shopdocs/soldering/&quot;&gt;have&lt;/a&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/on-design/&quot;&gt;opinions&lt;/a&gt; &lt;a href=&quot;https://rocktronica.github.io/shopdocs/perf-proto-board-tips/&quot;&gt;on them&lt;/a&gt;! (docs from my &lt;a href=&quot;https://blog.tommy.sh/posts/shopdocs/&quot;&gt;workshop gig&lt;/a&gt;)&lt;/p&gt;
&lt;h2 id=&quot;implementation&quot; tabindex=&quot;-1&quot;&gt;Implementation&lt;/h2&gt;
&lt;h3 id=&quot;schematic&quot; tabindex=&quot;-1&quot;&gt;Schematic&lt;/h3&gt;
&lt;p&gt;This is the final circuit schematic, made with &lt;a href=&quot;https://www.kicad.org/&quot;&gt;KiCad&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-schematic.svg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-schematic.svg&quot; alt=&quot;Schematic&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s pretty sparse!&lt;/p&gt;
&lt;h3 id=&quot;pcb&quot; tabindex=&quot;-1&quot;&gt;PCB&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://www.instagram.com/p/DArXw84tCPQ/&quot;&gt;The PCB was also done in KiCad&lt;/a&gt;. For a design challenge about making something tiny, it is admittedly not very tiny:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/pcb-speaker-batteries.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/pcb-speaker-batteries.jpg&quot; alt=&quot;Finished PCB, speaker, and batteries&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;But it makes sense in the context of its enclosure:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/pcb-in-enclosure.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/pcb-in-enclosure.jpg&quot; alt=&quot;PCB in enclosure&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&quot;button-feel&quot; tabindex=&quot;-1&quot;&gt;Button feel&lt;/h4&gt;
&lt;p&gt;To test how the rocker will work against its underlying switches, the first PCB rev duplicated them to be soldered at different positions against the rocker. The footprints overlap a little but OSH Park fabricated it just fine, seen here in their &amp;quot;After Dark&amp;quot; colorway:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/pcb-double_switches.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/pcb-double_switches.jpg&quot; alt=&quot;PCB with duplicate switch spots&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The outer switches, SW2 and SW5, are directly under the rocker pad centers, how a normal &amp;quot;switch cap&amp;quot; would work. The inner switches, SW3 and SW4, are as close to the center as they can be, which is what the final PCB does. In effect, the rocker is a lever.&lt;/p&gt;
&lt;p&gt;(The divots in the track from SW3 are part of an unrelated &lt;a href=&quot;https://www.instagram.com/p/DBoPrpmv2Zo/&quot;&gt;bodge&lt;/a&gt;!)&lt;/p&gt;
&lt;h3 id=&quot;openscad-and-final-design&quot; tabindex=&quot;-1&quot;&gt;OpenSCAD and final design&lt;/h3&gt;
&lt;p&gt;All the non-electronics parts are 3D-printed and designed in my favorite programming language for 3D CAD modelling, &lt;a href=&quot;https://openscad.org/&quot;&gt;OpenSCAD&lt;/a&gt;. Returning customers will see details from previous work.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-openscad.png&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-openscad.png&quot; alt=&quot;Details and debugging views from the game&#39;s OpenSCAD models&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;New to the Oskitone design language:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Button rocker (AKA &amp;quot;D-pad&amp;quot;)&lt;/strong&gt;&lt;br /&gt;
Hard to miss this big ol&#39; chonker, huh? This piece sits on top of standard tactile switches, strategically placed for a satisfying &lt;a href=&quot;https://en.wikipedia.org/wiki/Mechanical_advantage&quot;&gt;mechanical advantage&lt;/a&gt;. Cavities on its bottom register the switches&#39; actuators, and nubs on the enclosure top hold it in place during assembly. I wanted to but did not &lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/rocker-sketchbook.jpg&quot;&gt;over-engineer&lt;/a&gt; it. Maybe later...&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enclosure disassembly cavities&lt;/strong&gt;&lt;br /&gt;
The enclosure snap fit is &lt;a href=&quot;https://www.instagram.com/p/DBj7xudOTMs/&quot;&gt;newly refined for tightness&lt;/a&gt; and doesn&#39;t need screws. &lt;a href=&quot;https://oskitone.github.io/higher_lower/opening-the-enclosure&quot;&gt;Dimples and wedge cavities&lt;/a&gt; along the lip serve as design affordances to (try to!) subtly tell the user how to open it up.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2xAAA battery holder&lt;/strong&gt;&lt;br /&gt;
The game is powered by &lt;a href=&quot;https://blog.tommy.sh/posts/higher-lower/#two-batteries%2C-not-three&quot;&gt;two AAA batteries&lt;/a&gt;, housed in a reduced version of the Scout&#39;s battery holder. Instead of hitches on the sides to protect against wire fatigue at the solder joint, the wires run through a channel and fixture on the bottom of the holder.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Glue stick lightpipe&lt;/strong&gt;&lt;br /&gt;
My new approach to LED lightpipes is an old maker standard: the humble hot glue stick. An 1/8&amp;quot; segment of standard 1/4&amp;quot; diameter glue stick fits into the enclosure top, discretely exposed in the corner of the speaker grill. The LED isn&#39;t necessary for gameplay and I waffled on its inclusion, but in the end I kept it as an assembly guide feedback mechanism — Is the board getting power? Is the chip working?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hidden settings pots&lt;/strong&gt;&lt;br /&gt;
The game&#39;s difficulty and volume are set with trimmer potentiometers on the PCB under the speaker. It&#39;s a middle ground between exposed knob controls (too focal) and requiring a code update (too much work). I briefly pursued putting the trim pots on the PCB&#39;s bottom and exposing them through the enclosure like the &lt;a href=&quot;https://blog.tommy.sh/posts/oskitone-makes-an-atari-punk-console/&quot;&gt;APC&lt;/a&gt;, but it wasn&#39;t worth the enclosure height increase.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;available...-now!&quot; tabindex=&quot;-1&quot;&gt;Available... &lt;em&gt;now!&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-kit_with_prints-4x3-r.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/higher_lower-kit_with_prints-4x3-r.jpg&quot; alt=&quot;The &amp;quot;Higher Lower&amp;quot; kit&#39;s 3D prints and electronic components&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can purchase the &lt;a href=&quot;https://www.oskitone.com/product/higher-lower-game-diy-electronics-kit&quot;&gt;Higher Lower Game DIY Electronics Kit&lt;/a&gt; from the Oskitone website. It takes about thirty minutes to put together, a little more if you&#39;re new to soldering. It is reasonably priced.&lt;/p&gt;
&lt;p&gt;Have a 3D printer? The part files are available to download from &lt;a href=&quot;https://www.printables.com/model/1283695-higher-lower-handheld-electronic-game&quot;&gt;Printables&lt;/a&gt; and &lt;a href=&quot;https://www.thingiverse.com/thing:7027239&quot;&gt;Thingiverse&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Not everyone will want a full kit and there&#39;re many places in the world I can&#39;t sell well to, so I&#39;ve additionally made the final &lt;a href=&quot;https://oshpark.com/shared_projects/yGNulCRo&quot;&gt;Higher Lower game PCB available on OSH Park&lt;/a&gt;. I don&#39;t make any money from this but I&#39;d rather the business go to them than anywhere else!&lt;/p&gt;
&lt;h3 id=&quot;documentation&quot; tabindex=&quot;-1&quot;&gt;Documentation&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/assembly_guide.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/assembly_guide.jpg&quot; alt=&quot;&amp;quot;Oskitone Higher Lower Assembly Guide&amp;quot; website&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Oskitone Higher Lower Assembly Guide:&lt;/strong&gt; &lt;a href=&quot;https://oskitone.github.io/higher_lower/&quot;&gt;https://oskitone.github.io/higher_lower/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Like the other Oskitone guides, soldering is ordered by function (not by component type or size, which is typical) with clear tests at the end of each step so you know if it&#39;s working as expected before moving on.&lt;/p&gt;
&lt;p&gt;New to the docs are &amp;quot;How it works&amp;quot; sections on each step too. What are these components doing? How is the microcontroller using these switches and pots? Wait, what even &lt;em&gt;is&lt;/em&gt; a microcontroller? Some questions are hard to answer conclusively without writing a whole book, but an attempt was made!&lt;/p&gt;
&lt;h3 id=&quot;source&quot; tabindex=&quot;-1&quot;&gt;Source&lt;/h3&gt;
&lt;p&gt;Source code and design files are open-source on GitHub, per usual: &lt;a href=&quot;https://github.com/oskitone/higher_lower&quot;&gt;https://github.com/oskitone/higher_lower&lt;/a&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;h2 id=&quot;appendices&quot; tabindex=&quot;-1&quot;&gt;Appendices&lt;/h2&gt;
&lt;h3 id=&quot;two-batteries%2C-not-three&quot; tabindex=&quot;-1&quot;&gt;Two batteries, not three&lt;/h3&gt;
&lt;p&gt;The operating voltage range of a standard ATtiny85 is 2.7v to 5.5v.&lt;/p&gt;
&lt;p&gt;A rechargeable NiMH AAA supplies 1.2v, and three of them make 3.6v, which is perfect! That&#39;s what the Scout does, and it&#39;s the Scout&#39;s battery holder pack powering the game prototype above.&lt;/p&gt;
&lt;p&gt;The problem is that 3 AAAs plus the PCB length made the enclosure dimensions a kind of awkward rectangle, when I wanted it to be a square.&lt;/p&gt;
&lt;p&gt;Dropping to two NiMH batteries for a total 2.4v isn&#39;t enough voltage, and I dare not prescribe non-rechargeable alkaline batteries even though their nominal 1.5v (thus, 3v total for two) would work great.&lt;/p&gt;
&lt;p&gt;The solution was to switch to the ATtiny85V, a special version of the chip that runs on lower voltages, as low as 1.8v.&lt;/p&gt;
&lt;h3 id=&quot;so-random&quot; tabindex=&quot;-1&quot;&gt;So RANDOM&lt;/h3&gt;
&lt;p&gt;Random number generators &lt;a href=&quot;https://blog.tommy.sh/posts/fun-with-the-arduboy/#aside%3A-score-as-count-as-id&quot;&gt;need a seed number to start&lt;/a&gt;, otherwise they&#39;ll present the same sequence repeatedly.&lt;/p&gt;
&lt;p&gt;An unconnected chip pin has a value that&#39;s either high or low (or, in binary, 1 or 0), which is theoretically an okay seed. But, in practice, &lt;a href=&quot;https://github.com/oskitone/higher_lower/commit/3c6652f9aa3c97e80c9cc440a0e8b82deb6018a5&quot;&gt;I didn&#39;t have much luck&lt;/a&gt; with this technique.&lt;/p&gt;
&lt;p&gt;Now a &lt;em&gt;great&lt;/em&gt; seed would be the number of milliseconds it takes for the user to take an action, which is not only higher than 0 and 1 but also almost certainly unique on each play. (This, btw, is how a lot of those &amp;quot;Prove you&#39;re not a bot&amp;quot; captchas work. They&#39;re not checking your answer but rather how long it took you.)&lt;/p&gt;
&lt;p&gt;But if the game starts immediately on boot and launches right into the first round of should-be-random intervals, when can we get something like that?&lt;/p&gt;
&lt;p&gt;The compromise I made was to delay randomization until the user has finished the first round, guaranteeing a unique millisecond seed each time. The first round&#39;s sequences of notes are fixed and from the intro theme, so it also feels like a nice, musical ramp into gameplay before the intervals become arbitrary.&lt;/p&gt;
&lt;h3 id=&quot;lightpipe-cutting-jig&quot; tabindex=&quot;-1&quot;&gt;Lightpipe cutting jig&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/lightpipe-jig.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/lightpipe-jig.jpg&quot; alt=&quot;OpenSCAD model and 3D-print of the jig, with semi-cut glue stick&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To make the lightpipes, I first made this cutting jig. It holds the hot glue stick in place with slots at 1/8&amp;quot; intervals to run a utility blade through. The hole on the right is a &amp;quot;checker&amp;quot; that matches the lightpipes dimensions.&lt;/p&gt;
&lt;h3 id=&quot;parts-caf%C3%A9&quot; tabindex=&quot;-1&quot;&gt;Parts Café&lt;/h3&gt;
&lt;p&gt;Since so many projects are sharing so much OpenSCAD code, I&#39;ve started to extract as much as I can into a common Oskitone parts library, &lt;code&gt;parts_cafe&lt;/code&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The prototype&#39;s base and speaker enclosure seen above&lt;/li&gt;
&lt;li&gt;A &amp;quot;print test&amp;quot; for 3D printer calibration&lt;/li&gt;
&lt;li&gt;Lightpipe cutting jig&lt;/li&gt;
&lt;li&gt;Almost everything else you&#39;ve seen in my projects: enclosures, engravings, piano keys, PCB mounts, fixtures, etc&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are &lt;a href=&quot;https://openscad.org/libraries.html&quot;&gt;better options for OpenSCAD parts libraries&lt;/a&gt; so I don&#39;t recommend anybody really use it (and I have no immediate plans to add any real documentation or offer support), but it&#39;s here for the curious: &lt;a href=&quot;https://github.com/oskitone/parts_cafe&quot;&gt;https://github.com/oskitone/parts_cafe&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;multi_tiny&quot; tabindex=&quot;-1&quot;&gt;multi_tiny&lt;/h3&gt;
&lt;p&gt;The Sparkfun AVR programmer I&#39;m using is designed to program one chip at a time, and it works great for that!&lt;/p&gt;
&lt;p&gt;But if you want &lt;em&gt;many&lt;/em&gt; chips programmed, your options are basically 1) a bigger programmer or 2) to &lt;a href=&quot;https://www.digikey.com/en/resources/dk-services/programming-services&quot;&gt;outsource the programming&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/multi_tiny.jpg&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/multi_tiny.jpg&quot; alt=&quot;A purple PCB with lots of LEDs and resistors, some switches and caps, one ZIF socket with three ATtiny85s surrounded by four CD4052 multiplexer chips, and an ICSP header connected to a programmer&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This &lt;code&gt;multi_tiny&lt;/code&gt; PCB is my research side-quest into how to connect multiple ATtiny85 chips to a single programmer. The idea is that the programmer&#39;s pins go through multiplex switches that direct them to different target chips&#39; pins. When they&#39;re done programming, they pop out easily from the ZIF (Zero Insertion Force) socket. The multiplex destinations can be set manually, but the end goal is to control them digitally with another device that also handles queuing, testing, statuses, chaining...&lt;/p&gt;
&lt;p&gt;It&#39;s a promising start but very much a work-in-progress. Follow along here: &lt;a href=&quot;https://github.com/oskitone/multi_tiny&quot;&gt;https://github.com/oskitone/multi_tiny&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&quot;an-animated-gif-of-the-openscad-development%2C-git-commit-by-git-commit&quot; tabindex=&quot;-1&quot;&gt;An animated GIF of the OpenSCAD development, git commit by git commit&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;https://blog.tommy.sh/content/higher-lower/openscad-commits.gif&quot;&gt;&lt;img src=&quot;https://blog.tommy.sh/content/higher-lower/openscad-commits.gif&quot; alt=&quot;/content/higher-lower/openscad-commits.gif&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As one does.&lt;/p&gt;
</content>
	</entry>
</feed>
