Giving a Roomba Internet Connectivity

roombahack01_09

What was supposed to be a fun 1-day build ended up turning into a 3-day journey full of close calls when [Arthur] decided to give his Roomba Internet Connectivity.

The Roomba, whom [Arthur] calls Colin, has been in service for a couple of years, and once he got his hands on the Electric Imp, he had just the project in mind.  With embedded Wi-Fi and a 32-bit processor all in an SD Card form factor, the Electric Imp makes it very easy to add the “Internet of Things” to just about anything you can think of.  [Arthur] wanted to gain control of the Roomba, so he tapped into the SCI (Serial Command Interface).  Now he can read out the Roomba’s on-board sensor data including battery voltage, current draw, and even the temperature.

These are the kind of walk-through’s we love to see, because he did it in real-time, so you get to experience all of the “surprises” along the way.  For example, he removed an external charging port to make room for the added components, but that ended up disabling the dock charger.  Then he discovered that when the Roomba was charging, the input voltage to the Electric Imp breakout board was too high, so he had to introduce an intermediate voltage regulator.  But perhaps the biggest bump in the road was when he accidentally brushed the Electric Imp breakout board along the Roomba’s control board while power was on.  Luckily the damage was isolated to just one smoked — a simple FET.  The project turned out great, and (today) Colin’s data is actually visible through a public Xively feed.

 

