Interfacing a NAD T163 with a Homevision Pro

This article describes how I interfaced a NAD T163 pre-amplifier with my Homevision Pro automation controller. It does not cover all of the programming and smarts around the installation. In reality this article will provide guidance for any automation system.

Bill of Materials
– 2 x RS232 DB9 adapters ($8 AUD)
– 1 x Interfacing cable between units (I used Cat 6e)

Total Cost = $8 AUD + cable

Tools used
– Pliers
– Screw Driver
– Krone Tool

Step 1: Figure out how NAD serial communication works?
Probably the most obvious step here for any automation task. Before we can have the HomeVision Pro communicate with the pre-amp I need to how to communicate to it. Usually the best way to do this is with a PC and a serial emulator. My tool of choice is putty. I usually try a 8-N-1 connection. This is a common shorthand notation for a serial port parameter setting or configuration in asynchronous mode, in which there are eight (8) data bits, no (N) parity bit, and one (1) stop bit.

How ever after looking at websitethey actually have a RS232 test tool. Why re-invent the wheel? My device is pretty old. Whilst all of NAD’s devices today use ASCII commands mine used binary encoded decimal communication in Q8.8 format.
Q format is often used in hardware that does not have a floating-point unit and in applications that require constant resolution.
This device uses Q8.8 format, using an 8+8+1 bit signed integer container with 8 fractional bits, its range is [-128, 128]

What the NAD tool tells me exactly what commands I need to send to perform a given function and on the reverse how to interpret the results being sent back by the pre-amplifier. In the example in the images, if I want to tell the pre-amp to turn on I issue ‘1, 21, 21, 94, 65, 2, 212’ and like magic it powers on.

According to the NAD website the data format for all commands sent to the T163 and responses sent back have the following basic format:
| Start | Command | Data | Checksum | 8-bit Checksum |

Start | 1 byte control character which starts every packet of data.
Command | 1 byte command which represents the operation to be performed or the type of response being returned
Data | Variable length data. The length of this field depends on the command. If the data represents a multibyte number, it should be sent least significant byte first.
Checksum | 1 byte control character which denotes the end of the data stream and the beginning of the checksum.
8-bit Checksum | This checksum is the inverse sum of the Command and Data bytes of the packet. It is used to verify the validity of the data packet.

Any data received which does not follow this format will be ignored.

Step 2: Connect the devices
The connection to the NAD T163 is DB9 male. To connect I need to interface with it using a DB9 female connector with the following pin outs
Pin 2 – Transmit
Pin 3 – Receive
Pin 5 – Ground

On the Homevision Pro (or controlling system) the pin outs need to cross the transmit and receive
Pin 2 – Receive
Pin 3 – Transmit
Pin 5 – Ground

Step 3: Homevision Pro Code
Code now needs to be written on the home

Shane Baldacchino

Creating My Super DoorBell

WARNING : Electricity can be lethal, this work should only be attempted by a licensed electrician

When building my house it never dawned on me that one day my humble doorbell would be anything more than that. The more I started tinkering with my house I realised that given my central cabling design that I would be able to leverage my door bell as another input to take action on. What I started with is nothing more than a standard 8V AC door bell, what I have now is far from it.

At the moment the press of my door bell in certain cases will
– Make the door bell ring (wow)
– Logs the event to a table in a MS SQL database
– Turn on lights in the portico (if it is night)
– Turn on lights leading to the door bell internally (if it is night)
– In the next 6-9 months (money/time pending) it will take your picture/video and attach it to an email.

Bill of Materials
– 1 x 2 AMP 240V AC –> 8V AC transformer ($35 AUD)
– 1 x AC powered door bell ($16 AUD)
– 1 x ELK930 door bell detector ($40 AUD for 3 units)
– 1 x Large electircal junction box ($30 AUD)
– 1 x 2m of 4 core cable (enough to go from the ELK930 to your automation system) ($2 AUD)
– 1 x 40m (enough for your door bell runs) of 2 core cable. ($10 AUD)
– 1 x HPM PE Cell ($60 AUD)
– 2 x Clispal 30PBL 240V push button switches ($26 AUD)
– 2 x X10 two way appliance modules ($75 AUD)
– 1 x 2m of multi core 240V AC cable ($2)

Total Cost = $296

Tools used
– Soldering Iron
– Pliars
– Screw Driver
– Device to drive X10 modules and read open collector inputs. I am using CSI’s excellent HomeVision Pro
– Drill and drill bits (masonry may be required for brick)
– Drill
– Pencil / Pen
– Various electrical connectors

