Saturday, February 28, 2009

Anyone Can Share an App!!!

It's official...

Anyone can go to the app store and share there app for anyone to easily download.




I recently uploaded this paint app for free.

Friday, February 27, 2009

How to make your own bottle raft and get in trouble

Nooooooo... Ok, I was getting pretty excited to go to Make NYC this past week, but sadly it was postponed and now I just found out I can't make the new date. I was going to share with everyone Chris and my complete adventures of the USS Bottleware (or maybe the OSSWH Bottleware)? :)

P.S. this post has nothing to do with Arduino, Open Source Hardware, Open Source Economics, or anything like that. I was just going through my old pictures and found this, so I thought I'd share!

This story is a little old now, but a few summers ago Chris and I decided we didn't have enough danger in our lives, so we were going to build a sail boat to learn the principles of sailing. We didn't have enough money to justify buying a used boat, or even renting one, so we built a bottle raft and then later stuck a sail into the middle of it. Unfortunately, I don't have any pictures of the raft when it had it's blue tarp sail, but I'll say this much: it didn't work. We had to paddle pretty hard to keep it going, and it definitely did *not* tack against the wind.

So without further ado, here is my personal guide to building a bottle raft -the getting in trouble part comes at the end of the post:


Step 1: Find bottles

Find lots and lots of bottles. This was really hard for Chris and me until we discovered something... Thursday night was recycle night a few towns over. So we popped along in a little nearly broken down Subaru, and went from house to house picking out all of their nice bottles. We had the pick of the litter too, so we chose hardy, durable bottles.

You might think that 2-litre soda bottles are nice, but they're not. The problem is that they're too narrow, and they'll slip and pop out from under the boat if you're not careful in later steps. Also, I've seen a lot of tutorials recommend using 1 gallon Poland Spring water bottles - which are equally terribly, because the tops just pop off when you submerge the bottle. A good rule of thumb is: if you can take the cap off the bottle in a popping motion with your thumb, the bottle will leak, let in water, and you'll sink. On the other hand, using bottles with screw caps is ideal because they're thicker.

The perfect bottles are detergent and bottled water ones:


No, I'm not sponsored by Tide. In fact, I hate the way it makes clothes smell, but they make great raft bottles. Chris and I did calculate that it was almost worth just buying detergent just for the bottles, since we'd just dump out the detergent and save time scouring the neighborhood for the good bottles. If you value your time, then yes, it's worth just buying detergent and dumping it out. But if you don't, and you have good music to listen to, and a good story to tell neighbors when they see you taking their bottles, it'll probably just take a few hours. Another rule of thumb:

  • An average family household does laundry once a week, and runs 2-4 loads of laundry
  • The average bottle of detergent is good for 20-30 loads of laundry
  • On average, a household is buying a new bottle of detergent once every 8 weeks, or every 2 months
  • That means a household throws out a detergent bottle once every 2 months, or ~60 days - this is about right from my experiences growing up having to do laundry, so this checks out
  • That means that you'd need to visit 60 households before finding 1 detergent bottle
  • Not all households put their bottles in a recycling bin (let's say optimistically 80% do), so now you have to go to 75 households
  • This seems bad, but there's a catch - recycling only happens 1 day a week, so everybody batches their bottles together at once, and so you actually get to reduce the time step earlier by 7, since you're synchronizing when you're checking everyone's detergent-throwing-out-status, so now you have a good chance of finding a bottle with every 10-11 houses you check
  • The final step is a good and bad thing: some people seem to employ a multi-phase, or "stage-gated" recycling process (if you will), by which they keep a recycle bin in the garage, that they fill up first, and only when it's full will they put it out for collection. This is bad because this means there are some houses just sitting there - in front of your eyes, and you KNOW they MUST have a detergent bottle waiting to recycle, but you just can't GET IT! On the flip side, however, you know that when they finally do put their bins out, there's a pretty good chance (about 50%) that it will have a detergent bottle if they took 1 month to fill up the bin. On the other hand, there's a 25% chance the bin will have a detergent bottle in it if they let the bin sit for 2 weeks
  • The nice thing is that you can easily tell if someone has put a recycle bin in front of their houses, so the transaction costs of checking are very low - just drive by the house, and if there's a recycle bin in front of the house, then check it for bottles. If not, don't check for bottles.
  • Last tip: there's about a 1 in 50 chance there's a detergent bottle in the trash bin, hidden from plain site, but luckily most people put detergent bins on top of the trash, so there's a fairly good chance that if they didn't recycle it, it's the huge thing preventing the trash lid from fitting on snuggly, and you can see it. Again, visual inspection reduces time taken.

I can't help it - here's the Laundry-Dumpster-Diving-Time-Tradeoff-Equivalence equation:

W - loads of laundry / week (typical: 2-4)
L - loads of laundry / bottle (typical: 20-30)

New bottle bought = bottle thrown out

New bottle bought = L / W (range: 5-15 weeks)
New bottle bought (days) = L / W * 7 (range: 35-105 days, or ~1-3 months)

Pr - probability that house throws out detergent bin in recycling (assume: 80%)

Divide by 7 for single day-synchronization:

L / W * 7 / Pr / 7

Pt - probability that house throws out detergent bin in trash vs. bin disappears as kid's school project (assume 90%, round lower for technically-inclined neighborhood, or around the date of science fairs)

((1/Pr)(L / W * 7 / 7) + (1/(1-Pr))(Pt)(L / W * 7 / 7))

Tr - Time required to visually inspect recycle-bin (~5 seconds)
Tt - Time required to rifle through trash bin deposited detergent bin (~30 seconds)

Simplified:

((1/Pr)(L / W) + (1/(1-Pr))(Pt)(L / W))

So clearly, for the return, it's not worth spending the ratio of time on checking garbage, since you'd expend a *lot* (~20x) more labor for a garbage-bin collected detergent bin than a recycle bin collected one. Plus they're really messy.

So:

Number of houses to check: (1/Pr)(L / W)
Time spent checking: (1/Pr)(Tr)(L / W)
Time spent fetching: Tf (assume: ~10 seconds)
Time driving from one house (with recycle bin) to another: Th (assume ~60 seconds)
Total bottles needed: B

You have to drive and check every house: (1/Pr)(L / W)(Th + Tr)
You only have to fetch when you find: Tf * B

Total time needed: B* ((1/Pr)(L / W)(Th + Tr) + Tf)

Search: ~700 seconds / detergent bottle
Fetch: ~10 seconds / detergent bottle
B (from next section): ~35 bottles

Total time required: ~7 hours of driving around looking for bottles


How does this funny math validate empirically? From experience, about 1 in 8 houses has a detergent bottle, you're willing to do it for about 3 hours before you get sick of the smell and want to shower, so you spread it across two nights, and two weeks...

Which is just what Chris and I did :)





