ayatec logo
Home Store Blog Contact
unicontrol user guide by ayatec
Home Store Blog Contact

Topics

  1. Welcome
  2. Getting started
    1. What is unicontrol
    2. How it works
    3. Connectivity
    4. Integration options
    5. Default hardware
    6. Hardware extensions
    7. Special sensors
    8. RGB driver
    9. Audio driver
    10. Network API - HTTP
    11. Network API - MQTT
    12. Network security
    13. Downloads
  3. Web Interface
    1. Processes
      1. Process
      2. Name
      3. Main state
      4. Initial state
      5. Display
      6. Constraints
        1. Process timer
        2. Variable contraints
        3. Force output
      7. Input
        1. Input source
        2. Channel
        3. Control period
        4. Value
        5. Publish
        6. Frequency
        7. Subtopic
      8. Events
        1. On/Off event
        2. Condition
        3. Idle/running time
        4. Delay on/off
        5. Fade in/out
        6. High/low input
        7. Mid point/Tolerance
        8. Out on when
      9. Output
        1. Primary output
        2. Action
        3. Type
        4. Invert
        5. Duty cycle
        6. Mem value
        7. High/low output
        8. Folder/Track
        9. RGB mode
        10. RGB color
        11. RGB brightness
        12. RGB speed
        13. Publish
        14. Subtopic
        15. Secondary outputs
      10. Cycle
        1. Cycles
        2. High/Low phase
      11. On/Off button
    2. Peripheral
      1. Hardware
      2. Type
      3. Calibration
      4. Mapping (edit)
      5. IR remote (edit)
      6. Impulse_counter (edit)
      7. RGB driver (edit)
      8. DS18B20 (edit)
    3. Device
    4. Network
    5. System
    6. License
  4. Tutorials
    1. First boot
    2. First process
    3. Connect to MQTT
    4. Process sequencing

    5. DIY Project: Bath Fan

In this article

  • Introduction
advert
unicontrol > Getting Started > Hardware extensions

Hardware extensions

The unicontrol lets you take advantage of a wide variety of hardware configurations, but there are still situations and applications where the default set of peripherals are not sufficient. You may extend this using a combination of correct wiring and set-up in the In-out menu by:

  • Shift register with up to 9 additional digital outputs,
  • Analog multiplexer with up to 7 additional analog inputs, and
  • TFT Display.

Shift Register

The basic ESP8266 I/O set-up may be enhanced by additional digital outputs using a Shift register. Currently the only supported and tested hardware configuration is with a 74HC595 integrated circuit.

74HC595 pinout

Shift register in unicontrol is activated automatically once the following selections are made in the In-out menu:

  • SR - SRCLK for D5,
  • SR - SER for D7, and
  • SR - RCLK for D8:
Shift register set-up in unicontrol

Upon activation, RE1 through RE12 digital outputs appear as available choice in the Input source, Output and Variable constraints drop-down menus.

Please note that RE1 - RE12 outputs are slow (only refreshed several times per second) and are not capable of PWM. This makes them unusable for applications dependent on PWM like LED dimming. You may, however, easily use them for simple HIGH/LOW output applications like controlling a relay.
Although the RE1 - RE12 are pure outputs and cannot serve as external inputs, their output state can be used as an artificial input in another processes or constraint.

Available configurations

There are two possible configurations related to using the 74HC595 unit. The first option is to only use one 74HC595 which, as seen on the diagram, unlocks the RE1 through RE8. Adding the second unit will further expand the set-up capabilities by RE9 - RE12 outputs and an analog multiplexer (pins A, B and C)

74HC595 wiring diagram

In the software configuration these two cases are not differentiated as unicontrol always assumes both units are connected. In case of only one unit available, using outputs RE9 - RE12 will have no effect and inputs I1 - I8 will all return same A0 value.

Please note that the second unit of 74HC595 is only appended to the first one and shares no direct wiring with the ESP8266 board.

Analog multiplexer

By activating the Shift Register, an Analog multiplexer becomes automatically available as well. This expands the analog input capabilities from a single A0 pin to 8 independently monitored analog channels I1 - I8. While the officially supported is the CD4051B multiplexer, any multiplexer with at least 8 channels may be usable for this purpose.

CD4051B pinout
A, B and C of the CD4051B unit are the wiring counterparts to the equivalently labeled pins of the second 74HC595 module.

For the correct wiring, please follow the diagram below together with the diagram of the Shift Register. Please note that both register units need to be connected as a pre-requisite for the Analog multiplexer.

CD4051B wiring diagram

As long as the Shift Register is enabled no additional software configuration is needed for the multiplexer pins I1 - I8 to be readilly available for use in the Input source, Output and Variable constraints drop-down menus as well as in the In-out menu.

Analog multiplexer pins listed in the In-out menu

TFT Display

To obtain a permanent overview of the system and processes it is possible to connect and utilize a standard TFT display. Any monochromatic 128x64 display communicating with a I2C protocol should be compatible and follows the wiring below:

I2C display wiring diagram

The display is activated in the software automatically once the following selections are made in the In-out menu:

  • Display - SCL for D1, and
  • Display - SDA for D2.
*As of version 1.07 this is the default setting.
Display set-up in unicontrol

Activating a display will start a loop in which the module repeats indefinitely a set of information screens with crucial information about module's operation like WiFi and MQTT connection status, system clock and more:

Display connection status
Display system status

Outside of the regular loop, display will also show alerts of important system events like connection or disconnection of the WiFi, subscribing to MQTT etc.

Display system alert

Activating a display also unhides a Show display option in the Process menu. Enabling this will include basic information about the selected process into the display loop, notifying about current input and output:

Display process info screen

Change of the output state will then also trigger an alert:

Display process alerts
Use this to highlight the most important process(-es).
© 2024 ayatec.eu • Found a mistake?  Let us know!