0
\$\begingroup\$

I am trying to make an Android controlled toy car. Now the range of the bluetooth module is around 10 meters. However, to increase the range, I decided to interface the RF module with the Bluetooth (HC-05) Module. I have a TX and Rx pair of 433 Mhz. Basically, the app sends an integer value to the Bluetooth module. The Tx pin of the bluetooth module is connected to the Data pin of the transmitter.

On the Receiver side, I have connected the data pin of the receiver to the Rx pin (PIN 0) on the Arduino. This is the overall setup. I have attached an Image of the connections. It's my first time using Fritzing, so please dont mind the nasty connections.

I power the HC-05 and Tx pair using a separate 5V and the Rx using the Arduino. For the sake of the image, I have shown all of the components being powered from the Arduino. I am first testing the whole thing on an LED, so the code attached is that for an LED. Below is my code:

int LED= 13;  
char input;  

void setup() 
{  
  Serial.begin(9600);  
  pinMode(LED, OUTPUT);  
  Serial.println(">> START<<");  
 }  

 void loop() 
{  
  if(Serial.available()>0)  
    {  
     input= Serial.read();  
     if(input=='1')  
       {  
        Serial.println("ON");  
        digitalWrite(LED, HIGH);  
        delay(2000);  
        }  
     else if(input=='0')  
       {  
        Serial.println("OFF");  
        digitalWrite(LED, LOW);  
        delay(2000);  
        }  
     else  
      {  
      Serial.println("NO INPUT");  
      Serial.println(input);  
      }  
     }  

    }  

Now, without the RF module, that is, when I connect the Tx of the HC-05 to the Rx of the Arduino (PIN 0), the above code works perfectly. However, when I connect the Tx pin of the HC-05 to the Data pin of the Transmitter module and the Data pin of the Receiver module to the Rx pin (PIN 0) of the Arduino, everything goes awry. Any suggestions on why this might be happening?

\$\endgroup\$
  • \$\begingroup\$ Do you have access to a scope or logic analyzer? Also, a schematic would be a lot easier to read. \$\endgroup\$ – uint128_t May 7 '16 at 18:42
  • \$\begingroup\$ Nope, I do not have access to either of these things. Also, I believe the circuit is correct as the wiring is pretty straightforward. I believe there is something wrong with the code. \$\endgroup\$ – Swastik Mohapatra May 7 '16 at 18:44
1
\$\begingroup\$

It seems your 433 MHz RF link' data rate is too low for your application.

Judging by your picture you are using RR10 series receiver. It's maximum data rate is only 2 kHz (2000 baud) and a baud rate stated in your code is 9600. Moreover, it seems the lowest possible baud rate for HC-05 is 4800.

Check your 433 MHz transmitter and receiver for their max data rate.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.