Step 2: Calculate how many bottles you'll need


You would have thought this step would come first, but here experience has taught me otherwise. Start by finding out how difficult it is to acquire good, solid, quality bottles, and then work backwards. This will tell you what kind of design to go with. For instance, I've noticed that the Northeast seems to be a fiend for large detergent bottles, while the Midwest prefers the smaller types. The South seems to not use detergent, so you don't find too many in their trash (oh, and I don't think all Southern states have recycle night trash collection either, which makes finding bottles even harder).

Anyway:

  • Each gallon of displaced water is about 8 pounds (about)
  • 2 grown guys plus non-floating part of the boat is about 400 pounds (adjust accordingly)
  • 400 lbs / 8 lbs = 50 gallon bottles

1 detergent bottle is between 1.5 and 2 gallons, so you'd need about: 25-33 bottles

Here's the part that trips up mathematicians. Notice that this is only for break-even. If you meet break-even, as Chris and I discovered, you get a boat that usually is partially submerged on one side, or just sort of hovers there in the water, bobbing in and out.

Add another 10-20% bottle buoyancy, however, and you're actually capable of floating above the water most of the time.

The truth is, you never really know, so Chris and I grabbed tons of extras, and we chose the number based on how many we thought we'd need, and then brought extras just in case.



Step 3: Design ideal boat

For Chris and me, it was something like this:

Notice the punt-style main mast sail (forget how we thought it was going to attached to the base), the triangle shape out in front (forget that it would just steer sideways and not help thrust at all), and the outboard motor (for when we got tired of rowing).


Step 4: Reality sets in

A trip to Home Depot indicated a few problems with the plan: how to attach the mast to the platform?

Nevermind the outboard motor, since Chris actually had one lying around. We did notice, however, that it would require it's own ~25 bottles to float, not to mention the undercurrent would probably rip the bottles off the base, so we scrapped that idea. But only after debating about it furiously.

So instead, we got a few wood planks and 2x4's, and built a solid reinforced base (that's Chris with the drill):


Construction fencing makes a great way to secure the bottles to the underside:

You'll actually notice that there were some 1 gallon jugs in there... that's how we discovered that they're horrible sources of "robust buoyancy."

It was quite simple, actually - we used a staple gun to attach the orange fencing to the board, and that was pretty much it.



Step 5: Put "boat" in water

And, if religious, this would be the appropriate time to pray to an appropriate deity... actually, we also started to draw a crowd, since it was a weekend, and this was the New Haven shoreline. I'm pretty certain the New Haven shore crowd doesn't usually get a chance to see this type of work (stupidity?) in action...


That smug grim on my face is because someone just yelled out, "you're going to sink" and I'm thinking, "you're not on a homemade bottle raft, and I am, mwhahahahaha." Chris and I took turns on the "manual outboard engine location". We built a separate platform for the outboard engine, thinking at worst if it tore up the bottles underneath it, we'd still have the other section to be safe on. Seemed to make sense at the time.



Step 6: Get in trouble

We stayed on the raft for about 5? hours, and had no problems. In fact, these pictures were taken at night time, for proof - this is us looking back at the New Haven coast.




The one problem we had, was we made a serious tactical error. We brought a Weber grill on the boat too, thinking, sure, at some point we were going to get hungry and why not cook out on the boat?

Both Chris and I failed to anticipate what the view from land would look like with a fully lit Weber grill and charcoals starting light up. Apparently, someone called the police, thinking we were in danger and on fire and maybe trying to commit suicide in a blaze, when really we weren't, we were just hungry. The police drove up on that ramp in the second picture above, turned his siren on, fired a flare into the air, and called the mini-coast guard (do they exist?).

Anyway, we threw the Weber grill into the water to douse the fire, and rowed back into shore. The policeman said we were perhaps the dumbest guys he'd ever seen, but said it looked fun, and next time we should either not try the cook-out part, or maybe pre-cook everything and bring it out in a cooler.

Thursday, February 26, 2009

The Life and Times of an Open Source Hardware Newbie

Hi! I’m Chris (Chris #2 it seems), and it’s been months since I’ve gotten to hang out with Matt. We live in different cities but met through mutual friends who are into DIY electronics and used to hang out all the time. During the past few months or so I accepted that he was just incredibly busy with whatever it was he was doing. Well, as it turns out, he’s become better friends with someone/something by the name of Arduino. :-)

After looking deeper into the details of Matt's hobby, I realized that I didn’t understand a word that was coming out of his mouth, so I tried to figure out whether my incomprehension was a result of stupidity, or sheer, bent up, jealous rage. It was both. At any rate, I found myself wanting to fit in and decided to sort out what the hurdles of adopting this new hobby would be. I also found myself facing a challenge, not having any kind of engineering background, or any experience dealing with electronics (you know, besides iPods and every other trendy consumer electronic device that 99% of the world owns).


Matt was curious as to whether or not someone so inexperienced, incompetent, and pedestrian (remember when we were friends?) could crawl their way into open source hardware and start understanding his passion. So I asked him how I could get started. Before I finished this sentence he blurted out, "Arduino Duemilanove", which I made him spell of course. I was told that they were about $30 and he was nice enough to tell me that I could get one here...

He left me with these two steps to begin with:

1) Buy an Arduino

2) Explore the official Arduino website here

In the mean time, I’m going to do some research on what an Arduino is, does, and what the community is talking about. I’m curious as to how many other people are interested in this hobby and how long it takes someone with no such background to become accustomed to the Arduino and the entire open source hardware community. That’s a perfect fit for me, because I have absolutely 0 background in computer programming, engineering, or anything related to Arduino stuff!

