Hardware Interfacing

The various techniques for getting signals in and out of the system described on the Inputs and Outputs page all provide logic level signals.  At this point we move on to the electronics necessary to convert these signals to whatever is needed in the real world.

1. Relay Output

A relay is the easiest way to control lighting, central heating pump, and so on.  The relay safely isolates the logic from mains electricity and can be sized according to the load it is required to control.  On the logic side a simple transistor buffer can be used to drive the relay, or even better, the very useful ULN2003 chip contains 7 driver circuits which are TTL compatible and include diode clamps, so no other components are needed to drive a relay.

2. LED Output

Just like driving a relay, a simple transistor buffer is all that is needed, and once again the ULN2003 chip can also be used, requiring just a series resistor to set the current through the LED.  Depending on the characteristics and quantity of LEDs involved, they may be able to be driven direct from the PIC with just a series resistor.

3. Switch Input

An input from a switch is simplicity itself - Connect the logic input to the +5 supply with a resistor, and to ground via the switch.  Actually, the chip used in the ETHPIC nodes has inbuilt pull-up resistors so we don't even need the resistor.  This circuit applies whether the switch is a little button on the front of the box or a light switch on the wall.  Infra-red motion detectors for burglar alarms have a set of contacts which open when motion is detected, and we can connect these to our node in exactly the same way as a switch.

4. Temperature Sensor (PICNET)

When I wanted better control of the central heating I needed a way of measuring the temperature in the main room of the house.  After considering a number of possibilities I selected a chip which is a temperature to frequency converter.  A single input bit on the PIC is then monitored and the pulses timed to measure the temperature.

5. Temperature Sensor (ETHPIC)

With the advent of the ETHPIC nodes, measuring temperature became a lot easier, as the SBC65  boards feature a number of analogue inputs.  Simple three-legged sensor devices output a voltage which changes linearly with temperature, and the voltage reading from the analogue input can be easily converted to degrees C.  So nowadays the system has access to temperature readings in a number of rooms, plus the loft space, outdoors, and some of the central heating pipes.  In the unlikely event that the house becomes cold enough to freeze the pipes, the heating will be activated.

No comments:

Post a Comment