Step 1: Run cables for the doorbell
Run adequate cable. All of my cables were run to a central location. This was key in enabling the door bell to be hooked in to my automation system. One cable needs to be ran from the door bell to the garage and another cable needs to be ran from the garage to the momentary switch. I used figure 8 cable as this will be suitable for the current of the door bell.

Step 2: Wire in the doorbell in to the ELK930
Wire in your door bell according to your manufacturers instructions. My wiring is as per below.

Wire in the momentary switches and the ELK930. The ELK930 is a module that pretty much sucks the voltage out of the line and provides an open collector to any alarm / automation system. Put simply it stops voltage being fed in to my Homevision Pro’s mainboard and allows the Homevision Pro to detect the door bell being rung with no voltage being fed in to the unit. This module has been great and very cost effective. It probably could have been replaced with a relay (single port double throw) but would be more expensive.
The door bell is wired in to the ELK930 and the ELK930 is wired in to one of the Homevisions Pro’s input ports.

At this stage the door bell will ring and the input will be pickd up by the Homevision

Step 3: Add in some smarts

Yes the HomeVision Pro knows about my door bell being pressed but it is not doing anything about it (other than flashing an LED). First lets just get it to log the event to a database

Now when the door bell gets pressed the Homevision Pro will call a VB script I wrote which logs the event to a SQL database and gives a timestamp.
So we know when the door bell rings but that’s about it. Le’ts make it even smarter

Step 4: Day or night?

Given we know when the door bell is rung we can now use this event to drive other events in the house. How about for starters turning lights on when the door bell is pressed and it is sufficiently dark outside. That sounds good but we don’t know if it is day or night at the moment. By adding in a photo electric cell we are able to deem day from night. I am using a HPM PE 170 to carry out this task. To simplify the tech talk it is a light sensitive switch. This unit will be used for many other decisions in and around the house. The problem with this HPM unit is that it switches 240V AC. If I fed 240V AC in to my Homevision Pro’s input port it probably wouldn’t end pretty (I would be crying), I need to somehow get rid of all the voltage and turn this in to an open collector input. A relay is what we need here. The 240V AC output from the PE cell will drive the relays coil and power the electromagnet which moves the contacts from NO (Normally Open) to NC (Normally Closed). I am using an Omron L2YN DPDT (Dual Pole Dual Throw) relay, it is an overkill but that is all my friendly electrical wholesaler had in stock on the day of my visit.

Implementing the HPM PE 170 is pretty simple. Find a suitable spot to mount, turn the power off to your power circuit. Run power to the HPM PE170, run the switched power to the coil side of the relay and run the NO/Common to a Homevision Pro’s input port.

There is not much logic to add to the Omron LY2N. The port on the Homevision Pro will either be high or low which represents day and night. I log the time of day and night to a SQL database (may push the data through at some stage to SQL Server Reporting Services to plot the data but it is not required).

Step 5: Add a splash of X10

The aim to integrate in lights requires a means to automatically to power them on and off. I am using X10 as the transport protocol. The Homevision Pro has a built in TW 523 interface that allows duplex X10 transmission. I am interfacing the TW523 with an XTB-IIR from JV Digital Engineering which in turn provides communication to all the X10 appliance modules in the house.

The light switches need to be replaced from the traditional rocker based switches which won’t cope with the automation turning on lights to either momentary or pushbutton switches. I have elected to use Clipsal button 30PBL switches. These switches have a nice blue LED in them. This provides us with a visual inidication to show if a light is on or off.

The challenge for wiring was space, 3 rocker switches were replaced with 3 Clipsal 30PBL’s which are much deeper plus we need to wire in two X10 appliance modules. The original electrician is looping the active in this instance at the switch. I did not change this.

What we began with

Power off working away

Complete, but what a mess, cables to be made safe

All back together with lighs on, tidy and safe

I have set addresses on the modules, and added basic logic to the Homevision Pro.

Now for a demo, for the purpose of this demo I have changed the timer to 1 minute.

Shane Baldacchino

Cooling Home Audio with a PLC using X10 and Dallas DS18S20

WARNING : Electricity can be lethal, this work should only be attempted by a licensed electrician

We recently purchased a new TV unit. High on my priorities was ventilation. I own two NAD C272 stereo power amplifiers (one to power inside the house and another to power my shed and garage). I really like these devices, they are serious no nonsense premium power amps and have the same effect on your ears as moving from crop sensor based D-SLR to a full frame. The bad news is earlier revisions of this power amplifier lacked thermal cut out, I found out the hard way. Boom, look at that cap.

Even though this new entertainment unit is quite open, the NAD is 190mm high and only fits in by 17mm, this surely wasn’t going to cut it and with NAD posting a warning on their website I didn’t want to test my warranty, again.
A solution needed to be found.

My solution was to leverage my PLC to drive fans which I have mounted in the back of my cabinet.

