-
Notifications
You must be signed in to change notification settings - Fork 7
Home
System for measuring and displaying various values in caravans and motor homes, including climate values, filling levels and levelling data. Magic Mirror is used for presentation.
(go directly to the Installation Guide)
This project is currently under development!
In a caravan or motorhome there are a number of measuring points. In many cases the measured values are even displayed. Normally the different systems are independent from each other and supply separate displays. With this project the different measuring points are to be evaluated via one system (Raspberry Pi) and displayed elegantly and configurably.
The following data points are to be read in or created:
- Climate data (temperature, air pressure, humidity) inside and outside the caravan or motor home
- Temperature data in the refrigerator, preferably at different levels in the refrigerator
- Filling levels of fresh water and waste-holding tank
- Filling level of the gas cylinder via a scale
In addition, the horizontal position of the caravan or motor home should be determined and suitably displayed. A series of RGB LEDs at the corners of the caravan near the corner steadies will indicate in which direction the caravan or motor home needs to be cranked.
The entire project is based on a Raspberry Pi 3 Model B+ with various sensors and corresponding software. Of course you can also use other components than the ones listed here. The brand names are only examples.
I used the following sensors for my setup:
- Single point load cell for weighing the gas cylinder (Bosche H10A for 20 kg)
- hx711 for evaluating the signals from the load cell (ARCELI CJMCU-711 HX711)
- ADXL345 Triple-Axis Accelerometer to determine the position of the caravan (Adafruit ADXL345)
- BME280 Barometric sensor for temperature, humidity and air pressure (AZDelivery GY-BME280)
- DS18B20 Temperature sensor encapsulated in stainless steel AZDelivery 1M Cable DS18B20
- RGB LED to indicate the tilt angle
- various buttons, resistors, diodes
Different Python scripts are used to read out the different sensors. They read out the values and write them to different files with current time stamps. Thus, on the one hand, the current value display is possible and on the other hand, history data can be graphically displayed in a later expansion step.
For the display of all information the grandiose software MagicMirror is used. This software, which runs on modules, can be designed very flexibly and also comes with a number of existing modules that can usefully supplement the display in the caravan and motorhome. For the display of the sensor data own MMM modules (MMM-Caravan) were developed.
The horizontal position of the caravan is determined by the 3 axis accelerometer. This shows the respective acceleration due to gravity for the axes x, y and z in m/s². Knowing that the maximum acceleration displayed per axis is approx. 10.3 m/s², these values can be used to determine the position angle for the longitudinal and transverse axes of the caravan.
Due to the dimensions of a medium to large caravan, the angles result in the respective corrections at the corners of the caravan, which are displayed there by means of RGB LEDs. In order to be able to perceive the displays inuitively, I have chosen the display color blue (= sky) for a too high position. A too low position of the corner is indicated as green (= meadow). A position close to the horizontal position is displayed as yellow (= attention as with traffic lights). The horizontal position itself is displayed as white.
Due to the construction with a GPIO Extender, only the 8 mixed colors from the basic colors of the RGB LEDs can be used, since the Extender does not support PWM.
I have provided a total of 7 RGB LEDs on the caravan:
In this illustration I have replaced the "white LED" with a "red LED" so that it can be perceived better. Red here means horizontal.
Four LEDs indicate the position at the four corners of the caravan. Two LEDs indicate the position of the caravan on the axis in transverse direction. And one LED indicates the position of the caravan on the drawbar in the longitudinal direction.
The alignment of the caravan can be done as follows using these 7 LEDs:
- First, the caravan is brought into the horizontal position by lifting one of the tyres, e.g. with a [lifting cushion] (https://www.emukairlift.de/) in the transverse direction.
- The caravan is then brought into the horizontal position in both directions via the nose wheel in the longitudinal direction.
- Now the four corner steadies can be tensioned. The LEDS at the four corners will help.
The position determination is designed for caravans. However, it can certainly also be adapted for campers with minor modifications.
The repository MagicMirror describes the installation of a Raspberry Pi incl. the MagicMirror base very well. Please use this manual.
CaravanPi - smart Caravan based on Raspberry Pi
(c) Josef Spitzlberger, Schloss Lustheim, Munich, Germany, 2019ff
CaravanPi Wiki
- Testaufbau
- Raspberry Pi OS installieren und initial konfigurieren
- MagicMirror installieren
- CaravanPi Skripte installieren
- MagicMirror vorbereiten & updaten
- OBSOLET V2 - Bottle Framework installieren
- Ein-/Aus-Schalter installieren
- Bewegungsmelder installieren
- Hupe/Buzzer installieren
- weitere Taster installieren
- OBSOLET V2 - Konfigurations-Website einrichten
- Temperatur Sensoren installieren
- Temperatur Sensoren anzeigen
- Gasflaschenwaage HX711 installieren
- Gasflaschenfüllstand anzeigen
- mehrere Gasflaschen Waagen anschließen
- I2C-Bus einrichten
- Klimasensor installieren
- Klimasensor BME280 anzeigen
- Klimasensor BME680 anzeigen
- GPIO Ports mit MCP23017 erweitern
- Lage-Sensor installieren
- Lage-Sensor anzeigen
- I2C Extender - langes Kabel
- Tank-Füllstände auslesen
- LEDs zur Lageanzeige
- RGB-LEDs am MCP23017 betreiben
- LED Einbau im Testaufbau
- Caravan ausrichten im Testaufbau
ab hier altes WIKI, muss noch umgezogen werden
XX = in Bearbeitung NEU = neue Funktion in letzter Version
- Stromversorgung Grundsätzliches
- Testgerät bauen
- Verkabeln am Caravan
- Gasflaschen-Waage bauen
- LEDs am Caravan anbringen
- Temperaturfühler im Kühlschrank anbringen
- Klimasensoren innen & außen anbringen
- Stromversorgung Raspberry Pi
- Stromversorgung Monitor
- WLAN im Caravan
- CaravanPi in Betrieb nehmen
- Gasflaschenwaage in Betrieb nehmen
- Defaultwerte für Lage, etc eintragen
- NEU XX Vorüberlegungen
- NEU XX MariaDB installieren
- NEU XX CaravanPi Datenbank anlegen
- NEU XX phpmyadmin installieren
- NEU XX Grafana installieren
- NEU XX Grafana auf MagicMirror anzeigen
- NEU XX Pythonzugriff auf MariaDB
- NEU XX Problembehandlung MariaDB, Grafana
- NEU XX Vorüberlegungen
- NEU XX Flask installieren
- NEU XX Status-Website einrichten
- NEU XX vorhandene Websites migrieren
- NEU XX 230V Eingang prüfen
- NEU XX 12V Batterie prüfen
- NEU XX Gassensor