Help: 433MHz RF (UART) Transceiver-Received on Arduino Uno

Bluetooth, XBee, RF......

Help: 433MHz RF (UART) Transceiver-Received on Arduino Uno

Postby bskhoo » Sun Jul 13, 2014 5:50 pm

Hi,

I already try of the example LM35 temperature display on Serial Monitor(HyperTerminal) through RF transceiver. It works well per Cytron example..

I am currently trying to connect 2 Arduino Uno (One connected to LM35 while the other receiving the info).
I have not been successful, it can`t receive any signal on the second Arduino Uno.
Anyone can offer some help or any sample sketch will help.

*I am connecting transceiver
Rx pin -> Arduino Uno Tx pin(Digital Pin 1)
Tx pin -> Arduino Uno Rx pin(Digital Pin 0)

Here is a simple receiver sketch, unfortunately it`s not working.

-------------------------------------------------
void setup() {
Serial.begin(9600); //initialize UART for 9600bps
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}

void loop(){

if(Serial.available())
{ digitalWrite(13, HIGH);
delay(200); }
else { digitalWrite(13, LOW);
delay(200); }

---------------------------------------------------

Thks - BS
bskhoo
Newbie
 
Posts: 8
Joined: Thu Jul 10, 2014 11:42 am

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby ober » Tue Jul 15, 2014 9:43 am

If connection to PC and data is display on serial monitor correctly, it should be your setup (hardware or software) at Arduino.

Again, actual hardware setup photo would be helpful.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby bskhoo » Wed Jul 16, 2014 11:14 am

Ober,

It works on "SoftwareSerial"!! unfortunately doesn't work on standard hardware Serial (Pin 0/Pin1 Rx/Tx)

Below is the codes, just change to SoftwareSerial, it will work, what is the actual problem?

Tx code..
CODE: SELECT_ALL_CODE
#define   LM35    A1
int analog = 0;
float temperature = 0.0;

//#include <SoftwareSerial.h>
//SoftwareSerial mySerial(10, 11); // RX, TX

void setup() 
{
  Serial.begin(9600);
  //mySerial.begin(9600);
}
void loop()
{
   analog = analogRead(LM35);
   temperature = ((analog * 5.0) / 10.24);
   //mySerial.print(temperature);
   Serial.print(temperature);
   delay(500);

}



RX Code
CODE: SELECT_ALL_CODE
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

//#include <SoftwareSerial.h>
//SoftwareSerial mySerial(2, 3); // RX, TX

int incomingByte = 0;
int flag = 0;

void setup() 
{
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  //mySerial.begin(9600);
  Serial.begin(9600);
  lcd.setCursor(0, 0);
  lcd.print("Temp = ");
}

void loop()
{
  if (Serial.available())
    { flag = flag + 1;
      incomingByte = Serial.read();
      lcd.setCursor((6+flag), 0);
      lcd.write(incomingByte);
       if(flag == 5)
        { flag = 0; }
      }
 
   }



Thks. - BS
bskhoo
Newbie
 
Posts: 8
Joined: Thu Jul 10, 2014 11:42 am

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby ober » Thu Jul 17, 2014 9:31 pm

If you have tried the software serial and it works, but hardware serial does not work, it should most likely be the 1K series resistor on the RF UART module. It is stated in page 5 of User's Manual that RXD, TXD and SET has 1K resistor in series. And on Arduino UNO, the hardware serial is also connected to the on board USB to UART chip (for program loading and also Serial Monitor communication).

The RX of Arduino (ATmega328), pin 0 is connected to TX of on board USB chip. And in your case it is also connected to the 433MHz UART module's TX pin. By default, TX will be high when there is no activity, therefore the TX of on board USB chip is making that pin high as there is no activity. But the TX of 433MHz UART transceiver is trying to send data by pulling it low according to UART protocol. But since there is a 1K resistor in series, the RX pin of Arduino (Atmega328) cannot really be pull low. That is the reason why software serial pin can works, but not the hardware. I believe if you try this setup on Arduino Leonardo, Pro Mini, BBFuino, it will be successful with hardware serial.
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1486
Joined: Wed Apr 15, 2009 1:03 pm

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby bskhoo » Fri Jul 18, 2014 11:28 am

Ober,

Thks for the details explanation.
Yes, I check on the circuity, it actually show that the resistors and the connection to the on-board USB chip may have created the problem(Pullup the pins to high)
Currently I only have Uno, will test out other boards later.

-BS
bskhoo
Newbie
 
Posts: 8
Joined: Thu Jul 10, 2014 11:42 am

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby Idris » Wed Jul 23, 2014 2:31 pm

Hi bskhoo, I have done some experiment on RF-UART-433-1KM module + Arduino UNO. Frankly, it will not work if you connect directly between RF-UART-433-1KM module (RX, TX) and Arduino UNO (RX-0, TX-1) due to 1K series resistor on RF module. So my advise to use software serial. But, if you really need to use hardware serial on UNO, one of the method is by using SHIELD-XBEE (extra work needed).

1.jpg

2.jpg

*For RF-UART-434-100M, you can connect directly to UNO (RX-0, TX-1). There have no problem.
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Help: 433MHz RF (UART) Transceiver-Received on Arduino U

Postby robertsoon » Mon Nov 17, 2014 12:54 am

I am doing the same like what bskhoo did, transmitter side are Arduino UNO and Trasceiver 433MHz 1km while the other end are receiver side with Arduino UNO and Trasceiver 433MHz 1km. The receiver side is connected to a PC. What you have provided in the tutorial teaches similarly at transmitter side while the receiver side you are using UART-USB converter. Which I understand no script is required. Do correct me if I am wrong. How should I write the script for the receiver side, for the transceiver to receive data and output into serial monitor on PC.

However, at the transmitter side. I do not get what the input should be. Because both side I connected to individual PC. Can the SoftwareSerial.mySerial.print() output instantaneous data on the serial monitor like Serial.print()? As I cant view anything.

Apart from this, if I would like to test both the RF transceiver module alone without the arduinos, can I still transmit HI from transmitter's RX pin and expect to receive HI also at receiver's TX pin? Instead of serial data? I have tried, didnt see anything changed.

Meanwhile, if I supply 5V and 0V to Vcc and GND, I will get RX=3.2V, Tx=3.2V and SET also =3.2V at the same transceiver module. Meanwhile the other module I get Tx=5V whereas the rest remain the same. Is this normal? Or it is spoilt?
robertsoon
Newbie
 
Posts: 12
Joined: Sun Dec 25, 2011 7:11 pm


Return to Wireless Device

Who is online

Users browsing this forum: No registered users and 22 guests