Breakdown of parts (for one Power Amplifer)
– 2 : 119mmx119mmx39mm 240V fans (2 per power amp)
– 1 : X10 Lighting module with dimming functionality, I used an LW12
– 1 : Electrical junction box
– 1 : Patch cable
– 1 : Dallas DS18S20
– 1 : Wall plate for RJ45
– 1 : Electrical cord terminated to your countries wall sockets
– 1 : A length of heat shrink
– 1 : Various screws

Tools used
– Soldering Iron
– Pliers
– Screw Driver
– Device to drive X10 modules and read Dallas thermometer, I am using a HVPRO
– Hole-saw to match your fan diameter
– Drill to drive hole-saw
– Compass & Pencil

Step 1: Wire in LW12 to cord
The LW12 will be driving the fans. As high voltage is being used, for safety purposes this is enclosed in an electrical junction box. The electrical donor cord was cut in two. The first segment is used to go from the wall socket to the LW12, the second segment is used from the LW12 to the fans. The connections are as follows.

Cord Segment 1 : Brown (active) –> Red (active input)
Cord Segment 1 : Blue (neutral) –> Black (shared neutral)
Cord Segment 2 : Brown (active) –> Brown (active output)
Cord Segment 2 : Blue (neutral) –> Black (shared neutral)

Step 2: Create the thermometer
In order to deem when we need the fans to turn on and their appropriate speed (more thinking sound) we must first know what the temperature is. I am using a Dallas DS18S20 thermometer to achieve this.
A few things need to occur here, as these thermometers all connect to the same bus we must know the address of the device. Unfortunately this is not provided and the only way to read this 64-bit address with my PLC (Homevision Pro) is to disconnect all other sensors from the bus and just have this unit connected. So that is what we have done. Maybe yours is better?

In the above we can see the address of this device is, save this to a new variable. In this case it is my 4th sensor and given we start counting from 0, this is digital temp sensor number 3 in my system.

Once we have the address we can connect everything back up (dont forget to test if you have broken anything) and solder the DS18S20 to the end of a patch lead. I decided to use brown for negative, orange for 5V DC and blue for data.

Add heat shrink and enclose in container. I used a plastic container from a cutting tool and covered this in heat shrink and slid the DS18S20 and secured with two cable ties. These are really not needed as the fit should be snug

Step 3: Establish the link between the Dallas DS18S20 and HVPRO

I now needed to get the HVPRO talking to the thermometer. For all of my other sensors I use a 4 core multi strand cable but I didn’t think of this earlier and I have a double storey house. My solution was to use the existing Cat 6 cable I left beind my wall. I luckily have 4 ethernet cables behind this wall unit. 2 are used for data, 1 is used for RS232 and the 4th is now used for thermo.

The DS18S20 sensor can now be connected and placed on top of the NAD C272.

We now need to build our X10 driven fans.

Step 4: Link the LW12 to the fans
We need to link the LW12 to the fan. As a test I have connected the LW12 to a fan in my garage to test the variable speeds. Please note I did not insulate connections for this test. This can be very dangerous and extreme caution should be taken during these steps. The LW12 is speed limiting the fans which are an inductive load via a resistive coil.

Step 5: Wire the two fans and LW12 together
After testing in Step 4 it is time to make things a little bit more permanent. I used heatshrink to double insulate the wires, given the voltage / amperage combination is fatal I dont wish to take chances.

Step 6: Putting it all together – mounting the fans
It is now time to mount the fans. I would suggest using a hole saw to get a nice round cut. I had used a 130mm hole saw to mount the fans. Take your time, measure twice. The fans are designed to suck air from behind and push over the power amplifer

Measure twice, cut once. My pants are awesome.

130mm hole saw

First fan mounted

Both fans mounted, a few cable ties used to take load of any of the connections

Both fans mounted, very neat fit

Step 7: Add logic
Everything is connected but the PLC doesn’t know what to do. We better help it so here is some code to turn to the fans on (including a fail safe). It will need modification to log more data. Integer values are in degrees Fahrenheit + 50.

Step 8: Test
After about 15 minutes of hard load on the power amp the temperature has risen from the ambient 16c to 32c, you can see in the graph the fans flick on for around 1 minute, reduce the temperature and then power off. I have found I am unable to get the fans to spin faster than the first defined threshold

Given the data from thermostat is stored in a variable in the PLC we can keep track and model this in our NetIO front end which is displayable on phones / tablets that we use in our family


All in all, this solution has solved my problem and over the last two years I haven’t had any thermal related issues. The fan’s do their job when seldom needed and if I can’t poll the thermostats the fail safe logic cuts the power to the units.

Shane Baldacchino