Thursday, November 20, 2008

Invention Idea #1

My kids go to school and (probably) never wash their hands. I imagine 90% of the colds I get started their path to my nose on some doorknob there. How can we sterilize children more effectively?

I thought about blasting them with ultraviolet, but that leaves them leathery and tough. Good for character but hard to chew. How about just blasting doorknobs (and the like) with UV? How would you mount such a light to reach all the crevices? Well, you could make the knob out of glass and mount the light inside.

But it turns out you need a minutes-long exposure to kill bacteria with UV. And glass blocks it anyway. And even if it didn't, it would still be shining out into the room and eyes of students.

However, I just recently came up with another solution: Ultrasound. So a kid grabs a knob and leaves germs behind. He lets go. A sensor notes this and gives a brief blast of ultrasound, dismembering any organics. The next kid grabs and she doesn't pick up the nasties.

Google says this works, but talks about being immersed in liquid. Maybe that can be worked around. Or a gel coating on the knob. Or fill the school with water and equip the kids with scuba gear.

Monday, November 17, 2008

Magic Smoke and Mirrors

The task is very simple. I have a solar tracker. I have a microcontroller that knows what direction the tracker should be pointing. I have a cordless drill that I've taken apart to do the actual work. So why is it taking me WEEKS AND WEEKS to get this working? I can't even turn the drill on yet, at least not without threat of releasing the magic smoke.

It should be extremely simple. Here is how a drill works.

OK, so it should be easy to just replace the human-operated switch with a microcontroller-operated one.

The microcontroller replaces the human and relay replaces the switch. It's a high-amp relay because on the very first magic smoke release test I found that the drill draws 20 amps (or more!). It's also a 15V battery, so I managed to remember the resistance of the motor as being .7 ohms which makes the V=IR math work out.

However, when I almost melted my entire apparatus on the second test I realized that the motor is only about .1 ohms. How on earth can I be feeding 15V to .1 ohms and only drawing 20 amps? Including a current-limiting resistor doesn't improve things much, since it just wastes a bunch of power getting really, really hot. After a little thought, I decided to actually look at the drill switch. I can't get it open, but I was able to confirm this much:

I don't know how, but that magic box is somehow limiting the current. One thing I can see in there is a transistor, which could definitely do the job....except it would have to be awfully high power to handle 20 amps. Or maybe it isn't? Maybe the 20 was transient and it normally feeds more like 2-3 amps? No idea. Which leads me to think maybe I need to give up and do something like this:

Which is stupid. If I knew how it worked, I could probably hook the microcontroller directly to the magic box and forego all my rubegoldbergian relay stuff (which should be a post on it's own...). It's also annoying that I know this can't be an unsolved problem. But I must not be thinking of the right keywords to find the solution.

Friday, October 17, 2008

"School Tools"? "TooLibrary"?

Statement of Problem

I don't have the tools I want. Nobody I know has the tools I want. I don't have the money to buy the tools I want. And even if I did have the money, I don't have space for the tools I want. (The tools I'm thinking of are machine tools, such as a lathe, milling machine, etc. But it could also apply to automotive, woodworking, electronics and other things.)

Proposed Solution

