📜 ⬆️ ⬇️

Hard way from idea to commercial industrial monitoring system

In this post I want to share my experience and talk about the path we have taken when developing the WebHMI industrial hardware and software system for monitoring engineering systems. Under the cut a lot of photos.



The history of WebHMI began in the spring of 2013. Then I caught fire with the idea of ​​a smart home and at my leisure I did all sorts of toys to automatically turn on the light in the toilet, collect readings from water meters, etc. One day my friend looked at the resulting system and thought that it could be sold, and we started to think about how and to whom. But everything turned out somehow not elegant. A little later, he came up with another idea - he found a vacant niche in the market of industrial automation systems. And we implemented it.

Prologue


The situation was such that the existing solutions in the automation market were well suited for large plants with multi-million dollar budgets, but in view of their bulkiness and high cost, they were completely unacceptable for small and medium businesses. Classic solutions for monitoring technological processes, SCADA systems, cost a lot of money, require a powerful industrial PC, OS licenses and databases, require many, many hours of work of a qualified software engineer and project creation. If you have, for example, a small greenhouse, then you probably will not invest tens of thousands of dollars in the monitoring system of several dozens of parameters. And if such greenhouses, say, 10-20? And if they are separated geographically? The cost of such systems immediately takes off to the skies, but at the same time they still poorly solve “small” tasks. And absolutely not suitable for distributed systems.
')
On the other side of the scale were HMI panels. They have a relatively low cost (from a few hundred euros) and allow you to create a local operator interface for a small system. As a rule - one installation. However, such panels have very limited functionality and do not satisfy the needs of modern customers.

We have set our sights on a niche between large SCADA systems and HMI panels. Began to look for options that can be used as software and hardware platform. It quickly became obvious that everything would have to be done by ourselves, otherwise it would not work to make money on the decision. A ready-made industrial PC will either make the decision too expensive and uninteresting for the client, or it will not allow to make money. There was no ready software either.


Industrial PC, which we did not use

Looking ahead, I will say that we managed to create a product that is comparable in value to the HMI-panel, but has incomparably greater functionality. In fact, it turned out a full SCADA-system. Moreover, to develop projects based on it, no additional software is required - development, or rather configuration, is performed directly in the browser. All the necessary software is included and works on board.

The development process of any device, especially industrial, is fundamentally different from software development. Here the price of error is incomparably higher. The cycle of "making changes - checking the result" lasts for weeks because modification of the board requires an order for its production, assembly, commissioning. And this is a long production time, delivery time (from China), money for logistics, assembly, installation, debugging. But, fortunately, we did not know this at the beginning of our journey. Otherwise I do not know whether they would decide to play this game or not.

The first steps


Develop your PC, we did not take. For this trite there was no experience, no money, no suitable personnel. In addition, classic PCs are poorly suited for our use. We imagined our device as a small box that can be placed in a automation cabinet on a DIN-rail and powered from 24V already available in a cabinet. To do this, we decided to take a suitable ready-made System-On-Module (SOM) and assemble a “motherboard” with a power source and all the peripherals we need. The task seemed quite simple and realizable in a few weeks, maximum - months.

As it turned out, these terms were, to put it mildly, optimistic. Assembling a prototype on the table and getting a stably working industrial device is, as they say, two big differences. The first working layout can be assembled on the knee for two weeks. But it took us a year and a half to fine-tune this layout to a commercial serial product.

For the first version of the software, they set themselves a minimum task - working with the Siemens PPI and Modbus ASCII / RTU protocols. Since I had a lot of experience in web development, the interface was originally based on web technologies. Later it became a key feature of the product.

Why these protocols? We found a potential customer - a loyal client who was willing to test our product to monitor its product packaging installation. He had PLCs of the Siemens S7 200 and Delta DVP families in the equipment park. Now, of course, the list of supported protocols is much wider. You can, if necessary, even write your own protocols in the Lua language. But then we did not dream about it.

