Inputs and Outputs

An essential part of any domestic control system is the interfaces to the real world.  The Polly system has used a number of different techniques to get signals in and out:

1.  PIO Card

Initially I used a PIO (Parallel Input Output) card plugged into the server PC.  Simple memory read and write actions in the software controlled each individual logic signal.  Electronics in a separate unit was provided as necessary to interface these signals to the real world.

This system worked extremely well and was for a number of years the sole means of sensing and controlling equipment.  However, as time passed a number of disadvantages began to surface:

Firstly, every time I added a new input or output it required a new wire from wherever it was located back to the PC.

Secondly, when a new input or output was required, it would require new electronics to be added to the existing circuitry in the interface box.  Doing this necessitated disconnecting all the existing wiring and moving the box to the bench for the new components to be added, during which time all the control functions were out of action.

When I moved house in 1997, the opportunity was taken to retire the PIO card, and all inputs and outputs at the new location were via PICNET, and later ETHPIC.

2.  PICNET

In 1995 I became interested in using PICs for electronic projects.  A PIC is a simple microprocessor complete with I/O, memory, timer and all the requirements of an embedded microcontroller, all on one small (and more importantly, cheap!) chip.  Could I use these in some way to simplify my external interfacing?  The answer was a resounding yes, and soon a "network" (Technically a ring.) of PICs were providing inputs and outputs at the desired location in the house.  Gradually the interfaces which used the PIO card were migrated to use PICNET nodes.

See the page on PICNET for design details.

3.  ETHPIC

Despite its excellent  performance over many years, the PICNET system did have some disadvantages, not least of which was that if a firmware change was required on the node in the loft, I had to go up there and crawl on my hands and knees to replace the chip.  So I was always on the lookout for a more modern solution.  Once the Polly server software had been ported to Linux it was obvious that such a solution should use IP for communications, so what I needed was a little gizmo with a processor, a few input/output ports and an Ethernet connection.  Eventually I came across an Australian company called Modtronix who produce all sorts of nifty products, including the SBC65EC which is a "Compact SBC with Ethernet, RS232, I2C, 12 Analog Inputs, 32 Digital I/Os, free TCP/IP Stack, PIC18F6627 and Web Based Configuration."  This seemed to fit the bill perfectly, and the free software came with source code and instructions on how to set up the (free) tool chain necessary to build it.  So in 2010 ETHPIC functionality was added to the system and at the time of writing there are six ETHPIC nodes scattered around the house.

See the ETHPIC page for more details on the SBC65EC and how I use it.

4.  Raspberry Pi ?

A Raspberry Pi has all the functionality of the Modtronix SBC used for ETHPIC nodes, and much more, and it's cheaper as well, so next time a new node is needed I will be looking at developing a version of the node software to run on the Pi.  This is, of course, completely separate from the successful project to use a Raspberry Pi as the server.

5.  Connecting To The Real World

See the page on Hardware Interfacing for details of how I convert the logic-level signals provided by the methods described above into mains power and other real world signals.

No comments:

Post a Comment