I’m excited and can’t wait to report my progress. I know that when I was an undergrad the best way I picked up new subjects and topics was to learn them in parallel with my friends taking the same courses. If anyone wants to tag along and has any questions for me, or Matt, or the other experts out there, please let me know so we can struggle together and feel sorry for each other when things don’t work - ha!

Thanks guys,

Chris D, #2, etc.

Wednesday, February 25, 2009

The First Meeting of the Open Source Economics Council

Thanks to everyone who came out for pizza last night at the Open Source Economics Council! It was really great to meet some new people and extremely interesting to have so many different angles on the topic, all around the same table. I really had no idea that the discussion would take the direction that it did, and to be honest, a little surprised at how heated it got!

Suffice to say I came away with more questions than answers it seems, and as I’m pulling together some of the notes I jotted down from our chat, I wanted to share a couple of the big ones:
  • Since hardware is actually tangible and costs money to build, how do you deal with inventory risk that isn’t sold?
  • If things are cheaper at higher quantities, and there are enough people who want one, how do you achieve scale without having a company?
  • Open source is about collaborating in terms of time, and tools, and in the case of hardware, money. Time and tools are easily shared in the realm of open source software (through systems like Github), but what systems need to be built for open source hardware? How would they be structured?
A few other thoughts I had around this made me start organizing a “wish list” of a few of the things that came up as the big problems open source faces, like what the ideal solution would have to address. Maybe the “Principles of Open Source Hardware Economics” or something…if you’ve got a better name let me know!

Thinking from the standpoint of a community of engineers, the system should:
  • Reduce margins and cost for the community
  • Minimize the risk and opportunity cost of unsold inventory
  • Provide incentives for Open Source projects that do not want to incur transaction cost of establishing a corporation
  • Allow the build and distribution of low-quantity products (e.g. niche applications)
  • Allow the build and distribution of non-scalable products (e.g. non-VC fundable) –these two would be the “scale issue”
  • Align rewards and profits as closely as possible to those who contributed – that sense that of wanting my money to go to the right cause and the right people. John put it really nicely during the discussion, “It’s not about someone making money, but rather that the money being made is going to fund someone doing something, rather than someone doing nothing”. So I’m happy with whoever spent their time, knowledge and energy, to get some of those profits to keep going…but it’s a different feeling when I pay a whole bunch to support the investors behind the people who invested in the builder, because those folks didn’t actually build my gadget.
So ideally the system would:
  • Minimize economic transaction costs to high-paid non-laborer economic types
  • Reduce barriers to contribution
  • Reward innovation and encourage new ideas
  • Encourage project-level (not necessarily firm-level) competition
And it would be set up to attract people who:
  • Participate because they are getting as much or more out as they put in
  • Do it not just to make money and profit off of others for free
  • Have rare, inimitable skills who volunteer their talents for recognition or fun
  • Are willing to build a more sustainable hardware innovation system
  • Are willing to teach others for the gratification of helping others learn new skills
From a structural standpoint, there are systems set up to support time and distribute collaboration, but there’s not really a system for sustainable funding. And since it is the open source economic council, I thought I'd close with some food for thought on funding.

Even now, when "sustainable open source" comes up, it focuses on sustaining a single project rather than the environment. Don't get me wrong, there are certainly ways of making money from open source hardware, but it still feels like all the business models are on a one-off basis, where I build something for someone funding it, and there has to be a secondary purpose for it to get off the ground. I’m starting to go down the path of an open source, community bank or foundation. Something that can sustainably fund open source products or projects and cycles earnings back into the community. I'm really excited and it definitely feels like we're all one step closer to figuring open source economics! Of course, if I learned anything from yesterday, this is just one angle, so if there's something I've missed, I'd love to hear it!

Aardvark Gadgets!

Catching up on last weeks blog activity... I couldn't help but put the pieces together!

1.) Chris uploaded an app for his Arduino
2.) Matt uploaded an app; he actually used his app for his TouchShield, and Chris' app for his Arduino
3.) Omar uploaded an app; he created an gadget file for the ide so you can merge these 2 apps into 1 file
4.) My Turn!


I first downloaded all the apps, starting with the Arduino Windows version.

Next I installed the Aardvark






Run! -> Next! -> Yeah, Yeah, Program Files! ... Next! -> Install! -> Finish!

All Programs... Drag new Arduino.exe to my desktop
Quadriple click Arduino.exe! (hehe, double click works too)
Open: ArduinoSlide.pde (a gadget that includes an Arduino and a Slide!)
Finally opened my first gadget file!!! (thanks Omar)

Next is where I add Chris' and Matt's code...


First Chris' Arduino Forwarder App...
I selected the Arduino picture in the gadget window on the left
Then I pasted Chris' Forwarder code into the code tab

Now Matt's App...
I selected the TouchShield Slide picture in the gadget window on the left
Then I pasted Matt's InputShield_Display code into the code tab

Uploaded my code to each device
Saved my gadget!

Friday, February 20, 2009

Illuminato, Part 2 - and the open source economics experiment

So the illuminato ran out a couple weeks ago, and it's somewhat more expensive than Matt and I ever planned, especially building in small quantities. Matt's old professor, who paid for the last batch, isn't going to be paying for it this time around, not to mention trying to raise money from friends family and former professors is about as easy as pulling teeth! I've been trying to figure out just how to raise the money to fund this open source board in the most open source way possible, so I asked around. I've gotten a lot of awesome suggestions, and the most common ones had something to do with seeing if individuals might be willing to chip in upfront. Maybe a few people will buy a couple extras. (By the way, I'm simply blown away by the business savvy I've heard from quite a few folks *ahem* Elwyn :-)

