Atom Hydrogen Setup guide

1. Creating a configuration file

1.1 Connection web-server

web_server:  port: 80

1.2 Prefill sntp-servers

time:  - platform: sntp    id: sntp_time    servers:      - 0.pool.ntp.org      - 1.pool.ntp.org      - 2.pool.ntp.org

If you are using an OLED display

1. Initialize the I2C bus

i2c:  sda: 21  scl: 19  scan: True

2. Install fonts

To do this, upload the desired font files in *.ttf format to the user's root folder. Next, add them in the configuration file.

font:  - file: 'arial.ttf'    id: font1    size: 16  - file: 'arial.ttf'    id: font2    size: 35  - file: 'arial.ttf'    id: font3    size: 14

2. Connect the display and create an image design

An example of display settings with the display of the manufacturer's name of the controller, the current time and readings of 2 temperature sensors.

display:  - platform: ssd1306_i2c    model: "SSD1306 128x64"    address: 0x3C    update_interval: 3s    lambda: |-      it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "i3 Engineering");      it.strftime(0, 55, id(font2), TextAlign::BASELINE_LEFT ,"%H:%M", id(sntp_time).now());      if (id(temp1).has_state()) {        it.printf(127, 23, id(font3), TextAlign::TOP_RIGHT ,"%.1f°", id(temp1).state);        }      if (id(temp2).has_state()) {        it.printf(127, 60, id(font3), TextAlign::BASELINE_RIGHT ,"%.1f°", id(temp2).state);        }

1.3 Inputs settings

The entire list of equipment available for connection to the controller inputs, with the corresponding settings in the configuration file is presented on the ESPHome project page.

1.4 Outputs settings

    • Input type / Input number

    • 1-2

    • 3-6

    • 7-8

    • 9-12

    • Input type / Input number

    • Input type / Input number

    • 1-2

    • 1-2

    • 3-6

    • 3-6

    • 7-8

    • 7-8

    • 9-12

    • 9-12

    • analog input

    • +

    • +

    • -

    • -

    • Input type / Input number

    • analog input

    • 1-2

    • +

    • 3-6

    • +

    • 7-8

    • -

    • 9-12

    • -

    • digital input

    • +

    • +

    • +

    • +

    • Input type / Input number

    • digital input

    • 1-2

    • +

    • 3-6

    • +

    • 7-8

    • +

    • 9-12

    • +

    • digital output

    • +

    • -

    • +

    • +

    • Input type / Input number

    • digital output

    • 1-2

    • +

    • 3-6

    • -

    • 7-8

    • +

    • 9-12

    • +

    • digital interface

    • +

    • -

    • +

    • -

    • Input type / Input number

    • digital interface

    • 1-2

    • +

    • 3-6

    • -

    • 7-8

    • +

    • 9-12

    • -

    • optocoupler mode (selected by jumper)

    • +

    • +

    • +

    • +

    • Input type / Input number

    • optocoupler mode (selected by jumper)

    • 1-2

    • +

    • 3-6

    • +

    • 7-8

    • +

    • 9-12

    • +

Actuating devices that can be connected to the outputs of the controller, and their number, can be selected depending on the model of the controller.

    • Output type / Atom name

    • Hydrogen

    • Ferrum

    • Argon

    • Neon

    • Helium

    • Carbon

    • Output type / Atom name

    • Output type / Atom name

    • Hydrogen

    • Hydrogen

    • Ferrum

    • Ferrum

    • Argon

    • Argon

    • Neon

    • Neon

    • Helium

    • Helium

    • Carbon

    • Carbon

    • Connectors for modules

    • 8

    • -

    • -

    • -

    • -

    • -

    • Output type / Atom name

    • Connectors for modules

    • Hydrogen

    • 8

    • Ferrum

    • -

    • Argon

    • -

    • Neon

    • -

    • Helium

    • -

    • Carbon

    • -

    • Relay 5A

    • 2

    • 2

    • 18

    • 4

    • 2

    • 2

    • Output type / Atom name

    • Relay 5A

    • Hydrogen

    • 2

    • Ferrum

    • 2

    • Argon

    • 18

    • Neon

    • 4

    • Helium

    • 2

    • Carbon

    • 2

    • Relay 10A

    • -

    • 8

    • -

    • -

    • 2

    • -

    • Output type / Atom name

    • Relay 10A

    • Hydrogen

    • -

    • Ferrum

    • 8

    • Argon

    • -

    • Neon

    • -

    • Helium

    • 2

    • Carbon

    • -

    • Relay 16A

    • -

    • -

    • -

    • -

    • -

    • 6

    • Output type / Atom name

    • Relay 16A

    • Hydrogen

    • -

    • Ferrum

    • -

    • Argon

    • -

    • Neon

    • -

    • Helium

    • -

    • Carbon

    • 6

    • AC dimmers

    • -

    • -

    • -

    • -

    • 3

    • -

    • Output type / Atom name

    • AC dimmers

    • Hydrogen

    • -

    • Ferrum

    • -

    • Argon

    • -

    • Neon

    • -

    • Helium

    • 3

    • Carbon

    • -

    • MOSFET (DC <48V)

    • -

    • -

    • -

    • 8

    • -

    • -

    • Output type / Atom name

    • MOSFET (DC <48V)

    • Hydrogen

    • -

    • Ferrum

    • -

    • Argon

    • -

    • Neon

    • 8

    • Helium

    • -

    • Carbon

    • -

