DIY radio control. The simplest single-command model radio control circuit (3 transistors) 4-command model control circuit



This device is designed to control 4 different loads (for example, controlling garage doors, electric lighting, etc.). Simultaneous pressing of buttons in any combination is allowed (for the mode without command fixation). The receiver has 2 operating modes: – 1 mode without command fixation (the jumper on the receiver is removed) – commands are executed only while the corresponding button (buttons) are held down. – 2nd mode with command fixation (a jumper is installed on the receiver) – the command is executed after pressing the button, pressing the button again disables the command.

The transmitter consists of an encoder on a microcontroller and a radio module for transmitting data over a radio channel. Modulation - PWM. The transmitter contains an algorithm for noise-resistant data transmission to protect against false alarms. Current consumption in quiescent mode is 0.1 µA in sleep mode, and 11 mA during transmission (from a 3V voltage source). 0.3 µA in sleep mode, and 15 mA during transmission (from a 6V voltage source). For control over a short distance, one lithium battery is enough. For longer communication, 2 lithium batteries are used. The transmitter board is 2-sided. The reverse side is used as a screen. The foil is only removed under coil L2.

Transmitter Features:

– for ultra-low current consumption in sleep mode, one important function in the controller had to be disabled (with this function, the current consumption would be 60 μA, which is not good), so in some situations the controller may freeze when the battery is connected. To remove it from this state, you need to remove the battery, press the SB4 button (to discharge the capacitors), and install the battery again until the controller starts successfully. In normal operating mode with the battery installed, there will be no freezes (until the battery is discharged).

– if you hold down the SB1 button when connecting the battery, the transmitter will switch to the signal transmission mode with 100% amplitude modulation at a frequency of 1 kHz. This is made for those who will independently assemble and tune a super-regenerative receiver to the desired frequency (it is convenient to make this adjustment based on the transmitter signal).

– if you hold down the SB2 button when connecting the battery, the transmitter will switch to the mode of constantly transmitting code message 0101 (2 LEDs are on, 2 are off). This mode is convenient for those who will test the operating range of devices.

The receiver consists of a decoder on a microcontroller, and a ready-made receiving radio module (the radio module should not invert the transmitter signal). The command receiver has no special features. Powerful field-effect transistors can be connected to the output of the microcontroller to control various loads or relays.

And now about the operating range. When the transmitter was powered from a 6V source and the transmitter was located on the 7th floor, I was able to transmit commands over a distance of up to 1 km. Moreover, inside the house, the transmitter signal penetrated through 7 floors (up to the 1st floor); reception was even carried out in a metal elevator along the route from the 7th to the 1st floor. When the transmitter was located at a level of 1.5 meters from the ground, the signal was transmitted up to 300 meters with line of sight. 17cm pieces of wire were used as antennas.

The firmware is free and has no restrictions. The encoder and decoder have an individual code (can be rebuilt into hundreds of billions of different combinations). When programming controllers, do not forget about the calibration constants http://pro-radio.ru/controllers/3131-2/ (those who have PICkit don’t have to worry about this, the programmer will do everything itself).

If you use ready-made receiver and transmitter radio modules, for example these, then the assembly of this device will be greatly simplified.

Dear 4uvak. The other day I collected this miracle for 4 channels. I used the FS1000A radio module. Of course, everything works as written, except for the range, but I think this radio module is simply not a fountain, that’s why it costs $1.5.
But I assembled it in order to bind it to broadlink rm2 pro and it didn’t work out for me. Broadlink rm2 pro saw it, read its command and saved it, but when it sends the command to the decoder, the latter does not react in any way. Broadlink rm2 pro is designed according to the stated characteristics to operate in the 315/433 MHz range, but it did not accept this miracle into its ranks. This was followed by dancing with a tambourine..... The broadlink rm2 pro has a function as a timer for several commands and I decided to set the broadlink rm2 pro a task to send the same command several times with an interval of 0 seconds, BUT!!! Having written down one command, he refused to write it down further, citing the fact that there was no more memory space to save the commands. Next, I tried to do the same operation with commands from the TV and it recorded 5 commands without problems. From this I concluded that in the program you wrote, the commands sent by the encoder to the decoder are very informative and large in scope.