Besides the community, there's one other way to get inspiration - from someone who's recently returned from a cross country drive thinking about nothing but this stuff! After reading through Zen and the Art of Open Source Hardware, I talked with Matt over a whiteboard and lots of paper. The end result? My eyes are red (I imagine Matt's are too), I have a ton of loose, scribbled paper, and dry erase on my hands and face. I'm really not sure here, and maybe it would be nice to have a little chat about this in person. But I think I might just have an idea, and I'm going to spend this weekend drawing this out a little more neatly.

Well, there's this little pizza place right by me, in midtown Manhattan, and I'd love to chat with anyone who can join me for some pepperoni and the first session of the "Open Source Economic Council" (Sorry, I was watching the news when I came up with it, and I couldn't resist!)

Open Source Economic Council

Date:
Tuesday, Feb 24
Time: 8 PM
Location (in NYC): Famous Ray's, 831 7th Ave (btw 53rd and 54th).

Pizza's on me. See you there!

Wednesday, February 18, 2009

A little bit of spaghetti...

You know, I've always been a huge proponent of open source software…to me the open source spirit is the spirit of the internet. I've been benefiting from open source software for years and I've learned a lot from looking at the source. The only thing is that I've always had to reconcile one problem: I'm a leech…I have never contributed to an open source project. Well, there was this one time….back in college…..

It was the Spring semester of my senior year, I was almost ready to graduate but I caught something…infectious…Hardware. I had spent 3.5 years avoiding anything silca related but I guess my will wasn't strong enough. Something about making a light flash on a circuit board was just so cool; I was hooked to the Arduino. I started attaching more light, and then more lights until I had attached all of the light that I could…and then came the accelerometer and well…you get the idea.

In the flurry of wires and LED's that I was tossing around I did poke around the Arduino source code (I am a CS major…after all)…I even made some changes and added a kind of packaging; simple but it was there…I needed it to keep track of the gadgets I was making and, being a poor college student, I would reuse the same parts over and over again so nothing stayed the same. I had such a hard time keeping track of things with so many open sketches and transferring things to the wrong board etc…that, in the spirit Larry Wall, I just created a tool to help me keep track of things. It was a simple file format that would load into the Arduino IDE and allow me to switch between things…nothing fancy but fully functional. I would've continued working on my little enhancement had I not graduated and become victim of the 9 to 5….






Flash forward to an Alumni two months ago where I ran into my old lab buddy Mike and my excitement when I found out he's still playing with Arduinos. After getting into a discussion about open source he asked me what ever happened to that edit I made of the Arduino IDE source. The source was on my old computer that was collecting dust in the basement and…well…long story short he convinced me that the community was in need of something like this and I figured this was my chance to stop being such a leech…so I dragged my computer out of storage and fired up my Java juices (and a pot of coffee)!





I was a little slow at first getting back into coding a Java app, but I took a strand of code here, a little bit over there…tossed in some of the updates that had been made since the last time I had coded and viola! The Aardvark Release. Why the Aardvark? Because I'm a sucker for alliteration and African noctournal mammals of the Orycteropus genus.

In the sprit of open source and social coding I've committed everything to gitHub. By the way, github is awesome, I can't even call it version control because it is just so cool to work with. Chris and I had a lot of fun collaborating together on this and I want to see more commits so we can do this flashy disco light thing so please if you've got an idea, go ahead and stick a fork in this angel hair :)

Head over to the App Exchange to get a copy!

And now for a little screen scrape action...






Gamepack with InputShield_Ellipses

Matt recently posted the InputShield_Forwarder for the Arduino/InputShield and the InputShield_Display App for use on the Slide/ExtenderShields.

Since then, I've been selfishly wanting to build my own creations off those apps, so I simply slotted my own code into Matt's main loop, and deleted his text display stuff.


Which morphed this App into a graphical display of the Joystick position. It also shows how to scale and translate analog values into more meaningful data. Sinced I mostly used ellipse's to draw the graphics, I called it InputShield_Ellipses!


Tuesday, February 17, 2009

Getting started with the GamePack in 3 steps

Taking a lesson from the Mark and Omar school of "this is how real programmers actually do things", Chris and I decided to spend some time hacking together this simple little set of apps to dramatically simplify how to get up and running and hacking the GamePack as soon as possible. It's also a bit embarrassing that it took this long to do. I'm starting to get the idea that this is the week of "catching up on the obvious stuff".

The general idea is that the GamePack is an Arduino, InputShield, and TouchShield (either Stealth or Slide), and this tutorial will get anyone up and running with a very simple app to start writing a simple game on the GamePack. It includes two programs: one program for the Arduino that polls the InputShield and sends a packet of information to the TouchShield, and another program for the TouchShield that displays the information on the screen.

Step 0

Build the GamePack by snapping the Arduino and Lithium Backpack to the back of a DoubleWide or DoubleTall ExtenderShield, and then place the InputShield and TouchShield on the top of the ExtenderShield. Wire up the Lithium Backpack to the TouchShield using two small wires so the circuit is battery powered and portable. Then use a USB cable to connect the Arduino to your computer.


Step 1

Download the InputShield forwarder app here. Open the application pde file with the Arduino IDE. If the GamePack is connected to the computer, go to the Tools->Board menu option and select "Arduino". In my case, I have a Diecimila, so I select "Arduino Diecimila". Then select from the Tools->Serial Port menu option the serial port the GamePack is connected to the computer via, which in my case is COM9.

Press the Play button in the Arduino IDE to compile the code, and then press the "Upload to IO Board" button to download the code to the Arduino module of the GamePack.

Now the Arduino has code that continuously polls the InputShield. The InputShield needs to be set to "Mode A" using the mode selector switch.


Step 2

Download the InputShield Display app here. This code runs on the TouchShield Slide and displays the coordinates of the Joystick, and the status of the buttons as simple text. Open the pde and source code with the Arduino IDE. Since this code runs on the TouchShield, go to the Tools->Board menu option and select the TouchShield option. In my case, I selected "TouchShield Slide".

Press the Play button to compile the code, press the reset button on the TouchShield, and then click the "Upload to IO Board" button to download the code to the TouchShield module of the GamePack.


Step 3

This shouldn't totally be necessary, but just in case it didn't work, reset the GamePack. If it's running on USB power (probably, if it just got programmed), I usually just unplug it and plug it back in. On the other hand, if it's running the Lithium Backpack battery, just flip the switch and it will reset the battery.


Step 4

Wiggle the joystick around, and press the buttons, and have fun :)




Step 5

Laugh at how mundane and simple this little app is, and hack up the TouchShield code to make it into a real game... and maybe email me too if you want to write it together!

In the meantime, I'm working on a mini version of Mario right now, which I'll publish just as soon as I get it in a basic working form...

TouchShield processing bubbles

I can't believe it took me this long to upload this little app, converted to the TouchShield Slide. It's the fun little Processing demo app where you touch your finger to the screen, and various sized bubbles are drawn in a concentric radius around your touch... the bubbles get bigger the further out you go.



This is made possible with Mark's new and improved super-fast (and I'll add, actually functional!) graphics library :)



