Additional control hardware

We added a small interface board which plugs in to the MMJ socket on the Livebox. This board holds an AVR microcontroller which interprets commands sent from the Livebox. Since the MMJ connection exposes 5V and Gnd, as well as the serial Tx and Rx lines (at 3.3V), connection to the micro UART pins is straightforward.

Features of the add-on board

  • 4x relays
  • A set of four input lines
  • An I2C bus
  • A 1-Wire bus
  • A 433MHz RF transmitter
  • A LCD (1×16)
  • A DS18B20 temperature sensor

The PCB layout below was then fabricated - we use an RJ11 female to bring in 5V and serial from the Livebox MMJ connector. This PCB is sized to fit inside the Livebox case.

Simulated board layout with a few components populated livebox-pcb.jpg

Real board - populated and mounted inside the Livebox

Internal mounting serial connection
fitted livebox

Externally mounted for easier access during testing

Externally mounted

HAH PCB assembly notes

Click image for enlargement or download Full JPEG 2298×1563 image.

Before starting, make sure that you have all of the parts that you require. Components are packaged as per the shop - keep the parts in their separate bags until you are ready to solder them onto the PCB.

You will need a soldering iron, some fine solder and a small pair of wire-cutters.

The order in which you populate the components on the PCB is not critical. We usually start with the RJ11 socket. The socket is a tight fit. If you warm the part a little, fitting is easier. Be sure that all six pins align with the holes in the PCB before applying too much pressure. Then fit the zenner diode, D6, directly behind the RJ11 socket. Observe polarity - the bar on the component should match the bar on the PCB legend. Now, fit R6 (1K5 ohm), just to the side of the RJ11 socket.

The socket for the microcontroller is next. We use a 20pin socket + an 8pin socket.
Remember to align the notch on the socket with the notch on the PCB legend. Now, fit the two caps and the xtal. Crystal Capacitor mounting Solder the caps to pins 1 and 2, 5 and 6 of SV1. The xtal fits to pins 3 and 4. Fit these so that the xtal sits on top of the caps.

Jumper JP1 should be left unfitted. JP3 should be fitted and jumper-ed to short pins 1 and 2. JP4 should be fitted and pins 1 and 2 shorted. Note that our newer PCBs only have one jumper (JP1), which should be fitted and jumper-ed.

If you have relays to fit, it is easier to fit the diode, resistor (4K7 ohm) and transistor (required to drive the relay) before fitting the relay itself.

These relays are designed for LOW Voltage, LOW current operation. If you need to drive mains voltages, you should consider a suitable, external, relay board and take the precautions that are required when dealing with mains voltages.

When fitting the diode, ensure that the band on the component matches the PCB legend. When fitting the transistor, ensure that the flat side on the component matches the PCB legend.

The screw down terminal blocks interlock with each other.


You should interlock them all and do a 'test fit' onto the PCB before soldering them to the PCB. A similar thing applies to the input screwdown terminal blocks - these go in two sets of two adjoined terminal blocks.

The RF module comes with three male molex pins attached. When fitting the RF module, you first solder a separate set of 3 molex pins to the three way molex socket. Solder the 'short end' of the pins to the socket.

RF parts

'Reverse fit' these with the long length of pin going into the PCB. The goal is to have the RF module sit at the same height as the top of the RJ11 socket. If you make this stand too high, the Livebox case will not close properly. Be sure to check that the solder has flowed properly to join the pins.

RF module mounted

Solder the aerial (a 6.47“ piece of wire) onto the RF module solder pad connector (marked 'ANT'). Once fitted, trim the length of the wire to 6.47” Alternatively, if you have purchased the external antenna, use the pigtail connected SMA socket (that is supplied with the external antenna kit). Centre pin on the connector goes to the 'ANT' pad, outer to any Ground signal on the PCB.

External antenna (thanks to David for the photo)

Next, fit the voltage regulator (marked as IC1 on the PCB legend).
This regulates the 15V feed from the Livebox down to 12V for the RF module. Ensure that the flat side on the component matches the PCB legend.