I am an absolute zero in MK programming and your project is the first assembled and working remote control in my life. I have never been friendly with radio technology and my profession is far from electronics.

Now the question:

If, as I believe, the signal sent by the encoder is long and large, then it can be made as miniscule as possible???, with the same base, so as not to change the MK wiring and circuit.

I understand that any unpaid work is considered slavery :))))), and therefore I am ready to pay for your work. Of course, I don’t know how much it will cost, but I think the price will be adequate for the work done. I wanted to transfer money to you, but where it was written, it was in rubles and it was unclear where to send it. I am not a resident of the Russian Federation and live in Kyrgyzstan. I have a master card $. If there is an option to send you money to your card, that would be good. I don’t even know how to do this in rubles. There may be other easier options.

I thought of this because after I purchased broadlink rm2 pro I connected the TV and air conditioning for free, but the rest of our radio stuff is not cheap. There are 19 light switches in the house, 3-4-5 per room, and buying everything is very expensive. Yes, and I would like to change the sockets on the controls, otherwise what kind of smart home would this turn out to be?

In general, my task is to make remote controls with my own hands so that they do not confuse each other and the main thing is that broadlink rm2 pro understands them. At the moment, he does not understand the remote control according to your scheme.

I couldn’t write in the discussion, only registered users write there.

Waiting for your reply.

Who among the novice radio amateurs did not want to make some kind of device controlled by a radio channel? Surely many.

Let's look at how to assemble a simple radio-controlled relay based on a ready-made radio module.

I used a ready-made module as a transceiver. I bought it on AliExpress from this seller.

The kit consists of a remote control transmitter for 4 commands (key fob), as well as a receiver board. The receiver board is made in the form of a separate printed circuit board and does not have executive circuits. You need to assemble them yourself.

Here's the look.

The keychain is good quality, pleasant to the touch, and comes with a 12V (23A) battery.

The key fob has a built-in board on which a rather primitive circuit of the remote control transmitter is assembled using transistors and an SC2262 encoder (a complete analogue of the PT2262). I was confused by the fact that the marking on the chip is SC2264, although it is known from the datasheet that the decoder for PT2262 is PT2272. Immediately on the chip body, just below the main marking, SCT2262 is indicated. So think about what's what. Well, this is not surprising for China.

The transmitter operates in amplitude modulation (AM) mode at a frequency of 315 MHz.

The receiver is assembled on a small printed circuit board. The radio receiving path is made of two SMD transistors marked R25 - bipolar N-P-N transistors 2SC3356. A comparator is implemented on the operational amplifier LM358, and the decoder SC2272-M4 (aka PT2272-M4) is connected to its output.

How does the device work?

The essence of how this device works is as follows. When you press one of the remote control buttons A, B, C, D, a signal is transmitted. The receiver amplifies the signal, and a voltage of 5 volts appears at the outputs D0, D1, D2, D3 of the receiver board. The whole catch is that 5 volts will be output only as long as the corresponding button on the key fob is pressed. Once you release the button on the remote control, the voltage at the receiver output will disappear. Oops. In this case, it will not be possible to make a radio-controlled relay that would work when the button on the key fob is briefly pressed and turn off when pressed again.

This is due to the fact that there are different modifications of the PT2272 chip (the Chinese analogue is SC2272). And for some reason they install PT2272-M4 in such modules, which do not have voltage fixation at the output.

What types of PT2272 microcircuit are there?

    PT2272-M4- 4 channels without fixation. At the output of the corresponding channel, +5V appears only while the button on the key fob is pressed. This is exactly the microcircuit that is used in the module I purchased.

    PT2272-L4- 4 dependent channels with fixation. If one output is turned on, the others are turned off. Not very convenient if you need to independently control different relays.

    PT2272-T4- 4 independent channels with fixation. The best option for controlling multiple relays. Since they are independent, each can perform its function independently of the work of the others.

What can we do to make the relay work the way we need it?

There are several solutions here:

    We tear out the SC2272-M4 microcircuit and replace it with the same one, but with the index T4 (SC2272-T4). Now the outputs will work independently and latched. That is, it will be possible to turn on/off any of the 4 relays. The relay will turn on when a button is pressed, and turn off when the corresponding button is pressed again.

    We supplement the circuit with a trigger on K561TM2. Since the K561TM2 microcircuit consists of two triggers, you will need 2 microcircuits. Then it will be possible to control four relays.

    We use a microcontroller. Requires programming skills.

I didn’t find the PT2272-T4 chip on the radio market, and I found it inappropriate to order a whole batch of identical microcircuits from Ali. Therefore, to assemble a radio-controlled relay, I decided to use the second option with a trigger on the K561TM2.

The scheme is quite simple (the picture is clickable).

Here is the implementation on a breadboard.

On the breadboard, I quickly assembled an executive circuit for only one control channel. If you look at the diagram, you can see that they are the same. As a load, I attached a red LED through a 1 kOhm resistor to the relay contacts.

You probably noticed that I plugged a ready-made block with a relay into the breadboard. I pulled it out of the security alarm. The block turned out to be very convenient, since the relay itself, a pin connector and a protective diode were already soldered on the board (this is VD1-VD4 in the diagram).

Explanations for the diagram.

Receiving module.

The VT pin is the pin at which a voltage of 5 volts appears if a signal has been received from the transmitter. I connected an LED to it through a resistance of 300 Ohms. The resistor value can be from 270 to 560 Ohms. This is indicated in the datasheet for the chip.

When you press any button on the key fob, the LED that we connected to the VT pin of the receiver will flash briefly - this indicates that the signal has been received.

Terminals D0, D1, D2, D3; - these are the outputs of the PT2272-M4 decoder chip. We will take the received signal from them. A voltage of +5V appears at these outputs if a signal from the control panel (key fob) was received. It is to these pins that the executive circuits are connected. Buttons A, B, C, D on the remote control (key fob) correspond to outputs D0, D1, D2, D3.

In the diagram, the receiving module and triggers are powered with a voltage of +5V from the 78L05 integrated stabilizer. The pinout of the 78L05 stabilizer is shown in the figure.

Buffer circuit on D flip-flop.

A frequency divider by two is assembled on the K561TM2 chip. Pulses from the receiver arrive at input C, and the D-flip-flop switches to another state until a second pulse from the receiver arrives at input C. It turns out very convenient. Since the relay is controlled from the trigger output, it will be turned on or off until the next pulse arrives.

Instead of the K561TM2 microcircuit, you can use K176TM2, K564TM2, 1KTM2 (in metal with gold plating) or imported analogues CD4013, HEF4013, HCF4013. Each of these chips consists of two D flip-flops. Their pinout is the same, but the housings may be different, as, for example, in 1KTM2.

Executive circuit.

Bipolar transistor VT1 is used as a power switch. I used KT817, but KT815 will do. It controls the electromagnetic relay K1 at 12V. Any load can be connected to the contacts of the electromagnetic relay K1.1. This could be an incandescent lamp, LED strip, electric motor, lock electromagnet, etc.

Pinout of transistor KT817, KT815.

It should be taken into account that the power of the load connected to the contacts of the relay must be no less than the power for which the contacts of the relay itself are designed.

Diodes VD1-VD4 serve to protect transistors VT1-VT4 from self-induction voltage. At the moment the relay is turned off, a voltage arises in its winding, which is opposite in sign to that which was supplied to the relay winding from the transistor. As a result, the transistor may fail. And the diodes turn out to be open in relation to the self-induction voltage and “quench” it. Thus, they protect our transistors. Don't forget about them!

If you want to supplement the executive circuit with a relay activation indicator, then add an LED and a 1 kOhm resistor to the circuit. Here's the diagram.

Now, when voltage is applied to the relay coil, the HL1 LED will turn on. This will indicate that the relay is turned on.

Instead of individual transistors in the circuit, you can use just one microcircuit with a minimum of wiring. Suitable microcircuit ULN2003A. Domestic analogue K1109KT22.

This chip contains 7 Darlington transistors. Conveniently, the pins of the inputs and outputs are located opposite each other, which facilitates the layout of the board, as well as the usual prototyping on a solderless breadboard.