I've uploaded the code to the app store here, but in the meantime here's the heart of the functionality (notice it's still copied line for line from the Processing demo book, since all the functions are ported!):


for(int i = 0; i <= width; i += 20) {
for(int j = 0; j <= width; j += 20) {
float size = dist(mouseX, mouseY, i, j);
size = size/max_distance * 15;
ellipse(i, j, size, size);
}
}




Oh yeah, and it occured to me that I've done a really bad job at uploaded all the quirky little source code snippets I've written for the TouchShield Slide over the past few months, so I think I'll do my best and try to release an app or two each day the next week!

Monday, February 16, 2009

Zen and the Art of Open Source Hardware - Finale

It’s been over 5 days since Chris and I came back from our cross country trip, and the radio silence only means one thing… have you ever had an idea dumb enough that it completely engulfs everything you do since, and then you don’t do anything else until it’s done? Well, that’s pretty much what happened. Chris and I had an idea on the last day, and got so wrapped up in it, it took this long to settle down long enough to write about it! So here goes…

The Open Source Economy

There’s been a lot of talk in newspapers, and even Slashdot about the potential for Open Source principles to aid the current economic crisis. Hype aside, one thing is sure; there are more than superficial overlaps between the Open Source system and the real economy.

How can this be? In any economy, the basic units of analysis are markets, exchanges, values, and products. In Open Source, though, almost every one of these “concepts” has an analogy...



So this means that the system of Open Source isn’t so different from the real economy – at least in theory. Both involve the production of a thing, or output, they involve coordinated effort on top of systems or exchanges, and there is an implicit or explicit value to things. So there’s a translation between both systems, probably a little like the chart above.

But what makes each system work? What is the “WD-40” of each system, that allows any analysis or meaningful production happen? In the real economy, some would argue it all comes down to money. There is some notion of economic value that all activities, behaviors, or contributions can be expressed. In the Open Source system, it’s not as clear. Some of the “conceptuals” would say that trust is the underlying unit, and that the whole system only works because people value trust, and because there is an exchange in trust. On the other hand, from a practical note, speaking from my own experience, Open Source Software feels a lot like time. When contributing to a project, people are making a conscious decision to spend time on one project over another. Projects take a lot of time to make and complete, whereas the economy takes a lot of money to operate.

And that brings us to Open Source Hardware. The problem is, OSHW requires a lot of time and it takes money too. It can’t work with only one, and not the other. If you throw a lot of time at making a project schematic, it doesn’t become a real thing unless you also throw money at it. Likewise, you can’t just throw money at building a project or paying someone to build it, without also taking the time to design it, architect it, and eventually code it and debug it.



Here are some theories that might need to be tested in order to really understand the differences between the Open Source Software time-based economy, and the Open Source Hardware time and money-based economy:

  • Maybe Open Source Software works because people dramatically undervalue their time when contributed to causes
  • Maybe Open Source Software can work but Hardware can’t because the same reasons why people might donate time are different when it comes to money
  • Maybe the same reciprocity or “pay-it-forward” mentality of time doesn’t hold true with money?

Where do Time and Money Come From?

If Open Source Hardware takes time and money, where do they come from? Currently, time comes from individuals (like me) that have faith in the system, and believe that Open Source Hardware means something. So I spend my time hacking away at gadgets and projects making them work, just because.

Meanwhile, the money comes from a number of places. One place it comes from is companies and stores. Other times (like all the stuff at the liquidware store), it comes from individuals that pool their money together just for fun. It can also come from grants, donations, or institutional causes.

When money comes from individuals, it needs coordination mechanisms to make sure individuals are repaid, or get their money’s worth. When it comes from institutions, it often needs to support a cause or mission. And finally, when it comes from companies, it usually needs to make a profit. This last one is particularly nagging in the Open Source Hardware economy, because it suggests someone is making money off of Open Source. This tends to contradict the notion of the “free as in beer” ideas of Open Source. But is it necessary? Open Source Software can work without the presence of a profit-making corporate entity. Can the same be true for hardware?

Assuming for a second that it’s not true, and companies are required, then I’d put forth a simple framework for when it’s appropriate for someone, anywhere in the ecosystem, to make a profit from Open Source Hardware:



By this framework, profit-making is a good thing when it’s maximized and re-invested back to the community. On the other hand, profit-making is a “bad” thing (or “less good”) when it funds traditional business model reasons, like mitigating risk, distribution, portfolio, or scaling. Why? Because each of these business models involve taking advantage of the efforts of others to make profit. The profit doesn’t make its way back to the individuals who contributed, so it’s “less good” than a system that directly rewards and incents individuals and their time. This assumes that the end-state desired outcome is a system in which individuals are directly contributing to a shared community, and collecting as many of the benefits of their time as possible.


Clusters in an Open Source Economy?

While we’re talking about Open Source economics, I’m not taking anything for granted. Just because there are companies and stores in the real economy, doesn’t really mean you need them in the Open Source Hardware economy. To put it another way, if you were going to build an economy from scratch around Open Source ideals, what would it include?

I’ll start by describing what I imagine is the Open Source Hardware process. Like a chemical reaction, Open Source Software starts with people who contribute time, a “reaction” occurs, and the output is a set of source code that does something. Meanwhile, Open Source Hardware starts with people who contribute time, and money, a “reaction” occurs, and the output is a set of physical, tangible hardware products.



As groups of people contribute, eventually they coalesce into “clusters” in which there is a critical mass, center of gravity, and a formal “project” is created. Sometimes there is a single, large cluster, like Linux, Firefox or Wikipedia. The field of Open Source Hardware, however, is far from mass-centralized, and instead there are groups and clusters of mini projects. One could argue that today there is a central Open Source Hardware project, the “Arduino” platform, surrounded by a set of smaller communities. It might look something like this:





This “cluster”-based theory of Open Source Software and Hardware treats the Open Source Economy as a collection, or centralization of time and money. To have Open Source Software, you need clusters of time. To have Open Source Hardware, you need clusters of time and money.

Well, we all know where the time comes from – it comes from nights and weekends when you’re not working, and you decide to work or play on a project. You learn the project architecture, formulate an opinion, and decide to contribute to it. Actually, on a personal note, that summarizes my experiences with Open Source Software quite nicely!

But now that we want to do Open Source Hardware, I have to answer a more difficult set of questions:

  • Where does the money come from?
  • What is the best way to coordinate and centralize money?
  • How can the money be best structured so that the community reaps the benefit?
  • Can money be sourced from a distributed group of individuals or institutions, or does it have to come from one party?
  • Does money always need to generate interest through profit?
  • Are there other ways to sustain money in a community?
  • Who is incented to contribute money, and why?
  • What are good and bad reasons to contribute money to Open Source Hardware?
  • Does money always have to be structured in a corporate form?
  • Should Open Source Hardware have companies that make profit, or are there other ways?
  • What are examples of successful production economies that didn’t involve profit-seeking corporations? Can they provide lessons or motivation for Open Source Hardware?

Clearly, this is far from over. I guess I should have expected it, but it left me with more questions than answers. At the minimum, however, I feel satisfied knowing that the questions I’m confronted with now are much more precise than the ones I started out with. I now know my next challenge: solving the Open Source Hardware financial structuring problem.

Sunday, February 15, 2009

Paint Program for My Slide

I always liked finger painting... but now that I'm older making a mess with my fingers is kind of annoying... so I created a painting program on my TouchShield Slide!

6 Different Brush Sizes

The brush radius can vary from 1 pixel to 6 pixels.


7 Different Colors: Red, Green, Blue, Yellow, Orange, Magenta, and White


I am sharing my code for this project over on the app exchange...
I even made an icon for the app!

The top left corner has a picture of the app has a picture of the brush size and color that is selected.
In the top right corner of the app is a "clear" button to clear the screen.





Friday, February 13, 2009

10 things the arduino *can't* do...number #1

It's that time of the week again...Friday afternoon. Before heading out for the weekend, I logged into my Youtube account and discovered some videos from almost a year ago. And I realized almost every blog post on here has been about something that the Arduino can do. (Yes, there's quite a few things that fall into that category.)

