Velleman® K8056 8-Channels Relay Board Home Project Home Browse Source Code Downloads Contact

Velleman 8-Relay board K8056 Open source firmware for Velleman® K8056 8-Channels Relay Board.


The project was started after PIC16F630 MCU on my Velleman® K8056 Relay board losts ability to receive any commands. Neither RS-232 nor RF communications were possible - probably due burned out RA3 pin. The MCU code was obviously protected from copying and Velleman's support proposed either to buy a replacement IC or send them new empty MCU for programming. We choose laziest way - reproduce original functionality and share results for free on open source principles.

Replacement firmware, that is proposed to you, mimics all known features of original one - test button functionality, standard communication protocol support both on RS-232 and RF Module. Besides of this it supports programming and executing run-time programs stored in MCU's EEPROM.

Instruction 'W':  program event in run-time program.

Command sequence:
1. CHR$(13)
2. card address (1..255)
3. 'W'
4. program event index (1..42)
5. delay LSB
6. delay MSB
7. relays bitmap (MSB: relay 1, LSB: relay 8)
8. checksum (2-complement of the sum of the 7 previous bytes + 1)

Delay before executing the program entry is counted in 0.1 seconds ticks. Setting delay 0 assumes minimum delay that equal to 0.1 seconds. Events are executed in sequence from 1 to 42 and automatically restarted from event 1 after executing 42-nd one. To make shorter program write special event with delay set to 65535 (LSB:255, MSB:255) - such event will restart the program from event 1. If you do not want restart the program - set corresponding relays bitmap to 255.

Instruction 'R':  start / stop run-time program.

Command sequence:
1. CHR$(13)
2. card address (1..255)
3. 'R'
4. 1 - execute program, 0 - stop it
5. checksum (2-complement of the sum of the 4 previous bytes + 1)

Run-time program may be executed with long (about 3 seconds) press on Test button.

This project hosted and supported by SorceForce