Wireless UART with Arduino and 433MHz or 434MHz module

Last month, I was thinking of doing a wireless temperature monitoring at my office. But I do not want to use WiFi or Bluetooth module, because WiFi is expensive and Bluetooth require establishing connection. I am out of idea as the normal RF module is not good to transfer UART data.

Anyway, I was thrilled when our purchasing department give me two low cost options:


  • 433MHz wireless UART module: 1km (kilo meters) wireless range. Are you kidding me? Frankly we have never tested that distance, maybe we will try to verify that some other time. Not to forget, the specification is measured under open space, or line of sight. In urban area where there are walls, iron, interference; I would expect distance within 100 meters or so.


 

Please do take note that both these modules are not compatible in term of wireless communication, they cannot talk to each other as the frequency is different. You must get the same modules for communication.

Nonetheless, both these wireless module have similarities:

  • Come as transceiver each module; require at least 2 modules (1 pair) to establish communication.
  • Wireless communication frequency band is either 434MHz or 433MHz.
  • UART TTL, Half Duplex, supported baud rate from 1200bps to 115200bps, default is 9600bps.
  • 100 channels to be configured for security or interference avoidance.
  • Configurable in command with AT command.
  • Power: +3.3V to +5.5VDC, recommended < 5.0V.
  • Low current consumption, depending on operating modes.

We notice there is 1K resistor built-in series with the TX and RX pin of 433MHz (1KM) wireless module. This will cause problem when this module is connected to Arduino hardware serial pins (especially pin 0).

When you get it, the antenna (spring or spiral) require soldering to the “ANT” pad. Try to fit the hole nicely! I soldered it in two different methods 🙂 Not to forget, you will need to get yourself header pin to extend the UART and power pin. I am choosing the right angle header pin. There are 40-ways of header, so you have plenty of extra pins to spare.


Hardware Require:

OK, after you had done solder the antenna to the wireless UART module, let’s prepare the temperature reading and send to UART program on Arduino. BTW, I am using 434MHz (100 meters) module, but you can choose 433MHz (1KM) as it is just the distance and wireless frequency that are vary between these two type of module. Not to forget the 1K series resistor on 433MHz module. I will show the both the connections and examples sketch.

1st thing is always the hardware connection. Connect the LM35 Arduino as shown:


I hope is straight forward. If you like it in Fritzing format, here you go:

UNO + LM35

 

Load this sketch(UART_LM35) into Arduino UNO.

Hardware UART for 434MHz

 

Now open up serial monitor in Arduino IDE: Tools -> Serial Monitor


Make sure the Baudrate is 9600 and you should see this:


If you type ‘a’ (small letter a) in the top bar of Serial monitor and send, you will notice the LED on Arduino will light up. Sending ‘A’ (capital letter A) will OFF the LED. Sending other character will not change anything. This is to demonstrate bi-directional communication. Temperature reading is from Arduino to computer while the character ‘a’ or ‘A’ is from computer to Arduino.

Em…. I know that this is UART, is simple! I want wireless. Yes, wireless UART is the same as UART. So develop and make sure the communication is working and you get proper reading and temperature update. It seems my office is quite a hot place to work 🙂 Yeah! 29 degree Celsius.

After verify everything is working properly, let’s proceed to wireless. No code modification is necessary if you plan to:

If you plan to use 433MHz (1KM) wireless UART module, you will need to do minor modification on sketch and also connection, I will show this later.

We need to setup the wireless module with Arduino and also with computer. It is different with Bluetooth or WiFi, you do not need to establish connection by searching or key in pairing key :).

Arduino with 434MHz (100 meters) Wireless UART, please make the following connection. The pin assignments for wireless UART module are labelled at the back of the module.

DSC06660

434MHz Module with Arduino

Bear in mind, the UART pins are cross connected; RX of Arduino should be connected to TXD of wireless module and vice versa for TX of Arduino.

How about the connection at Computer? We will need to setup the connection for computer to receive wireless data. I am using UC00A to receive UART data and display it in Arduino Serial monitor, if this is your 1st time using UC00A, please refer to the User’s Manual, you will need to install the driver.

434MHz Module with UC00A

 

Here is a closer photo on the connections, hopefully you can get it right. Please do not connect the supply of 5V wrongly. You will definitely damage it. The photo shows connection to 433MHz (1KM) module, but actually the connections to UC00A are same for both 433MHz or 434MHz module.


OK, good! We are done for the wiring. Now, go to Arduino IDE, close the Serial Monitor. Choose different COM number for the Serial port. We are not going to load any program here. Just to choose the com port UC00A connected to. Go to Tools -> Serial Port -> Choose the new com number. Previously my Arduino UNO is COM 5, after I connect UC00A and install driver, I have another new COM port which is 50. You should check the COM port number for your UC00A. It can be any number.


Now open the Serial Monitor again. Notice the temperature is being updated through new com port? Wireless via the 434MHz wireless module. Oh, is getting hot here!


Good! You get it, hopefully! If you cannot get it, please do check the connection again, most likely is due to wrong connection! Not to forget to try sending ‘a’ or ‘A’ to control the LED on Arduino.

433MHz (1km) wireless UART module, modification needed

Now, allow me to show the modification needed if you want to use 433MHz (1km) wireless UART module. 

1st, after you verify the LM35 temperature monitoring and control with USB connection. You will need to load this sketch (Soft_UART_LM35) which uses software UART to send and receive data. 

Software UART for 433MHz

And changes on the connection from Arduino to the 433MHz module.

DSC06650

433MHz Module with Arduino

Do take note the pins from Arduino for UART is shift from D0 to D2, and D1 to D3. We are utilizing software serial to transmit and receive data. The connection of 433MHz module to UC00A is same as connection of 434MHz. Choose the correct COM port and open serial monitor from Arduino IDE. You should get the same result.

These modification needed due to 1K series resistor on 433MHz and Arduino TX and RX pin. If you are using PIC or other type of microcontroller, these modification might not be needed.

Summary 

If you study the tutorial and try it out, you will notice you did not modify the code if you are using 434MHz (100 meters) wireless module. Even if you use 433MHz (1km) wireless UART module, the modification is minor only. Yes it is easy and straight forward to use. BTW, it is bidirectional communication, but in half duplex mode. You can still control LED, outputs or motors on Arduino, but please develop program to do so. Good luck!

I will explain how to configure the module in other topic.

If you have any inquiry, please do post in our technical forum as we seldom visit the comments section under tutorial page. 

Attachment:

Sample code

There are two folder in this repository:

  • UART_LM35 – Hardware UART LM35 temperature monitor and control (434MHz only)
  • Soft_UART_LM35 – Software UART LM35 temperature monitor and control (433MHz and 434MHz)


Buy

, , ,

Related Post

Getting Started with IR Distance Click

Getting Started with Temperature Sensor (Celsius) (SN-LM35DZ)

Getting Started with Light Sensor Module (SN-LIGHT-MOD)

Getting Started with 3A Motor Driver Shield and Arduino Uno

3 thoughts on “Wireless UART with Arduino and 433MHz or 434MHz module

  1. Hello Sir,
    Good Morning.
    I need to send four bits which are stored in controller of 52 series over RF module. Sir suppose i dont know anything about RF interfacing and its programming. Will you please suggest some name of books where i can get all the information.

Leave a Reply

Your email address will not be published. Required fields are marked *