OSHW: Where to Start, and How to Participate

So you read my post about OSHW, you’re super excited to do some hardware of your own, but have absolutely no clue where to start. I get that! We hear about that all the time, and I have some really simple stuff to get you started. First thing is first, the excitement and interest is great. At the end of the day your want to learn, and to better yourself is the important part. Even if all you do your first day on the job is light up an LED, i promise it will be cool, and as you get deeper its that interest that will keep you going through the really gross bugs. If you’re already elbows deep in a project and looking for pointers read down a bit, I try to explain the tools you need and how to work with and without them. For everyone else here is my advice for where to start…

Tools

I would really recommend taking a look at Lady Ada’s equipment list as a starting point for what you’re gonna need. The following is my list of comments.

Soldering iron

You just need one for now. Get the most watts you can reasonably afford, but there is nothing wrong with a $25 iron. I used to have one of the Metcals and I loved it (it was also my job to solder for days on end), but unless you are trying to find a place to spend your millions you don’t need one.

Multimeter

If you can afford an auto ranging one get it. I used to bang my head against the wall picking ranges, which is just a pain.

Power Source

My advice would be (and please don’t die or sue me) to take a 12V or smaller wallwart for some old thing that you no longer have and cut the connector off. 12V and below can’t kill you, so you should be safe, and you’re gonna love not having batteries to fool around with.

Tronix

Do you need a scope? a logic analyzer? Universal counter? Variable dc supply? etc, etc, etc. While all very, very cool, my answer is a resounding no. All of these tools make your life easier when trying to solve certain problems. And I really do want you to stick around electronics long enough that you collect all of these tools, but start small. Start with what you need, and when you hit a problem that requires a scope to solve beg, borrow and steal one, and only when you need to – pony up and buy one. I will change my story if someone ever builds a cheap usb accessible display-less scope, or logic analyzer, but for now I say skip it.

Bits n’ Pieces

So, you have some tools and you have parts for an idea. But you are a hacker, and hackers need to hack. So here are some suggestions for the bits n’ pieces to keep around for maximum hack-ability.  I’d start with something like thesparkfun beginners kit. The Make beginner electronics kits also look decent, albeit more expensive, kit1 & kit2. Its totally cool to put together your own kit too, here are my suggestions.

Resistors & Caps

For resistors you need a range of values from 20R up to 1M (20 ohms to 1 mega-ohm). You can have big spread in the high values, so your density should be best between a couple hundred and tens of thousands (250R – 20K). For capacitors you again need a range of values from 10pF to 100uF.

The smaller values will need to be ceramic while the bigger values will need to be electrolytic, but don’t get too hung up on any of this. The important part is that you have a starting point, you will still find yourself needing particular parts, for particular problems as time goes on.

Diodes & Transistors

While super cool and I recommend having a few lying around (1N4148 Diode, 1N4001 Diode, 2N3906 PNP Transistor, 2N3904 NPN Transistor) your need for diodes and transistors will largely be driven by your project. With one exception – LEDs. Because you always need a couple LEDs kicking around.

Others

You’re gonna want a few switches, some wire, and maybe a 7-segment. Headers and pots are useful too. But really don’t worry too much about these. This pile is gonna grow as you hack and collect your stash of bits.

What to Hack on?

So, you’ve got the bare essentials and are looking for a project. My advice would be to start by looking at something like the Spinnerette or the Arduino. Here is a link to a top-40 list of Arduino projects which might give you some inspiration.

Sensors are cool
Robots are cool. Anything wireless, or distributed, or web-connected is cool. But hell even the simple stuff like multi-color leds (2) and making sounds is cool.

How to Use the Tools?

Never done any of this before? No biggie! Here are some videos and tutorials on using the tools – and don’t worry if you mess up, in the end its all about the learning experience and the fun you have hacking away.

Zak’s OSHW Plug

OSHW is made great by the people, the energy and the collaboration in this community. However big or small your project please share it. Post pictures, make a video, share the schematics, give a part list, anythingeverything. Teach others what you learned, and help others to get involved. Together lets make this a great place to learn and hang-out.

Holidays and Such

