peet.za.net

ctrl-ocp-1 (Controller Office Cabinet Power 1)

Initial thoughts

This is not a pretty device. I did not have a proper enclosure and had to cannibalise a DC-DC converter - which is really small.

There is no disconnect should the battery run low. This is an issue as the battery is very expensive.

Everything is crammed inside, there's really not a lot of space.

Given my tremors and twitches the square hole for the voltage display isn't really square at all.

Measurements

Real-time:

Hardware

The chassis is a non-functioning DC-DC "mini-UPS" powerbank that was stripped.

It has an ESP8266EX microcontroller with a Tensilica L106 32-bit cpu running at 160Mhz, with 4MB of flash memory.

Generic 3A variable DC-DC converter (used to convert 12V input to 5V output).

Front

The 3-digit 7-segment display shows the voltage of the input line.

The RGB LED that indicates the device status. It is simply used as:

Yellow LED: Something is using power via the 5V connector.
3 Green LEDs: One for each 12V DC female jack, also indicates if something using power via that connector.

Back

Input: 12V screw terminal connector.

The selector switch and the USB port is not in use.

Output: 3 (salvaged) female DC jacks in the rear, each running through an INA219 Voltage/Current/Power sensor, all of which are connected to the ESP8266 via a single I2C bus.

Output: dual 5V screw terminal connectors, also on an INA219.

Inside

As you can see everything is glued together very well. This is purely to secure the boards and wires, to make sure it doesn't move and cause a short.

Completed project

Initial installation location in the 9U cabinet.

Permanent residence in cabinet, between the two nuc boxes. The TP-Link switch above the controller is the one that stopped working, and now houses ctrl-hcp-1, the home 12V distribution box.

Prophet functionality

The ESP controller has an HTTP server, providing the following information on request in real-time: WiFi RSSI, Free Heap memory, all 4 INA219 sensors Voltage, Current and Power.

The fullowing information is pushed to Prophet:

Standard for all controllers, $IP/reboot reboots the controller, $IP/disable disables the controller by going into an infinite loop.

Thoughts

Concerns, missing things, etc

The device has no way to shutdown the load if/when the battery gets low. It needs relays for the 12V and 5V output (ESP should still be powered). ESP would then set all LED states to error, and go into deep sleep. Possibly wake up every couple of minutes (without wifi) to check voltage.

Ideally this device should act as a UPS and notify the nucs and router when it's about to disconnect the load, to allow for proper shutdown. Either via USB or probably more easier nut.

There is no protection, power switch or reset switch. It should have at least a fuse and power switch in front, and possibly a reset switch at the back. The DC DB board does provide the required protection, but it can't hurt having more

The case is very small, more space would be useful.

A rack-mount case would be ideal.