So, having enlisted the support of a potential client, we began developing our product. I believe that we have the right start - we solved a specific problem (tracking the number of products produced), and did not invent a universal solution to an abstract problem. Otherwise, we would definitely be bound in the endless desires to add “another” very important killer feature, which would have been inexplicably useful even to someone in real life.

In the future, all the new "features" were added only as real need. When it is very hot. Moreover, if a feature is needed only for one specific client and cannot be made useful to other clients, we do not add it. We only do what we can “sell” to someone else.

For debugging, a debug board from the manufacturer SOM was used and a bunch of self-made boards with various subsystems. So it turned out to debug the work of the main peripheral systems without constant reworking the entire base board. It was already done when all the components were ready and worked as needed.

The software was written in parallel with the development of the first revision of the board. I will not talk in detail about the software development process in this article, because Many readers of Giktaimza are well acquainted with this process. Let me just say that I had to:


This is primarily due to the very limited resources of the selected SOM - 400MHz CPU, 64MB of RAM, 16 MB of flash memory. Making websites that would host on such a “server” - oh, how difficult it is. But nevertheless, we have on board and PHP, and the database, and Nginx, and many other "buns". And at the same time, the system can work with amazing responsiveness - for example, you can draw trends that are updated 20 times per second.

The first version of the software was, let's say, just a test of the idea. We have checked more that on this platform in general it is possible to realize what we waved. After 3-4 months of development, somehow, but the software "came to life." We have a web interface where you can create screens for displaying and visualizing data from a PLC. The data was read in the background and the browser constantly updated information on the screen of a computer, tablet or phone in real time. Web orientation has become the cornerstone of our product - it allows you to use almost any operating system and any device to display the operator interface, from phone to Smart TV. It also allows flexible integration into the network infrastructure, working remotely via the Internet, etc.

Our first project consisted of two dozen registers (variables read from the PLC). Then we planned that WebHMI will be used just for monitoring small separate systems. How humble and insecure we were then! Now our clients have projects to automate stores and sports complexes, where there are two thousand registers. But between the first alpha and the current version of the software, there were more than three years of painstaking development, debugging, and optimization.

Approximately when the first alpha version of the software was ready, our hardware engineer designed and manufactured the first version of the printed circuit board of the device. We were happy to finally hold our offspring in our hands for the first time! This is an indescribable feeling. We were bursting with pride from the fact that it was we who made this device. It was then still like an ugly duckling - scary. But its, dear.


The first board. Made at home. Now working in our office.

After assembly - process with a file


We didn’t do the body from scratch. It is expensive, long and difficult. We decided to use one of the standard enclosures on the market. The board was originally designed for a specific case. The body chosen "prettier" - Italian. Oh, how did we then suffer with this Italy! But more on that later.

The body of the very first "product", in fact the prototype, we milled by hand with a Dremel, finished with a file. It turned out, of course, not very neat. And the pitch of the holes for the LEDs "floated", and the rectangular holes turned out to be completely uneven. But to understand how it will look, and, most importantly, put the board in the case we left.


First building

We were afraid that the connectors would not go where they needed, that we would screw up somewhere. In general, there were no errors, but surprisingly there was nothing fatal. Here and there it was necessary to move the connectors by 1-2 mm and that's it. We moved the following connectors, LEDs and holes in the case, probably revisions 10-15. All the time there was something to improve. Immediately make everything perfect did not work. Wi-Fi connector in general had to be replaced with a non-standard, longer one. Since some antennas did not want to be screwed on a short thread.

Sales


What to do when the first prototype is ready? Immediately sell it! But how easy is it to show the customer an industrial device that communicates with other devices? We collected a demo suitcase in which we placed the minimum gentleman's set - PLC, power supply, HMI-panel, and of course WebHMI.


Demo suitcase

This suitcase allowed to carry out demonstrations "in the field" - on the territory of the customer, and at the same time possessed the mobility, which allowed to move it from place to place, quickly turn on and quickly turn off. By the way, almost unchanged it is used by us and until now.