I know I've seen at least a couple of businesses on this concept, but I can only find one now: TechShop. It's like an gym, but for tools. You pay a membership fee and you can go use their space, stuff and expertise. (For a more non-profitish take, there's also the MIT Hobbyshop.)

Of course, one could argue that if you are paying even as low as a mere $20/month (TechShop's actual lowest price is $100/month), you'd eventually be paying more than if you bought the equipment yourself. However, you still gain these advantages:

  • lower startup cost - Instead of having to save up $N to buy the next tool, I immediately have access to all of them after the first membership fee.
  • access to specialty tools - It would probably be pretty rare for me to need 5 axis CNC milling machine. But when that's the only thing that will work, it would be nice to have it.
  • access to experts/help - This is either someone that works at the shop and gives classes or just the other users. Synergy, people.
  • space - Unless I start throwing out family heirlooms, I'm not fitting more than one more power tool in the workshop.
However: Statement of New Problem

Places like TechShop tend to be in locations of high population concentration, particularly of a high-tech nature. The Bay Area. Research Triangle Park. And even at that there still isn't (or going to be) one in Boston. Plus $100/month is pretty expensive. The MIT Hobbyshop is only available to MIT students, faculty and staff. Other restrictions apply, void where prohibited.

Proposed New Solution

Almost every town, no matter how tiny, already has a high school with a shop. Some of them also have area vo-tech type schools. This is space that is already set up to

  1. teach
  2. a large group
  3. of complete n00bs
  4. to get immediate results
That's perfect, right?

Of course, you can't go during the school day. But nights, weekends and summers are plenty. This is especially true if you imagine where you might be storing your half-completed project. If it's something big, you might store it at the shop and then you are locked out when they are closed. But if it's small, you can work on it at home with what you have, then bring it to the shop during open hours. (Other hours possibilities would be just weekends, twice a week, etc.)

Another potential issue is whether insurance restrictions or byzantine school regulations would prohibit this. Apparently not, at least in my state. I thought of this idea when I saw the courses offered at my local high school. No shop classes, but according to the coordinator they have done so in the past. These are 8 one-evening-a-week sessions, generally. So you'd really need to just need to extend the class "indefinitely" and done. (I don't know how the instructors for these classes are chosen and/or paid. Maybe they are volunteers? Maybe they get some portion of the proceeds?)

Then we come to the little matter of the bill. How much would this cost? Here's where I think this plan could really work. The tools, space and (some of) the personnel are already paid for! It's part of the school district funding. The venture doesn't have to pay for the entire cost of everything, only for the marginal cost of expanding the hours. That marginal cost isn't zero, but neither would the membership fee.

Just throwing random numbers around: Shop classrooms are typically set up for about 10 students at a time, so let's call that a max nightly number. Let's also say the place is open twice a week and every member wants to attend on average twice a month. That's 8-9 open nights per month or 80-90 person-nights. So the entire membership could be 40-45. That also seems like a reasonable number of interested people living within a radius of a given high school. If each one is paying $20/month, that's around $10k/yr. Not a huge amount of income for the school, but perhaps enough to pay for itself? Some of the 8 week classes are listed at $100, so maybe $50/month is more reasonable.

Of course, I would be remiss in mentioning only the financial side. For instance, book libraries were not actually started purely as a cost-cutting measure, although they serve that function. They were started as an educational measure. Even if I'm well-educated myself, it makes sense for me (in terms of enlightened self-interest) to pay for the education of others. That's because the society I'm in will be better overall, including near me, if everyone else is smarter. If you consider knowledge a mental tool, then my idea is simply an extension of this.

Friday, October 10, 2008

Go Is A Game Of One Network

Both videos are amazing but imagine a gaming server using the technology from the second one (chess is demo'd at the end). Go stones would cast even less shadow than the chess pieces do. The only problem is that projectors aren't household technology. Although maybe you could use an LCD screen laid flat as your board?

Thursday, October 9, 2008

Apert

  • I've been working on various projects but none of them is to the point of being documentable. But I feel like I should update my blog so it doesn't look like I'm dead. So...here I am. I'm a Montharian. (For explanation of this and the post title, see next item)

  • I'm "reading" Anathem and it's really great so far. I "read" The Name of the Rose a few months ago and had the idea of scientific monastics then, so I'm a little cheesed off that Stephenson beat me to the punch (not that I was going to write a book, but now I can't talk about how cool it would be without sounding like a fanboi). I've seen some complaints about the made-up words, but I don't think that's really fair. For one thing, a lot of the words like "fraa" and "reticule" aren't made up, they are just less common. For another, shut up.

  • Is it just me, or is the YouTube subscription system completely broken? My concept of that list on the front page is that they are supposed to be new, unwatched videos from my subscription list. Instead, they seem to show a random selection of new videos from my subscription list, watched or unwatched, and only one from each subscription. So if, say, New Scientist puts out 3 videos in between visits, I only see the latest one. Why isn't it more like an RSS feed? Or maybe I should use an RSS feed for it?

  • Weight loss is still on track to reach my goal by Christmas. I'm such a dork I even wrote a program to calculate some stats, including what day my current trend will have me finishing at. 12/24/2008 so far.

  • One of the projects I'm not ready to post about yet involves some electronics running outside. I wasn't comfortable having it plugged in, so I went with a large, rechargeable battery. After getting everything working, I realized
    1. The motors weren't powerful enough
    2. but they were still drawing too much power to allow the battery to last very long
    3. and I bet the battery won't work well in the cold
    Sooo....yeah. Back to the drawing board for at least part of that.

Tuesday, September 16, 2008

Wooo

  • I cracked 50 lb of weight loss today. I'm still on track (±ε) to reach my original goal by Christmas. It also happens to be, as of yesterday, 10 lbs in 100 days, or almost exactly 350 calories/day.
  • Pursuant to that, I have made a breakthrough in food reduction technology. One of my favorite meals is...undocumented on this site?! WHAT. Anyway, it involves guacamole. The problem I've had is that I need to make enough to use up an entire avocado, which now that my metamabolism needs fewer calories is a little too much. Avocado turns brown if you look at it funny, so I can't put the excess in the fridge. I also can't throw it away because of the starving children in Africa. However, it turns out to freeze just fine. So now I can make M/Nths of a recipe which not only vastly reduces the hit points but also means I only use M avocados every N days.
  • I'm trying to embed a microcontroller into a project that I'll describe more later. All I know is Arduino, so I'm going with that. (I guess I could just use the Atmega chip or however that works, but baby steps, people.) The basic Arduino is a little unwieldy for this, but last night I finished soldering and testing the Really Bare Bones Board. And besides being much smaller and breadboard-compatible, it's also much cheaper because it pushes some of the cost of the unit into a one-time-purchase cable.
  • Number One Son, age 9, is trollering me. He just found out about HTML and has made a couple of pages. (With random size changes and font colors, naturally.) He keeps calling the .html file a "program".

Wednesday, September 10, 2008

New Control Structure Considered Useful

We have a large data processing problem at work. Basically, we get thousands of items every day and have to figure out which ones go together. The only way to know if they go together is to try them. Some items may not go with anything, some may fit with a hundred or more other items. The one nice thing is that once we've found 3-5 items that go together, we can zip through all the other members of the group.

The problem is finding those 3-5 items. Choosing every possible combination of 5 would take too long. Choosing every combination of 3 is fast enough, but leaves a lot of extras. The simple solution is to first try all the combos of 3, then try all the combos of 4 on the remainder, then try all the combos of 5 on the remainder of that. The smaller and smaller pile makes the larger and larger choices feasible.

My boss, who is a competent practical programmer, suggests we have 3 procedures: One that does a 3 nested loop, one that does a 4, and one that does a 5. Like this (in Tcl):

set items {apple orange banana grape strawberry}
set count 5

for {set i 0} {$i < $count} {incr i} {
    for {set j [expr $i + 1]} {$j < $count} {incr j} {
       for {set k [expr $j + 1]} {$k < $count} {incr k} {
         set string [lindex $items $i]
         lappend string [lindex $items $j]
         lappend string [lindex $items $k]
         puts $string
       }
    }
}

That's just the 3 level loop because the other two look almost the same. The 4 and 5 level loops are identical except for having additional levels. As a programmer who values elegance over readability, the phrase "identical except for" is a red flag. Why have 3 separate procedures when all you are adjusting is a single parameter? What I need is a new control structure that is basically a for loop but lets me control how many nested fors there are.

Tcl makes it easy to create new control structures. Here's the control structure definition:

# Usage:
#  indexcount - how many items are being chosen
#  itemcount  - how many items are being chosen from
#  indexvar   - variable to hold current combination of indexes
#  body       - code to execute for each combination
proc chooseloop {indexcount itemcount indexvar body} {

    if {$indexcount > $itemcount} { 
      error "More indexes than items"
    }

    if {$indexcount == 0} { return }

    set indexes {}
    for {set i 0} {$i < $indexcount} {incr i} {
       lappend indexes $i
    }

    set maxindexval [expr $itemcount - 1]

    while {1} {
 
       # make new body that sets indexvar first
       set newbody "set $indexvar {$indexes}\n$body"

       # do this iteration
       uplevel 1 [list eval $newbody]

       # find incrementable index
       set found no
       for {set i 0} {$i < $indexcount} {incr i} {
          set index [lindex $indexes end-$i]
          set thismax [expr $maxindexval - $i]
          if {$index < $thismax} {
             set found yes
             break
          }
       }

       if {!$found} { break }

       # increment this index and set all following ones
       set incrindex [expr ($indexcount - 1) - $i]
       set precedingval [lindex $indexes $incrindex]
       for {set j $incrindex} {$j < $indexcount} {incr j} {
          lset indexes $j [expr $precedingval + 1]
          set precedingval [lindex $indexes $j]
       }
    }
}

Now to get my 3 level loop, I can call like this:

chooseloop 3 5 indexes {
    set str ""
    foreach index $indexes {
       append str "[lindex $items $index] "
    }
    puts $str
}

In order to do 3, then 4, then 5, I can call like this:

for {set i 3} {$i < 6} {incr i} {
    chooseloop $i 5 indexes {
       set str ""
       foreach index $indexes {
          append str "[lindex $items $index] "
       }
       puts $str
    }
    puts "--"
}

The output of that last one is:

apple orange banana 
apple orange grape 
apple orange strawberry 
apple banana grape 
apple banana strawberry 
apple grape strawberry 
orange banana grape 
orange banana strawberry 
orange grape strawberry 
banana grape strawberry 
--
apple orange banana grape 
apple orange banana strawberry 
apple orange grape strawberry 
apple banana grape strawberry 
orange banana grape strawberry 
--
apple orange banana grape strawberry 
--

Monday, August 18, 2008

Forming Acrylic Mirror

I think all this information exists in previous entries, but it's nice to have all my knowledge, however little that is, dumped into one spot.

Heat forming acrylic (aka plexiglass) is pretty simple. Just get the temperature up around 220°F and it's pliable. I put it into the kitchen oven. Don't rely on the oven temperature, though, use something with a probe to tell if you've got the real temp. For one thing, you can put the probe right down where the mirror is, not just floating around in the air inside the oven. Also, when I was researching this I found some warnings about fumes. I think that's only if you overheat because I never smelled or sensed anything. Maybe I've silently shortened my life by 20 years.

I tried a couple different methods of using a form. The first couple tries were "open-faced," meaning I laid the acrylic on top of something and counted on the weight of the material itself to cause it to sag into the form. It isn't really heavy enough for that, so I moved to a two-part form. It takes longer to heat that way because of the mass of the form itself. Another disadvantage of this method is that you have to be able to force the mirror into shape before you heat it, which means no 2D curves (like a bowl, if you see what I mean). Actually, you probably could do that by putting the acrylic sheet between the halves of the form and then weighing the top part down. Like the open-faced method, but with extra weight. Drill a hole in the form so the temp probe can sit right on the acrylic.

The above should give pretty nicely formed acrylic sheet even in complex shapes. Unfortunately it's totally unworkable for acrylic mirror. I'm not sure if it's the acrylic or the mirror backing, but the heat stresses the material such that you don't get a smooth reflection anymore. For a while I thought it was imperfections in the form, but various experiments ruled that out. (You can get bumps and ridges from a rough form, though, which can be eliminated by loosening the form a little or by lining the form with some kind of bumper material. I used a sliced up silicone baking sheet.)

Also: I never got far enough to have this problem, but eventually you'll run out of space in the oven. Multi-part forms? Some other heating method?

The curve I wanted wasn't 2D, so how about cold forming (aka "bending")? I have not yet determined the point at which the acrylic cracks or deforms. I haven't even determined if there's some point short of complete destruction where the mirror breaks down, a la the heat deformation. It seems to be pretty sturdy and stable, but then I'm not making tiny radius curves. If you imagine bending a yard stick, that's about what it seems like, or maybe a little stiffer. Put another way: I have a square of acrylic mirror that's 2'x2' bent into a curve about the same as the side of a 55 gallon drum and I haven't see any problems with it. (This is the 1/8" thick stuff. There's also a 1/4" thick stuff that I've never tried.)

The trick with cold forming is that you have to hold it in place somehow. Even drilling a hole through the acrylic will deform it, although only in the immediate area surrounding the hole. I started with a sandwich method--cutting two parts and then cramming the mirror between. That works, but you have to have some method of securing the bread of the sandwich that doesn't involve drilling through the mirror. Also, you cover up some portion of the mirror surface.

Of course, you can drill through the mirror, but in that case why even have the top piece of bread? That's what I switched to: Put the mirror on an open-faced form and drill a few well-placed holes to secure it down. Don't overtighten, because the force isn't distributed over a wide area like with the sandwich, so the local area can get quite deformed. Maybe a reason to have the top piece of bread after all. Or maybe just some rubber washers or silicone baking sheet for padding.

You can't get too fancy with this method, but for a single, relatively gentle curve it works great.

Wednesday, August 13, 2008

Massively Unparalyzed

  • I think I'm out of the summer diet doldrums. I suddenly realized that if I stayed focused, I could meet my original goal by Christmas. I have to lose 1 lb every 10 days, which seems pretty reasonable. That's just ~350 calories/day. This is the same rate my overall history has been up til now, so as long as I keep, or *cough* get back on, that average I should be good. (I say "original goal" because after I meet that goal I think I'm going to go an additional 10 lbs. But I'll have to see how things stand when I get there.)

  • I needed to sense sunlight vs shadow and I'd read somewhere you can do that using an LED somehow. I got that working but they aren't made for that and so it didn't meet even the low standards of this application. Some photoresistors, even at RadioShack's redonk prices, were only $3 and work so much better.

  • Also needed, or at least wanted to evaluate, pulleys. McMaster-Carr's site is so awesome, why can't my local hardware store (or even Lowe's) have a website like that? Or McMaster-Carr have an outlet near me.

    That said, my local hardware store fits an amazing depth and breadth of stuff into their store. I don't think there's been a single thing I couldn't find there that I was able to find at Lowe's, in the fields the LHS covers. (i.e. they don't sell appliances at all, so obviously they have a smaller selection of dishwashers.) And the reverse is not true--I've found things at the LHS that Lowe's didn't have. And they manage to fit all this stuff into an area that's probably literally no larger than the area devoted to just cash registers at Lowe's. Like, how is it possible that my LHS has a 9 ft2 caribiners + pulleys display right next to the pumps I need (though are still more than I want to pay)?

    Oh and the staff actually know where things are and how to use them, unlike at Lowe's.

    I guess what I'm saying is, local hardware store:Lowe's::small European country:US. It may be a little more expensive, but the service and selection are great.


  • How can I completely waterproof a wooden structure? How about sunproofing? Like, is it going to get baked and shrunken on one side? Probably somebody already knows all this stuff. No wonder people just build with metal. Oh wait, how about PVC? Does that degrade in the sun? Oh and it's hollow, so you can put wires in there....HMMMMM

  • I was going to have an entry in here talking about all the things I suddenly (as of this morning!) have to do, but I can't even spend time enumerating them!

Monday, August 4, 2008

Paralyzed by Obstacles (i.e. whining)

(throughout this entry substitute "can't find at a reasonable price" for "can't find" and "free or under $40" for "reasonable price")

The next stage in the parabolic solar collector thing is to have the fluid circulating. I want to have it run through the collector, then down a hose into a tub of water and then back. Measuring the heating rate of the water will give me a better value for the power.

For this, I clearly need a pump. And can I find a pump? Clearly not. For simplicity, I think I want one that has garden hose fittings on both ends. Sump pumps usually have that on one end, but the other end doesn't have any fitting at all. (Maybe I could disassemble one to find out, but I can't find any to do that with either.) I bought a drill pump for like $6 but it was too wimpy to be useful.

Not that it has to be that powerful. According to the back of my envelope, I only need about 60 gph in the worst case. Typical sump pump numbers are 10x that. I could probably do it myself by putting a squeezable diaphragm inline and stomping on it. What a lot of work, though.

But I have feelers out on craigslist and freecycle, so in the meantime how about something else? I know, I can try to make a much larger stirling. What'll I use for the piston? Oooh, brill idea: a cut off bike pump!

Take 2: And can I find a pump? Clearly not.

Maybe I'm just too cheap. Or maybe I haven't figured out the right workaround. Or maybe I'm asking for too much. All of these questions (plus a couple other things I'm stopped on but aren't worth describing) has my brain in vapor lock. I am unable to move on anything.