Utility Control Unit

A DIN-rail mountable computer for home automation applications

Similar projects worth following
The need for this project originated from Hendrik-Jan's 3D-printer setup. The printer was running remotely in the shed and was controlled and monitored using octoprint on a raspberry pi 3b. The big amount of cables, using dupont-connectors on the pi's pinheaders needed a better solution. That is why we developed the utility control unit.

This Raspberry Pi Compute Module 4-based PC offers 4 high power outputs, 4 digital inputs, RS485 interface, current transformer input, RGB LED-strip output, up to 4 usb 3.0 ports and 3 usb 2.0 ports, programmable status LED's, and a cooling fan. Off course, the perks that come with the Compute Module 4 like HDMI and gigabit ethernet are also included. The computer sits inside a small enclosure that can be fitted on a DIN-rail, and can be powered by a 12V supply.


The computer is divided in two seperate boards. First there is the mainboard. This is the upper PCB that carries the Compute module 4. The board handles the high-speed interfaces and carries the USB 3.0 host controller, the USB 2.0 hub, ethernet connector and HDMI connector. An SD card can be inserted so CM4's without internal eMMC can be used. 

The mainboard is mounted on top of the utilityboard. This PCB contains an 8 Ampere 5V power supply, RS485 and LED-strip driver circuitry, inputs and (relay) outputs and an input for a current transformer so the power consumption of e.g a 3D-printer can be monitored. In the middle of the utilityboard, a fan is mounted to keep the system cool even under big loads.

Power supply

Many peripherals connected to or implemented on the board, including the compute module need a 5V power rail. To make a stable 5V rail from the 12V input, the Texas Instruments TPS54821 was used. This buck converter can supply up to 8A at 5V. The system has a lot of USB-ports (which will be addressed later). The USB ports to the outside are protected by a power supervisor shutting the port off when a short circuit happens. To each power supervisor IC, 2 USB ports are connected.

Current transformer

Reading out a current transformer can be quiet difficult and can require high sample frequencies and much calculating power. The UCU uses another approach. The current through the transformer is first converter to a voltage over a burden resistor. Then, the signal is buffered, and sent into a dropless rectifier to remain accurate voltage readings. The signal then goes through a peak detector circuit, making a DC signal of the AC waveform that comes in. This DC signal is then sampled by an ADC (MCP3421) without requiring much processing power and high sample rates. The circuit can be made with cheap opamps and still provide decent precision.

USB 3.0 host controller

The VL805 USB 3.0 host controller is used to give the system 4 usb 3.0 ports. The host controller can also be found on the raspberry pi 4. The bootloader for the controller is read from a seperate flash chip at boot. This loads the (proprietary) settings of the controller. Unfortunately, we could not get our hands on the official development documents for the chip, so could not compose our own binary to put on the flash chip. The Pi 4 flash contents also are no good option as the pi only has 2 usb 3.0 ports in use. Instead, we bought a VL805-based PCI card online and de-soldered the flash-ic from the pcb. We then extracted the data from the flash-ic using a raspberry pi and a custom script. We wrote the binaries to our own flash chips and soldered these onto the UCU. All 4 usb 3.0 work with this hack. Due to some bug we have not figured out yet, the system gets stuck in a boot loop when the CM4 is booted with more than 2 devices plugged into the VL805 host controller. Still, it was a nice hack that also kinda worked. :-)

Relay outputs

The 4x 12V output pins of the system are simply open drain connections to ground using N-FET's.


There are 4 signal inputs on the system, of 2 different types. The first type of input is realized with a comparator set to a certain threshold. When the voltage on the input-pin with respect to GND goes above the set threshold, the input turns on. The second type of input uses a diode bridge and optocoupler to allow reverse voltage inputs and voltages referenced to something else then system GND.


The RS-485 functionality uses a USB 2.0-port of the pi. An CH340 USB-TTL uart converter is connected to this port. The TTL levels are then converted to RS-485 levels. The RS-485 output also has a fused 12V pin to power peripherals.

Status LED's

On top of the system, there are 12 LED's peaking outside through a light pipe. 8 of the LED's are connected to a shift-register and can be controlled from the CM4. The system also has a buzzer.

USB 2.0 hub

The system has the...

Read more »


Schematics of the test jig that was built to read back and program the VL805 firmware flash IC

Adobe Portable Document Format - 38.80 kB - 04/18/2022 at 09:17


Adobe Portable Document Format - 1010.16 kB - 04/18/2022 at 09:01


Zip Archive - 965.05 kB - 04/18/2022 at 09:01


Zip Archive - 368.12 kB - 04/18/2022 at 09:01


Adobe Portable Document Format - 406.60 kB - 04/18/2022 at 09:01


  • Design files

    Hendrik-Jan04/18/2022 at 09:03 0 comments

    Schematics and gerbers of the utility control unit have been added to the project. Meanwhile, the system has been running smoothly since it went up.

View project log

Enjoy this project?



vileer wrote 03/02/2023 at 07:55 point

Hi, I am working on a project using the VL805, and based on your schematic, could you release the firmware you dump from the VL805-based PCI card or point me out the part number of the card?

  Are you sure? yes | no

baukespoelstra wrote 03/02/2023 at 18:06 point

binaries and program used to flash are on github:

  Are you sure? yes | no

vileer wrote 03/03/2023 at 05:00 point

Thanks for the information.

  Are you sure? yes | no

ffindog wrote 11/02/2021 at 12:21 point

sweet looking project! Do you plan on releasing the files for the pcb’s?

  Are you sure? yes | no

Hendrik-Jan wrote 11/03/2021 at 14:26 point

Thanks! We are definitely planning on releasing the design files and software written for it, but the schematics still look a bit messy and more documentation on the project still needs to be added.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates