Thursday, January 19, 2012

A universal remote control receiver to self-learning



This receiver can operate in combination with 9-bit encoders or 12 bits. It can read and memorize the codes automatically, through a process of self-learning. Output is on relays ON / OFF mode.

The studies we have conducted to make remote controls that we have presented in our various issues, have paved the way for a series of other very interesting projects. The receiver described here is an example.
At first glance, it looks like any remote control receiver, the kind that is used to open garage doors, shutters, curtains, metal etc.. It requires 12 volts and works in the UHF band frequency of 433.92 MHz. Its output is by relay contacts without surprises.
So far, nothing more classic, you might say.
However, this is not the case. You will realize in a moment.
How is it different?
The title of the article has already partially lifted the veil on the mystery. But it should say more, because of peculiarities, we counted at least three.

features
The first special feature of this receiver universal remote self-learning is that it is capable of operating with both types of coders the most disseminated, both those offering 12-bit combinations 4096 (we refer to types MM53200, UM3750, UM86409 etc..) than 9-bit tri-state with 19,683 combinations, which are the specialty coders Motorola (we refer to types MC145026, MC145027 and MC145028).
With still a restriction, because it should be noted that, although it may work in combination with both with each other during the learning phase codes, one must make a choice and define exactly what type it is dealing. Because it is not possible to associate simultaneously with one transmitter equipped with an encoder and the other MM53200 coder MC14502x.
The second special feature of this receiver is the lack of micro-switches that are normally used to provide the coded key. The memory of this code is directly capture / copy of the key contained in the radio signal from the transmitter, during the phase of self-learning.
We have provided the ability to capture / store five different keys. That does not mean it is forbidden to use more than five transmitters, as only one of the key is copied to a large number of transmitters to be as it takes.
The third feature of this receiver is its remarkable simplicity.
Judge for yourself by looking at the diagram in Figure 1.
Despite the level of its services, it only uses very few components, including: an integrated regulator, a UHF hybrid module and a microcontroller.
Who says few components, also called low prices. But although this may add to the number of praise we can build on it, we do not dwell there.
Turning to consider the scheme.

 Figure 1: Diagram of the receiver universal remote control self learning.

Despite its level of services, our assembly requires only very few components, including: an integrated regulator, a UHF hybrid module and a microcontroller. Note the absence of dip-switch that is normally used to compose the encrypted key.





DS1 DS2 J1 Function
ON ON X Clears memory to power on the receiver
ON X ON Stores codes from the encoders MM53200
ON X OFF Normal associated with MM53200 coder
X ON ON Stores codes from encoders MC14502x
X ON OFF Normal operation associated with encoders MC14502x
Contact closed = ON - OFF = Open contact - Position X = indifferent


Figure 2: Table illustrating the functions of micro-switches DS1 and DS2 and close up the dip-switch and PIC16C674-MF363.


Functional analysis
The radio signal received by the antenna, which consists here of a piece of copper wire 17 cm long rigid and twisted at the end as to form a coil of two or three turns, is sent to a hybrid module Aurel.
This is a module BC-NBK references keyed to the frequency of 433.92 MHz. This is a super-regenerative receiver with a sensitivity of 3 microvolts at -3 dBm, which, combined with a handheld remote, can guarantee bonds of up to 100 meters in open ground.
This module, in addition to a selectivity of ± 1.2 MHz at -3 dB, which for this application, is very good if not excellent, with consumption reduced to only 2.7 mA at 5 volts.
It is mounted according to the manufacturer, ie, with legs 1 and 15 connected to positive supply, the legs 2, 7 and 11 connected to ground and pin 3 connected to the antenna.
The output is on the leg 14, on which the signal is demodulated square, sent into the circuit that follows.
This is a microcontroller PIC12CE674, a "small" Microchip's catalog. It is programmed to perform two tasks: identifying codes in the received radio signal, and decide what to do with. This choice depends on how the two are positioned micro-switches DS1 and DS2 which, according to how they are configured, telling the microcontroller, or perform some sort of copy / paste the code received (ie ie decode and store the received key), or compare the received key to those found in memory and in case of identity, activate the relay.
Possible configurations of microswitches are five in number. We shall see what the jumper J1.
If DS1 and DS2 are both set to ON at the start of the circuit, that is to say if the two micro-switches are both closed, the program clears the memory and erases all codes can be saved.
This kind of reset memory is highlighted by the LED LD1 through 20 who reported rapid blinks. Needless to say we need to pay close attention to these micro-switches and see how they are positioned so they do not want to lose the keys stored ...
Despite the relative danger of such a configuration, we must admit that it is necessary ...
The other four configurations: two are used to force the microcontroller to store the code (configuration for the keys from MM53200 coders, and one for the keys from MC14502x coders), and two more to put the microcontroller operation Normal (a configuration for queuing signals from the encoders MM53200, and one for queuing signals from the encoders MC14502x).
The choice between these modes of operation, whether you want the receiver to make the recognition of code or must begin to function as a remote control receiver is determined by the jumper J1.
In the first case (recognition mode), jumper J1 must be pressed (ON) while the second (normal operation), it should be removed (OFF).
The table 2 shows the five functions a lot better than we could do it in word.
When the receiver is configured to do copy / paste, it is in the process of self-learning. During this phase, the key contained in the received pulse train is decoded and stored in one of five available slots for memory.
If one is not careful and it allows the microcontroller to continue to copy / paste after the five memory slots were filled, while the sixth key from the first game, because the five keys are arranged in a kind shift register. The key is the oldest is removed and the news which is stored in the location vacated by the shift.
Storing a new key is indicated by the LED LD1, this time, after producing 20 flashes fast, yet stays on for about two seconds.
When the receiver is placed in normal operation, the key received is compared to those stored in memory, and if at least one of them happens to be the same, the relay is activated for two seconds. In this case, the LED also lights up for two seconds.
What we said about the configuration of micro-switches DS1 and DS2 (that sometimes a table illustrates things better than words can do) is even more true when one wants to explain what the program a microcontroller. That is why those of you who want more details on the structure of the program can refer to the organizational structure given in Figure 3.
Now that we know how this receiver works, see how to implement it practically.

 Figure 3: Program MF363.

