Skip to main content

My weekend project: an Arduino, Raspberry Pi & Node.js robot

Yes I know, I'll get more buzzwords when I my JavaScript creates Cloud Synergy - but after I Pivot.

I've been spending my wee few hours a week designing, tinkering and finally building my little robotics platform. I've had ideas brewing for a while but haven't had enough time outside of work to start hacking.

It all started when I first saw Rick Waldron's Johnny Five framework for Node.js.
Sensors are asynchronous, so, ya, a node.js robot framework makes sense.
A few months later I started sketching designs, reading up on firmata and buying my arduino & Pi.

Before the what & why, here's the basic BOM:
  • 1 Arduino Uno R3 running firmata
  • 1 original Raspberry Pi with Raspbian, Node.js & 4gb of storage
  • 1 Magicians chassis
  • 1 SN754410NE Quad Half H-Bridge to drive the motors
  • 1 dual-output mobile battery back
  • A custom mount for the Pi & some custom USB cabling for power

Why Raspberry Pi

The main controller is a Rpi. It turns 2 small motors by delegating instructions to an Arduino. Overkill? For now, yes. But by having a powerful machine at the helm, I can expand the robot's capabilities. That means bigger boards like the Mega with 54 I/O, multiple boards via a USB hub and interpreting a bazillion inputs or adding vision with OpenCV.

Why Node.js

Short answer: Internet of things & I <3 Node. If you haven't heard of the Internet of Things concept, it basically means physical things will be connected to the web. TVs, Thermostats and of course robots! The main interface for my robot is a web app and that app will continue to get more sophisticated. Due to latency concerns, I wanted to control it over websockets, so Node.js was a good choice there. Plus, the more JavaScript in Node.js I write, the happier I am :)

Hardware choices

Outside using a cheapo chassis to get started, you may wonder why I'm using a mobile battery pack. I had the idea because the Raspberry Pi needs 5v and connects via USB. That made running cables easier. The model I went with also has 2 ports, so I could power the Pi and drive the motors at the same time.

What's next

I've already alluded to more & bigger boards but I'll definitely need a bigger base. I'm currently eyeing the Rover 5 from Dagu. It is a tracked chassis that has 4 independent motors with optical encoders. It can also be converted to an omni-wheel bot pretty easily. That also means more inputs & more inputs = Arduino Mega. Lastly, once I get the latest Raspberry Pi with more memory, I'll try out OpenCV for some basic blob detection.

Don't expect regular posts anytime soon. However, this is a pet project that I hope to take pretty far and hopefully inspire some weekend hackers along the way.

Popular posts from this blog

A Maker's Equipment List

I've been building up a nice supply of tools and components so I decided it is high-time to build a small workspace in my tiny SF apartment. There were things I knew I still needed but wrestled with some tough choices (like which Oscilloscope to buy.) I wanted either a nice Wishlist on Amazon or at least a great list to start my journey. I found a few decent starting points in the form of video & blogs:
How to set up an electronics lab/workshop at homeSo You Want to Build ElectronicsHow to equip your EE lab The first link is actually a transcription from +EEVblog /by +Dave Jones (EEVblog is an awesome blog and YouTube channel, you should subscribe.) The second blog /by +Kenneth Finnegan covers more of the components side.

What I couldn't find is a complete compiled list with links to purchase. So I made one! I put together a simple Amazon Affiliate store called Maker Workbench Equipment List. I merged what I thought made sense and added a bunch of items I think any good Mak…

Google+ Pages, Events and Hangouts On Air for organizers (part 1)

If you run a conference, meetup or event, you're probably thinking about increasing your presence on Google+. I've recently helped a few folks set up their Google+ presence in haste so I thought it would be worth typing notes on what you need to know.

I've observed 3 types of events being organized on Google+:
A yearly conference or unconf that it is a stand-alone brand, such as CES.An umbrella conference with several related or affiliated events, like JSConf.A broad collection of many local communities, such as the Google Developer Groups. In this multipart series, I'll dive into each main part:  Google+ PagesEvents & Hangouts On Air, starting with Google+ Pages. I'll also touch on YouTube channels. Google+ Pages In the past, organizers would create a brand new email for their event, like You don't need to do that anymore. Actually, DON'T CREATE ONE OFF GMAILS ANYMORE! Using you're existing gmail is easier to manage…