Category Archives: University

Finished Dissertation

I’ve finally finished my dissertation and done my final presentation. I’ve previously detailed what the dissertation involved here. And this post is just going to be some additional documentation, and my dissertation.

I’ve created several Github repositories making all work public. The source code is split into three sections: the code for the radio board, the code for the sensor board and the configuration program. All can be found under source/code in the main Github repository:

The dissertation itself can be found here and in the Github repository.

University Dissertation

Since January I’ve been working on my dissertation for university. It’s a small research and development project which aims to create some low-power sensor and gateway nodes which run from solar and interface them with a building management system called EMonCMS. This is for the company called CAT (Centre for Alternative Technology Wales).

In addition to those requirements the overall goal of the project is then to create an example implementation of an end node which monitors the level of a lake which provides water and hydroelectricity for the site.

The system I’m building has been split into two parts to share between two dissertations. My half focuses on creating the hardware and low power segment. Jonty Newman’s ( focuses on creating a gateway which bridges the low power segment to Ethernet using a Raspberry Pi translating messages from the low-power radio format to one accepted by EMonCMS. This includes buffering requests for sensor data and coordinating when nodes will go into sleep mode to conserve power.

For me January was mainly focused on researching the hardware and libraries to use to get the best value for money in terms of hardware costs and library usability. The radio segment is based upon work by TMRh20 ( who created a mesh networking layer for the nRF24l01+ radios. This library runs on both the Pi and Arduino platforms. The meshing capabilites are a little limited as it isn’t a true mesh, it’s tree based. This means it has to have a gateway node and that routing between leaf nodes is little less optimised. However, for this system of relaying all data to the gateway it’s a good fit.

On top of of this layer me and Jonty have created a specification for transferring various data types and making requests including encryption. This can be found here on Google Drive.

To conserve power the nodes and routers will all contain a real-time clock, this will be the cheap DS1302. This is so the whole network can have synchronized sleep.

For monitoring the lake level I’m using the PTM/N/RS485 pressure sensor by Omni Instruments. This sensor communicates using Modbus over RS485 and the public documentation is a complete pain and required a few weeks of emailing to get everything from them. Overall though they have good customer service. These pressure sensors are in titanium cases and can accurately measure down to a few hundred meters.

The sensor node which connects to the pressure sensor and relays data back over an nRF24l01-LNA-PA

The sensor node which connects to the pressure sensor and relays data back over an nRF24l01-LNA-PA

Ton Java Generator on Softpedia

My university group assignment from last year just got added to Softpedia, I guess that’s what I get for leaving it on GoogleCode.

More authentication experiments

This time there are two. Both use tomcat as that is what my group has asked me to investigate, however one is standard HTML where as the other uses WebSockets. Both are hosted on my home server so don’t expect speed 🙂 The username/password combo is again admin/admin.

Without WebSockets: (Offline)
With WebSockets: (Offline)

Also the sources for both:

Overall though I still think I prefer the java applet for this assignment. It took 4 hours to implement the applet including research, and then about another 3-4 to do the plain HTML, and then another 1 to figure out sockets with Tomcat. However I believe the only reason the applet took so long was because I made the code neat and did planning beforehand, but with the HTML bases examples I didn’t know what I was doing so just jumped straight in, and it actually went fairly well.

Server Client Auth

This is a server client authentication experiment/example using java sockets and sax xml parser.
The server should be run from command line with no parameters.
The client can be run without parameters and will by default connect to localhost port 4444.

The example is capable of authenticating against a server and then pinging it and also disconnecting.

In the source code, the server includes a fair few javadoc comments and the client contains none as it reuses nearly all of the communication code, it simply adds a swing interface on top. In this example the correct username/password combo is admin/admin.