---
title: "IOT Gateway as a bridge for wireless sensors using WIZnet 5500io Ethernet module and Xively"
url: "https://maker.wiznet.io/wiz_chandana/projects/iot-gateway-as-a-bridge-for-wireless-sensors-using-wiznet-5500io-ethernet-module-and-xively/"
markdown_url: "https://maker.wiznet.io/wiz_chandana/projects/iot-gateway-as-a-bridge-for-wireless-sensors-using-wiznet-5500io-ethernet-module-and-xively/md"
type: "UCC: User Created Content"
author: "Chris"
author_url: "https://hackaday.io/project/2581-iot-gateway"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Chris"
original_url: "https://hackaday.io/project/2581-iot-gateway"
published: "2023-02-02"
language: "en"
hardware: ["Arduino UNO", "WIZnet W5500-io"]
likes: 3
views: 470
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# IOT Gateway as a bridge for wireless sensors using WIZnet 5500io Ethernet module and Xively

> A configurable bridge for wireless sensors and controllers using WIZnet 5500io Ethernet module and Xively

Original author: Chris (source: https://hackaday.io/project/2581-iot-gateway)

## Components

- **Arduino UNO** x 1 ([docs](https://www.farnell.com/datasheets/1682209.pdf))
- **WIZnet W5500-io** x 1 ([docs](https://docs.wiznet.io/Product/ioModule/W5500-io))

## Article

This is a device to allow multiple wireless sensors and controllers to connect to the internet. This will be a configurable bridge to make the addition of new devices easy. This will be combined with a raspberry pi to serve a website interface.

Details :
The IOT Gateway Acts as a bridge for wireless sensors to send their data to the internet and allows outputs to be controlled by another web connected device. The Gateway will listen for data from each sensor node in the system and send the data to the appropriate Xively channel for use by another device. The Gateway will also listen for commands from the internet and pass the commands to the output devices.

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675366995%2Ejpg)

COMPONENTS
1×Arduino Uno
1×433MHz Transmitter module
1×433MHz Receiver module
1×WIZnet 5500io Ethernet module

Proof of concept

With the sensor ready I I set myself up with an account with Xively and began to hack away at the Xively demo from the Ethernet library. I initially used only one sensor from the DHT11 and sent the data onto the web and started viewing the data. Then adding the second sensor was a simple duplication job.

The next step was to setup the raspberry pi as an Apache web server. Using another Xively demo as a base a simple webpage was created to display this data.

One of the directions was working, the next step was to control one of the sockets from the browser. A couple of Javascript buttons were added to the webpage to run cgi scripts on the server. These Python scripts send a UDP message to the Arduino to initiate the transmission of the codes to the socket.

Add a picture and the concept was proven:

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675367093%2Ejpg)

There is a number of choices made along the way that need to be looked at again.

The message structure used by the sensor only uses two bytes of data. This was done just to avoid the collision with the remote controlled sockets. I need to analyse this to decide on a protocol that is going to avoid this problem and have the ability to be flexible.

The usage of CGi scripts and UDP messages might not be the best way to do it, but this is my first venture into web based programming, so I don't know any better and have just gone with the one I can get to work.

Ideally I think that having the sensor data on the Pi rather than Xively would mean that the server could be in constant communication over the LAN and give me more control of the data

Test Sensor

To have any meaningful setup I was going to need a sensor. At the recent UK MakerFaire (In Newcastle) I picked up a DHT11 temperature and humidity sensor. I decided to use this and an msp430 to monitor our pet Snails. Again I used a bread board to prototype the sensor:

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675367599%2Ejpg)

Circuit :

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675367918%2Ejpg)

Since this was going to be on the Snailarium, I decided to box it up. a reused battery box and with some tricky positioning fit it all in.

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675368082%2Ejpg)

Shield Construction

With the circuit working I could move it to an Arduino shield. I don't think this needs more explanation, Because of the number of modules used, this is really just a wiring job. I have left enough space on the shield to add a 2.4GHz transceiver at a later date.

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675368144%2Ejpg)

Prototype Hardware

The first task was to prototype the hardware. For this, I used the breadboard setup shown below. It's a bit of a mess, but let me get each section working on its own. I started by using the examples for the Ethernet shield to check the internet connection, then used the RCSwitch library examples to send and receive with the 433 MHz modules. While I was using the receive example I also captured the codes from the remote control for the sockets. This will let me reuse the codes to control the sockets and detect when the remote has been used instead of the web.

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675368216%2Ejpg)

Once the circuit was proven I could finalize it, giving me the following

![](https://maker.wiznet.io/upload/ckeditor5/290604016%5F1675368269%2Ejpg)

---

Source: https://maker.wiznet.io/wiz_chandana/projects/iot-gateway-as-a-bridge-for-wireless-sensors-using-wiznet-5500io-ethernet-module-and-xively/