So, while we don’t get much of a holiday here at Upverter (startup = hacking 110% of the time) we do want to wish you all a happy one! We are furiously working on a couple of deadlines right now which is disrupting the blog a wee bit. So for this week that’s pretty much it! I just wanted to say Happy New Year, Merry Christmas, and stay tuned – 2011 is gonna be a big year for us.

Building an OSHW Community

Upverter wants to be a place that will allow the free exchange information, grow the open source hardware community and make the creation of new hardware less painful. One of the ways that we are going to do that is build a community. There are four facets that we think are important to facilitate this, and here they are.

Projects

There isn’t a good way for people to collaborate on OSHW projects. In the software community there are sites like Git hub and SourceForge. While hardware does not fit into the same mold, we believe that we can create a space that will allow people to share ideas and designs in a similar way.

Q&A

As with every discipline, hardware has its own rich and unique lexicon associated with it. These include specific language, block diagrams, systematics and mathematical equations. We are going to facilitate the use of this kind of information by integrating our tool into the community.

Parts Library

Have you ever tried to find how other people use a part? Want to find a good DC to DC converter? Well this is where you will be able to find it. We are putting together a kick ass parts library, and we want to share it with you. We will be making it easier for you to find the parts that you are looking for and provide some examples of how that the part is being used.

How To

Have you always wanted to make a digital clock that displayed in binary? Cool, so does Steve. Our How To section will be the place to find this and much more. With step by step instructions, and a parts list to boot we will have you reading 1’s and 0’s in no time.

Why We Can Do it Better?

That is the pride and joy of Upverter. We can do it better because we have a kick ass web based EDA tool. It can be used to described ideas better than anywhere else. We are going to bring the electrical engineering lexicon to the web so that everyone can troubleshoot together, show off cool project and kick ass hacks. We can do it better because we are bringing a new element to the table, we are adding a way to relay information.

Startup Reading List

Read? What are you crazy? We’ve got work to do!!!

That sounds a little like me harassing the troops, but don’t worry I’m smiling! Haha. As a bit of lite and fluffy Christmas reading I thought I would diverge from my hardware stories and my OSHW rant to share a bit of startup wisdom. This is the as-official-as-it-gets Upverter Startup Reading List. Back before we started Upverter there was a fairly enormous Google Wave that for a couple months seemed to be growing exponentially. It was basically a dumping ground where we all put our personal reading lists and then any new finds we stumbled across. Maybe because there was a lifetime worth of reading on it, or maybe because we had exhausted the ISBN index, I’m not quite sure, but the list eventually stopped growing.

Personally I’m maybe 1/10 through the list, Steve is probably close to half way, and Mike is a lost cause, haha. But either way, I wanted to share our favorites from the monster list. The stuff we think you absolutely need to read if you ever decide to do the startup thing. The list is a little software oriented, and that’s really just because we are building a startup that builds software, and so that’s a focus for us; but you could absolutely trim the software titles and kick-ass with your revolutionary pet rock business!

Upverter Must Read List:

Basically you’re off the team if you haven’t read these.

  • Code Complete, Second Edition This book is on more programmer book lists than should be fair. Its a must.
  • Rapid Development Right up there with Code Complete, this one normally seems to rank second on the book lists. Again a software book. Also a must.
  • The Pragmatic Programmer Don’t fix something that isn’t broken, this book often scores around 3rd. Again a software book. Also a must.
  • Peopleware This book is probably the most important management book of all time. Ever. If you ever have to work with another human being, ever, you should read this book.
  • The Mythical Man Month This book goes hand in hand with Peopleware. If you ever, in your working life, will have to make a schedule – read this book.
  • Don’t Make Me Think This book is down to earth usability. If anyone ever has to use something you build – this will explain why they hate it or get lost inside.
  • The Art of the Start This book is pitched as for anyone starting anything. And thats a pretty good take on it!
  • The Tipping Point Epidemics, viruses and human behavior. Another great read!

Upverter Reading in Progress:

The books on our kindles and iPads at this very moment.

Upverter Next in the Queue:

If I ever make it there, I have to conquer these next…

Why is Our Community Important

