As we discussed in our previous tutorials , RTU5024 is a single relay remote G.S.M controller . This device is designed for simple remote applications to control over the mobile networks . The controller requires a SIM to receive the commands . You can control the RTU5024 by sending commands VIA SMS or VIA mobile app . You can turn ON or OFF a device from anywhere in the world . Here in this article we are going to focus on what is inside the RTU5024 Gate opener or G.S.M relay controller .
Disassembly Of RTU5024
In order to see whats inside we have to disassemble the RTU5024 G.S.M controller . Here is how to it . It’s quite easy to disassemble .
• Remove the antenna by turning it counter clock wise .
• Detach the power and relay connectors by pulling them out .
• The top metal housing is fitted to the back housing by four Phillips screws (On sides of the housing) . Unscrew them using a Phillips screw driver .
• Turn the controller upside down and slide the bottom housing out .
• The PCB is fitted to the bottom housing by four screws . Unscrew them using a Phillips screw driver .
• Pull out the PCB .
The PCB of RTU5024 is a double layer PCB with components on both sides . Both Through hole and surface mount electronic components are present on the PCB .For the explanation purposes we will divide this PCB into four main sections Power circuit , Relay Circuit , Microcontroller circuit and the G.S.M module circuit.
Power Circuit of RTU5024
The power circuit of this controller takes up one quarter of the PCB . This circuit includes protective components , regulators and noise filtering components . Lets see how they designed the power circuit of this controller.
The Protective components
This power circuit consist of a P.T.C as a resetting fuse . This component is the first component after the power connector . It connected in series with the positive power supply line . As the current flow the temperature of this component will also increase . This will increase the resistance of the P.T.C reducing the current flow . Disadvantage of this arrangement is that it cant prevent sudden spikes in current such as current spikes due to short circuits. There is a diode across the pins of the relay to protect the components from back E.M.F when switching .
There are three regulator ICs in this controller each one supplies different output voltage .
LM2965S – There are two LM2965S regulators on this PCB . These are switching regulators . Which means they regulates the voltage by switching an inductor at a high frequency . This regulators can deliver up to 3.0A current . The output voltage is set by two resistors . The first LM2965S IC (Near the power connector) outputs 5.0Vdc and the second LM2965S regulator outputs 3.9 Vdc . First regulators supplies the power to the switching circuit and the third regulator IC (AMS1117) . The second regulator supplies the power to the G.S.M module .You can read more about this regulator from Here !
AMS1117 (3.3) – This is a Fixed 3.3 v Output linear regulator . This regulator doesn’t require external components like the previous one .This one can supply up to 1.oA current (max 800mA recommended) . This regulator supplies the power to the Microcontroller and the EEPROM IC . You can read more about this IC from Here !
Noise filtering components
Since This is a radio signal device , The supply voltage should not contain any electrical noise . But , There are only few steps taken to filter out the noise in this circuit . There are some capacitors being used to smooth the waveform . That’s why you need a good power supply for this device . We recommend a linear power supply with step down transformer . Avoid cheap SMPS power supplies . They are full of electrical noise .
The switching circuit of RTU5024 G.S.M controller consists of relay , opto-coupler and a transistor .
• The Relay in this controller have contact points that can withstand a current 20A at 40Vdc . The Coil of the relay is rated at 5Vdc 0.250A . If you are switching 110Vdc , You can switch up to 2A load . If you are switching 230Vac You can switch up to 1.5A load . However , If you wants to control a greater current , You have to replace the relay or you have to switch an external relay using this relay contacts .
• The Optocoupler being used so that the microcontroller is isolated from the relay circuit . This is necessary to avoid any back E.M.F . The back E.M.F from the relay coil can damage the IC or at least reset the IC .
• The Transistor used in this have “J3” SMD code . The part number is “SS9013”. A NPN transistor . It can handle up to 0.5A load . Read the datasheet from Here for more details .
Switching Circuit Diagram
As you can see in the diagram the 29th pin of the Microcontroller controls the switching of the relay . As the logic of that pin goes low the Optocoupler will turn ON . This will allows the current to flow from collector to emitter of the optocoupler . Since , The emitter of the optocoupler is connected to the base of the transistor , The transistor will turn ON allowing current to flow from collector to emitter . Current will flow through the coil .Thus , Magnetizing the coil of the relay . The contact point will switch to Normally Open contact point.
To communicate with the G.S.M module and control the relay actions with the commands received a Microcontroller being used . It’s a programmable IC that follows instructions . These instructions are programmed to the Microcontroller memory VIA programmer (Hardware and software) . The instruction can be written in many programming languages (C , C++ , Assembly , Java) . A special software called “Compiler” being used to convert this program instructions to machine code (in this case Hex code) . That compiled hex code is the written in the program or flash memory of the Microcontroler IC using a device called Programmer.The Microcontroller used in this case is STC 8F2K32S2 . It’s a 8051 based microcontroller by the Chinese company STC . Here are the basic specifications of this Microcontroller .
STC 8F2K32S2 Specifications
As you can see in the above table 8F2K32S2 is a 8 bit Microcontroller with 32KB of program memory . Even though , This Microcontroller have a 32Kb EEPROM memory , They used an external EEPROM IC to store the phone numbers . This Microcontroller Have 32 I/O pins .But , They have only used 6 pins for this application .
As you can see in the image there are seven Analog to digital pins available in this microcontroller . Two UART ports , One I2C port , Two SPI port available for serial communication . Pin 8 and 9 can be used for external oscillator connection . Power pins are 14th and 15th (VCC , Gnd) .
As you can see in this diagram you can design a USB programmer (Hardware) for this microcontroller easily . PL2303 USB to serial IC being used . It connects to the P3.1 and P3.0 pins of the microcontroller . A switch (S1) being used to switch between USB power and supply power . The capacitor (C1) value should be 0.1 µf when the system clock is <= 10Mhz and 0.01 µf when the system clock is >= 10Mhz . Read the datasheet for more programming methods .
If you are not interested in designing such a programmer you can buy one it’s called “STC U8 mini Programmer ” . It supports large variety of STC microcontroller chips . It’s very cheap .If you want the expensive option you can use the “V8-5V Programmer”.
You Can solder a four pin header to the RTU5024 PCB’s program terminal layout and use a three pin connector to program the STC8F2k32S2 microchip on board .
VCC – 5v from the programmer or USB
T – Transmit pin of STC8F2k32S2
R – Receive pin of STC8F2k32S2
8F2K32S2 Programming Software
The programmer (Software) is called “Open STC-ISP ” You can download it for free . You need the version 6.79 or version 8.8 ( full ) for this chip. Download STC v8.8 (Full) from Here More about this software and how to program can be found in the bottom of the datasheet.
Keil µvision Software
This is the IDE (Development Environment ) witch allows you to write the program for your STC microcontroller . It contains run-time environment, project management, build facilities, source code editing, and program debugging .Programming with this software is very easy . You can read more about how to setup this software in the datasheet . The software version recommended for STC8F2K32S2 is Keil µvision 5 . You can Download it from Here . Fill out the form and click on “Submit” button . It will redirect you to the download page .Click on “C51V960A.EXE” .
If you wants to know how to write a program and examples Click Here ! .
The G.S.M Module
The G.S.M module contains the circuit that requires to communicate VIA radio signals . If you look at the G.S.M module of RTU5024 G.S.M relay controller , You will see a metal cover on top of a PCB . This metal cover is called E.M.I Shield . E.M.I stands for electro magnetic interference .This is to prevent the components inside to be affected by electro magnetic forces . In side these shield there are many components ICs , Capacitors , Resistors , Inductors and transistors . This is basically a mobile phone without a number pad . The G.S.M module inside this RTU5024 is Quentel M26 .
Quentel M26 Pin Out
This module communicate with the microcontroller VIA Tx and Rx pins . The communication protocol is UART . The microcontroller can send AT Commands to the G.S.M module . The list of AT commands are listed in the datasheet . SIM connection pins are 10 ,11, 12, 13 ,14 . It supports 1.8v or 3.0v SIM cards . Here are the specification of this module.
QuecTEL Circuit Diagram
This is the Quentel M26 circuit diagram with minimum components . There are many things you need to consider when designing a PCB with this module . Please read the datasheet for full list of requirements . There are many other features that not been used in this circuit diagram . You can find a full list of features and how to use them in the datasheet of this module . The 22ohm resistors and 33pf capacitors are not present in the RTU5024 G.S.M relay controller . But , You need to include it in the design to protect from E.S.D . These are the main things you need to keep in your mind when designing a PCB with this module .Power Circuit , Antenna Layout and SIM port Layout .Design the PCB as described in the datasheet . If you are using a Antenna cable please make sure it meets the requirements described in the “Antenna” section of the datasheet .
Conclusion – What is inside RTU5024
After examining whats inside the RTU5024 G.S.M relay controller, We can come to a conclusion that this controller cannot be considered as a professionally designed device . There are lot of components missing which requires for proper function of the G.S.M module . Don’t use it for applications that requires reliability . But use it for applications like gate Openers , remote light controllers . However , There are properly designed RTU5024 G.S.M relay controllers available . But, They are very expensive and hard to find comparing to the most common RTU5024 device . Only god can say whats inside those RTU5024 controllers. If you are using a antenna cable for this device , Make sure that it meets the requirements of the G.S.M module . If not , You will not get the best out of it. During our examination , We found out that some SIM pins are not gold plated (Three pins) . This may be a isolated incident , Where the manufacture of that SIM port didn’t made that port properly . If you have the same issue , Replace the SIM port with a good one . Because , non plated pins can get oxidized very quickly .