On the lighter side, Chris D, a.k.a. Dungo, and myself, self-proclaimed n00bs to the Arduino made these videos about what the Arduino *can't* do. Chris and I thought really hard and came up with a list of ten things...here's number 1.

Hope you enjoy it!

Tuesday, February 10, 2009

Antipasto_cores commits MessageScroller

When Matt B. said github rocks, and everyone who is a fan of Linus Torvalds should use it, I was interested, but like Mike usually is, I was skeptical.

Fast forward a few months later, passing through some github maturity scenes, and I eating my own words, while being spoon fed by Curtis Morehead's oled_objects branch of the antipasto_cores code base.

Curtis made some some sophisticated updates to the TouchShield Stealth's Oled drivers, that conceptualize the screen as an object, well done! In fact, I had a difficult time photographing the app because of the super efficient text scrolling capability,


It sprinkles in some object orientated design to allow for console applications, such as the one above, that can consume text data. This could be especially interesting to someone who spends 25% of their time serial debugging messages, like me.

Antipasto Cores activity feeds are now active, so with a quick glance at liquidware.com, checkout how Matt B made some tricky web hacks to capture the github data stream with his "Latest Code on github" section.



Thanks Matt, but now everyone can see how I typecasted a (float) to an (int) on that release. Yea, yea, spotted, but I should have known better, whoops ;-)

Anyways, I just finished testing and merging Curtis's fork back into the TouchShield Stealth core. So you want to play with it, pull down the cores and drop them into the Arduino hardware/cores directory to test with some example code,
//*******************************
//*
//* MessageScroller Example
//* for the TouchShield Stealth
//* By: Curtis Morehead
//*
//*******************************
#include "Oled.h"
#include "MessageScroller.h"
#include "colors.h"

MessageScroller scroller = MessageScroller(&Display, &BLUE, &BLACK);
int i = 0;

void setup()
{
Display.Initialize();
}

void loop()
{
if(i%250 == 0)
scroller.AddFormattedText("This is line %d", i);
i++;
}


Saturday, February 7, 2009

Zen and the Art of Open Source Hardware - Day 4

Hi it’s Chris this time,… I’m posting this a day late because it took a while to edit together from the notes Matt and I have been taking. In the meantime, hello Utah, Arizona, New Mexico, Texas, and Oklahoma! Today, we decided to try out yet another format for the conversation, a bit like the turtle and the hare dialogs in the book, Godel, Escher, Bach. It’s still a bit rough, but it’s somewhat transcribed, and we handed off the computer back and forth at each gas station refuel. Unfortunately, since it's a day late, there are some ridiculous ideas we've had since this, but it wouldn't be right to just skip ahead, so here goes...


Chris: So how did you get started in open source hardware?


Matt: Back in the 90’s, I was in school studying electrical engineering, and learning computer architecture and VHDL, when I started getting a little adventurous, and wanted to make new cores and processor architectures on my own. Why? Just because. I pretty quickly learned that FPGAs are almost entirely proprietary, and the smallest thing requires a license for $10k’s. Then I stumbled onto opencores.org, and that was my first exposure to open source hardware... funny because back then no one even knew what an Arduino was, and yet these days open source hardware is almost synonymous with the Arduino. Anyway, I really like how Justin described the three waves of open source hardware... I think it really describes well how the major communities have come and grown, and each one stronger than the other… How about you, how’d you get started?