It works quite simply. We apply a voltage of +5V to the IN1 input, the composite transistor opens, and the OUT1 output is connected to the power supply negative. Thus, supply voltage is supplied to the load. The load can be an electromagnetic relay, an electric motor, a circuit of LEDs, an electromagnet, etc.

In the datasheet, the manufacturer of the ULN2003A chip boasts that the load current of each output can reach 500 mA (0.5A), which is actually not small. Here, many of us will multiply 0.5A by 7 outputs and get a total current of 3.5 amperes. Yes, great! BUT. If the microcircuit can pump such a significant current through itself, then it will be possible to fry kebab on it...

In fact, if you use all the outputs and supply current to the load, then you can squeeze out about ~80 - 100 mA per channel without harm to the microcircuit. Ops. Yes, there are no miracles.

Here is a diagram for connecting ULN2003A to the outputs of the K561TM2 trigger.

There is another widely used chip that can be used - this is the ULN2803A.

It already has 8 inputs/outputs. I tore it out from the board of a dead industrial controller and decided to experiment.

ULN2803A wiring diagram. To indicate that the relay is turned on, you can supplement the circuit with a circuit of LED HL1 and resistor R1.

This is how it looks on the breadboard.

By the way, ULN2003, ULN2803 microcircuits allow combining outputs to increase the maximum permissible output current. This may be required if the load draws more than 500 mA. The corresponding inputs are also combined.

Instead of an electromagnetic relay, a solid state relay (SSR) can be used in the circuit. S olid S tate R elay). In this case, the scheme can be significantly simplified. For example, if you use a solid-state relay CPC1035N, then there is no need to power the device from 12 volts. A 5-volt power supply will be sufficient to power the entire circuit. There is also no need for an integrated voltage stabilizer DA1 (78L05) and capacitors C3, C4.

This is how the CPC1035N solid-state relay is connected to the trigger on the K561TM2.

Despite its miniature size, the CPC1035N solid-state relay can switch alternating voltage from 0 to 350 V, with a load current of up to 100 mA. Sometimes this is enough to drive a low-power load.

You can also use domestic solid-state relays; for example, I experimented with K293KP17R.

I tore it off the security alarm board. In this relay, in addition to the solid-state relay itself, there is also a transistor optocoupler. I didn’t use it - I left the conclusions free. Here is the connection diagram.

The capabilities of the K293KP17R are quite good. It can switch direct voltage of negative and positive polarity within the range of -230...230 V at a load current of up to 100 mA. But it cannot work with alternating voltage. That is, constant voltage can be supplied to pins 8 - 9 as desired, without worrying about polarity. But you shouldn’t supply alternating voltage.

Operating range.

In order for the receiving module to reliably receive signals from the remote control transmitter, an antenna must be soldered to the ANT pin on the board. It is desirable that the antenna length be equal to a quarter of the transmitter wavelength (that is, λ/4). Since the key fob transmitter operates at a frequency of 315 MHz, according to the formula, the length of the antenna will be ~24 cm. Here is the calculation.

Where f - frequency (in Hz), therefore 315,000,000 Hz (315 Megahertz);

Speed ​​of light WITH - 300,000,000 meters per second (m/s);

λ - wavelength in meters (m).

To find out at what frequency the remote control transmitter operates, open it and look for a filter on the printed circuit board Surfactant(Surface acoustic waves). It usually indicates the frequency. In my case it is 315 MHz.

If necessary, the antenna does not need to be soldered, but the range of the device will be reduced.

As an antenna, you can use a telescopic antenna from some faulty radio or radio. It will be very cool.

The range at which the receiver stably receives the signal from the key fob is small. Empirically, I determined the distance to be 15 - 20 meters. With obstacles this distance decreases, but with direct visibility the range will be within 30 meters. It is foolish to expect anything more from such a simple device; its circuitry is very simple.

Encryption or “binding” of the remote control to the receiver.

Initially, the key fob and the receiving module are unencrypted. Sometimes they say that they are not “attached”.

If you buy and use two sets of radio modules, the receiver will be triggered by different key fobs. The same will happen with the receiving module. Two receiving modules will be triggered by one key fob. To prevent this from happening, a fixed encoding is used. If you look closely, there are places on the key fob board and on the receiver board where you can solder jumpers.

