Skip to content

Commit

Permalink
docs: enhanced and fixed multiple chapters
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio Nold committed Mar 6, 2021
1 parent 14d00e5 commit 8ee6d67
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 9 deletions.
18 changes: 12 additions & 6 deletions docs/docker/DockerSetup.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
MQTT Broker Docker Setup
========================

Variant
-------
Docker Guest OS
---------------

Docker eclipse-mosquitto

version 1.6, no SSL because of certificates


Host Persistend Directories
Host Persistent Directories
---------------------------

Make directory for :code:`/Container/eclipse-mosquitto-16`
Expand Down Expand Up @@ -65,7 +65,13 @@ Shared Folders:
HTTP server for the Web App
---------------------------

Offical nginx
.. note::

The MQTT broker could also provide some files via http but is made too simple as the
mime types cannot be configured. So JS files will not be interpreted by the browers.
Therefore an nginx is used here to provide the web app files.

Docker OS used: offical nginx

Name: nginx-safechicken
CPU Limit: 10%
Expand All @@ -88,8 +94,8 @@ chown nginx:nginx .
chown nginx:nginx -R ./*


MQTT Client
-----------
MQTT Client for Testing
-----------------------

Proposed client: https://mqtt-explorer.com/

Expand Down
33 changes: 33 additions & 0 deletions docs/hardware/control_components.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Door Control Hardware
=====================

Parts
-----

.. table:: Hardware Components

== =================================== ===================================
Expand All @@ -19,6 +22,8 @@ Door Control Hardware
9 green LED 11 mA + resistor 82 Ohms MQTT connection to broker working
== =================================== ===================================

Connections
-----------

Raspberry GPIO connection:

Expand All @@ -40,6 +45,34 @@ This I/O configuration can be found on the Python/Raspberry side as *config.json
}
}
Outdoor Case
------------

The Raspberry is enclosed in a case which is waterproof so there will not be any condensed water. It's good enougth to control the relays.

.. image:: Raspberry_in_case.JPG

Electrical Considerations
-------------------------

Some notes about the electrical possibilities and limitations of the Raspberry 3+4:

- the GPIO devices must not consume more than 50 mA altogether
- one single GPIO output must not consume more than 16 mA
- Some outputs have a pullup and others have a pulldown behavior. If we choose the wrong behavior the startup or a reboot
of the system lets the output relays switching unexpectedly. A pullup output sets the output to high until the application
has been started which could be a big problem. For this project this means that the door will open or close on each
startup which is an unwanted operation of the door.
- So the relay outputs have to be connected to GPIO 5 and 6 which have a pulldown resistor. A reboot of the system will not lead
to an unwanted switch of the relays.
- GPIO power considerations this project:

- Estimated limiting resistor for testing: (3.3V (measured output) - 1.7V (typical LED voltage))/20mA = 80Ohms
- Voltage measurement of the used LED (limiting resistor 82Ohms): I=11mA (measured), R=82Ohm => U=R*I=82Ohm*0.011A=0.9V (limiting Resistor)
- so a limiting resistor of 82 Ohms fits here for both LEDs used.
- Relay coils: nominal power=0.2W, resistance=125Ohms => I=U/R=3.3V/125Ohms=26.4mA

.. note::

The coil current consumption is too high (26.4mA instead of 16mA) but it's only for 2 seconds so this should
damage nothing.
4 changes: 2 additions & 2 deletions docs/raspberry/base_setup.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Raspberry Base Setup
====================
Raspberry Pi Base Setup
=======================

OS Installation
---------------
Expand Down
6 changes: 6 additions & 0 deletions docs/raspberry/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ Or in Python:
print('timesync working')
else:
print('timesync NOT working')
Output Signals
--------------

The door open and door close signals are both an **impulse of 2 seconds** each which let the door motor electronics
activate its motor on the requested side.
4 changes: 3 additions & 1 deletion docs/webapp/webapp.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Web Application
===============

The web application's functions are generally described in the overview page already.
The web application's functions are generally described in the index and overview pages already.

Here are some technical details:

Expand All @@ -10,4 +10,6 @@ Here are some technical details:
- `Bootstrap UI <https://getbootstrap.com/>`_ components
- self-created simple communication adapter between MQTT and bootstrap html components

As the web app uses bootstrap containers it's responsive and looks good on multiple devices. On a desktop it looks like this:

.. image:: WebAppDesktop.png

0 comments on commit 8ee6d67

Please sign in to comment.