members
Basics: Project 037b RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver, 433 MHz RF remote
of Acoptex.com in UNO
Basics: Project 037b
Project name: RF 315/330/433 MHz XD-FSF / XD-RF-5V Transmitter / Receiver, 433 MHz RF remote controls, RC (remote controlled) mains switch
Tags: Arduino, RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver, way to communicate between Arduinos, 433 rf remote control, SCT2260 CHIPSET, 2-Button Transmitter TX-3312N / (RN) (TX3312 B1.0), RC (remote controlled) mains switch
Attachments: library1, receiversketch1, transmittersketch1;
Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you
In this project, you needed these parts :
1.Arduino Uno R3 (you can also use the other version of Arduino) 2 pcs
2.Arduino IDE ( you can download it from here )
3.Jumper cables F-M, M-M
4. RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver module 1 pc
5. 433 Mhz RF remote control SCT2260 chipset 1 pc
or
2-Button Transmitter TX-3312N / (RN) (TX3312 B1.0)
6. Battery 12V 24A for remote control 1 pc
7. RC (remote controlled) mains switch, for example PowerTran model A0342 with a small radiofrequency (RF) remote control
General
We will learn how to connect RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver modules, 433 Mhz RF remote control to Arduino board and use them. In this project we will also analyze the data sent by the RF remote control and see if we can make the Arduino send the same signals instead. We will build a 433MHz receiver using an Arduino board and a 433MHz RX module and log data to the serial port.
Understanding the RC (remote controlled) mains switch, for example PowerTran model A0342
A0340 Remote Control Mains Operated Switch package allows you to switch almost any appliance on or off via remote control! Almost any device that plugs into a mains power outlet / power point can be used with this system. Simply plug the included RF power point into your existing power point, then plug the power cord from your device into the RF power point. You can then use the remote control to switch the device on or off! It's really that easy. Most remote controls use IR (Infrared) to transmit a signal, but infrared is limited to line-of-sight use and generally doesn't work over longer distances. This is fine if you're sitting in front of the TV and want to change channels, but if you're in another room and you want to turn the TV off, you would have to go into the same room as the TV to switch it off. With this system, the remote control system uses RF (Radio Frequency) to transmit the signal, which has advantages such as extended range (up to 20 metres) and no need for line-of-sight: this means that you can use the remote control from a different room, or upstairs, or outside!
The RF remote control unit supports up to 8 switch unit channels. You can have multiple switch units listen on a single channel.
PLEASE NOTE: This power outlet is rated to a maximum total loading of 1000W.
Please check your devices to make sure you do not overload the outlet and be especially careful if using this product with a multi-outlet powerboard.
Specification:
- Maximum Switching Power: 1000W
- Input: 240V AC
- Transmission Frequency: 433.92MHz
- Operating Range: 20m
Understanding the 433 Mhz RF remote control
Most RF controlled devices should work with RC Switch library, but if you want you can open up the remote and check that the encoder chipset is on the list of compatible chipsets - check below.
Send RC codes
Use your Arduino to operate remote radio controlled devices. This will most likely work with all popular low cost power outlet sockets.
All you need is a Arduino, a 315/433MHz AM transmitter (find out where to get one or hack your existing remote control) and one or more devices with a SC5262 / SC5272, HX2262 / HX2272, PT2262 / PT2272, EV1527, RT1527, FP1527 or HS1527 chipset. Also supports Intertechno outlets.
Receive and decode RC codes
Find out what codes your remote is sending. Use your remote to control your Arduino.
All you need is a Arduino, a 315/433MHz AM receiver (altough there is no instruction yet, yes it is possible to hack an existing device) and a remote hand set.
1. 433 Mhz RF remote control SCT2260 chipset universal
This remote control only support the learning code (1527) of the receiver. Compatible with remote control using these chips: PT1527,EV1527, SCT527, HS1527, SCL1527, FP1527,EV1527 Do not use this remote control to clone other remote controls, you will lose the built-in 1527 encoding.
Approach to clearing old codes: Long press the upper two (A & B) buttons to clear old codes(The LED indicator will flash three times, followed by a continuous fast blinking, which is the sign of cleared state.).
Approach to duplicating: Place them side by side(as close as possible), then press both one key of your old remote and the to-be-matched key on this remote simultaneously. The LED indicator will flash about three times, followed by a continuous fast blinking. Learning process done. Other keys accordingly.
Approach to recovering: Press the lower two buttons (C & D) for about 3 seconds till the light is on and flicker. (Or you can delete the codes and repeat the learning process.)
Approach to test if the old codes are totally cleared: Press any key on the remote duplicator, if the LED indicator blinks instead of being on, codes cleared. Otherwise, undone.
Humanized design: Button slide cover to protect buttons from accidental unplanned operation. Application: Vehicle central locking systems, garage doors, electronic doors, car sunroofs, heating systems, etc.
Application:
- Duplicate Your Existing Remote Controllers
- Vehicle central locking systems
- Garage doors access control system
- Electronic gates access control system
- Electrical appliances control
- Car sunroofs control
- Heating systems control
- Light Switch
Specification:
Channel: 4
Wireless Communication: RF
- Operating frequency: 433.92MHz
- Powered by 27A 12V battery
- Material: PVC
- Button: 4 buttons
- Size: 55mm x 30mm
- Operating voltage: DC12V
- Operating Current: 12mA@12V
- Transmitting power: 10mw@12V
- Modulation mode: ASK (AM)
- Encoding type: Learning
- Transfers distance: 80 meters
2. 2-Button Transmitter TX-3312N / (RN)
TX-3312N / (RN) is a LC-based radio frequency transmitter with high performance solution for remote control type applications. It is suitable for use with any ASK receiver available. LC-based radio frequency transmitter with high performance solution for remote control type applications.
Specification:
- Model Number:TX-3312N / (RN)
- Brand Name:Automicro
- Place of Origin:Taiwan
- Range: 40~80M
- 2-button RF remote control
- Injection housing (case) size : 50 x 34 x 13mm
- Output Power : 17.4mW (TX-3312RN) / 15.3mW (TX-3312N)
- Power Consumption : 5.9mA (TX-3312RN) / 5.2mA (TX-3312N)
- Power : 12V DC
- - Rolling code : TX-3312RN
- - Fixed code : TX-3312N
- Encoder :
- Frequency : 434MHz LC
- Modulation : ASK (AM)
The RF remote control unit contains a logic chip LX2262A, some momentary pushbuttons, a LED and a transmitter chip. It is reasonable to assume the switch modules contain a receiver chip and a logic chip to decode the data it receives, combined with a relay.
The LX2262A uses the same Tri-State protocol as the popular PT2262 chip. Instead of sending just “One” and “Zero”, the chip uses a specific pulse for each instead. This helps avoid situations where an accidental voltage spike is picked up by the receiver as a “One” or “Zero”. The protocol also supports a “Fault” pulse to indicate an error and a “Sync” pulse to indicate the end of a transmission. Any noise picked up by the receiver will result in the Sync pulse not being received correctly thus avoiding false positives at the receiver end. All this combined offers some rudimentary flow control to ensure data packets are received correctly. Data is however not re-transmitted; if the receiver does not pickup a proper signal, you simply have to press the button on the RF remote control unit a second time to try again.
The duration of a “1”, “0” or “F” pulse is approximately 230 us (microseconds) which equals to 4.348 kHz (kiloHertz). Note that this is nowhere near 433MHz. The 4kHz signal is amplitude modulated on top of a 433MHz carrier wave. As an Arduino runs on 16MHz it can easily generate a 4kHz data signal. The 433MHz TX transmitter will take care of the carrier wave generation and amplitude modulation.
Let’s check if we can program an Arduino board to generate these pulse sequences for us instead of having to use the RF remote control unit.
Decode signals from your remote controls
RCSwitch library has built-in functions that sends codewords for supported devices (see 3 types below) - so if you have one of these devices you can skip this step.
There are generally three common kinds of outlet switches. The first one is configured with a 10 pole DIP switch the other one is configured with two rotary (or sliding) switches with four setting possibilities each.
Type A: 10 pole DIP switches
RCSwitch::switchOn("11001", "01000");
The first parameter represents the setting of the first 5 DIP switches. In this example it's ON-ON-OFF-OFF-ON.
The second parameter represents the setting of the last 5 DIP switches. In this example the last 5 DIP switches are OFF-ON-OFF-OFF-OFF.
Transmitter code for type A switch is here.
Type B: Two rotary/sliding switches
RCSwitch::switchOn(4, 2);
The first parameter represents the setting of the first rotary switch. In this example it's switched to "4" or "D" or "IV".
The second parameter represents the setting of the second rotary switch. In this example it's switched to "2" or "B" or "II".
Transmitter code for type B switch is here.
Type C: Intertechno
RCSwitch::switchOn('a', 1, 2);
If you have another type of outlet switch which was not mentioned above then:
- Open the RCSwitch library's - ReceiveDemo_Advanced example sketch.
- Open up serial monitor and set your baud to 9600 baud
- Verify and upload the the sketch to your Arduino Uno board.
- Hold your remote near your receiver module and press a button.
- The Arduino board should decode the signal and print the results in the serial monitor.
- We received these codes after pressing buttons 1 and 2 on 2-Button Transmitter TX-3312N / (RN):
- We received these codes after pressing A, B, C, D buttons on 433 Mhz RF remote control SCT2260 universal:
- If we start pressing buttons on the Remote control for RC mains switch with LX2262A-R4 chipset, the following will be printed in serial monitor when we press the button to turn channel 5 on:
- So to turn on a switch module listening on channel 5 we would need to send the following Tri-State pulse sequence: 01100000 1000 S.The LX2262A-R4 uses a 12 tri-state bit codeword comprising 8 address bits followed by 4 data bits. For the tri-state codeword above - 011000001000 - the address is 01100000 (channel 5) and the data/command is 1000 (turn on). By pressing every button and decoding the signals we worked out the codes for all the addresses and commands:
Write code for your device
RCSwitch library has built-in functions that sends codewords for supported devices - so If you have one of these devices you should be able to use the RCSwitch::switchOn() and RCSwitch::switchOff() methods in the TypeX example sketches located in library RCSwitch -> Examples folder.
If your device is not supported you’ll need to manually set the PulseLength and Protocol and send raw codes using the RCSwitch::send() or RCSwitch::sendTriState() methods, as shown below.
Code for the RC mains switch
The following code based on the RCSwitch library SendDemo sketch switches remote controlled mains switch on and off every 1 second. Note the pulse length has to be manually set because it differs from the default pulse length for Protocol 1. We created a function rfcontrol() which accepts channel number and on/off as integer arguments and looks up the corresponding address and data commands specific to my device. For your device you could create a similar function, or just send the raw codes.
The code is here.
Code for 433 Mhz RF remote control SCT2260 universal
Here is the code which simulates button A every 10 seconds. It also flashes the on-board LED to indicate a command has been sent.
The code is here.
Understanding the RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver
The 433MHz is used on a wide variety of applications that require wireless control. Check that it's legal to operate low powered devices (25mW) in the 433MHz band without a licence in your country. If you're transmitting to (or on the same frequency as) a garage door opener / RC toy etc that you bought in your own country, it should be fine, provided you stick to the power limit.
315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver modules are very popular and, of course, cheap You can use them with any microcontroller (MCU).They work very well when the receiver and transmitter are close to each other. If you separate them too far you’ll loose the communication. The communication range will vary. It depends on how much voltage that you’re supplying to your transmitter module, RF noise in your environment and if you’re using an external antenna.
The use of an optional antenna will increase the effectiveness of your wireless communication. The transmitter module seems to have a range of several metres without an antenna. If you require more range, you can add an external antenna by soldering a length of insulated wire on the transmitter and receiver. Recommended length is 1⁄4 wavelength, which is approx 17cm @ 433MHz.See on picture below.
Specification:
TX (Transmitter) Technical Specifications:
- Working voltage: 3V~12V
- Working current: max≤40mA (12V), min≤9mA(3V)
- Resonance mode: sound wave resonance (SAW)
- Modulation mode: ASK /OOK
- Working frequency: 315MHz-433.92MHz, customized frequency is available.
- Transmission power: 25mW (315MHz at 12V)
- Frequency error: +150kHz (max)
- Velocity: ≤10Kbps
- Self-owned codes: negative
- Transmit up to 90m in open area
RX (Receiver) Technical Specifications:
- Working voltage: 5.0VDC +0.5V
- Working current:≤5.5mA (5.0VDC)
- Working principle: single chip super regeneration receiving
- Working method: OOK/ASK
- Working frequency: 315MHz-433.92MHz, customized frequency is available.
- Bandwidth: 2MHz (315MHz, having result from testing at lowing the sensitivity 3dBm)
- Sensitivity: excel –100dBm (50Ω)
- Transmitting velocity: <9.6Kbps (at 315MHz and -95dBm)
Signals and connections of the RF 315/330/433 MHz XD-FST/XD-RF-5V Transmitter/Receiver
Transmitter (TX) pins:
ATAD (DATA) - output signal coded by first Arduino board
GND - should be connected to ground , (-) of power supply
VCC - should be connected to power supply +3V - +12V
Receiver (RX) pins:
DATA - there are two pins, it doesn't matter which one to connect to second Arduino board, as long as you use only one of the DATA pins.
GND - should be connected to second Arduino board ground pin
VCC - should be connected to second Arduino board 5V pin.
Build the circuit
The following picture shows the needed connections with the Arduino Uno
Step by Step instruction
- Do wiring.
- Setup of tranmitter and receiver can be done on different PC (using installed Arduino IDE softwares) or on the same PC (using installed Arduino IDE and portable Arduino PC softwares) Open Arduino IDE.
- Plug your Adruino Uno board into your PC and select the correct board and com port
- Open up serial monitor and set your baud to 9600 baud
- Verify and upload the the sketch to your Arduino Uno board.
- Open the Arduino IDE serial monitor to see the values.
Summary
We have learnt how to connect RF 315/330/433 MHz XD-FST / XD-RF-5V Transmitter / Receiver modules to Arduino board and use them, analized RF remote control transmitted data and programmed the Arduino board send the same signals instead.
Library:
- See attachments on the begining of this project description.
- Sketches (transmitter1 and receiver1). We have used the RC Switch library - rcswitch.zip which we downloaded, unzipped and added to libraries in our PC, for example C:\Users\toshiba\Documents\Arduino\libraries. This link you can find in Preferences of Adruino IDE program which installed in your PC.
Sketch:
- See attachments on the begining of this project description.
- Sketches (transmitter1 and receiver1)
Other projects of Acoptex.com










Viewed: 9976 times