📜 ⬆️ ⬇️

Arduino operates an industrial freight elevator

Disclaimer: If you understand electronics, some of the technical solutions described in this article will shock and terrify you, and also cause an overwhelming desire to tear off the author's hands. I warned.
A little bit about how cargo lifts are arranged and not a big history of creating a control system for a six-storey freight elevator based on the Arduino compatible Seeeduino controller (ATmega 328) controller. image
Quite a lot of pictures and letters!

I earn money as an electrician in a small company that manufactures and install cargo lifts. At this work actively accept students enrolled on a close profile and they willingly agree. In terms of creativity, such work is simply paradise - no one climbs into electrical affairs and there is complete freedom of action both in the choice of electrical materials (just not very expensive) and in the ways of selling the finished product (if only it worked). Since the bulk of orders is reduced to the simplest lifts with two stops, such work cannot be called complex, and even a student without experience is quickly drawn in.
In general, fertile field for experiments !

As a rule, all electrics are assembled according to ready-made schemes, which are built on primitive logic using relays. The main elements in a typical solution are the two magnetic starters (PV and PN in the figure), which start the electric hoist (motor with gearbox and drum, on which the cable is wound), floor limit switches (K1 and K2), start control buttons (KH) and limit switches of the safety circuit (CD), which block the start of the elevator (for example, if the doors of the mine are open).
image

All the logic of the freight elevator operation is reduced to the fact that while all limit switches in the safety chain are pressed (in the figure it starts from L1 and up to limit switches K1 and 2), the phasing is observed, the engine is not overheated and the Stop button is not pressed, voltage. In the case of pressing one of the buttons, the corresponding magnetic starter starts up, which, when triggered, essentially forms a trigger, which opens as soon as the elevator reaches the floor limit switch.
The whole rigmare begins after the number of floors to which the freight elevator must arrive becomes more than two. For example, for a three-story elevator, the circuit will be replenished with one intermediate relay, which will rewire the circuit to provide a stop on the middle floor. For a four-story elevator, such relays will need two, for a five-story one — three, and so on. And if you figured out the previous picture as a nutlet, then I present to your attention a control scheme for a nine-floor cargo hoist: image
In our time, such a complexity of the control scheme is a mortal sin. Of course, the first thing a reasonable engineer would suggest is to use a programmable logic controller (PLC). True, the cost of components in this case will increase. But why not use cheap Arduino here? Poryskav in the network, I found several interesting projects with layouts of passenger elevators from all the familiar LEGO and decided that this shawl should definitely handle the freight elevator. Just in time for the occasion, I received an order for a six-story lift.
')
In addition, I already had a Seeeduino board (ATmega 328) for quite some time, and a Chinese LCD display. If you really sculpt the controller - then with the display! And first of all, I calculated the number of ports on the board that can be used. And their Seeeduino - 14 discrete and 6 analog (which of course work as discrete). The idea was simple: hang up each button and limit switch on your port, and turn on magnetic starters using a 5VDC / 220VAC relay. The security chain must also have its own port. In total, 13 discrete inputs and two relays are needed for a six-floor freight elevator. But where to connect the display? Comes to the aid of the shift register PCF8574, which will allow you to manage it with just two wires (there is a post about it). Thus, using a mock-up board, 13 pull-up resistors and two light bulbs that simulate a “start-up” relay and a “start-down” relay, I wrote a control program (there is a cycle on a cycle and a cycle on a chase, even I’m ashamed to show it). Unfortunately, I have a display without Cyrillic support, so it displays only messages like “Lift on a Floor” and “Security Circuit Broken!”.
image

If everything went smoothly with the number of ports, the first big problem was the combination of logical levels. The fact is that electrical products used in our company are designed for 220VAC *. That is, when you press a button or a limit switch, the real phase comes to the wire, while the Arduino uses 5VDC logic. Since I am not a pro in electronics, I turned for help to the radio forum, and using hints I blocked such a scheme based on an optocoupler:
image
She worked perfectly with the LED, and I was guided by the principle of Cave Johnson ("we just throw science into the wall and see what sticks") immediately decided to solder it to the board. image
And, of course, it was a failure. Arduino not only did not see the logical unit on the port, but the optocouplers often burned merrily along with resistors. Meanwhile, the customer was already waiting for his elevator. And there was nothing left but to admit defeat and make the scheme as before, on the relay. Well, the relay is so on the relay, I decided, threw out the optocouplers and took thirteen intermediate relays for use as a galvanic isolator. Each relay has its own button and a floor limit switch.
image
After such an original solution to the problem of logical levels, I moved on to the problem of turning on magnetic starters. It is worth mentioning that the 5VDC / 220VAC relays are connected to the Arduino ports not directly, but according to a circuit with a transistor and a diode. However, you can simply buy a finished unit.
However, in the issue of managing such a load as 220V magnetic starters, the second and biggest problem was waiting for me - pickup. Since I shoved the Arduino, the display and both relays were pretty tight in one case, when the magnetic starter was turned on, the display started to show cracks instead of letters, and the controller could hang. There was less and less time left, and I decided to make an improvised screening of kitchen foil.

