Friday, July 24, 2015

The Tooba

Way back when, one of my friends in high school was a guy named Dave Wilson whose father got him into Moog-style analog electronic music synthesizers. Dave created a museum of historical synthesizers in his home in Nashua, New Hampshire. Through my high school and college years, we exchanged ideas and circuits and bits of lore for various synthesizer hacks. These synthesizer modules were implementing mathematical functions that could be implemented in digital electronics. So we both at various points and in various contexts wrote code to do that.

The Tooba is going to be some of that built into a short length of 3" PVC tubing. There will be a two or three-octave touch sensitive keyboard and some linear slide pots for various synth parameters. Sound will be generated in the same Teensy 3.1 controller board that scans the keyboard. Unless the poor little CPU gets overwhelmed, then maybe I'll put in a second Teensy for sound generation.

Here is a prototype, mostly testing the touch-sensitive keyboard. For this version the sound was generated by Timidity running on a Raspberry Pi, and the form factor is obviously different. The keyboard misbehaved in this video because of a sagging under-powered 12-volt supply.

I'll add more to this post as the thing gets closer to completion.

I had some confusion about the date for the Rhode Island Mini Maker Faire (last year it was a month after the NYC Maker Faire) so I had to hustle when I got the date correct. But I managed to pull it off and have got the thing working.

I also had to figure out how to mount the copper hexagons on the PVC tubing. Eventually my technique got good enough, but by then I had a mix of well-soldered and poorly-soldered hexagons, and the latter periodically pop off. So in the video below you'll see some missing hexagons that I need to replace before I head down to Providence.

So that's the gadget. There is a lot of clean-up to do on the mechanical design. Now I feel it's stable enough to justify laying out a printed circuit board. And the inside wires should be replaced by ribbon cable. But hey, it's working.

Thursday, June 11, 2015

Eating without grains

Recently a friend had me watch a talk by William Davis, a cardiologist who wrote a book called Wheat Belly. If you have an hour, here are his thoughts on wheat.

If you don't have an hour, here is the gist. Humans originally consumed grains in general and wheat in particular to avoid starvation. They saw aurochs (predecessors to the modern cow) around them eating grasses, and lacking other food sources at the time, also tried eating grasses. They found that the only part of the grass that was digestible was the seeds, and they cultivated these grasses into the various grains we know today.

A few problems. First, the first humans to eat grasses did not have the evolutionary adaptations that the aurochs and the cow have: special teeth, special multiple stomachs including one grinding stomach, special digestive enzymes. We still don't have those adaptations, and we probably wouldn't acquire them for hundreds of thousands or millions of years. Grasses have only been on the human menu for about 10,000 years, and our genotype doesn't change very quickly.

Second, the seed of the grass is the one part that, from an evolutionary perspective, wants NOT to be digested. It has defensive proteins and enzymes intended to discourage (read "poison") any animal trying to eat it. Gluten allergies are human reactions to one of these poisons.

Third, what has been changed in recent decades. This is largely the work of Norman Borlaug, undertaken to improve crop yield. Borlaug received a Nobel prize for his work in creating a dwarf form of wheat with a vastly increased yield. Farmers can no longer prosper growing the earlier tall wheat and so now all the wheat you eat in any form is Borlaug's dwarf wheat. This is true on a global scale, not just here in the United States.

The problem is that this wheat has proven to be mismatched even more poorly to human nutritional needs, and that's why so many people are gluten intolerant, a condition that did not previously exist. It is looking likely that the modern epidemics of obesity and diabetes are also tied to dwarf wheat. Many have been mystified that these epidemics have spread outside the U.S. and this explains why that would happen.

Gliadin, one of the proteins in wheat, is an opiate that stimulates appetite, contributing to obesity. This video by Joe Rignola goes into more detail of the damage that gliadin does to a person's intestines. This damage is not confined to the intestines. T cells (the part of the immune system that attack one's own body, responsible for inflammation) respond to gliadin by attacking both it and something that belongs in your gut called transglutaminase. It turns out that transglutaminase is produced throughout the entire body and all areas come under attack as the T cells attempt to respond to the original gliadin injury. And so now you have a problem of broad spectrum inflammation.

As if this all weren't enough, it turns out that wheat raises blood glucose substantially. Two slices of whole wheat bread raise blood glucose higher than six teaspoons of ordinary sugar. In the hour-long video, Davis goes on to enumerate more components of wheat that cause additional health problems. Elsewhere, he identifies health issues with all other grains as well. So the thing one wants to do is to adopt a grain-free diet. Here are a few resources that may be helpful if you are considering this.
The important thing is to identify foods that you can be certain are grain-free, for example meats, cheeses, fruits, vegetables, and nuts. Recall that grains did not enter the human diet until the very recent evolutionary past. Grains are not, as might be believed, necessary for good health. They are in fact detrimental to it.

Monday, March 02, 2015

An overview of the 2014 printer

