Last chance to enter The Hackaday Prize.

Putting scores of Arduinos on the Internet with one router

Like many hackers of late, [Rick] has been experimenting with connecting Arduinos to the Internet with a disused WiFi router and an installation of OpenWRT. Unlike his fellow makers, [Rick] thought it would be wasteful to dedicate a single router to one Arduino project, so he used a small, low power wireless module to connect up to 30 Arduinos to the Internet.

Just as in a few recent builds (1, 2), [Rick] found an old Fonera router sitting in a box at his local hackerspace. After installing OpenWRT, [Rick] connected a very small wireless module to the router’s GPIO pins and patched the firmware to put an SPI bus on the router.

Now, whenever [Rick] wants to connect an Arduino project to the Internet, all he needs is a $4 radio module. This radio module connects to the router, and the router handles the networking requirements of up to 30 DIY projects.

If you’re looking to build an Internet-enable sensor network, we honestly can’t think of a better or cheaper way of going about it. Nice job, [Rick].

Comments

  1. selim ozatici says:

    it will be good for diy home automation systems

  2. Chris C. says:

    Yes, this is a great way to leverage low-cost radio hardware.

    But depending on your requirements, it make take a lot of effort to make communications robust enough over such a simple radio protocol. The author touches on this:

    “When the router receives a message it sends back an ACK signal to the sender so it can retry until it knows the message gets through.”

    That’s a good step. But consider this – what if the message got through, but not the ACK? The sender will resend data the router has already received. Will the duplicate data cause problems? If so, you’ll also need to add an incrementing packet ID, so that duplicates can be detected and discarded.

    What if there’s a collision between multiple senders? Do they have a randomized retry interval that will prevent indefinite deadlock? Even in a worst case scenario, such as 12x Arduinos all trying to send initial packets to the router after a power outage? You may need to automatically increase the randomized interval after each failure; reducing collisions until packets eventually start to get through. Or have all communications router initiated in a polled scheme.

    What if a marginal, but normally functional, signal path is occasionally blocked by someone sitting in particular chair? This can be a hard one to figure out. Whereas mesh networks like Zigbee tend to handle this automatically with a sufficient number of devices, by switching to alternate paths.

    I’m not saying the proposed setup is useless, or even all that bad. Just bringing up a few of the potential issues and decisions with a large radio network that you may run into, which more complex radios handle behind the scenes.

    • Bogdan says:

      Good points!
      Also, the RMF12 supports some sort of carrier detection which can also be used.
      I’ve been working on some wireless sensors with these modules, but the software is far from finished.
      I would really like to have some robust and complex radio stack for these modules. The microchip MiWi features built for the RFM12 would be great, but nobody has done it before, as far as I know.
      The cheapest modules from microchip, MRF24J40MA, are still double the cost of a RFM12 while offering lower range.

  3. rpannen says:

    I’m using this for sending sensor data from the nodes every half hour or so – that works really well and it doesn’t matter if every now and the a package fails to get through.

    However I tested it for 2 days with three nodes sending a value every 60 seconds and didn’t experience any problems with these – however there is room for improvement in the C code on the gateway router – e.g. it should run the lua scripts in a separate thread.

    Also some encryption would be nice but I’ll get to that when I get my raspberry pie. That has a hardware spi port so it will be much easier to use it for this purpose without soldering or custom kernel stuff.

  4. Whatnot says:

    I wonder if anybody ever tried emulating the whole ethernet thing on some arduino data lines through a level convertor, I wonder if that would work and if the arduino is speedy enough, it could pretend to be a slow 10Mbit device I guess.
    Just curious, I know it’s hardly practical and worthwhile.

    • Bogdan says:

      I don’t think it is practical given that you have something like ENC28J60 or even micros with ethernet inside that cost little enough. Also, i doubt it is possible to put out 10Mbps data with a 20MHz clock, remember the software usb uses 1.5Mbps data…barely.
      If you really want reliable data over distance you might be interested in RS485.

    • smay4finger says:

      Yes, this is possible, kind of. Look for IgorPlug-UDP.

  5. slashsplat says:

    30 ain’t “scores”…

  6. Jeroen says:

    Not to knock the achievement, which is great, but he’s essentially recreated the functionality of a Nanode RF with a bunch of WiMin’s. The WiMin’s are cool, since they are cheaper than an Arduino, and come with the same RFM module [Rick] uses.

  7. Andrew says:

    He actually didn’t use the Jeelabs JeeNode Micro, it is just a JeeLabs Breakout board for the RMF12 http://jeelabs.com/products/rfm12b-board

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 91,219 other followers