Chris: Actually, I’m a car guy, and so I’ve always gotten a kick out of trying the “hack” and increase the performance of an engine… whether for power or fuel efficiency. The problem is that the holy grail of engine modification and performance enhancements is the electronic fuel injection system. These systems let you tweak the fuel delivery, oxygen mixture, and compressions, but are very closed and proprietary. About 5 years ago, I was hacking away trying to make one myself from scratch, and I started flipping through Circuit Cellar magazines, studying schematic diagrams, and eventually learning how to make EFI controllers and enhance a mechanical system… and that’s where I learned about the MegaSquirt, and decided to build the LCDash as open source as possible.


Matt: What made Open Source hardware approachable for you?


Chris: That’s not an easy one… because it really wasn’t that approachable in the car world. The Arduino world is quite a bit different though. It’s approachable because the basic things work with very little effort. I’d probably assign 95% of the success of the Arduino platform to that silly little LED blinking program. So I guess it’d have to be the simplicity and low learning curve for me. What about you, what was the hardest part about open source?


Matt: Realizing it was real stuff. Sounds mundane, but that really took me a while to “click.” I’d also come from coding websites, software algorithms, and what some guys might call “computer science.” A lot of guys like computers, then go into computer science, and somewhere along the way I think they get a little misled into thinking that’s all there is to it. I think some guys just go out and build websites for the sake of websites, and they don’t actually do anything useful in the real world. That’s how I feel about a lot of those funny Web 2.0 sites out there… it really surprises me that people are trying to make them into companies. A lot of them would work much better as cool little hobby projects and things you build because you like to do it, not companies that only make money from ad-revenue! I guess the other thing is that you can be sloppy in source code, and you only really need to focus on the algorithm. Memory leaks, tables that don’t have closing tags, etc. don’t really mess anything up until things get really big, so you don’t have to be perfect. But physical stuff is like making art… there’s a role for a different type of craftsmanship in hardware design versus building a website. When I built the Illuminato, it hit me on the head all of a sudden. I guess the last thing is that for all the talk about collaboration and community, I was surprised that all the open source hardware projects tended to be just the creation of one guy. Like Dave Mellis and the Arduino. I still really haven’t found what I’d call a “distributed, collaborative” hardware development project, where a lot of people build a device together, sharing files and whatnot. But how would you have fixed that?


Chris: I think you’re definitely talking about the tools, and I’d agree. They’re miles and decades behind the software tools that have allowed open source to work. The biggest problem with the files (we discussed this yesterday) is that they save into a monolithic format, not a distributed one. That means it’s very difficult for one person to build a large project, upload it to a source code repository system, and have other people come in and tweak little sections of it. If you look at Linux, you’ve got these guys checking out modules and sections one at a time, and optimizing pieces. So a guy like Linus becomes the architect of the system. We don’t really have the tools to allow anyone in the open source hardware community to become architects. So everyone is just a circuit builder and schematic drawer, and there’s no division of roles. The real problem is that none of the PCB software developers seem to care much about this problem, since they’re perfectly content making licensing fees!


Matt: So what’s the real problem this tool or distributed file format is solving?


Chris: I’d call it “collaborative circuit building.” But no matter what you call it, I think it all comes down to allowing groups of people to build circuits together. Licenses, costs, prices, and all of that are really important, but not as important as building the infrastructure and tools first to allow people to do it in the first place. But speaking of expenses, who pays it? Who pays for open source hardware development?


Matt: I guess I do! Ha, just kidding. Grants, friends, former professors, people we’ve met along the way that have some spare money to throw at hardware projects. That’s where the money comes from. And I guess you could say those are the people paying for or funding open source hardware. Someone finds a really clever way to spin a grant proposal to include the development or purchase of some cool new tools, and some of those tools get custom built for the specific purpose they’re looking at. And then at the end of the development, they just give it out to the community. So I guess you could say grant funders and educational institutions are the ones really paying for open source hardware to work. But I think it’s also interesting to look at who makes money from open source hardware. The truth is, anyone makes money from open source when they’re getting more money than the total cost of their parts (e.g. they’re making a margin) or getting reimbursed for their time. Looking at open source hardware today, the folks actually making margin are the PCB manufacturers and assembly shops, and the online stores that are selling open source hardware devices. If you keep tracing it back the “open source value chain,” component manufacturers are also making money, and then I suppose you could even say the companies that are building fiber sheets for PCB’s are making money too. So plenty of companies in the production-to-selling process are making money, just like a traditional world.


Chris: So should open source hardware projects be sold with profit margins?


Matt: In open source software, the finished product is free (as in speech and as in beer), and a few companies like Redhat make money off of services and support, and others like Sun and IBM make money through association with the principles of open source. But in open source hardware you have a tangible product, and you get to decide what you’re gong to charge for it. Well, I think the cost-plus-margin way is the wrong way of thinking about it. I think open source hardware should be priced and sold like crafts and limited edition art pieces. You’re not really looking at the cost of the components, you’re looking at the labor, effort, and work someone put into a project, and you’re saying, “ok, I’d pay X for it.” And I’m buying more than just a thing, I’m buying what it stands for and what it means. You don’t buy art as the sum of the cost of the canvas and paint that went into it, and similarly I think that “pricing model” should be applied to open source hardware. Right now, the whole open source community seems to be stuck in a system of double marginalization. Someone builds something, they add a margin on top of it, someone else wants to resell it, so they add another margin on top. Anyone who’s actually buying open source hardware is paying margin on top of margin, and that’s just silly. There has to be other ways. How would you price it?


Chris: Well, I guess if we’re talking about the craft of making something, and comparing it to art, why not sell something at the price someone would want to pay, in a way that’s recognizing people’s collective efforts. You suggested pricing it like art, but I think that’s probably wrong too. You want to match up the people who contributed with the reimbursement and rewards. The problem with having the seller set the price is that if they make margin, how (if at all) does the profit get back to the group of people who contributed? Perhaps you want to recognize a number of things – people who put in the time to build something, and people who put in the money to make it. But above all, recognizing the value of time I think is important.


Matt: So what do you think the value of someone’s time is when they’re making open source hardware?