Operation of the RF module requires the addition of a wire from the Livebox PCB to the HAH PCB. This supplies 15V from the Livebox to the PCB. The PCB has a solder pad (marked '15V' - shown front right on the picture below, more recent versions of the PCB have this connection near the LCD connector, it's marked 'LSP1') - solder one end of the red wire to this. The other end should be soldered to the 15V rail on the Livebox PCB (see RF 15v for details).

Note that R14 is not fitted.

Temperature sensors connect to the 1-wire bus. Solder the a 3pin header to the PCB. Pin 1 on the PCB is Gnd, pin 2 Data and pin 3 Power. Next, fit R7 (4K7 ohms). Then attach the molex-to-3.5mm jack socket connector cable. The black wire on the molex connector is ground and goes to pin1. For longer busses, we recommend that you use Cat5 cables and connectors. A 'Cat5 to terminal block' adaptor works well for making the PCB connection.

Newer versions of the PCB make provision for an on-board DS18B20. This is located at the edge of the PCB, near to the RF module connection point. There is also provision for a schottky diode but not many folks need bother to fit this.

Temperature attach cable orientation

If you intend to use the I2C bus, be sure to fit resistors R9 and R10 (10K ohms), or fit these at the end of your bus.

Next fit the LCD contrast adjustment preset potentiometer (R5). Then fit the LCD IDC connector to the PCB. Here is a close-up of the LCD connector on the PCB. hah_idc_mount.jpg


The LCD requires to be wired to the ribbon cable.
N.B. be sure to check lcd_assembly for details - the wiring for this isn't as obvious as you might think. If you don't see anything on the LCD, do make sure you have fitted and, try adjusting, the contrast potentiometer.

LCD notes how_to_use_cdm_1.pdf how_to_use_cdm_2.pdf

Mega8 pin LCD Pin Name Function
PC0 - 23 4 RS Register Select
PC1 - 24 6 E Enable
PC2 - 25 11 D4 Data bit 4
PC3 - 26 12 D5 Data bit 5
PC4 - 27 13 D6 Data bit 6
PC5 - 28 14 D7 Data bit 7

If you want to control RF devices, the PCB requires 15V to be fed from the main Livebox board. This is used to feed a regulator to source the 12V supply for the RF module on the PCB. The image below shows where this can be tapped. Note that the Livebox case is held closed by four small screws. These have a torx type of head. A T10 sized driver is the best fit.

cimg1827.jpg cimg1828.jpg

The only 1-Wire device that we currently support is a temperature sensor - the Dallas Semiconductor DS18B20, up to 15 of these can be chained to the bus. We use a standard 3.5mm audio plug as extension leads and Y splitters are cheap and readily available to make our bus connectors.

ds18b20 with plug

The 1-Wire bus is exposed on three molex pins on the HAH PCB (PCB legend shows '1-WIRE'). Pin one is clearly marked on the PCB.


  • Pin 1 = GND
  • Pin 2 = DQ
  • Pin 3 = Vcc

We supply a pre-wired three way molex female cable. This has a black wire (Gnd) a white wire (DQ) and a red wire (Vcc). So, when fitting the cable to the PCB pins, the black wire is nearer the middle of the PCB.

The other end of the cable connects to the 3.5mm female connector. You need to strip the cables and solder them to the 3.5mm female part. To ensure that you wire this correctly, it's easiest to plug in the 3.5mm male jack & use a multimeter to check the connections.

3.5mm female wiring:

  • Black wire - GND (base of the 3.5mm jack)
  • White wire = DQ (middle segment of the 3.5mm jack)
  • Red wire = Vcc (tip of the 3.5mm jack)

Then simply solder the DS18B20 onto the male jack the same way (see picture above for pinout).

Resistor R7 is the 1-Wire bus pullup resistor. We supply a 4k7 resistor, but a lower value might give better results on longer busses. When adding extra sensors, it's best to power down the HAH first.

For sample BASCOM code that can read this device have a look at the ds18b20 page.

By chaining a series of Y splitters and extension cables we can cable up a set of temperature sensors.

RJ45/Cat5 can also be used. This is definitely more reliable for longer cable runs. A breakout adaptor makes for easy connection to the HAH PCB. There are various 'standards' for wiring this. Details here for (perhaps) the most common one.

Further RJ45 related connection info here

1-Wire bus design notes

Before Power-up

Before powering up for the 1st time, visually check the HAH PCB for any short circuits. With the Livebox power unplugged, use the MMJ to RJ11 cable to connect the HAH PCB to the Livebox. Apply power. Before inserting the AVR chip, be sure to use a multimeter to check that ~= 5V (4.8V is typical) is present at pin 7 of the IC socket with Ground on pin 8. If you don't get near to 5V or you get something higher than 5V, STOP NOW and investigate.

Start by getting things going without the LCD or the RF Module connected. With power removed, insert the AVR chip (the correct way around) then power up the Livebox and let it bootup. Use xFx Viewer to see that the xAP endpoints on the HAH are visible. If all is well, power down & plug in the LCD. Powering up again should show you the IP address of the HAH after it boots (adjust the trimpot if you don't see anything on the LCD). Once you are happy that all is good, power down again & add the RF module.

  • livebox/assembly.txt
  • Last modified: 2013/04/13 12:37
  • by minerva9