Pins from 1 to 8 for a pair of encoder/decoder chips ( PT2262/PT2272) are used to set the code. If you look closely, on the control panel board next to pins 1 - 8 of the microcircuit there are tinned strips, and next to them are letters H And L. The letter H stands for High, that is, a high level.

If you use a soldering iron to place a jumper from the pin of the microcircuit to the strip marked H, then we will thereby supply a high voltage level of 5V to the microcircuit.

The letter L respectively means Low, that is, by placing a jumper from the pin of the microcircuit onto the strip with the letter L, we set the low level to 0 volts at the pin of the microcircuit.

The neutral level is not indicated on the printed circuit board - N. This is when the pin of the microcircuit seems to “hang” in the air and is not connected to anything.

Thus, the fixed code is specified by 3 levels (H, L, N). Using 8 pins to set the code results in 3 8 = 6561 possible combinations! If we take into account that the four buttons on the remote control are also involved in generating the code, then there are even more possible combinations. As a result, accidental operation of the receiver by someone else’s remote control with a different encoding becomes unlikely.

There are no marks in the form of the letters L and H on the receiver board, but there is nothing complicated here, since the L strip is connected to the negative wire on the board. As a rule, the negative or common (GND) wire is made in the form of an extensive polygon and occupies a large area on the printed circuit board.

Strip H is connected to circuits with a voltage of 5 volts. I think it's clear.

I set the jumpers as follows. Now my receiver from another remote control will no longer work, it only recognizes “its” key fob. Naturally, the wiring must be the same for both the receiver and the transmitter.

By the way, I think you have already realized that if you need to control several receivers from one remote control, then simply solder on them the same coding combination as on the remote control.

It is worth noting that the fixed code is not difficult to crack, so I do not recommend using these transceiver modules in access devices.

The post caught fire and I came up with the idea of ​​making my own airplane. I took ready-made drawings and ordered motors, batteries and propellers from the Chinese. But I decided to make the radio control myself, firstly - it’s more interesting, secondly - I need to keep myself occupied with something while the package with the rest of the spare parts is on its way, and thirdly - there’s an opportunity to be original and add all sorts of goodies.
Beware of pictures!

How and what to manage

Normal people take a receiver, plug in servos and a speed controller, move levers on the remote control and enjoy life without wondering about operating principles or going into details. In our case, this will not work. The first task was to find out how the servos were controlled. Everything turns out to be quite simple, the drive has three wires: + power, - power and signal. On the signal wire there are rectangular pulses of variable duty cycle. To understand what it is, look at the picture:

So, if we want to set the drive to the extreme left position, we need to send pulses with a duration of 0.9 ms with an interval of 20 ms, if to the extreme right - a duration of 2.1 ms, the interval is the same, well, with the middle positions it is the same. As it turns out, the speed controllers are controlled in a similar way. Those who are in the subject will say that this is a regular PWM, which can be implemented on any microcontroller - a trifle. So I decided so, bought a servo machine at a local store and riveted a so-called ATtiny13 servo tester for it on a breadboard. And then it turned out that PWM is not entirely simple, but has pitfalls. As can be seen from the above diagram, the duty cycle (the ratio of the pulse duration to the duration of the period) is from 5% to 10% (hereinafter I take pulses with a duration of 1.0 ms and 2.0 ms as extreme positions) for a 256-digit PWM counter ATtiny13, this corresponds to values ​​from 25 to 50. But this is provided that it will take 20ms to fill the counter, but in reality this will not work, and for a frequency of 9.6 MHz and a prescaler of 1024, we need to limit the counter to the value 187 (TOR), in which case we will get a frequency of 50.134 Hz. Most (if not all) servos do not have an accurate reference frequency generator and therefore the frequency of the control signal may fluctuate slightly. If you leave the TOP of the counter at 255, then the frequency of the control signal will be 36.76 Hz - it will work on some drives (possibly with glitches), but not on all. So, now we have a 187-digit counter, for which 5-10% corresponds to values ​​from 10 to 20 - a total of 10 values, it will be a little discrete. If you are thinking of playing with the clock frequency and prescaler, below is a comparison table for an 8-bit PWM:

But most microcontrollers have a 16-bit (or more) timer for generating PWM. Here the problem with discreteness will immediately disappear and the frequency can be accurately set. I won’t describe it for a long time, I’ll give you a sign right away:

I don’t think that for a Chinese servo there is a significant difference between 600 and 1200 values, so the issue with positioning accuracy can be considered closed.

Multi-channel control

We've sorted out one servo, but for an airplane you need at least three of them and also a speed controller. The straightforward solution is to take a microcontroller with four 16-bit PWM channels, but such a controller will be expensive and most likely take up a lot of space on the board. The second option is to use software PWM, but taking up CPU time is also not an option. If you look at the signal diagrams again, 80% of the time it does not carry any information, so it would be more rational to set only the pulse itself to 1-2ms using PWM. Why does the duty cycle vary within such narrow limits, since it would be easier to generate and read pulses with a duty cycle of at least 10-90%? Why do we need that uninformative piece of signal that takes up 80% of the time? I suspected that perhaps this 80% could be occupied by pulses for other actuators, and then this signal is divided into several different ones. That is, in a period of 20 ms, 10 pulses with a duration of 1-2 ms can fit, then this signal is divided by some demultiplexer into 10 different ones with a period duration of just 20 ms. No sooner said than done, I drew the following diagram in PROTEUS:


The 74HC238 acts as a demultiplexer; pulses from the microcontroller output are supplied to its input E. These pulses are PWM with a period of 2ms (500Hz) and a duty cycle of 50-100%. Each pulse has its own duty cycle, indicating the state of each channel. This is what the signal at input E looks like:


In order for the 74HC238 to know which output to send the current signal to, we use PORTC of the microcontroller and inputs A, B, C of the demultiplexer. As a result, we get the following signals at the outputs:


The output signals are obtained at the correct frequency (50Hz) and duty cycle (5-10%). So, you need to generate a PWM with a frequency of 500Hz and a filling of 50-100%, here is a table for setting the prescaler and TOP of a 16-bit counter:


Interestingly, the possible number of PWM values ​​is exactly 1000 times less than the timer frequency.
Software implementation
For ATmega8 with a clock frequency of 16 MHz in AtmelStudio6, everything is implemented as follows: first, we define the counter values ​​for the extreme positions of the servos:
#define LOW 16000U #define HIGH 32000U
then we initialize the PWM generator on timer/counter1:
OCR1A = HIGH; //Set TOP TCCR1A = 0<It remains to implement interrupts:
ISR(TIMER1_COMPA_vect) //interrupt when the upper value of the counter is reached, immediately before the start of the next pulse ( //c_num is a variable indicating the number of the current channel, channels is an array of channel values ​​if (c_num<= 7) { OCR1B = channels; } else { OCR1B = 0; //отключаем ШИМогенератор для несуществующих в демультиплексоре 8 и 9 канала } } ISR(TIMER1_COMPB_vect, ISR_NOBLOCK)// прерывание возникающее в конце импульса { if (c_num <= 7) { PORTC = c_num; //для каналов 0-7 выводим номер канала на PORTC } //и изменяем значение счетчика от 0 до 9 if (c_num >= 9) ( c_num = 0; ) else ( c_num++; ) )
Globally enable interrupts and you're done, entering values ​​from LOW to HIGH into channels and changing the values ​​on the channels.

Implementation in hardware

Well, we’ve sorted out the theory, it’s time to implement it all. The ATmega8A microcontroller was chosen as the brain of the system, clocked by quartz at 16 MHz (not because I wanted 16,000 servo positions, but because I had some of those lying around). The control signal for the MK will be received via UART. The result is the following diagram:


After some time, this scarf appeared:




I didn’t solder the two three-pin connectors because I don’t need them, and they are not soldered in a row because I don’t have metallized holes, and in the lower connector the tracks on both sides could be replaced with a wire, but in software there is no problem outputting a signal to any connector . Also missing is 78L05 because my engine regulator has a built-in stabilizer (WE).
To receive data, the HM-R868 radio module is connected to the board:


Initially I thought of plugging it directly into the board, but this design did not fit into the airplane, I had to do it through a cable. If you change the firmware, the contacts of the programming connector can be used to enable/disable some systems (side lights, etc.)
The board cost about 20 UAH = $2.50, the receiver - 30 UAH = $3.75.

