Putting it all together

It's neater than it looks, honest guv.
It's neater than it looks, honest guv.

After a long block soldering, unsolder, re-soldering, I've finally managed to get all of the data collector box together, and this is what it looks like before it's boxed up. I've soldered the extra components and controllers onto an Arduino 'ProtoShield'. I made a few silly mistakes, but they were easily fixed.

The protoshield means I can easily replace the various components if there is a failure, especially as the cables are all attached via screw down terminal blocks. The code for the Arduino board is pretty much complete, but I want to do some thorough testing before I finally load it onto the microcontroller without the Arduino Bootloader.

Start & Stop

Well, I found it exciting

A small milestone, seeing the start/stop buttons work in context as I do final tests to the prototype

Prototype 2 (or 3?)

It's much the same as the last one, only better soldered.
It's much the same as the last one, only better soldered.

Having waited for the Tirna Electronics to mount the one-wire controller chips from Maxim I've inserted their chip into the circuit and was more confident that it's my dodgy code that's the problem reading the one-wire network, so I got back into the code and now have it working, a set of code for searching and manipulating a 1-Wire network via IC2 and a DS2482-100 One Wire Controller... the next step is to swap in a DS2482-800 and try and read multiple inputs.

Application Design

I've come up with a final application design I'm happy with and confident will work. Now to start implementing it all.

There will be numerous components in the system, and it's a pretty loose description, but it will do the job.

Data Collector

This will be based in the collector box, running a piece of software on an Arduino base ATMEGA Micro Controller. The program will check for presses of the start button, signalling a listener application on the connected MacBook that the mapping has started. It will then wait for the stop button to be pressed, and collect the data from across the 8 wire networks it can be attached to, and transmit that information to the main computer along with a stop signal.

Listener Application

This will be a background application on the MacBook, which will listen for signals for the data controller. Upon a 'start' it will create a new mapping, and grab co-ordinates for the floats location from the GPS device connected to the macbook, as well as logging the start time and creating a unique ID for the map. When the stop signal is recieved it will log the information gather from the various circuits into a database.

As we won't have a 'live' internet connection on the float this application will also listen for an active internet connection and upon receipt start synchronising data with he primary server were the website lives, uploading new maps and downloading any data that's changed on the website.

Display Application

This will be an application that will run on the laptop on the float, and also on the website for the project. It will work slightly differently for each context, but visually will be mostly identical. It will display the latest map available, as well as allowing exploration of the maps and augmentation of the data collected.

Web Synchronisation

This will be a backend application that will be triggered by the listener application, and handle the details of synchronising data with the main server.

Another Prototype

Fortunately you can't see my bad soldering...
Fortunately you can't see my bad soldering...

i've been playing around building the next prototype for capturing the data from the network. I started playing with the 1 wire libraries that are available for the Arduino, but wasn't getting very far with them, and I'm still somewhat wary of the bit banging approach this takes. If my electronics/physics wasn't quite so rusty I may be more confident.

To that end I've taken on board a different challenging task. I soldered one of the very small surface mount packaged DS2482-100 that Maxim sent me as a sample onto a mounting board from eP board. The soldering is not a task for the feint hearted, and I hope it works. The trouble is that I'm not sure whether it's my dodgy soldering, or something else, which is preventing me from talking to the chip.

I guess I'll just have to carry on getting my head round the [url=²C
I²C and one-wire protocols, in the hope that I can be sure it's one thing. An interesting and challenging task.

The reason I've opted for this route is that I can use the Arduino to control start/stop signals, light a status LED, and collect and send data to our MacBook. Finally I intend to swap out the DS2482-100 for a DS2482-800 in the final build to allow up to 8 one-wire networks, for better contextualising the data we gather.

First Proof of Concept

I've managed build a first, quite lo-tech, prototype to make sure that my idea of using 1-wire networks is sturdy enough. My initial look at ibuttons proved them to be too fiddly for the kind of use we need, and so my thoughts turned to something more robust: 1/4" Jack(TRS) Plugs, as used in telephone exchanges in the days of old.

I connected up a number of sockets in a small circuit that had one Silicon Serial Number chip attached to it, and then hooked that back to the 1-wire reader using a guitar lead, and could read one or more chips on the network without a problem. I built a second box and could daisy chain them together, using 10 meter cables. This makes me confident that this will work in a real environment.

The low cost of TRS plugs and the Silicon Serial Number chips, and the simplicity of the network, really appeals to me in making this practical. Earlier networks I'd imagined with lots of intelligent collectors for each network, feeding back to a computer; which would have been expensive and more prone to errors, this one is much more simple.

The only real issue is one of context. I'm unable to detect which chip is plugged into which box when they are chained together, and so this is pushing me towards having multiple 1-wire readers: Though I'm not sure how well the host computer will handle that.

It's looking much more likely that we'll use a micro controller somewhere as well, so it may be possible to read the multiple networks from that. The use of a micro controller comes from the desire to have our computer hidden away, so the focus is on the mapping, not a computer screen.

We've realised we want to capture other input, such as photographs or video, and an easy way of doing this. I've suggested a 'start/stop' mechanism, where a button get's pressed to start the mapping, then pressed again to stop the mapping. This will allow us to grab a time stamp, then when we copy images from a camera we'll be able to tell which mapping they belong to by the time they were taken, to make reconciling maps to collected data easier.

the start stop will also allow us to work out how long it takes to do a mapping, and capture other data such a GPS, or weather, or anything we decide on.

Starting a prototype

I can read one ID, therefore I can read many.
I can read one ID, therefore I can read many.

Some of the 1-wire samples I've ordered from Maxim have turned up. I ordered a 1-wire Evaluation Kit, but it appears to be on back order, which could hold things up. The fact that it has to ship from the US, via the ever painfully slow UK customs, is making me nervous. In the meantime I ordered some parts from homechip to allow me to get on with testing the network ideas.

First step is wiring up a 1-wire reader and a 1-wire Silicon Serial Number ID chip, and seeing if I can get them to show up on my MacBook. The hardware itself is simple enough, but the software is more challenging.

Some googling throws up a Mac OS X compatible version of the one wire viewer. After some playing round, and reading all the comments, I manage to get it working, and I can swap serial numbers in and out on the board all nicely.

The software isn't really going to be much use in the final thing alas; There are a few options here though, I can use the basic libraries in here and extend oit to get the data out and into whatever database I want, or I can use other available software, such as the One Wire File System to read what's on the network. The problem seems to be that the mapping we need would require the network to be cut into segments, whereas the default one-wire network is just one long string of IDs.

I've been thinking about using an Arduino or Wiring microcontroller to talk to the one wire network; there are some libraries which appear to allow talking to one-wire nodes directly. The catch here maybe one of timing and accuracy: each network we have may be quite long, and so the timing issues on the 1-wire network may become a problem.

Again there are some options here using 1-wire hubs. It doesn't fit with my feeling of keeping it simple however.

More work to be done...

a public works project. site design and build by dorian