After the presentation of the prototype to the client and getting approval from his side, we decided to make the first batch - 5-10 devices. How difficult and unnecessarily expensive in our country!

Go to the series


The board for the prototype was made at home. But the manufacture of 12 simple two-layer boards in Electroplating cost some bad money at the time (more than $ 100, it seems). But the quality of the boards, and especially the silk ones, made us cry - almost amateurism. Then he tried to order at the factory Etal. Were also disappointed.


On the left - the production fee of the Etal plant. On the right is China.

Much later, when we ordered the boards already in China, we shed a tear again. The quality was compared with domestic as heaven and earth! Clear silky, holes exactly in the center of the pads, dense and uniform solder mask. The quality is two orders of magnitude higher than local production at a price three times less ... Well, who then will support the domestic producer?


Boards from China. Aurix is ​​the code name of the project.

Components have been purchased. Boards collected, tested. But with the hull there was trouble.

We had 5 cases of samples on our hands, which we wanted to mill on the CNC and put inscriptions on them. But since Our circulation is small, and the product is much more complicated than the usual biblical advertiser, it was difficult to find those who wanted to fulfill our order. Practically, unreal. Our body is of complex shape, for printing on it you need to use pad printing. And she is good when there is a big circulation. The adjustment and adjustment of the process is a complicated and unpleasant business. We got a lot of impressions on only 5 buildings. Nobody wanted to take on such an ungrateful job because you won’t earn it. CNC history is similar.

With a grief in half it turned out to agree with a couple of guys and in a few weeks we received 4 sets of cases in which there were holes where needed and inscriptions where needed. Let the inscriptions were of horrible color and far from perfectly printed, but they were.


The first commercial products in the case.

But while the epic with the corps lasted, we could already sell the first device! It was urgently necessary to put something on the object for the client. Shells were not ready. So the first commercial device was also milled by hand on the balcony and was without inscriptions. The case was only available in extravagant green color. But it was all not important. It is important that we are paid - it means that we are doing what people need.


Baptism of fire"

Work in an industrial environment


At this facility, we first encountered what is called Industrial - noise, dust, interference. Organizing a stable connection on the RS-485 bus "on the table" is not an example easier than on a real facility. We constantly buggy connection. How much we have suffered with this bus! But, as it turned out, the fault was ... aiming at the cable. A potential difference of up to 40 volts appeared between the ground and the signal lines A and B, impulsively and randomly. And this is on a 50 cm cable! And the tip was visible only on the oscilloscope. On the voltmeter everything was within the normal range. Eliminating the cause of interference, we stabilized the connection and got a working system. Could pass the job and get the next order.

Almost immediately, we realized that selling the device ourselves is an impossible task. You need to know the client, have a relationship with him, understand his needs. It’s not so easy to go out and sell a new and unique product. Much so we will not sell. Many people still do not immediately understand what WebHMI is when we try to tell them about the system. Therefore, we decided to make sales through integrator dealers - this is how the product will be offered directly by the integrator. And he already knows his clients, he has a large base of established contacts, he will be able not only to sell equipment, but also to carry out a project based on it. And the client will satisfy and he will earn.

Therefore, we began to negotiate with potential partners. And very quickly able to get into an interesting project. The metallurgical plant required a system for tracking the parameters of the furnaces, which relieve stress from rolled tubes. Literally, as soon as the first corps were ready, two of them were sold to this project.

On this project, we caught a whole lot of problems. And those who were not aware of. The software had to be greatly modified to optimize the system. You feel what memory leaks are, what system debugging is in another city. The hardware platform also had to be redone almost from scratch! Initially, we assumed that WebHMI would be powered by a good and high-quality industrial 24V power supply. Therefore, the noise immunity was not particularly worried. But in industrial conditions, everything works in a completely different way than in everyday life.

One of the WebHMIs sold there hung in just a few minutes of work. What we just did not try, and different power supply units and filters, and ferrite rings, shielded and grounded everything they could. Nothing helped. Moreover, the second WebHMI on another furnace worked stably. As a result, we completely remade the WebHMI circuitry, adding very powerful filters from input power noise.

