-
NUCLEO-L152RE for Automatic Sliding Gate





Home Page
STM32F0xx Page


Introduction
Basic Functions

How to use this HW/SW in real application
Suggested improvement
Electronic scheme
Software & Doc





-
Introduction

This project is intended to release you the basic Automatic Sliding Gate.

Single Sliding Gate

This project is based on the NUCLEO-L152RE and the SW was developed using mbed.
In the project (HW/SW), some parts are not implemented. We developed this SW for our necessity but it is easy implement more functions.

We used a surplus components and is for this reason that we used the relays for interface the input signals.
Also, using relays, we have saved a lot of solder joints, but of course is not cheaper if you must buy the new relays.
I suggest the schematic below for substitute the relays in input.




You should choose R5, R1 and R2 to have the right input voltage supported by your MCU input pins.
The formulas to calculate the resistors are shown below.

Vi
|     R1                 R2
|     ____            ____
|---|____|---------|____|----- GND
|<--- Vr1 --->|<--- Vr2 --->|
|

Vr2 = ( Vi / (R1+R2 ) )* R2
Vr1 = ( Vi / (R1+R2 ) )* R1

Suppose that MCU is powered at 3V and that Vi is 12V the resistor must be:
R5 == 9,7K
R1 == 330
R2 == 3,3K
Vr2 == 2,970V




-

Basic Functions


InPut
PP == Step by Step - It is NO (Normally Open) and by pressing on it you can Open, Close and Stop the Automatic Gate
RA == Automatic Reclosure - If this jumper is OFF (not present - 1) after the open, the automatic gate wait 10sec and next it close.
FOTO == Photocell - Before open or close the automatism check the photocell. If photocell is OK (NC) the movement start.
During the closure if the Photocell is NotOK (something go through in the beam of the photocell) the automatic gate closure is stopped.
EMERGENCY == Normally is a Push Button (NO) - If it is pressed the movement of automatic gate is stopped.
FCA == limit switch open - If it is pressed (closed - 0) means that the automatic gate is opened.
FCC == limit switch close - If it is pressed (closed - 0) means that the automatic gate is closed.
AT == ANTI_TAMPER present (NC - Normally Closed) == OK, at the moment is not implemented.
ANTI_TAMPER not present == The gate is blocked
For restart the gate is necessary:
1) Reinstall the ANTI_TAMPER
2) Turn off and turn on the power supply of the gate.

OutPut
ReleLight == If it is night and the gate is in movement this relay is ON for a time that depend of the value of the potentiometer connected to the analog input called TempCurLight. At the moment is not implemented.
M1Com, M1Open, M1Close == are the commands for the motor.
Flashing == is the flashing light (220Vac) that signal that the automatic gate is working.


Analog Input
Light Sensor == It is a photoresistor that measure the intensity of the sun. At the moment is not implemented.
SensCrep == the value on this pin it is used for decide, in accordance with the Light Sensor, if it is day or night.
At the moment is not implemented.
TbC == Time to wait before close. At the moment is not implemented.
At the moment, if the jumper on RA is not present and the automatic gate is open the automatic gate start to close after 10sec.

TempCurLigth == Time to stay ON the relay ReleLight. At the moment is not implemented.






-

How to use this HW/SW in real application


Electrical connections that need to be done are are shown below.

Click on the image below for enlarge it.


Operating Mode

Power On
At the first start, the automatic gate must be either closed or open.
If no FCC or FCA are pressed, the first pressure of PP start the automatic gate to open.

Automatic gate is in STOP (close or open) - Press PP
PP, automatically turns on the flashing light, at this point is necessary release the PP and the automatic gate start to move.
The direction depend if the automatic gate is close or open.


The automatic gate is performing the maneuver to CLOSE and you press PP
PP stop the automatic gate.
If you press again the PP, the automatic gate start the maneuver to open.


The automatic gate is performing the maneuver to OPEN and you press PP
PP stop the automatic gate.
If you press again the PP, the automatic gate start the maneuver to close.

Photocell - FOTO
Before open or close the automatism check the photocell. If photocell is OK (NC) the movement start.
If you press PP and input
photocell is not OK, the automatic gate is not moving and the flashing, blinking at twice the frequency, indicating the fault.

EMERGENCY
Emergency is a Push Button (NO) - If it is pressed the movement of automatic gate is stopped.




-

Suggested improvement

Add a motor speed control also called: gate’s final opening/closing phase slow-down speeds.






-
Electronic scheme


The electronic scheme is below, for see large image click on it.
Click on the image below for enlarge it.


The 5V supply is connected to E5V pin and the jumper JP5 must be on E5V, see schematics.
The FR (PHOTORESISTOR) is 2..20K, 100mW and it is find here (cod.2510-LDR04) and here (LDR04).

The FE-8220-PSS1215M also called PSS1215M and it is find here (cod.8220-PSS1215M) and here.

Below there are some photo of our board.

 





-
Software and Doc


For download the complete documentation, Software and Doc click here and download: NUCLEOL152-CASCO-mbed
This SW was made using Mbed

It is possible download this SW directly from Mbed website, see here.





Up
Home Page
Nucleo Boards