Wiren Board 6: again on Habré with a new version of the controller for automation

Hello!

Today we will tell about a completely new version of our controller for automation, smart home and all that. Below is a detailed technical overview of the device.




Brief about the controllers Wiren Board
The Wiren Board Controller is a device that operates as a central controller in an automation or monitoring system.

For example, in a “smart building” the controller can control lighting and climate control, take readings from climate sensors and security sensors. For this, the controller supports various external devices, executes rules and scripts, stores and beautifully displays data.

The controller runs on Linux, has many built-in wired and wireless interfaces for communicating with external devices and the outside world.
Modular controller - I / O modules (relays, dry contact inputs) are docked on the side, expansion modules are inserted inside — additional RS-485, RS-232 ports, etc.

Naturally, all this is industrial-grade: a DIN rail enclosure, a large input power range, a wide temperature range, reliable memory, protection of all ports, etc.

Why we have released a new version


The times are difficult now: in order to blink with a LED, the clock frequency is often indispensable without a gigahertz. But seriously, the performance of our previous Wiren Board 5 with ARM9 was enough for almost all tasks, but only with our software written in C ++ and Go.

We wanted to give users more flexibility - so that you can use demanding memory and processor applications without any problems.

The main change in Wiren Board 6 is the new NXP i.MX 6ULL ​​processor with one Cortex A7 core at 800 MHz and 512 MB of DDR3 RAM (in WB5 there was a Freescale i.MX28 454 MHz ARM9 and DDR2 128 MB).

The controller has become several times faster: in addition to the actual increase in the clock frequency, the use of a more efficient (in terms of MHz) core architecture also plays a role. In i.MX 6ULL ​​there is a hardware FPU - in some applications that save and process data, this has given a significant performance boost.

The new processor allowed to use the latest versions of Node.js (the architecture of the previous processor was not supported in the V8 engine), use Node-RED and install ready-made software for Raspberry Pi without recompiling.

In general, from the point of view of development and choice of software, Wiren Board 6 has moved from the category of “embedded hardware” to the category of “a regular computer with Linux, but with many interfaces”.

A couple of words about why not 8xCortex A53@2.2GHz we chose the processor more slowly than in the new TV set-top boxes or in the fresh Raspberry Pi. i.MX 6ULL ​​is a modern (2017) processor for industrial embedded systems. It has a very low power consumption - and therefore it is almost not heated. But at the same time the permissible operating temperature of the core is as much as 105 ° C. This is important for us, because Wiren Board usually stand in closed cabinets without any cooling. In the cold, the controllers also work, the minimum temperature of all components is minus 40 ° C.

Also, this processor has excellent support in the mainline Linux kernel, and the manufacturer guarantees its production at least until 2026.



Other changes in the controller


Wiren Board 5 controllers had several hardware revisions, which can be used to trace the evolution of the device. There are quite a few differences between the latest revision and the first:


Wiren Board 6 has added more changes:


Internal changes:

  1. Altered the power scheme (again? How much can you, Karl?). Now it looks like this:



    Advantages of this scheme:

    - the main consumption in the controller is on line 5B. Efficiency with a large load (many side modules, external sensors, etc.) is higher;
    - if you install our backup power supply module inside the controller, then if there is no external voltage, 11 V is supplied to the Vout terminal block. This allows operation of several devices connected via RS-485;
    - the output can be switched on and off programmatically, which is useful in order to remotely reboot the connected peripherals of different manufacturers via power supply.
  2. Software switchable stretch RS-485 lines. Weak resistor "stretching" of lines is needed to set a fixed logic level on the bus when no device transmits data. It is necessary to disable “stretching” (failsafe bias intelligently) if several controllers are connected to the bus, for example, when the Wiren Board operates as a Modbus slave.
  3. Smart keys instead of transistors at terminals A1-A4: with protection against short circuit and overheating, and current limiting.

Expansion Modules


I / O modules (these are modules with additional inputs and outputs that connect to the controller on the side) were left the same as before, but the expansion modules decided to redo it.



Pinout expansion connector. On the left - as it was, on the right - as it became.

In WB5, the signals with margin were output - power, UART, I2C, SPI. For three years, only one module was invented using an SPI - SD card module, and it does not require external terminal blocks. And I2C is enough software for GPIO. Therefore, the excess was removed, and space was made for the third slot for expansion modules that do not require external terminal blocks (this is GPS, microSD slot, in the future different modules with radio).



The expansion modules themselves are made with a key - the projecting part of the board is inserted into the slot in the controller board. This adds stiffness to the connection - the scarves do not hang out in the connector, and it is impossible to insert it correctly.

Crypto processor


In Wiren Board 6, we added a crypto processor. This is a special chip that stores the user's private encryption keys and uses them to make a cryptographic digital signature of data.

If simple, then this is an analogue of smart cards or USB-whistles, issued by banks and government agencies to confirm the identity of the user.

Why do you need a crypto processor
The crypto processor in the controller is used to authenticate it in the monitoring and control systems of the upper level.

Previously, to connect the controllers, for example, to the VPN server, it was necessary to use a common login and password (insecure) or to give each controller separate details (inconvenient). In addition to the complexity of managing the details, both solutions are potentially unsafe: the details and the certificate file, if desired, could be copied from one controller to another and accessed the system.

With a crypto processor, everything is greatly simplified: on the server you only need to register a list of serial numbers (common name) of allowed controllers. At the same time, the server verifies the cryptographic signature of the controller certificate, which cannot be forged and copied.

We implemented cryptochip support in the standard OpenSSL system library, so almost any standard software using SSL, TLS or HTTPS will be able to work with secured hardware keys.

Now we are working with partners - suppliers of top-level systems to ensure that Wiren Board connected to these systems without passwords and pre-configuration. Support is also scheduled for IoT platforms from leading vendors: Amazon, Google and others.

Soft


In general, Wiren Board software updates are released simultaneously for all supported versions and revisions of controllers.

However, by the release of Wiren Board 6, we timed several important changes in the software.

Debian 9


New controllers come with the latest stable version of Debian - Debian Stretch. The transition process from Debian Wheezy was long and painful, primarily due to the use of systemd instead of sysvinit in the new Debian.

But now our users get a modern distribution with relatively fresh versions of third-party software. Moreover, the distribution kit and WB6 itself are compatible with packages for Raspbian.

New update and firmware recovery system


Previous versions of the controllers could be updated via the APT package manager, or overwritten the entire firmware via the web interface. If careless user actions led to system malfunction, then full restoration of the factory firmware was performed via USB port using a computer or a virtual machine with Linux and a special program mxsldr.

In Wiren Board 6, we also implemented an update using a bootloader. To restore the firmware, it is enough to insert a USB flash drive with a new firmware file into the USB port of the controller and click on the update button.

Similarly, you can reset all controller settings to factory defaults.

Call to action


Need more technical information? Here you can find full specifications .

Any other questions about the device and its applications? We are waiting for you on our website https://wirenboard.com/ and visiting our office.

Want to try the new controller in operation? Buy a controller at retail right on our website . We ship the equipment by courier 1-2 days after ordering.

Source: https://habr.com/ru/post/414411/


All Articles