Being a narrowboat owner I wanted to add some interfaces to Venus OS Rpi Project to:
- take more temperature readings
- provide tank level interfaces
- read temperature and humidity using a rugged sensor (illustrated below)
- Keep the size down as space is always limited on a boat.
The following has been tested on Rpi 3B+ and Venus OS 2.42 in Feb 2020
This post details the hardware I have constructed (software configuration to be posted elsewhere)
1)
Take a RaspberryPi, Touch Screen, Smart Touch 2 case, + 15 mm back box
Fit a custard pi 3A HAT and a ribbon cable header as shown here:
NB the Custard Pi 3A uses the mcp3208 analogue interface board, other boards are available which use this interface chip and could probably be used. The Custard pi 3A is fitted with a 2.5v reference shunt. Research has indicated that the 3.3v on the Rpi is known to be stable and well regulated, therefore the 2.5v shunt was removed and a 1.2k resistor fitted instead. This resistors then forms a voltage divider with the 1k resistor already fitted on the HAT producing 3.3*1.2/2.2 = 1.8 v which should be as stable as any other 1.8v reference method.
The ribbon cable picks up 3.3v / 5v / GND and the i2c Data and Clock signals from the GPIO header which is piggy backed on the Custard pi board. 8 wires of the ribbon cable (not connected to the GPIO header) are connected to the analogue inputs.
This all fits inside the screen mount and back box like this:
NB for long term use I will put a little protection round the ribbon cable.
The display will be hinged from the roof of the electrics cupboard so out of the way until lowered to view the display.
2) I constructed the CAPE circuit in a box about 8x4x2 cm it looks like this:
The device connected is an i2c device the 16 holes for connecting the 8 analogue inputs can be seen. The holes in the top provide access to the screws on the terminal strips. Once installed a sticker will be placed over the screw access holes to protect the box from dirt and dust. The holes in the side are a tight fit for bootlace ferules used to terminate the cables. (I will temporarily connect a temperature sensor inside the box on one of the analogue inputs to check for temperature rises inside)
Inside the box the circuit is constructed to replicate the published CAPE circuit like this:
The construction is based on a matrix with each of the 8 inputs running vertically in this picture, on the underside of bottom board, and horizontal busses mounted above the components for GND, vClamp and 5v.
Most of the components are sandwiched in between two boards, mounted vertically like this:
You can see the following which are mounted vertically:
- Capacitors to a GND bus bar
- Schottky diodes to a GND bus bar
- Schottky diodes to a vClamp bus bar
- Pull down resistors to a GND bus bar
The series 10k resistors can be seen mounted across the board. The vClamp regulator can also be seen.
The pull up resistor on the inputs are fitted in a similar manner but are not shown in this image.
The i2c connections are fed directly across between the input and output side of the box.
This has all been tested and appears to be working ok.
Next steps
This provides a stable and robust platform to use for software development and testing before installation.
I am aware of the project to produce a commercial Venus OS Rpi HAT by @Rob Duthie and for many that will be the way to go but for me I wanted to get to grips with how everything works by constructing this.