FIELD OF THE INVENTION
[0001] The invention relates to the automation of doors, gates, entrances and similar barrier
devices moved by one or more electric motors.
BACKGROUND ART
[0002] Nowadays, the control of the movement of movable barriers is entrusted to an electronic
control unit which generates the sequence of commands needed to drive motors, mostly
in direct current, to provide the necessary torque to perform the required movements.
[0003] Sliding gates or swing gates are examples of these barriers. The motor or motors
must be able to supply the mechanical energy necessary to operate its opening and/or
closing according to a drive command sent by the control unit through ratio motors.
[0004] In the simplest systems, the motor control can be replaced, or in any case backed,
by manual mechanical movement by the user who may decide to push the barrier open
and/or close, e.g. when the motorized system does not work as shown in fig. 1b.
[0005] However, this is not always desired. Gates or doors closing a reserved area or a
mechanical moving device of an access bar are relevant examples.
[0006] To remedy the issue, systems are known to use irreversible ratio motors which prevent
the motor from transmitting any movement to the barrier by applying a mechanical brake
action as shown in fig. 1a.
[0007] Solutions are also known which allow to achieve the irreversibility of the barrier
movement on the software level. In this case, the control unit which drives the motor
provides actuating commands such that the motor applies a counterthrust which opposes
the external thrust, thus preventing the barrier from being moved manually as shown
in fig. 1c.
[0008] For the control unit to be able to provide adequate thrust balancing commands, it
is necessary to provide the presence of a sensor, typically an encoder, which accurately
detects the movements induced from outside.
[0009] Similar solutions, although performing their function very well, are expensive and
require electronics capable of recognizing not only the extent of the movement but
also its direction.
[0010] It is the object of the present invention to create a simple and effective control
system which requires fewer hardware components to manage the irreversibility of the
movement of a barrier.
[0011] The invention achieves the object with a system for controlling the actuation of
a movable barrier, such as a gate, bar, door and the like, the system comprising:
a motor with a shaft which either is or can be coupled to the barrier through a reversible
kinematic mechanism so that the rotation of the motor in one direction corresponds
to a displacement of the barrier in one direction and that the rotation of the motor
in the opposite direction corresponds to a displacement of the barrier in the opposite
direction to control the opening/closing of said barrier by inducing the rotation
of the motor either in one direction or in the opposite direction;
a control device of the motor;
an input for receiving a movement command of the barrier;
a control unit in communication with the input and said control device, said control
unit being configured to read the barrier movement commands from the input and correspondingly
send actuation signals to said control device of the motor,
a sensor which either is or can be coupled to the shaft of the motor or to a member
which either is or can be connected to said shaft or to the barrier to detect a quantity
related to the induced rotation on the non-driven motor shaft;
a circuit for detecting the direction of the current generated by the motor when its
shaft is put into rotation by effect of a displacement of the barrier when the motor
is not driven, the control unit interfacing with said detection circuit and said sensor
to send actuation commands to the motor so that said motor generates a counterthrust
which opposes the rotation imposed by the displacement of the barrier according to
the entity of displacement detected by the sensor and to the direction of rotation
of the motor shaft as detected by the detection circuit.
[0012] Specifically, the control unit is configured to set the control device to allow the
current to flow into the motor either in one direction or in the opposite direction
as a function of the desired direction of rotation when a rotation command is sent
to the motor and to short-circuit the terminals of the motor when the motor is not
driven to be able to detect the direction of any current generated by the motor as
a result of manual movement of the barrier.
[0013] By observing the operation of common gate automation devices, the inventor noted
how the electronics commonly used to send driving commands, typically of the PWM type,
if properly configured, can already provide indications about the manual movement
of the barrier and, therefore, of the motor associated therewith. Indeed, if put in
rotation electric motors behave as generators so they can be used as motion sensors.
Hence the idea underlying the invention to divide the detection of the displacement
of the barrier into two phases associated with different devices. The measurement
of the absolute value of the displacement is entrusted to rotation sensors, e.g. Hall-effect
sensors, coupled with the motor shaft, while the detection of the direction of the
displacement is entrusted to the measurement of the direction of the current generated
at the motor terminals by the induced rotation.
[0014] By virtue of this, it is, therefore, possible to avoid the need to accurately detect
bi-directional movements manually imposed on the barrier with obvious cost reduction
also considering how the motor control devices currently on the market can be easily
adapted to the purpose mostly using appropriate H-bridge activation sequences and
electronics often already available in the commonly used microcontroller control boards.
[0015] A further aspect of the invention relates to a motor control device for systems for
controlling the movement of barriers according to one or more of the preceding claims,
wherein the motors are provided with at least two control terminals through which
a current flows from a power supply to ground in one direction or the opposite direction
as a function of the direction of rotation of the motor. The control device comprises
two circuit branches in parallel between a power supply terminal and a ground terminal,
each branch comprising a first electronic switch and a second electronic switch arranged
in series, with the first switch connected to the power supply terminal and the second
switch connected to the ground terminal, two output terminals for connecting to the
motor, switches being provided on the intermediate socket in series with the first
and second branch respectively, the switches being controllable to achieve at least
three operating configurations comprising, when the motor is connected to the output
terminals:
- letting a current flow into the motor in one direction when the first switch of the
first branch and the second switch of the second branch are closed;
- letting a current flow in the motor in the opposite direction when the second switch
of the first branch and the first switch of the second branch are closed;
- detecting the current generated by the motor when the first switch of the first branch
and the first switch of the second branch are open, while the second switch of the
first branch and the second switch of the second branch are closed to create a mesh
in which the motor is a generator and in which the current flows either in one direction
or in the opposite as a function of the direction of rotation of the motor.
[0016] Further objects, features and advantages of the present invention will become more
apparent from the following detailed description provided by way of non-limiting example
and shown in the accompanying drawings, in which:
Fig. 1 shows an example diagram of the three possible ways in which a gate can react
to external manual stress in the direction of opening. In the first case in fig. 1a,
the gate does not move due to the presence of an irreversible ratio motor. In the
case of fig. 1b, the gate is free to move, while in the case shown in fig. 1c the
motor applies a counterthrust able to oppose the movement.
Fig. 2 shows a driving diagram a barrier motor via H-bridge according to the prior
art with shunt resistance to ground for current measurement.
Fig. 3 shows the diagram in the preceding figure modified for use in an embodiment
of the present invention to detect the direction of the current generated by the motor
as a result of manual bias on the barrier.
Fig. 4 shows the driving diagram of the preceding figure in a system according to
an embodiment of the invention in which the current measuring circuit comprises a
pair of additional resistors provided with combination with a sensor capable of determining
the displacement, in absolute value, of the barrier.
Fig. 5 shows the detail of the displacement detection section of the diagram in Fig.
4.
Fig. 6 shows a block chart of a signal processing chain for determining the direction
of rotation of the motor.
Figures 7 and 8 show an example of an operational amplifier circuit with offset which
can be used to measure the direction of the current generated by the motor by measuring
the drop on a resistor with examples of values measured in both rotations.
DETAILED DESCRIPTION OF THE INVENTION
[0017] With reference to the block chart in Fig. 2, a typical system for controlling a DC
motor 1 comprises an H-bridge consisting of two circuit branches in parallel between
a VM power terminal and a ground terminal. Each branch comprises a first electronic
switch 102, 102' and a second electronic switch 202, 202' arranged in series, with
the first switch 102, 102' connected to the VM power terminal and the second switch
202, 202' connected to the ground terminal. The motor is connected to the intermediate
socket of the switches in series on the first and second branch, respectively. In
this manner, it is possible to let a current flow into the motor in one direction
when the first switch of the first branch 102 and the second switch of the second
branch 202' are closed or in the opposite direction when the second switch of the
first branch 202 and the first switch of the second branch 102' are closed. The direction
of the current determines the direction of rotation of the motor.
[0018] In order to guarantee the correct driving of the switches, the inverter logic 3,
3', 3" shown in the figure can be used, for example. In this manner, the corresponding
switch on/off signals can be generated with only one signal coming from the control
unit 4, as discussed above.
[0019] The H-bridges can be built using MOSFETs, relays, discrete junction transistors or
integrated circuits such as SN745510, which includes two H-bridges with an independent
drive of each bridge branch and an integrated inverter.
[0020] By using variable duty cycle square waves (PWM - Pulse Width Modulation) as control
signals for variable duty cycle switches, it is possible to carry out a complete control
of the motor rotation both in terms of direction and speed of rotation, as known to
those skilled in the art.
[0021] A shunt 402 to the ground terminal completes the circuit for possible total current
measurement.
[0022] On the other hand, a motor is a reversible electric machine which acts as a generator
when rotated. Hence the idea underlying the invention to use a circuit capable of
detecting at least the direction of rotation of the motor by measuring the direction
of circulation of a current in a circuit mesh comprising the motor.
[0023] Fig. 3 shows an example of how the circuit in Fig. 2 can be modified to make such
a measurement using a current direction detection circuit. Such a circuit comprises
a first resistor 302' in series with the second switch 202' of the first branch and
a second resistor 302' in series with the second switch 202' of the second branch
to form a mesh consisting of the motor 1 and the two resistors 302, 302'. The current
measuring circuit is connected to one of the two poles not in common between the two
resistors. In this manner, it is possible to use the measuring circuit both for detecting
the direction of current circulation and for reading the current on the motor via
shunt 402 in normal bridge operation. The direction of the current in the flowing
mesh, as a function of the direction of rotation of the motor, can be detected by
measuring the voltage drop on one of the two resistors 302, 302' through the measuring
circuit 5 shown in fig. 4 in which a sensor 6 interfacing with the control unit 4
capable of detecting the rotation of the motor shaft or of an associated member and
which will be discussed in detail later.
[0024] To avoid unnecessary dissipation, the two resistors 302', 302' typically have a low
value and, therefore, can be advantageously made through printed circuit board tracks.
[0025] Figures 7 and 8 show an operating example in which it is assumed that the motor,
following an induced rotation on its axis, generates a voltage of +50 mV on the first
branch of the bridge and -50 mV on the second branch of the bridge for clockwise rotation
(fig. 7) and -50 mV on the first branch and +50 mV on the second branch for a counterclockwise
rotation (fig. 8) to which ±3 mV of drop on the resistors correspond, as shown. This
is obviously an example because the values of the voltages in play can vary widely
according to the type of motor adopted and the extent of the induced movements as
transferred to the shaft by a gear set.
[0026] In this specific example, the circuit for detecting the direction of the current
comprises an operational amplifier circuit 501 connected to the pole not in common
with one of the two resistors 302, 302' to detect a positive or negative voltage as
a function of the direction of the current flowing in the mesh, as shown in the figures.
[0027] To avoid working with bipolar voltages, it is possible to shift the levels of the
operational amplifier circuit so that the output is always positive as shown in the
figures. In an advantageous embodiment, there is a circuit for compensating for the
operational offset drift so that even small motor shifts which cause current values
in the order of the offset of the operational amplifier circuit can be detected. For
this purpose, it is possible to provide a signal processing circuit taken from one
of the two resistors which calculate in real-time a continuous value to be used as
an offset for the operational amplifier circuit which compensates any drift of the
same.
[0028] The block chart of this circuit is shown in fig. 6. The input is the signal taken
from the modified H-bridge. Block 501 is the operational amplifier circuit described
above. Block 502 is an analog-digital converter (ADC) which transforms the output
voltage values from the operational amplifier circuit 501 into digital values. After
any decimation and filtering operations operated by block 503, the digital data are
compared with the thresholds in the circuit 504. The output of such a circuit is a
signal indicating whether the rotation has occurred in one direction or in the opposite
one. The output data from filter block 503 are also used to keep the offset of the
measurement of the operational amplifier circuit and therefore, the thresholds applied
for direction detection always up to date.
[0029] By virtue of the circuits described above, the control unit 4 can know whether the
motor is rotated by an external mechanical action and in which direction such action
is applied, entrusting the measurement of the amount of displacement to position sensors.
[0030] Indeed, it is a common expedient to use a sensor, e.g. a Hall-effect sensor, to calculate
the displacement of a gate and more generally of a barrier. This generates one or
more pulses (depending on how many poles the magnet used has) at each turn of the
motor axis and the number of pulses is proportional to the movement space of the gate.
This is generally used to measure the actual movement of the gate when it is driven
by the motor. In this case, the direction of displacement is known so that it is not
necessary to measure such a direction, but simply the amount of displacement in absolute
value. Hence the idea of using such a sensor in combination with the direction determination
circuit described above to determine the extent of any movement induced to the gate
from outside.
[0031] Fig. 5 shows the detail of the displacement detection section of the diagram in fig.
4, in which the two switches 102' and 102' and the relative controls are omitted for
the sake of simplicity, and which will now be used to explain the operation of the
system in an embodiment of the invention.
[0032] The sensor 6 typically comprises a fixed part and a movable part. The movable part
is generally designed to be rotatably coupled to the motor shaft or a member associated
therewith or to a member associated with the barrier. The fixed part comprises at
least one Hall-effect sensor arranged at a certain distance and able to detect the
presence of a magnetic field. The movable part correspondingly comprises at least
one magnet, preferably a plurality of magnets arranged in angularly offset positions
and such as to generate a magnetic field which is detected by the sensor when the
motor shaft (or the member with which the movable part is associated) is rotating.
[0033] In this manner, each turn of the moving part implies the onset of an impulse (a set
of impulses in the case of multiple magnets). By measuring the number of generated
pulses, it is, therefore, possible to determine the extent of the movement of the
barrier.
[0034] It is apparent that the same number of pulses is generated for the same movements
in one direction or in the opposite one. For this reason, quadrature encoder sensors,
which are much more expensive and complex to manage than a simple Hall-effect sensor
like the one described above, are needed to determine displacements and respective
directions.
[0035] On the other hand, since the direction is determined by circuit 5, the control unit
4 is still able to determine the direction and orientation of the displacement and
correctly generate the sequence of PWM commands to be sent to the motor to apply a
counterthrust as a function of the displacement detected by the sensor and of the
direction detected by the current detection circuit.
[0036] The operation will, therefore, be as follows:
- Initial status: Gate stationary, H-bridge used to keep the motor short and direction
detector active.
- Displacement detection: When the gate is moved from the outside, the Hall sensor indicates
how much the gate is moving but does not give the direction information provided by
the current sensing circuit.
- Counterthrust: The counterthrust intervenes on the driving of the H-bridge and ends
when the recorded displacement from the initial point is canceled. At this point,
the H-bridge is put back with the two low MOSFETs in conduction, returning to the
initial state. In addition to this, the force of the counterthrust is generated proportionally
to the detected displacement to create a "spring effect" for the person who is pushing
the gate from outside, i.e. the pusher manages to move it a little until the counterthrust
generated is such as to balance its force. Only when the pusher releases the thrust
does the gate return to its initial position.
[0037] The invention lends itself very well to retrofitting existing systems. To this end,
an aspect provides a kit to make an automation system of gates and similar barriers
irreversible via software, which system comprises:
a motor with a shaft which either is or can be coupled to said barrier through a reversible
kinematic mechanism so that the rotation of the motor in one direction corresponds
to a displacement of the barrier in one direction and that the rotation of the motor
in the opposite direction corresponds to a displacement of the barrier in the opposite
direction to control the opening/closing of said barrier by inducing the rotation
of the motor either in one direction or in the opposite direction;
a control device of said motor;
an input for receiving a movement command of the barrier;
a control unit in communication with said input and said control device, said control
unit being configured to read the barrier movement commands from the input and correspondingly
send actuation signals to said control device of the motor.
[0038] The kit comprises:
a sensor which either is or can be coupled to the shaft of the motor or to a member
which either is or can be connected to said shaft or to the barrier to detect a quantity
related to the induced rotation on the non-driven motor shaft;
a device according to the invention for detecting the direction of the current generated
by the motor when its shaft is put into rotation due to a displacement of the barrier
with the motor not driven;
connection elements to the control unit;
updating software of the control unit or a new control unit programmed to read the
displacement values of the sensor and the direction value of the detection circuit
to send actuation commands to the motor so that said motor generates a counterthrust
which opposes the rotation imposed by the displacement of the barrier according to
the displacement entity detected by the sensor and the direction of rotation of the
motor shaft as detected by the detection circuit.
1. A system for controlling the movement of a movable barrier, such as a gate, bar, door
and the like, the system comprising:
a motor (1) with shaft which either is or can be coupled to said barrier through a
reversible kinematic mechanism so that the rotation of the motor in one direction
corresponds to a displacement of the barrier in one direction and that the rotation
of the motor in the opposite direction corresponds to a displacement of the barrier
in the opposite direction to control the opening/closing of said barrier by inducing
the rotation of the motor either in one direction or in the opposite direction;
a control device (2) of said motor (1);
an input for receiving a movement command of the barrier;
a control unit (4) in communication with said input and said control device, said
control unit (4) being configured to read the barrier movement commands from the input
and correspondingly send actuation signals to said control device (2) of the motor
(1),
characterized in that it comprises
a sensor (6) which either is or can be coupled to the shaft of the motor (1) or to
a member which either is or can be connected to said shaft or to the barrier to detect
a quantity related to the induced rotation on the non-driven motor shaft;
a circuit (5) for detecting the direction of the current generated by the motor when
its shaft is put into rotation by effect of a displacement of the barrier when the
motor is not driven, the control unit interfacing with said detection circuit and
said sensor to send actuation commands to the motor so that said motor generates a
counterthrust which opposes the rotation imposed by the displacement of the barrier
according to the entity of displacement detected by the sensor and to the direction
of rotation of the motor shaft as detected by the detection circuit.
2. A system according to claim 1, wherein the sensor (6) comprises a fixed part and a
movable part, the movable part being designed to be rotatably coupled to the motor
shaft or to a member associated therewith, the fixed part comprising at least one
Hall-effect sensor arranged at a given distance and capable of detecting the presence
of a magnetic field, the movable part comprising at least one magnet, preferably a
plurality of magnets arranged in angularly offset positions and such as to generate
a magnetic field which is detected by the sensor when the motor shaft is put into
rotation.
3. A system according to claim 1 or 2, wherein the control unit (4) is configured to
set the control device (2) to allow the current to flow into the motor either in one
direction or in the opposite direction as a function of the desired direction of rotation
when a rotation command is sent to the motor and to short-circuit the terminals of
the motor when the motor is not driven to be able to detect the direction of any current
generated by the motor as a result of manual movement of the barrier.
4. A system according to one or more of the preceding claims, wherein the control device
(2) of the motor (1) comprises two circuit branches in parallel between a power supply
terminal and a ground terminal, each branch comprising a first electronic switch (102,
102') and a second electronic switch (202, 202') arranged in series, with the first
switch (102, 102') connected to the power supply terminal and the second switch (202,
202') connected to the ground terminal, two output terminals for the connection to
the motor being connected to the intermediate socket of the switches in series on
the first and second branch respectively, the switches being provided to let current
flow in the motor (1), when connected to the output terminals, in one direction when
the first switch of the first branch (102) and the second switch of the second branch
(202') are closed or in the opposite direction when the second switch of the first
branch (202) and the first switch of the second branch (102') are closed.
5. A system according to claim 4, wherein the circuit for detecting the direction of
the current generated by the motor is configured to operate when the first switch
of the first branch and the first switch of the second branch are open, while the
second switch of the first branch and the second switch of the second branch are closed
to create a mesh in which the motor is a generator and in which the current flows
either in one direction or in the opposite as a function of the direction of rotation
of the motor.
6. A system according to claim 4 or 5, wherein the circuit for detecting the direction
of the current comprises a first resistor (302) in series with the second switch of
the first branch (202) and a second resistor (302') in series with the second switch
of the second branch (202') to form a mesh comprising the motor (1), the two resistors
(302, 302') and a shunt (402) towards the ground terminal, the flowing direction of
the current in said mesh being detectable by measuring the voltage drop on said resistors
(302, 302').
7. A system according to claim 6, in which the two resistors (302, 302') are made through
printed circuit board tracks.
8. A system according to claim 6 or 7, wherein the circuit for detecting the direction
of the current comprises an operational amplifier circuit (501) connected to the pole
not in common with one of the two resistors to detect a positive or negative voltage
as a function of the direction of the current flowing in the mesh.
9. A system according to claim 8, wherein there is a signal processing circuit (5) configured
to measure and keep the offset voltage of the operational amplifier circuit updated
in real-time to correct the direction detection thresholds as the voltage changes
over time.
10. A system according to one or more of the preceding claims, wherein the motor (1) is
driven by sending sequences of different width, so-called Pulse Width Modulation,
i.e. square waves with duty cycle as a function of the speed to be imparted to the
motor, to the control device pulse, the direction of rotation of the motor being as
a function of the direction in which the current is made to flow into the motor through
the control device.
11. A system according to one or more of the preceding claims, wherein the control unit
(4) sets control values such that the counterthrust force is generated in proportion
to the detected displacement to create resistance to gradual displacement.
12. A motor control device for systems for controlling the movement of movable barriers
according to one or more of the preceding claims, wherein the motors are provided
with at least two control terminals through which a current flows from a power supply
to ground in one direction or the opposite direction as a function of the direction
of rotation of the motor, which control device comprises two circuit branches in parallel
between a power supply terminal and a ground terminal, each branch comprising a first
electronic switch (102, 102') and a second electronic switch (202, 202') arranged
in series, with the first switch (102, 102') connected to the power supply terminal
and the second switch (202, 202') connected to the ground terminal, two output terminals
for connecting to the motor, switches being provided on the intermediate socket in
series with the first and second branch respectively, the switches being controllable
to achieve at least three operating configurations comprising, when the motor is connected
to the output terminals:
letting a current flow into the motor in one direction when the first switch of the
first branch (102) and the second switch of the second branch (202') are closed;
letting a current flow in the motor in the opposite direction when the second switch
of the first branch (202) and the first switch of the second branch (102') are closed;
detecting the current generated by the motor when the first switch of the first branch
(102) and the first switch of the second branch (102') are open, while the second
switch of the first branch (202) and the second switch of the second branch (202')
are closed to create a mesh in which the motor is a generator and in which the current
flows either in one direction or in the opposite as a function of the direction of
rotation of the motor.
13. A kit to make an automation system of gates and similar barriers irreversible via
software, which system comprises:
a motor (1) with a shaft which either is or can be coupled to said barrier through
a reversible kinematic mechanism, e.g. such as a ratio motor, so that the rotation
of the motor in one direction corresponds to a displacement of the barrier in one
direction and that the rotation of the motor in the opposite direction corresponds
to a displacement of the barrier in the opposite direction to control of the opening/closing
of said barrier by inducing the rotation of the motor either in one direction or in
the opposite direction;
a control device of said motor;
an input for receiving a movement command of the barrier;
a control unit (4) in communication with said input and said control device, said
control unit being configured to read the barrier movement commands from the input
and correspondingly send actuation signals to said control device of the motor,
the kit being characterized in that it comprises:
a sensor (6) which either is or can be coupled to the shaft of the motor or to a member
which either is or can be connected to said shaft or to the barrier to detect a quantity
related to the induced rotation on the non-driven motor shaft;
a device according to claim 12 for detecting the direction of the current generated
by the motor when its shaft is put into rotation due to a displacement of the barrier
with the motor not driven;
connection elements to the control unit (4);
updating software of the control unit or a new control unit programmed to read the
displacement values of the sensor (6) and the direction values of the detection circuit
to send actuation commands to the motor so that said motor generates a counterthrust
which opposes the rotation imposed by the displacement of the barrier according to
the displacement entity detected by the sensor and the direction of rotation of the
motor shaft as detected by the detection circuit.