The topic of low-cost transceiver modules for the 11m band, returns regularly to forums on the internet like a boomerang. The ESP8266 microcontroller, which is becoming increasingly popular, is replacing the well-deserved PIC and AVR in many projects. In addition, it has several development environments, giving you the freedom of choice and ease of porting your older applications to this extremely practical microcontroller.
Many people "boast" about their applications for the above-mentioned transceiver modules, quoting (... I have perfected RS232 transmission, or ...use "torment_ster"...)
While the latter makes sense for IR transmission, it is meaningless with AM modulation, because the module on the transmitting side sustains for about 1ms a falling state at a level higher than logical "zero" which covers with its carrier "rubbish", and the receiver reports the change of state. That is, encoding bits into short interrupts is meaningless. These modules were intended to be as low-cost as possible, and that is exactly what they are, which is why a number of very clever "tricks" have been devised, ranging from hardware support for an "intermediate-this-is-not-harmful" state to a simple preambulation system as an indicator of the speed and quality of the transmitted signal. I would be remiss not to mention the coding for this modulation with the system developed by NEC and X10RF, where there is frame control in transmission.
Ok,to the point, the following very simple function, allows you to emulate the PT2262 chip, which is a 12 byte encoder with tristate resolution. How to use the function.
And here it is necessary to distinguish between the hardware part:
If you want to obtain a satisfactory range, you need to bear in mind the supply voltage, this has a key influence on the transmitted transmitter power. For a 3.3V power supply for the ESP and TX433, the power will be only 1-2mW, so the range can be only a few metres, with a 17cm antenna wrapped around a pencil. If our module is made e.g. on a 2SC3357 transistor, the maximum power value will be obtained with an 18V supply and 9V driving, i.e. we should make a simple converter from 3.3->9V, then the power should balance within 500mW, which provides really very good distances, but is also illegal according to the law. It is even more interesting with modules based on SS8050 transistors where, with 38V supply and 5V driving, the power is about 1W, which, in favourable conditions and good directional antennas, makes it possible to achieve kilometre distances. I have encountered such modules on modelling websites from the USA. So much for hardware issues.
Software:
The application provides(a,in fact ESP provides) much better pulse width stabilisation than the original PT2262, giving several metres more range under the same wave propagation conditions.
The function works very simply
Simply enter the command
and that's all it takes to make a wireless socket, or other switch, an electric car for children on the 433MHz band work.
Designations in the command:
1- GPIO to which the transmitter is connected, several can be connected on different bands
61 - is the time of a single bit (oscillator)
3 - is the number of times the code repeats (minimum for PT2272 and a single button press is 2)
"00111T0T1100" - is the code of the button.
The codes for different systems are very different so I will not publish them here, they will be found in the PT2272 emulator function. It is easiest to read the code in ELRO systems because they are readable under the remote control battery changed on the sliders.
The above version will only work with the official NodeMCU Firmware.
Universal version running on both firmware versions below
Many people "boast" about their applications for the above-mentioned transceiver modules, quoting (... I have perfected RS232 transmission, or ...use "torment_ster"...)
While the latter makes sense for IR transmission, it is meaningless with AM modulation, because the module on the transmitting side sustains for about 1ms a falling state at a level higher than logical "zero" which covers with its carrier "rubbish", and the receiver reports the change of state. That is, encoding bits into short interrupts is meaningless. These modules were intended to be as low-cost as possible, and that is exactly what they are, which is why a number of very clever "tricks" have been devised, ranging from hardware support for an "intermediate-this-is-not-harmful" state to a simple preambulation system as an indicator of the speed and quality of the transmitted signal. I would be remiss not to mention the coding for this modulation with the system developed by NEC and X10RF, where there is frame control in transmission.
Ok,to the point, the following very simple function, allows you to emulate the PT2262 chip, which is a 12 byte encoder with tristate resolution. How to use the function.
And here it is necessary to distinguish between the hardware part:
If you want to obtain a satisfactory range, you need to bear in mind the supply voltage, this has a key influence on the transmitted transmitter power. For a 3.3V power supply for the ESP and TX433, the power will be only 1-2mW, so the range can be only a few metres, with a 17cm antenna wrapped around a pencil. If our module is made e.g. on a 2SC3357 transistor, the maximum power value will be obtained with an 18V supply and 9V driving, i.e. we should make a simple converter from 3.3->9V, then the power should balance within 500mW, which provides really very good distances, but is also illegal according to the law. It is even more interesting with modules based on SS8050 transistors where, with 38V supply and 5V driving, the power is about 1W, which, in favourable conditions and good directional antennas, makes it possible to achieve kilometre distances. I have encountered such modules on modelling websites from the USA. So much for hardware issues.
Software:
The application provides(a,in fact ESP provides) much better pulse width stabilisation than the original PT2262, giving several metres more range under the same wave propagation conditions.
The function works very simply
Simply enter the command
Code: Lua
and that's all it takes to make a wireless socket, or other switch, an electric car for children on the 433MHz band work.
Designations in the command:
1- GPIO to which the transmitter is connected, several can be connected on different bands
61 - is the time of a single bit (oscillator)
3 - is the number of times the code repeats (minimum for PT2272 and a single button press is 2)
"00111T0T1100" - is the code of the button.
The codes for different systems are very different so I will not publish them here, they will be found in the PT2272 emulator function. It is easiest to read the code in ELRO systems because they are readable under the remote control battery changed on the sliders.
Code: Lua
The above version will only work with the official NodeMCU Firmware.
Universal version running on both firmware versions below
Code: Lua