Everything seemed ridiculous, but it helped. I searched the network for any solutions, but found only offers to use ferrite rings or again optocouplers with which I no longer became friends.
All assembly complete:

This is followed by a trip to the site for the installation of electrical equipment. This is a factory for the production of plastic containers. This handsome, three-ton capacity will be controlled by the controller:

Installation of electricians is quite tiresome - you have to climb around the mine all day, pulling the wires, and then, sometimes hanging in an uncomfortable position, connect them in the terminal blocks in the junction boxes. But this is not the worst problem that awaits you, if you have decided to make your controller. The most terrible as I have said - tip. It turned out that the pickups from the magnetic starter, working in idle and pickups from the starter, closing or (what is the most terrible) shutting off the power of an eight-kilowatt engine is not the same thing (Who would have thought!). Whatever screens I am, the sparks on the contact group of the starter reduced their action to zero. And although the controller was not disturbed, the display gave nonsense instead of informational messages. After long ordeals, in the end, I fenced off the magnetic starters from the controller with a steel plate connected to the neutral (grounding unfortunately at the time of installation was not yet), and solved the display problem programmatically using the function delay () ;. As soon as the program started the engine start or stopped, the second delay () turned on; after which the message was displayed.

Of course, I could not completely trust the controller with the question of an emergency or emergency elevator stop. As soon as the power supply in the safety circuit disappears, the relay opens the power supply at the starters, and sends a signal to the arduino port. And even if the controller for some reason hangs, the lift will still be stopped. In addition, the scheme provides for a remote reboot of the system from any floor, by pressing the “Stop” button for more than two seconds.

Video of work, I apologize for the quality in advance.

Results:
For the price it turned out quite inexpensive: Relay - 80 p / pc * 13pcs = 1040r, display + Arduino = 1000r, power supply, housing, terminals and resistors = 1000r.
In total, the controller cost around 3000r, while the most budget-friendly PLC, which will cope with this task, will be released at least 7000r.
Reliability - time will tell. I've already seen burnt PLCs, so it's not a fact that the Arduino will be worse. For this parameter, the relay circuit is still out of competition. Using the controller has reduced the number of wires, and thus facilitate the work on their crimping and marking, as well as simplify installation.

Summing up, I would like to wish the development of the Arduino platform towards integration with power circuits (well, for example, the appearance of ready-made optical isolation units) in the future. I know that many consider Arduino only as a child's toy. However, progress does not stand still, and everything goes to the fact that even a little bit familiar with electronics people will be able to assemble the most complex devices, without turning to all sorts of problems like "choose a resistor so that the optocoupler does not burn," and free up more time for technical creativity.
Thanks for attention!

PS:
* Yes, I understand perfectly that 220V is not the best choice for control circuits. The fact is that in the firm before my arrival historically it happened (apparently it was too lazy to bother with converters), and also sometimes suppliers find it difficult to get buttons and actuators for the necessary voltage. To reassure you, I will say that many customers connect freight elevators through the RCD, which I advise everyone.

UPD:
Gentlemen, a freight elevator, and people are not allowed to ride it. This is clearly written on every door on every floor. The doors of the mine at the time of work are blocked by electric locks, completely independent of the controller.
All emergencies already have their answer. For example, in the event of a cable break, a mechanical safety device (by the way, he was invented by Ottis himself), in the event of a cab overload or jamming, a thermal relay and overload limiters, also operating independently of the controller.
In short, the controller only deals with the logic of starting the elevator to the floors, and the security system has remained absolutely unchanged.

UPD2:
Here is the text of the program (I am a programmer the same as the electronics engineer)

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


All Articles