Monday, June 3, 2013

New toy in the house: BealgeBone Black

Recently I purchased a new toy known as BeagleBone Black, a tiny computer worth only $45 which has Linux operating system on it just like Raspberry Pi.  This one has Linux Angstrom distribution on it but you can load Ubuntu on it if you want. BeagleBone was around for a long time and its earlier version BealgeBoard was little bit expensive but $45 is just the right price for me.


And by tiny I mean it is really very small just check out in this image in perspective below.

I also have an Arduino UNO R3 but I haven’t played with it much.  Arduino doesn’t have an operating system on it.  It is just a microcontroller but that is not the reason I haven’t played with it much.

Raspberry Pi is really very popular because of its low cost $25 and some of the cool things people are able to do with it.  For starters Raspberry Pi is really very good and for a lot of reasons. Few things I liked about Raspberry Pi compared to BeagleBone Black are: one you have two usb ports which you can use to connect a keyboard and a mouse, second to connect to an external monitor like your TV you have HDMI output and so you can directly plug into your TV without requiring any external adapter (assuming you have an HDMI cable) and third some of the boards that are available for Raspberry PI. In BeagleBone Black you only have one USB port so you will need a USB hub to plug in a keyboard and a mouse, plus it uses a micro HDMI port so you use some kind of adapter again to hook up to your TV or just buy one of these.  For a full comparison you look this post and this comparing Raspberry Pi, BealgeBone Black and Arduino.

BeagleBone is rock solid in terms of no of I/Os (65) you have available. So if you are interested in robotics applications which require lots of I/O pins then BeagleBone Black is the board you want. And that was my primary motivation to buy BeagleBone Black. Check out expansion connectors section in the image below.

It has Arduino style programming library, and by that I mean you can turn a particular pin High and Low just like you would do in Arduino but in JavaScript.  Did I just said JavaScript?  Yes you heard it right, it does all this magic using JavaScript.  So BeagleBone Black has python, node.js (Ah! I like it) and Cloud9 IDE along with Angstrom Linux distribution.  You can program using either python, node.js or plain C. I chose node.js.  There is BoneScript, a JavaScript file which does all the magic to turn a pin High or Low on BeagleBone Black. I will go into basics of programming BealgeBone in next couple of blog posts where I show you my little experiment with BealgeBone Black.  BBB uses 5V power supply and you can use USB cable to power it.  If you are interfacing multiple sensors then I recommend using an external power supply.  Typical voltage on the I/O pins of BealgeBone has 3.3 volts.  Once you plug BBB into your computer then getting started is really easy.  This link has all the details but just visit http://192.168.7.2 and you are in business in your browser (don’t use IE).

I had a spare old Sony Vaio sitting around which I wasn't using anymore so I loaded Ubuntu on it to play with BBB.  It is really very cool once you figure out the basics.   Below are few things I learned on the way to playing with Linux and electronics.

1. Electronics: Research first about what you are buying.  There are components that you will end up buying that you might not need or they might not be of different specifications. Ask somebody on the forums and there are really awesome people hanging out in these forums who will help you with it.

2. Don't update operating system on BeagleBone Black before checking what it does for you.  I tried updating OS and it blew up on me and I had to reload using a 4GB microSD card.  So another tip is keep one microSD card handy.  You will need it.

3. Learn some quick Linux OS commands to work in the terminal.  Being able to navigate into the OS will help you are lot.

4. Create a plan, sketch it out and make a list of components you will be needing to complete a project.  So this one I learned it the hard way. If you don't make a list of components and you start playing around and when you think you will need something then you will end up making multiple trips to RadioShack paying more or end up waiting for components to arrive in the mail.  And waiting for stuff is really annoying because you are so excited to hack into different project but you can't until it comes.

5. Buying the board is not the only thing you will do in an electronics project.  You will need a soldering iron, wires, resistors, transistors, de-soldering wire, multimeter, capacitors, leds, batteries, breadboard, boards and sensors.  So have some budget and buy everything at once so you don't end up wasting time and money buying them separately.

6. Safety: This has to be number one thing but please be careful with electronics and understand what you are doing. If you are young then have your parents by your side or someone who knows what you are doing.     Be safe and if you aren't not sure then please ask.

Electronics is a lot fun and don't get intimidated by it.  I have a bachelors degree in electronics and communication but trust me I am just like any new person trying to learn it first time.  I didn't liked electronics initially and was turned away by it because the way I was introduced to some of the concepts in electronics by the education system.  However, six years later I am digging deeper into the open web and YouTube to discover my lost passion into electronics once again. So don't give up.  Play with it.  If you get stuck then just ask somebody in person or on online forums, read online, watch YouTube videos and play again.