Why is Our Community Important

At Upverter we want to make the world a better place. And we think we can do this by making electronics more accessible to hobbyists. The problem with hobbyist electronics is the tools suck and that makes the electronics part a lot scarier than it really is. Better tools = friendlier = more people hacking on hardware = better world!

So why the focus on community? Its a little self explanatory – but at some point hacking alone in your basement gets lonely and demotivating. How many more projects would you finish if you had a group of people cheering you on, and helping you solve the hard problems? Like most things, hardware is better in a community.

A while back I worked on a solar charger for my laptop, it was going to be more efficient and cheaper then what was on the market (and I got to play with solar cells!). The only problem was that I had not actually made a real circuit from start to finish before, and retrospectively, did not know many of the real world problems with putting together a piece of hardware.

Luckily I lived with one of the best hardware engineers that I know,

Zak

. He took one look at what I had and told me that transients would kill me. After much help from him (thanks Zak!), we eventually came up with a design that would not fry my components, or my laptop (and would maybe help power it too).

So what is the point of this story? Simple: after reading textbooks, looking up on-line, and even having a reasonable amount of education in the field, I needed help from someone with a different perspective and a lot more experience. Without him I would have been on my own in my basement banging my head against the wall, maybe solving the problem, maybe not.

Either way I would not have enjoyed the experience. So the reason that we need a community, and the reason we are building one, is so that you too can have a Zak, and we all won’t have to be alone in our basements. Upverter is going to help make more people into hobbyists, hackers and engineers, because we are going to make it really easy to help each other. After all its the people that make hardware special.

Building Better Javascript (Through Testing)

Building Better Javascript (Through Testing)

Last week I talked about our Javascript tool chain. One piece of our chain that we’ve invested quite a bit of time in so far, is testing. Our reason for spending so much time: making tests easy to write, run, and manage increases the odds they’ll actually get used. We looked at a few different unit testing libraries when we were getting started. Our requirements for a unit testing library were:

  • able to be run from the browser and the command line
  • cleanly written (to make extension and modification easier)
  • not tied to a particular framework (didn’t depend on a specific JS library)
  • low on boilerplate

The best fit that we found was QUnit. It’s the unit testing library used by jQuery. It’s a very cleanly written library that already has some hooks for integration with browser automation tools. QUnit has a very minimalistic interface. Knowing the functions ’test’, ’equals’, and ’ok’ is all you need to get started. Here’s an example:

test('point in middle of granular region', function() {
  var map = new up.common.BucketMap(10);
  var point = new up.common.Point(5, 4);
  var keys = map.locationKeys_(point);
  equal(keys.length, 1, "Only one key for point locations");
  equal(keys[0], up.common.BucketMap.BucketKey_(0, 0));
});

QUnit on it’s own is great. But there are some very real points of friction that we found with our process and other tools. The big ones are:

  • Managing dependencies with tests
  • Dealing with overrides/ injecting mocks
  • Keeping test HTML in sync with the JS
  • Being able to run tests in one click/command

The first and second points come from our embracing Google’s Closure library. Being able to break up our application into proper namespaces and classes has been great for development. When you go to run a test however, you need to make sure that all of the right dependencies get loaded. The third issue crops up when you have tests that need to interact with the DOM. They may need certain elements or structures to be present to effectively test a unit of code. In most examples that we found a separate js and HTML get created. The HTML files is used to bootstrap the testing environment with the correct dependencies and DOM. The last issue is dealing with lowering the friction to test. If you have to type in 5 commands to run a test, chances are you’re not going to test very often. To solve all of these issues we’ve cooked up a QUnit/closure testing harness. It’s main features are:

  • test’s are a single js + HTML + list of custom dependencies
  • dependencies get dynamically loaded and overrides are used to allow for easy injection of mocks
  • can run multiple tests in a row, cleaning the environment and dependencies in between
  • has hooks for running from the command line as well as the browser
  • the entire set of unit tests can be kicked off with a single ‘scons jstest’

It still has some issues when the tests contain syntax errors, and the command line version still blows up occasionally, but it’s helping to make the Upverter testing process smoother.