The following interchangeable modules are available for the Atom Hydrogen Black Edition controller: relay 5A, DC MOSFET 48V 5A, 0-10V PWM.

Important! In the I / O configuration, the GPIO port numbering of the ESP32-PICO-D4 chip or the MCP23017 port expansion chip is specified, not the numbering of the physical pins of the chips or the numbering of the inputs / outputs of the controller. The table of correspondence between GPIO ports and inputs / outputs of the controller is given in correspondence of inputs / outputs with ESP32 GPIO ports table

1.5 Examples of appointments

GPIO27 ESP32 port

binary_sensor:  - platform: gpio    name: "IN1"    pin: 33

GPIO8 MCP23008 port

   - platform: gpio    name: "IN9"    pin:       mcp23xxx: mcp23008_hub      number: 4      mode: INPUT_PULLUP      inverted: True

2. Connecting the equipment

2.1 Connecting inputs

Connect sensors, switches and other devices to the inputs of the controller. Inputs of the controller connectors are with spring-loaded contacts, which provide convenience and reliability of connection of conductors with a cross section up to 1.5 mm2.
Important! The inputs are numbered and each input has a "common" output marking (marked with the letter "G"), which is connected to the "minus" of the power supply.
3.3V and 5V controller outputs are provided for power supply of sensors. If the system uses sensors or actuators with a different operating voltage, use additional power supplies or the power supply that powers the controller.
By default, all inputs with jumpers are configured in "Optocoupler" ("OP") mode. This is necessary if switches, discrete sensors or other devices are connected to the controller, which due to the specifics of operation, large length of the connection cable, other potentially dangerous factors can generate voltage values ​​exceeding 3.3V at the input of the controller. If analog sensors or a bus with 1-wire devices are connected to the input, the input will be used in digital output mode, the inputs must be reconfigured to direct signal mode. To do this, use a flat-blade screwdriver to remove the front panel of the controller, remove the input display board, and switch the required jumpers on the input board to the “Dir” position.

Illustration

3.2 Connecting outputs

Connect the 220V phase and neutral conductors to the "L" and "N" connectors.
Connect the devices controlled by the controller to the outputs. Each output is implemented in the form of a 2-pin connector with screw terminals. One of the contacts is labeled "OUT". The load is connected according to the type of output.

After connecting all devices, you should check their operation. It is convenient to use input and output indicators for this.

Illustration

Input indicators - show the status of each input;OLED display - for monitoring and adjustment, display of system parameters of the device, information from sensors.

Illustration

Output status indicator - red LED that displays the active output status of the controller;
Output type indicators - the color of its glow corresponds to the output type:
Yellow - Triac or AC MOSFET
Blue - DC MOSFET
Green - Relay

3. Automation configuration

The purpose of any automation system is, obviously, the ability to configure all devices to work according to certain rules and algorithms. The simplest option is to turn on the lamp when you press the switch.

The algorithm example

switch: - platform: gpio    pin: GPIO3    name: "Lamp in the living room"    id: Lamp1
binary_sensor:  - platform: gpio    pin: GPIO4    name: "Switch in the living room"
on_press:      then:        - switch.toggle: Lamp1

In this case, a switch called “Living Room Switch” is connected to the GPIO3 output of the ESP card, and the “Living Room Lamp” control relay connected to GPIO4 changes its state (on or off) each time the switch is pressed.

Important! To properly configure automation, you do not need to re-describe the devices connected to the controller, as it is assumed that this procedure has already been completed. You only need the switch configuration, which looked like

binary_sensor:  - platform: gpio    pin: GPIO4    name: "Switch in the living room"

add code lines that are responsible for the lamp's response to a click:

 on_press:      then:        - switch.toggle: Lamp1


In the ESPHpme system it is possible to configure a lot of similar algorithms (automations) using different devices, different logic of their work, using groups of devices and a large number of options for relationships between devices.
Examples of automation implementation

4. Additional information

4.1 Examples of configuration files for Atom Hydrogen

IN1 - ADCIN2 - WS2811 LED-stripIN8 - DS18B20 temperature sensorOUT2 - DCD moduleOUT5 - ACD module

4.2 Examples of implementations of various functions

Example link

Do you have a question?

Fill out the form and we will contact you soon!

Thank you!

We will contact you soon!

Can't send form.

Please try again later.