Chris: Yesterday when we were talking about the long tail idea, I was thinking, if someone spends time building something that benefits a lot of people, is their time worth more than someone spending time that only benefits a few. At the extreme, what is someone’s time worth if it only benefits one person, them? Isn’t that the idea that a lot of the guys hyping the long tail idea really mean? I guess you could say the opportunity cost is worth what they could have been making doing something else with their time. But I think most people (like me) have jobs, we’re happy in those jobs, and probably wouldn’t be doing something else in spare time just to make money… instead we’re doing something to have fun. I enjoy programming, so opportunity cost doesn’t really work either. I guess you could say the time value is worth the number of people that benefited from something, times the amount of time or money you saved them with your project. That works when you’re building productivity tools, but not with games and silly programs like your morse code pop song app. Those things don’t have financial value (sorry to say), aren’t saving people money, aren’t being used instead of making money, and so the opportunity cost or value issue comes right back. I think that’s the real problem… almost all of this work and stuff is getting made and built in non-work, non-financial, non-economic time. It’s all happening outside of institutions, outside of companies, or like you say, “beyond the boundary of the corporation”… so what’s the value of having an institution or company any more?


Matt: Well, I’ve read a few places that many of the people who actually work on “open source software” projects, like Linux, Open Office, and Eclipse, are actually full-time employees are real companies. They’re getting paid to do open source, especially by big companies. Thinking about why, you get into all kinds of strategy questions: is IBM funding open source as a way to unseat Microsoft’s OS in the high end server market, where they sell big mainframe computers (how would you even measure if that’s working)? Or perhaps it’s so that the total cost of ownership of IBM Linux-equipped machines is cheaper than HP servers running Windows? Is Sun funding Open Office to unseat Microsoft Office, in order to promote Java over Visual Basic as an enterprise programming language of choice (if so, seems a bit far fetched). So maybe it really is like sports; someone’s paying for it, and getting other types of benefits. Or maybe it’s like prime-time t.v. programs; everyone knows the television shows like The Office and Heros and 24 are just great filler in between the commercials, which are the thing that really make money (even when you include the effects of DVD sales of the full season, they don’t add up to even a commercial break’s worth of ad fees!). But this doesn’t feel right … this feels like every other “well-intentioned” movement; some company comes along and finds a way to use it for their advantage. Seems wrong to me.


Chris: I can just imagine that. Here I am, getting this mental image of thousands of distributed hackers programming away in their apartments late at night, when actually they’re commuting into work from 9-to-5, sitting in cubes like me and you during the day. I wonder how many truly lone, non-employed open source hackers there really are? I guess the biggest problem I can see is that full time coders are going to write more code than part time guys working nights and weekends. And a platform isn’t as strong if you have just a few guys coding and testing it. Anyway, I also wonder what it is about California, New York, Boston, the Netherlands, and England that have so many Open Source communities. Looking around Utah, Oklahoma, Indiana, I understand there are cities, but I wonder if they have critical mass to have physical communities?


...lunch, the topic being open source names, brands…


Chris: So what’s the value of open source and open source hardware, and is it a brand?


Matt: It seems like a project becomes a brand when many people have contributed to it. It seems a little funny that when assigning a name to a project it loses the person’s name that built or contributed to it. That’s why I feel funny calling an open source project by its project name. Regardless, some projects get popular and develop reputations, and then after the fact, contributors in the community also get those reputations by association. I wonder if that’s how large companies are thinking about it? People who run companies want to associate themselves with brands that have good reputations, and they gravitate to good open source projects.


Chris: So “Open Source hardware” is a brand, and that means it does have value because sharing and being open tells a lot about the motivation behind what finally gets sold. If something is open source hardware, it tells you it’s being built to be used, not marketed. It means someone’s not trying to up-sell you on features or functions that it doesn’t really do, hoping that you’ll be convinced into buying it. Also, open source hardware has another type of value, because it tells you something about what you can expect when using it. On the upside, you know that you’re going to be able to change it, edit it, read schematics, solder your own stuff onto it, and maybe even completely change what it’s supposed to do. On the downside, you know it’s probably not 100% fully tested and functional, there will likely be some rough edges, and you’re not really dealing with a warranty or service plan, or anything like that so if it breaks, the response is probably, “uh oh, can someone help me, please?” and not, “you’re a horrible company, I want my money back, and I’m suing you.”


Matt: There’s a whole other topic we haven’t even started talking about, about open source licenses, warranties, and what people’s rights are in a community and when they buy stuff from the community. Companies typically play the role of “limiting liability” in order to protect individuals in a company from getting sued into losing all of their personal assets when something they made breaks. I think some historians even trace some of the first “limited liability” clauses to U.S. railroad company grants (as opposed to the first companies, which I think were around the trade charters given to shipping expeditions). Anyway, the point is that companies usually protect individuals by letting them hide in a way behind a corporate liability shield. On the other hand, in the open source world, companies seem to be created for exactly the opposite reason – for helping to create liability for service, quality, support, etc. Makes me wonder whether a “company” is really the right organizing form for open source hardware. I’m not convinced! Maybe that’s why liquidware isn’t really a company, it feels much more like a group of random guys that each pitched in to pay for some part of the infrastructure… Mike pays for the credit card processing, Matt for the adwords, me for the Paypal integration, you bought soldering stations… what do you call a bunch of people pitching in their own money for the sake of it, with no expected return? Stupid, right? :-) On a serious note, there are many different organizing forms than corporations, so maybe that'll be the topic of more investigation tomorrow...?


...dinner on the run...


Chris: Well, at the end of every day, we’ve asked ourselves whether what we talked about has changed how we think about the meaning and practice of open source hardware. Has it?


Matt: Yes, I think it has, and it had a lot to do with our tools conversation. I’m starting to view “open source hardware” more as a verb instead of a noun or adjective because it requires a community of people sharing and contributing. That sounds a lot more like a collective set of actions rather than traits a product or project has. What about you?


Chris: Definitively, in fact, by “doing” open source hardware, it means that you’ve contributed to the development of a tool or platform. So I’d call open source hardware the process of contributing to building tools that constantly change. The reason you’d want to do this is because tools typically become outdated and obsolete, but if they’re open sourced, they can evolve with time. Anyways, this reminds me it’s probably time to contribute to the evolving definition of open source hardware on wikipedia, even if it means getting into edit wars :-)