People have been asking for an overview of the 3D printer that I showed at Makerfaire NYC 2014. I designed it myself, borrowing a couple of ideas from other printers. My printer builds objects from a liquid resin that solidifies under ultraviolet light. Your dentist may use similar stuff to fill cavities. I get the ultraviolet light from an unmodified conference room projector that cost me about $350, the single biggest expense of the whole project. The most important design principle was that a person of very low craftsmanship like myself should be able to build the thing. It pretty much does not require precision at any point in the construction.

The idea to use a projector rather than steering a laser came from the B9 Creator printer. The Peachy printer gave me the idea of floating resin on salt water and projecting the light onto the surface of the liquid. The idea to raise and lower the build platform using three threaded rods driven by a bicycle chain was my own, and it turned out not to be such a great idea.

Soon I plan to post some of my plans for a 2015 printer. Right off the top of my head I can think of four worthwhile goals.

  • Bring it to both the Bay Area Makerfaire and the NYC Makerfaire.
  • Replace the bicycle chain and those three threaded rods with something simpler and more reliable.
  • Clean up the electronics and software so I don't need a laptop to control it.
  • Replace the orange bucket with something with transparent sides, like an aquarium, so that people can watch the printing process.


With the bicycle chain not yet in place, the printer looks like this. Those gray sprockets engage the bicycle chain, which goes around in a sort of diamond shape. The orange bucket is one of the three-dollar buckets from Home Depot. The plywood, nuts and bolts, and threaded rods also came from Home Depot. At this particular point in the work, I thought I would suspend a mirror over the top of the bucket at 45 degrees, which is why you see a piece of wood in the upper right of the photo. But I didn't know about first surface mirrors then, and I lost enough UV going through the glass twice that I couldn't get the resin to solidify, so I then positioned the projector directly over the bucket, pointing downward.

The sprockets were designed using OpenSCAD and initially the teeth were too pointy - correct in theory but too sticky for real-world bicycle chain, so you can see where I cut off the points, and later revised the design. If you order sprockets from my Shapeways store, they should now work fine.





Here is the printer fully assembled. The bicycle chain is driven by a stepper motor. Each revolution of the stepper motor (200 steps) raises or lowers the build platform by 1/20th of an inch because the thread on the threaded rods is 1/4-20.

When it's printing, it looks like this. Only where the light is the strongest is the resin solidified. The resin happily ignores ambient diffuse daylight in the room where I'm printing, so I don't need to use dark room lighting.

Pictured below are some of the objects I've printed with the thing. I started out with a bottle of green resin and when that started getting low, I added a bottle of clear, so my things tend to vary between green and clear.

Tuesday, September 16, 2014

A couple of recent 3D printing successes

With a few last-minute improvements I've been able to substantially improve the performance of the printer. I slowed the stepper motor to reduce vibration, and I allowed a settling time after each motor movement before exposing the next layer of resin. I cleaned up the build platform, it is now a sheet of aluminum epoxied to the plywood. (And of course, within a couple of prints, it has gotten covered with a sheet of cured resin. Best laid plans...) I had been trying exposure times that were too short, so I went back to 60 seconds per layer.

If you'd like to see these prints and others, and the printer that made them, come to Maker Faire NYC this weekend at the New York Hall of Science in Queens, NY.

Here is a chess rook. It has an interior spiral staircase. The windows are a bit misshapen and the bottom flat surface is covered with a big glob of cured resin. I don't know why those things happened, but the detail on the parts that came out well isn't too bad.
This is a dodecahedron, one of the five Platonic solids. In the days of ancient Greece, this shape was the cause of some controversy because it could be used to prove the existence of irrational numbers, which ticked off Pythagoras something fierce. This was posted on Thingiverse, as was the rook.

More shapes to come soon, if all goes well.

Sunday, September 07, 2014

Finally, the thing is printing

Tomorrow I start a new job with Formlabs, a 3D printer company, and I'm psyched about that. Unfortunately, however, one of the conditions of my employment there is that I cease development on my own 3D printer. I spoke with their attorney and it all makes sense, it's the right thing to do, because my printer is entirely open source and they are selling a proprietary product. If I were to continue developing my printer, it would be too easy to unintentionally include pieces of their technology. So tonight I am putting the finishing touches on the Github repository.

Today was the first time I made a successful print with this printer design. I had hoped to print four dodecahedra at once. But I had some crud on the surface of my build plate, and I hadn't stirred the resin before printing, so only one of the four came out really well. Another was misshapen, and two of them never came together at all.


 Here are the two that were at least coherent solids. I think with a little more learning and practice, I'll get to where I can make four that all look as good as the one on the right.
Here is the setup I'm using. If you've followed this blog, you'll recognize the stuff on the bucket. The box-like thing overhead was quickly cobbled together when I realized that my mirror wasn't reflecting enough UV light to make the resin cure properly, because the mirror's glass isn't transparent enough in the UV range. To remove the mirror from the optical path, I needed to put the projector directly over the bucket, pointing down.

Friday, August 29, 2014

Of bicycle chain and sprockets

Here is the best video I've found for working on bicycle chain. I haven't looked extensively but this one gave me the information I needed, starting at the 34-second mark. I had to buy a length of chain and one of these tools shown in the video. I thought I might need a thing called a "master link" but that's really unnecessary. Bicycle chain is one example of roller chain, a mechanical engineering term for chains that follow the same principle.

