The past few months I’ve been working on a control system for the cabin. Initially I wanted an easier way to turn on and off the video motion detection when I arrived and left the cabin instead of having to boot up the laptop. I wanted to be able to switch it on/off it with my phone. Then I wanted to be able to view the snapshots remotely. And monitor the temperature in the cabin…

Well, you get the idea. The project as it stands today consists of:

  • 2 Control boards, one for the motion detection and to run the local web application (Odroid U3) and one to control all the inputs and outputs (Udoo Quad)
  • 3 temperature sensors (inside, outside, utility room)
  • 8 relays
  • 1 voltage sensor
  • 5 current sensors
  • 2 power supplies (5V and 12V)

Everything is mounted on din rails with a plywood backing.

The web application operates in two modes, local and remote.

In local mode, the web app runs on the Odroid and communicates directly with the motion capture service, also on the odroid, and a web service on the Udoo to control the inputs/output. The web service on the Udoo talks to the onboard Arduino Due via serial. There are also two services on the odroid which upload the camera snapshots and sensor data to the remote version of the web application (via 3G modem).

The remote web application stores the snapshots and sensor data in a database so has access to time series data. Otherwise it functions the same as the local app other than it uses the MQTT protocol to send commands to the local application so it can control everything remotely.

The only feature the local application has that the remote application doesn’t is a live feed from all the security cameras.

Here are photos of the controller being constructed and installed in the cabin.

Here are screenshots of the remote web application.

The plywood base Marking hole locations for the din rails The rails and wiring channels installed The din rail mount relays Temperature sensor connections (1 digital input) The temperature sensors The Odroid and Udoo The entire board layout Wiring the arduino pins to the din rail terminal blocks Yellow for analog and blue for digital Analog input terminal blocks Digital input/output terminal blocks Temp sensors need a pulldown resistor Test of the current sensor module Final testing of the board Test bench and work area Controller installed in utility room Controller installed in utility room Utility room temp sensor installed Needed a second 8 port switch Relays Both power supplies installed Current sensors on four of the relays The bottom of the controller board The top of the controller board The full controller board The main dashboard Motion events for a specific date Snapshot lightbox Events for all cameras Control of the motion detection Relay status/control Temperature sensors Temperature graph (daily) Raw sensor values