Practical realization
It must first make or buy the printed circuit given in Figure 6. Figures 4 and 5 will help in the development of components to remove a possible doubt.
Let's try the constituent assembly Because they are few, the realization takes only a short time.
Indeed, the greater complexity of such a circuit is not in the number of components, but the scale of integration of the three main ones, which are the microcontroller U1, U2 and the hybrid module the regulator U3.
The latter is a small model in 78L05 TO92 case (it would take for a transistor).
It must receive a DC voltage between 9 and 15 volts and must take account of consumption of the circuit which varies between 8 mA and 40 mA at rest when the relay glue.
Since, in general, dual power feeds from the maximum current they need Forni, ours will be able to charge 100 mA.
Positive joined the anode of diode D1, while the negative is connected to ground.
The diode has a protective role. It avoids an accidental reversal of polarity will damage the circuits placed downstream.
The capacitor C1 purifies chemical input voltage potential remains of alternating voltage or pulse peak potential, ensuring better functioning of the 5 volt regulator. The same input voltage is also coming over.
The latter is controlled by the transistor Q1 which amplifies the current that provides the microcontroller on the base when the output goes to the GP5 high.
The diode D2, connected in series on the relay coil, protects against the extra currents.
The 5 volts are stabilized again filtered by capacitor C2 chemical before reaching the hybrid module and the microcontroller which, in addition, contains close to him the ceramic capacitor C3. This prevents the smallest change in current is interpreted as a significant signal by very sensitive logic circuits.
The presence of this capacitor is all the more necessary because of the presence of the hybrid module producing radio nuisance all around him.
Let's start by installing the resistors and two silicon diodes.
To avoid mistakes on the direction of the latter, we would not know too advise you to refer to the diagram board layout shown in Figure 4.
Then weld the bracket to 8-pin microcontroller for receiving, taking care to orient it correctly now, so you can refer to when you press the PIC. Must face its keyed side of C2.
Then fit the dip-switches, transistors and LEDs. The latter has the cathode (that is to say, the slightly flat) side facing the printed circuit board.
Then turn up the hybrid module. For the orientation of it you have no need to worry, because these pins are arranged so that you are forced to mount correctly. Even if you try to mount it upside down, you would not succeed because they do not correspond to pin holes on the PCB.
Jumper J1 is the same type as those you've probably already seen on PC cards.
Finally, two solder terminals. One to two poles are used to connect the power supply, while the three poles is the relay output that needs to connect the servo system.
Last (it is important not to forget!), Solder a small jumper, placed between the module and hybrid resistance R3.
Once all the welds are made, set up the microcontroller.
You should have hands like a realization that you see in Figure 5, which is actually the picture of one of our prototypes.
The receiver is immediately ready for use because it needs no adjustment.
Put it on and, for this first time, set the switches both in position to erase the EEPROM zone reserved for key storage. From there, follow the procedures in accordance with what was said further.
Remember to configure the receiver according to the type of encoder installed in the transmitter. If it has two channels, know that the receiver stores the code for each of them separately.
In other words, our system sees each key as a separate key.
Also, the signal from channel 1 is heard and recognized as one of five codes memorized, the one from Channel 2 is a another code, that of channel 3 still another, and so on.
To force the receiver to perform a session of self-learning codes, simply close the jumper J1.
Then press the button on your remote for a few seconds, and verify that the code has been copied.
Do the same with possibly a second transmitter, or another, if you have several.
Afterwards: Remove the jumper, press again the button on the transmitter and make sure that if there was recognition of the code, the relay sticks for about two seconds and then return to idle.

 Figure 4: Implementation of the components of receptor self-learning universal remote.

Figure 5: In this photo of one of our prototypes we have, particularly in view of the microcontroller The dip-switch, two pole terminal block for power and one with three poles, next to the relay, constituting the output for slaving.

 Figure 6: Drawing scale 1, the circuit board.

 Figure 7: FM RX module Aurel BC-NBK.

Component List
R1 = 10 k
R2 = 10 k
R3 = 10 k
R4 = 470
R5 = 4,7 k
C1 = 100 uF 25 V electrolytic
C2 = 100 uF 25 V electrolytic
C3 = 100 nF multilayer
C4 = 100 uF 25 V electrolytic
U1 = Module Aurel BC-NBK
U2 = PIC12CE674-MF363
U3 = Regulator 78L05
D1 = 1N4007 diode
D2 = 1N4007 diode
T1 = BC547 NPN
LD1 = 5 mm red LED
DS = Dip-switch 2 micro-inter.
RL1 = Miniature relay for above 12 V 1 RT

Others:
1 Terminal 2 poles
1 terminal pin 23
1 Support 2 x 4-pin
Pimples in 2 bands scored
1 Cavalier Computer
17 cm enamelled wire prior to 12/10.
1 PCB ref. S363

No comments:

Post a Comment

Most visited posts this week