Transmitting part

The aircraft part is there, it remains to deal with the ground equipment. As already written earlier, data is transmitted via UART, one byte per channel. At first, I connected my system with a wire through an adapter to the computer and sent commands through the terminal. In order for the decoder to determine the beginning of the parcel, and in the future to select parcels addressed specifically to it, first an identifier byte is sent, then 8 bytes defining the state of the channels. Later I started using radio modules; when the transmitter was turned off, all the motors began to twitch wildly. In order to filter the signal from noise, with the tenth byte I send XOR of all 9 previous bytes. It helped, but weakly, I also added a check for the timeout between bytes; if it is exceeded, the entire sending is ignored and the reception starts again, waiting for the identifier byte. With the addition of a checksum in the form of XOR, sending commands from the terminal became stressful, so I quickly riveted this program with sliders:


The number in the lower left corner is the checksum. By moving the sliders on the computer, the rudders on the plane moved! In general, I debugged all this and began to think about the remote control, I bought these joysticks for it:

But then a thought came to me. At one time I was drawn to all sorts of flight simulators: “IL-2 Sturmovik”, “Lock On”, “MSFSX”, “Ka-50 Black Shark”, etc. Accordingly, I had a Genius F-23 joystick and decided to screw it to the above program with sliders. I googled how to implement this, found this post and it worked! It seems to me that controlling an airplane using a full-fledged joystick is much cooler than using a small stick on the remote control. In general, everything is shown together in the first photo - this is a netbook, a joystick, an FT232 converter, and an HM-T868 transmitter connected to it. The converter is connected with a 2m cable from the printer, which allows you to mount it on some tree or something similar.

Start!

So, there is an airplane, there is radio control - Let's go! (c) The first flight was made over asphalt, the result was a fuselage broken in half and a half-torn out engine. The second flight was made over a softer surface:

The subsequent 10 flights were also not particularly successful. I think the main reason is the extreme discreteness of the joystick - for roll it gave only 16 values ​​(instead of the possible 256), with the pitch axis it was no better. But since as a result of the tests the aircraft was significantly damaged and cannot be repaired:


- It is not yet possible to verify the veracity of this version. This version is also supported by the attempt to level the plane recorded on video - it flies banked, and then sharply falls in the opposite direction (but should be smoothly). Here's a more visual video:

The operating range of the equipment is approximately 80m, it also catches further, but every once in a while.
Well, that's all, thank you for your attention. I hope the information provided will be useful to someone. I will be happy to answer all questions.

The most beloved and at the same time difficult electronic toys for young radio amateurs.

Radio control of models

The article is a series of publications on the design and operation of radio control equipment for electromechanical toys and models.

Selecting a model and control system

There are several radio communication systems that can be used for telecontrol. We will not consider all of them, and not all of them will suit us. First you need to decide on the future radio control system. And it is advisable to decide on the choice of a specific model of electromechanical toy right away, so as not to have to worry about the problem of placing electronics inside the car model.

Transmitter

There is a rare exception to the rule when the transmitter of a communication system is simpler than the receiver. This is the case here, so let’s begin our introduction to telecontrol by making a transmitter, which in fact turns out to be quite universal and suitable for various control models.

Single command receiver

Now it’s the turn of the receiver for the model radio control system. In the simplest case, this is a single-command device, the function of which is quite sufficient for the model to move and turn, albeit only in one direction.

Two-channel four-command receiver

A more complex version of the receiving device for the model remote control system via radio. The name speaks for itself: the equipment allows the toy to execute four commands, providing the entire range of movement along the plane.

Selecting a discrete proportional control model

A more complex telecontrol system for models is discrete-proportional, which allows you to radically improve the controllability of the toy. But the problem of choosing a model also becomes more complicated: it must be compatible with the principle of the radio control system.

Transmitter for controlling flying models

Controlling flying models (airplanes) is a very exciting activity for children. Fighting competitions on cord models are still held somewhere. But a model equipped with a radio telecontrol system is the ultimate dream of any boy. This article describes how to make a two-channel control system for flying models from discrete-proportional equipment.