Second generation


Also, many other components have been replaced, many others have been added. The memory was not in the form of a USB module, but in the form of an SD card. A Li-Po battery appeared for the ability to properly shut down and, if desired, be able to work for up to two hours autonomously. This allows you to survive short power outages without shutting down and rebooting. You can also send a “distress” signal to the upper level systems. Added the ability to turn off the power on an external USB connector to reset external 3G modems that like to hang up periodically. We tried different hubs, RS-485 bus drivers.

There were a lot of difficulties with the RS-485 bus. Usually, they were connected with the fact that integrators do not like to buy a special cable for RS-485. Instead of an expensive special cable, they use a regular twisted pair cable, considering it an equal replacement. The confusion on their part brings the basics of the work of this bus. The myth is widespread that only two wires are enough for this bus to work - A and B. But this is not so. When operating in industrial conditions, on a long bus and when powering all devices from different power supplies or even phases, potential differences arise and the third, common, wire is extremely necessary for potential equalization. Also, the screen is highly desirable.Now we have used galvanically isolated RS-485 driver. This increases reliability.

After the release of the updated version of the hardware, we replaced all previously installed devices with new versions for our own peace of mind.

Reliability


WebHMI can survive many small-blooded installation errors. But some of them require contacting our service engineer. The integrators' favorite entertainment is to send 230V to RS-485. By the way, these are the only reasons for appealing for repairs! If we do not force our equipment by improper installation, then everything has been working like a clock for many years now.


The consequences of connecting 230V to the RS-485 bus.

With flash drives we also had many different problems. It is used to store images and databases with journals, charts and all other accumulated data. The USB DOM (Disk-On-Module) we used initially was rare, of unstable quality and speed, low volume, unpredictable availability. As a result, we switched to industrial memory cards. With memory cards there was a separate epic.

WebHMI now comes without a memory card, because everyone needs a different volume. Industrial cards are significantly more expensive than commercial ones. Therefore, we leave the choice of the card to the client - too big a fork in the price and volume of the card. Someone is enough and 1GB, and someone give 32GB.

We recommend everyone to use industrial maps. But new customers, apparently wanting to save money, are trying to use commercial cards from a nearby kiosk. For them there is no difference - if it is written that this is an SD card, then it should work. Is it logical Not.Such cards do not live long. And until the client loses his data, he does not want to believe that not all cards are the same. Commercial cards can "die" in just a few weeks.

In search of a solution, we came to the conclusion that we are offering, together with the device, to immediately buy an industrial card from us, so to speak “from one source”. In order to offer a product in which we are sure, we had to do a lot of research. Compare a lot of different cards from different manufacturers, test the recording speed, drive them in industrial conditions for a long time. Try out different suppliers.


Transcend representatives in our office. We discuss their products.

Let's play tetris?


A new revision of the board required space for installing additional large components. Sincethere was no more space in the case, I had to think how to put all this inside the allotted space. We have come up with a sandwich of three boards. This allowed the use of the entire volume of the case. But this brought additional trouble to the logistics and equipment.

It was necessary to find racks of rare length, to figure out how to transfer a lot of signals between the boards (standard 2.54 mm pinheders take up too much space). Think of how to transfer another large number of signals to the front panel, which added additional LEDs indicating the presence of the Internet and VPN connections, and the reset button for network settings. All this required the search for various components, their suppliers, the coordination of layouts, measurements of all dimensions with calipers and fittings in the body, production of test batches and repeated alterations. The boards have become multi-layered. This process took a lot of effort, time and nerves. Probably half a year.





Here you can see the internal revision number of the V05.34L4 board. It is deciphered simply - the 5th generation of design, the 34th revision. Think about it, we drew, produced and tested 34 board modifications before we reached this stage! This is a big way. By the way, after that there were only two small modifications.


Appearance of the device

