Martin's corner on the web

Micro IoT gateway

I have long wanted to make my own Internet of Things gateway and I wanted it small. I have researched for quite a while on the options, and finally decided to base it on the excellent work done by Simon Küppers back in 2008 with his micro Web Server. It is a true piece of art, measuring bare 30x38mm. There are some trick up the sleeve to achieve that, most notably that the on-board Atmega328 is getting its clock from the ENC28J60, to run at 12.5Mhz at 3.3V.

I have talked with Simon and have his permission to create and sell for non-commercial usage my own version of his micro Web Server. The changes I wanted in place are basically three:

  • I used another MagJack that is widely available
  • I added micro USB power jack, so the board can be powered from the widely available power supply units for mobile phones
  • I re-arranged a bit the power pins on the 20-pin header, so that I can easily design shields that don’t need to be cut around the MagJack and still get 3.3V and GND from the board

[Edit] Adding rendered image of the above PCB:

I plan to adapt JCW’s ethencard library for the micro IoT Gaateway.

I have ordered one original version of the Micro Web Server and am expecting it in soon, once I am conformable with assembling it (it comes as a kit), I will order PCBs for my version. My future plan is to add shields for RFM12B and possibly SD card slot, FTDI expansion.

If all tests go well, I plan to sell it as pre-assembled product in the store.

12 thoughts on “Micro IoT gateway

  1. Ken Boak

    Martin,

    A great little board – if only you had put the RFM12 on it too! Looking forward to the next version, with it talking to your super Funky sensors

    The ENC28J60 is also available as a 28pin SSOP or a 28 QFN in a 6mm x 6mm pack. I have seen designs where they place the 28J60 underneath the magjack!

    We are experimenting with emonCMS not only for datalogging sensors – but also controlling digital outputs on remote RF nodes. See my latest blogpost

    http://sustburbia.blogspot.co.uk/2012/09/using-nanode-rf-and-emoncms-for-remote.html

    1. admin Post author

      Thanks Ken,
      Your work is such an inspiration for so many, I have a load of Nanodes myself 🙂
      I will have the RFM12B as a “shield”, that will surely save space compared to having it on the board since we can utilize the empty space that the magjack creates by its height anyway. The idea is to use all dimensions, not just X and Y, but stack up in Z. I really want to get the concept running before doing further size reduction, if you want to give it a try, I’ll gladly email you the Eagle files. I din’t publish them here as I thought it is a bit early and wanted to test it out first. Also, shield approach will allow other wireless modules to be used, not just limiting to RFM12B.

      I am happy to see bi-directional stuff as I too have come to the conclusion that remote nodes need to be instructed to do stuff. I intended to try out the approach outlined by JCW here http://jeelabs.org/2011/06/27/time-controlled-transmissions/ , that with the stuff you point out will probably work out nicely.

      Arent these interesting times in the IoT world?

  2. Ken Boak

    Martin,

    Thanks for the swift reply, and pleased to hear that you have been using Nanode.

    There’s a new surface mount version of Nanode RF being launched next week by my associates at WickedDevice in the USA. It’s the same footprint as the existing Nanode RF, but ready built and ready to go straight out of the pack.

    We are also looking at a new simplified version of Nanode RF based on the ATmega1284 and also looking at your work with the Raspberry Pi – as a RFM12 compatible home server.

    I’ve been following your work with Funky, and I am pleased to see that this is another open hardware device that can communicate with JeeNode, OEM and Nanode. It is good to see new devices from new suppliers which use the RFM12 and JeeLib communication.

    I will look at jcw’s post on time controlled communications and see if we can work some common ideas.

    I am just happy to be able to click on emonCMS server and have a node perform an action at the end of my garden – about 65m from the house.

  3. Ron K Jeffries

    Love what you are doing. Since gateway will usually have plenty ofg power due to location, your design is fine.

    But my dream is that remote IoT sensor stations be based on an extremely low-power chip, such as the soon-to-arrive ARM M0+. Encryption of data and an ability to authenticate (to prevent bad guys form hacking IoT network flow) are not desirable, they are REQUIRED. That’s much more practical to do with an ARM than the AVR chips.

    The radio you are using is ok/fine, but has a 2 byte buffer. The TI CC11xx radios are similar but have important improvements such as 64 byte buffering and in-built CRC to add with packet integrity.

    I am NOT dissing your work, period. But I hope you are others press on to new heights. 😉

    1. admin Post author

      Ron,
      good comments. In regards to low-powered gateway I am closely watching the development of the ‘Electric Imp’, I am on the wait list and should be getting one soon. The ‘Imp’s have SPI so hooking it up with a wireless transceiver shouldn’t be hard. But again, with grid power available near Ethernet routers, the uIoT is a fine solution. You probably could also run custom PoE using the extra wires available in the Ethernet cable.
      The radio I am using is fine for the applications I am testing, I also was looking at nrf24l01. I will be interested to check the module you suggest, I see there are pretty nice miniature size Arduino compatible boards with that radio already available (panStamp).

    2. admin Post author

      I have been intrigued by the TI CC1101 radio and check what I found:
      Attiny84 + CC1101 in a DIL14 size package
      It is an ATTiny84 + CC1101 in a DIL14 sized package.. I have lost sleep since then, this is amazing stuff. I wish I get there one day 🙂

  4. Christophe

    I also find the design above quite impressive. I personally chose for panstamps because the “shield” approach and the Arduino form factors (or XBee) do not fit well in electric boards, and Daniel’s battery and relay boards make an nice combination fitting my needs. The downside is that it’s a bit more expensive, not compatible with more mature solutions like Nanode, and does not provide an attractive solution for the Gateway. So for that one I selected the KMtronic DINo (also on DIN rails), but I’m a bit afraid of the power limitation of the AVR for this as well. I managed to get publishing to COSM for a few days, but it doesn’t look very robust.

    Ron, did you look at MSP430 for “very low power” ? The tandem with Cortex Stellaris (actually trio with CC RF chips) could position TI as the one-stop shop for chips actually.

    I can in any confirm that going down to 868MHz from 2.4G makes a big difference in RF signal quality. These packets get thru, but no Wifi or BT. So I wouldn’t recommend nRF24. But of course YMMV.

    IMHO for the sensor itself, ATMEGA (tiny ?), TI MSP430 or ARM Cortex is more or less equivalent. But for a gateway with web server/client and memory, Cortex-m3 seems the best way to go. Unfortunately, nothing beats the Arduino/Wiring IDE in terms of ease of use, so I never managed to get those doing something useful.

  5. Christophe

    While I’m at it, I also looked at Electric Imp, found it a very good idea because it can piggyback on existing WiFi. But did they publish anything recently ? The blog is silent since mid-July 🙁 And the selection of Squirrel as language (a one-person effort) scares me a bit.

  6. Pingback: Using Nanode RF and WiNode for Server driven control | Nanode

  7. Pingback: Putting together Simon’s Micro Web Server | Martin's corner on the web

  8. Pingback: uIoT gateway project update | Martin's corner on the web