The chain I'm using is 1/2"-1/8" single speed chain, also known as #410 chain. The first number (1/2") is the pitch, the distance between the centers of two consecutive rollers. The second number is the width, the distance between inner plates. These numbers, together with the roller diameter, determine the shape of the sprocket teeth. For #410 chain the maximum roller diameter is 5/16".

If you're going to build a gadget using bicycle chain as a drive chain, remember that you'll need a tensioner somewhere, something you can adjust to take up slack in the length of the chain. You'll need at least an inch of adjustment available (twice the pitch). In my design, I made the stepper motor moveable to take up chain slack.

On to the topic of sprocket design. The approach I used is basically guided by the red curves in the diagram to the left. Some sprocket designs truncate the teeth, which reduces friction but engages each roller for a little less time. I probably should have done that but it's not really necessary. The OpenSCAD code for my sprocket design appears at the top of the sprockets.scad source file in the Github repository for my printer. I tested the sprocket (Thingiverse, Shapeways) to make sure that in the absence of unreasonable friction, the chain could freely engage and disengage the teeth as it moved around at fairly high speed (much faster than it will move on the printer most of the time) and that worked fine.

There are a few different pieces, so let me step through it. The outer thing is a difference operation, which means that the first part (the union) establishes a block of stuff and the other parts are removed from it. So we begin with a rectangular solid stretching in the X direction from one roller to the next, with a Z height equal to the width of the chain. To that we add the "tooth" part, defined by the two upper red curves in the previous diagram. The first two pieces we remove are the cylindrical cutouts in which the rollers will sit when closest to the sprocket's center, defined by the two lower red curves. Finally, a couple of flat surfaces are cut out to taper the tooth in the Z direction, which allows the sprocket to still engage nicely when the chain isn't precisely coplanar.

module sprocket_tooth() {
    difference() {
        union() {
            translate([-1/4,0,-1/16])
                cube([1/2,3/8,1/8]);
            intersection() {
                translate([1/4, 0, -1/16])
                    cylinder(h=1/8, d=1-5/16, $fn=30);
                translate([-1/4, 0, -1/16])
                    cylinder(h=1/8, d=1-5/16, $fn=30);
            }
        }
        translate([1/4, 0, -1/8])
            cylinder(h=1/4, d=5/16, $fn=30);
        translate([-1/4, 0, -1/8])
            cylinder(h=1/4, d=5/16, $fn=30);
        multmatrix(m = [
            [1, 0, 0, -0.5],
            [0, 1, 4, -1.3],
            [0, 0, 1, 0],
            [0, 0, 0, 1]
        ])
            cube([1, 1, 1]);
        multmatrix(m = [
            [1, 0, 0, -0.5],
            [0, 1, -4, 2.7],
            [0, 0, 1, -1],
            [0, 0, 0, 1]
        ])
            cube([1, 1, 1]);
    }
}




POSTSCRIPT

I found with the design above that those teeth can easily get stuck if one of the links in the bike chain is stiff. I haven't done a lot of bike chain work, and I would imagine that people who do probably get better at avoiding or fixing stiff links, but I'm not there yet. So one thing I did was to make much less "aggressive" sprocket teeth. For my application, I get away with much shallower teeth, and have updated both the Thingiverse design and the Shapeways store accordingly.

I might have neglected to mention this elsewhere (though I think it's mentioned in both those places) that the sprocket for the stepper axle takes a 1/4-inch long 4-40 machine screw as a set screw.

Friday, August 22, 2014

Once more, with feeling

My too-clever-by-half use of laser-cut plywood gears ended badly. Small errors repeatedly accumulated to make the gears fit unreliably. It was a mess. I needed another idea.

I started thinking about timing belts, especially something clever that Vik Olliver did on Rep Rap involving those ball chains used to switch ceiling lights on and off. I didn't really trust myself to be able to solder the ball chain together, and I continued scratching my head. Then I saw one of those bicycle chain bottle openers at a party, and realized that bicycle chain was the solution to my problem.

I started learning about roller chain and sprockets. It turns out sprocket tooth design is really pretty simple, much simpler than involute gear teeth, and I was able to design some sprockets with just a little study. It took a redesign because the first time, my stepper sprocket design assumed a friction fit would work, but when the part arrived, I discovered I'd need a set screw. In the picture to the left, I retrofitted a set screw on the initial sprocket design with sub-optimal results. This is probably adequate on a temporary basis, but an improved design is pending and should arrive by the end of August and should be in place for exhibition at Maker Faire.

 So this is the new design. I think it retains the Steampunk flavor of the original design, if perhaps not quite as pronounced. It's a bit simpler and all the plywood cutting can be done by hand with a compass and a jigsaw. So my design goal that it should be buildable by a person of minimal craftsmanship (like myself) is intact.

Barring some disaster, I expect to be exhibiting this printer (hopefully in operation) at Maker Faire NYC 2014, at the New York Hall of Science in Queens, on September 20th and 21st. If you're reading this, you're invited to come see it. If you can't make it, I'll try to post as much information here, on Github, and on Youtube as possible.