Externally, WebHMI then also ennobled. The color of the inscriptions became gray; we learned to apply the inscriptions ourselves. To solve the problem of milling in our country in small batches for adequate money, we could only temporarily. We were milled pieces of 50 buildings, then the shop closed. Now the hull is milled in Italy by the manufacturer of hulls. But the inscriptions we learned to do themselves. Bought a pad printing machine, mastered the printing technology. It turns out very well, even better than the Italians. It is understandable - we can afford to lick to perfection the printing process on our case, because we have one product. We modified the printing press, made our own make-ups - in general, they were confused. But it was worth it. Meet - on clothes.


Our machine at the time of purchase

In general, it is very difficult for us to work with the Italians. They are sluggish, think tight, fulfill the requirements through time. Constantly somewhere yes. We have already accumulated a whole mountain of defective buildings.

Now the hardware platform has long been debugged and stable. Going to an automatic installation line. About two years, we no longer make changes to it. But the software develops every day. Usually we release a new firmware once a month with changes, improvements and fixes found problems.

After finishing the “iron” for stable work in the conditions of the metallurgical plant, we sleep peacefully. Now all other applications seem to us kindergarten - WebHMI will survive almost everywhere. Now it is used in various and unexpected places - from bakery enterprises to breweries, from steel mills to railways and ports, from shops to sports complexes. And, of course, distributed objects - greenhouses, gas and electric boilers, pumping stations, pumping stations, irrigation systems. The only significant limitation is the temperature range from 0 to + 50 ° . It is limited by the presence of a Li-Po battery and its operating parameters.

Packaging


An interesting challenge was the creation of packaging. Sincethe product was not produced in very large quantities, then we did not want to order several thousand packages at once - this is frozen money and dead storage space in the office. Therefore, the packaging did themselves. They ordered the cutting of foam rubber on a laser and glued a cradle as they were sold. We put it in suitable cardboard boxes of standard size. The picture on the boxes we put silk familiar master. It turns out beautiful and practical. Although cutting foam rubber is a nasty thing. He always strives to ignite, smokes, stinks. It turns out expensive, a lot of marriage. But the end result is cool. Looks expensive. Meet, in fact, on clothes. And the device during transportation is reliably protected.


Appearance of packaging

Then we found some more good dealers and integrators, we still cooperate with many of them. We are not engaged in direct sales, but we are working on the development of the dealer network. If necessary, we help dealers, we participate in seminars, exhibitions, we train their staff to work with WebHMI. Developing a dealer network is, as it turned out, also an interesting and fascinating task. Dealers constantly strive to lead the customer from each other, quarrel. And we need to rebuild the system so that it would be interesting for dealers to work and customers were satisfied.


WebHMI Workshop

At the seminars they ask a lot of interesting questions. Some of them lead to improved firmware. But there are also funny things. I remember one man who, at some seminar, tried to find out where we “licked off” the device. Tried to get to the bottom of every detail that would catch us in plagiarism. His strongest argument was that at that time we only had English in the interface - they say this because we took some other software and give it away for our own. Now we have several interface languages, including English and Russian. And then we were even slightly taken aback by his pressure and distrust.

As an experiment a couple of years ago, we donated a demo stand with WebHMI to the automation department at the National Mining University. This has not yet brought any special fruit, but we are not upset - what if it “shoots” later?

Stand for university

Epilogue


Summing up, I want to say that the way to develop an industrial device is fascinating, thorny and unpredictable. To assemble a prototype is a matter of several weeks. But to create a commercially stable complex device is a matter of more than one year. If you feel the strength to walk on it - bolder. Road going by walking. But be patient - not everything is as simple as it seems at first glance.

Solve real problems - then it's much easier to sell your products. Now we have developed several additional satellite products that successfully complement WebHMI and solve some actual problems when building monitoring and dispatching systems. Prototypes were sold very quickly, even without inscriptions and in technological cases. And for the first installments, a small, but nevertheless, line has already lined up, wishing to purchase them.

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


All Articles