Comments

  1. Of course everybody remembers that when Ford Prefect had to break in to The Guide’s offices and made a little security robot very happy, he nicknamed it “Colin”.

    You knew that, right? ‘Course you did ;-) It’s in “Mostly Harmless”, somewhere in the middle.

    Even better is the guy’s called Arthur ;-)

  2. matt says:

    How is this useful? According to the website the Roomba should dock it self when the battery is low. And outside of the battery charge level I’m not sure why you would want the rest of the data internet accessible.

  3. xbrav says:

    I picked up an IMP lately (was trying to reverse engineer a Budweiser Red Light), and this company is set for suicide.

    You are not allowed direct communications to the device without going through their servers. As a result, the developer account is free, but there is a subscription fee if you want to make a product with it.

    Also, to get the wifi going, you NEED to have a smartphone, as it using pulsating light to program the wifi prior to initial use. The USB port you see on the “April” board above is only for charging.

    In regards to programming, you have to use their IDE built into their website.

    • Arthur Guy says:

      There are a lot of problems with the imp system especially for people who want to take a project beyond a simple single unit but for one of projects they work well

      • xbrav says:

        Your application here is a great example of a one-off design for it. After playing with mine, I might just use it as a simple wireless power bar design.

        I could deal with all the follies if not for the costs. The card plus the mandatory daughter board makes it more expensive than a Pi Model A and wifi dongle. On the plus side, it takes care of the external IP and web hosting.

        I was just really hoping the Imp would have a better selling point than size.

    • matt says:

      Also it has a proprietary programming language and some weird “virtualization” environment which keeps you from directly accessing the hardware.

      Personally I would be interested in knowing what the underlying OS on it is. I have a sneaking feeling it is Linux, but the manufacturer doesnt seem to make the source code available. For christ sakes they dont even tell you on their website what specific CPU it has or how much RAM or Flash there is.

    • Arthur Guy says:

      I saw a brief CES interview with someone from the company and they did a good job of explaining the purpose of the imp system.
      As long as you don’t expect to much from the system and chose it for the right project it can be a good choice.

    • Hitek146 says:

      “Also, to get the wifi going, you NEED to have a smartphone, as it using pulsating light to program the wifi prior to initial use.”

      While I am also disappointed that an owner of this device has no low-level access to the hardware, the part about requiring a smartphone is not true. There is Windows software to do the initial programming, and there is supposedly also Arduino code to do the same.

    • Hugo Fiennes says:

      Well, if “set for suicide” means “have shipped over 300,000 imps in 2013″ then yes, we’re very much set for suicide. It’s designed to make it easy for manufacturers to build connected projects, so it’s very much great for scaling up, easy end-user setup, and for vendors to not have to worry about building complex back-end hosting to deal with all the devices they sell.

      Just to clear up some things:

      – OS used is eCos, currently. With only 128kB of RAM, there’s no room for linux. Source mods are here: http://electricimp.com/docs/resources/opensource/

      – It’s an STM32F205 in there with 1MB of flash, of which 128kB is the user’s bytecode.

      – It uses virtualization because that means that (a) programs can crash and you can recover the device remotely, even if it’s on the other side of the world (b) because the underlying hardware can then change without you needing to change your code and (c) because there’s a companion VM for every device in the field that runs the same language in the cloud on x86 hardware.

      The imp is designed for people to actually get connected devices shipped. Yes, it doesn’t allow you to access the underlying hardware, and all comms goes through the imp servers, but for the target market, those are advantages not disadvantages. If it seems perverse to you that anyone would use such a system, and you can’t understand how we’ve sold huge numbers of them, then I would humbly suggest that you are not in the target market :)

      Hugo (from electric imp)

      • matt says:

        From Wikipedia

        “The FreeBSD TCP/IP network stack port included with eCos is out of date—circa 2001—and exposes systems using such to numerous security and stability vulnerabilities (FreeBSD RELENG 4 4 0 RELEASE for IPv4 and FreeBSD’s origin KAME for IPv6). Official eCos maintainers do not appear to monitor FreeBSD or KAME for security or stability updates, but rather rely on minimal and insufficient bug reports from users of eCos.”

        This sounds like exactly what “people to actually get connected devices shipped” want.

        • hfiennes2 says:

          Good job we use the latest lwIP then, and not the eCos stack.

          • matt says:

            The latest version of lwIP? I downloaded ei-ecos-20131206-9af2fae.tar.xz from your website, opened “.\ei-ecos-20131206-9af2fae\thirdparty\ecos\packages\net\lwip_tcpip\current\ChangeLog” and the most recent change entry in it was from 2011-03-08. Comparing this to the ChangeLogs on the official lwIP distributions
            1.4.0rc2 – 2010-11-21
            1.4.0 – 2011-03-27 (there is not a 2011-03-08 entry present)
            1.4.1 – 2012-03-25 (there is not a 2011-03-08 entry present)
            So what version of lwIP are you using exactly?

            Why is the COPYING file not included in your source code and there is no reference to it on your website (google query ‘lwip site:electricimp.com’ returns zero results)? According to the terms of the lwIP license:

            ” * Copyright (c) 2001, 2002 Swedish Institute of Computer Science.
            * All rights reserved.
            *
            * Redistribution and use in source and binary forms, with or without modification,
            * are permitted provided that the following conditions are met:
            *
            * 1. Redistributions of source code must retain the above copyright notice,
            * this list of conditions and the following disclaimer.
            * 2. Redistributions in binary form must reproduce the above copyright notice,
            * this list of conditions and the following disclaimer in the documentation
            * and/or other materials provided with the distribution.”

            And a brief review of the bug list for the current version gives them impression that there are numerous security vulnerabilities in lwIP. Specifically bug id #s 36492, 40177 and 39565.

          • hfiennes2 says:

            …as I don’t appear to be able to reply deeper than a certain level of nesting….

            – Thanks for pointing out the attribution being missing. We’ll fix that. Adam, the originator of lwIP, is well aware we use it and has tweeted as such :)

            – Those bug IDs are interesting, but it’s a stretch to say they are security vulnerabilities. 39565, for example, is a possible DoS on incoming sockets; we have zero incoming sockets hence it’s not applicable. 40177 is a bug against 1.3.2, not 1.4.1, so may not be present any more (it could also be an issue with incoming sockets, and has too little information to replicate). 36492 is the most interesting, but static analysis doesn’t go deep enough to prove issues, just areas that should be checked.

            I’d say that every piece of code has bugs in it. So, who would you prefer to be dealing with the task of keeping an embedded network stack up to date and secure – a company whose sole purpose is to make connectivity solutions, or, for example, your toaster manufacturer, who has no idea about security and why updates are important?

          • matt says:

            Yeah you’re right, any project large enough does have bugs in it. And writing your own network stack would be a pain in the ass and large undertaking, especially for a company of your size. One of the reasons I brought it up is that a client of yours – Lockitron does have some misleading marketing material, from their security page:

            “Security is the core component of Lockitron, and as such we focus much of our effort on vigilantly assessing and quickly addressing any security concerns and vulnerabilities.

            All Lockitron traffic is redirected to HTTPS. Public facing web applications are hardened against XSS, code injections, MITM attacks, replay attacks, and are patched as new attack vectors emerge. Servers are firewalled and monitored for system integrity. Sensitive data is encrypted when stored or transmitted. Access to services is strictly logged and monitored. ”Defense in Depth” is practiced where applicable. Services are routinely patched and updated. ”

            Which gives the impression that this OS has been audited. When you take in to account that the static analysis bug report was entered about 7 months ago and the project maintainer said “This will probably get addressed for the next major release. I’d rather not delay the 1.4.1 release while we wait to analyse the errors.” 6 months ago and hasnt updated it since, it doesn’t exactly inspire confidence in regards to security.

            I suppose it could be worse, I discovered that Symantec didn’t know how to properly implement encryption, nor did they audit the code of their enterprise class systems management product (Altiris, now Symantec Management Platform).
            http://www.securityfocus.com/bid/37953

            Anyways thanks again for all the feed back, I didnt expect you guys to actually monitor HaD. Although I dislike your particular product, I do have to give you credit for getting it this far.

      • matt says:

        Also how exactly is “virtualization” implemented? Is it just a user space process/task which can be restarted, or is it real visualization?

      • matt says:

        And if 300k have shipped what products actually use them? All the products (Budweister Red Light, Lockitron, Hiku, Wink) show cased on your website have not yet been produced and are still in the pre-order phase.

        • hfiennes2 says:

          Erm, all those products have been produced….

          Red lights have been for sale in Canada for well over 6 months (they are Canada only, but you can find them on eBay and they work anywhere in the world), Wink products have been in Best Buy and Home Depot since November, Hiku has been shipping for months and some lockitrons are out there – there’s one on my door, for example. It’s also in other products that we aren’t at liberty to publicize as yet, but thousands of which are in the hands of paying customers.

          • matt says:

            “Red lights have been for sale in Canada for well over 6 months”
            Their website shows it is still in the pre-order phase. After you click the link on your website, click the smart phone and wifi check boxes on their website, the red light picture on the right hand pane has “PRE-ORDER PRE COMMANDRE” overlaid on top of it.

            You are right about the Wink devices. I got confused by their website and somehow over looked the “start shopping link”.

            Your website says Hiku is in the pre-order phase, while their website says back-order.

            And I suppose you are right about the Lockitron, although your website says it is in the pre-order phase, it appears their website will accept orders.

            You guys might want to update your website to correct this. Anyways thanks for the responses, I’m surprised company reps are actually visiting/responding on HaD.

          • hfiennes2 says:

            Hi Matt :)

            I can assure you that many tens of thousands of Canadians have red lights already. They’ve been advertised on canadian TV multiple times, and plenty of proud owners have shown them off – search youtube for “budweiser red light” to see just some of them. Budweiser do release them in batches, which is something to do with marketing I guess…

            Hiku shipped many devices, but I guess they sold out. Our website shouldn’t say pre-order any more, that’s out of date, and I’ll file a bug to update that.

            I’m not a rep, I’m a co-founder of imp and an avid reader of HaD – I’d like to consider myself a hacker too, having been at this stuff for over 30 years now and made everything from the very first soundtracker (MOD) file player for the ARM processor to IMAP clients, thermostats and many many millions of phones. Most recently I’ve made imp-powered cowbells and traffic lights for server status indication :)

          • matt says:

            Im not saying you’re lying, but I can’t believe that over 10k people paid $150 for that red light.

            And congrats on all your achievements, you certainly sound more accomplished than myself.

          • hfiennes2 says:

            I find it hard to believe too, but Canadians have told me that this is because I’m not Canadian and hence cannot understand how important hockey really is. They also told me each team plays something like 80 matches per year, so I guess they get their money’s worth from the light.

            Thanks for the frank discussions, and I absolutely respect your opinion of not liking the imp. It’s a product that inspires a lot of strong opinions, but one that we felt needed to be built, so we built it.

          • xbrav says:

            Yes, we have a ton of Red Lights here. It is how I discovered the Imp.

  4. bithead942 says:

    Nice job, Arthur. I have a 540 my kids dubbed “Roby”, so I had to laugh when you introduced “Colin”.
    I did something similar with a Rootooth. I discovered the same thing you did about the limits of the space within the body itself, so I have it attached to the outside top of the case. Since my Roomba is contained to one room, the bluetooth range is not a problem, but if I had it cleaning multiple rooms, I’d definitely want to use a WiFi connection like you did.

    http://bithead942.wordpress.com/2013/03/24/roomba-interface/

    Since completing the project, I’ve had vexing issues with the Roomba putting itself in a mode where it becomes unresponsive to SPI commands and requiring manual intervention to get it to communicate again. I’d be interested to hear if you have similar issues and how you’ve overcome them.

  5. Juno says:

    Check out the Carambola-2 if you’re looking for a cheap powerful wifi module with gpio:

    http://8devices.com/carambola-2

  6. Jon says:

    This is a very interesting project. Can the roomba be told “CLEAN NOW”? I this project tracked in a forum where the author is responding?

    In my home automation / alarm system I use an IR blaster to tell my roomba to start cleaning when the alarm is set. Its often unreliable.

    This project would further be useful for measuring how long roomba ran during a session. If it got stuck early in a run I would want it to run again that day.

    Finally it would be useful for charting battery life. Once the battery runtime falls below a threshold I would replace the battery. This happens every couple of years. Since the roomba only runs when the house is empty I don’t know the batteries have effectively died.

    • Arthur says:

      You can definitely control the roomba remotely including I believe starting the cleaning process. The irobot document I linked to in the blog posts contains all the details.

      The Xively feed can be used indirectly to see how long it ran for and it is also interesting to see the battery charge drop, how quick this happens can give me a good indication of the battery life.

  7. eas says:

    My Roomba tends to knock off work earlier than I’d like if I have the dock available. If I don’t it tends to decide enough is enough when it is under a piece of furniture. You have me thinking i could give it a little upgrade to its attitude

    • mh says:

      I do not have or know roomba, but it would seem to me that if it runs unatended and parks on its own “will”. you will want it to park out-of-the-way and not right infront of a door or in the middle of the floor to trip over – so parking under a chair or other furniture kinda makes sense

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 92,417 other followers