Interfacing transmitter and receiver using one arduino uno

Hey,

I have to show that any kind of data is transferred from transmitter to receiver for my project. I have build a transmitter and a receiver (13.56 MHz) and I have an arduino uno. Its a simple project ( my guide says). I just have to demonstrate that something is being sent and something is received. Is it possible to use one arduino uno for both transmitter and receiver? Also any help on the codes will be highly appreciated. How and where (pins) should I connect Tx and Rx on arduino uno? Is it easier with two arduino unos? I have ordered another uno.

You could use one Arduino but then the transmission of data would be so easy to fake that it would hardly be evidence that your transmitter and receiver were working. I would use a separate Arduino for each.

You have not specified that nature of the transmission protocol so it is hard to specify the 'right' pins to use. Are you sending a simple on-off signal? Serial data? Audio? The answer is way different for each.

"Is it possible to use one arduino uno for both transmitter and receiver? "

I would say No. Folks have tried this numerous time with the Virtual Wire library and have not succeeded. http://www.airspayce.com/mikem/arduino/VirtualWire/ Now part of the RadioHead library http://www.airspayce.com/mikem/arduino/RadioHead/ See RH_ASK

It might be possible if a [really?] slow data rate so that the code could switch back and forth between sending a bit and receiving a bit. You could work the code out just using 2 digital pins, then add the RF part in after you get it working.

Grab any ol' infrared TV remote and an IR receiver for your Arduino.

With no idea of your project guidelines, and just going off of what you said about proving data has been delivered, controlling LEDs/motors/buzzers/etc on your Arduino via remote is simple.

For sending serial data using arduino uno ( one for both Tx and Rx) which pins should I use? Is the code simple?

If you can’t use an Arduino Leonardo, Arduino Micro, or Arduino MEGA which would allow the use of a hardware serial port then I would use SoftwareSerial (Arduino - SoftwareSerial):

#include <SoftwareSerial.h>

SoftwareSerial SoftPort(2, 3);  // RX on Pin 2, TX on Pin 3

void setup() {
  Serial.begin(115200);
  SoftPort.begin(115200);  // Fastest speed allowed
}

void loop() {
  if (Serial.available())
    SoftPort.write(Serial.read());
    
  if (SoftPort.available())
    Serial.write(SoftPort.read());

}

I don't think it's possible either. You will need two boards, with the transmitter on one and the receiver on the other, unless you have two transceiver modules.

Anyway, to give you food for thought look at my 433Mhz Wireless Rain Sensor YouTube video, #46 Wireless 433MHz Rain Sensor as it may give you an approach to using serial data, and the frequency of the transmitter is not relevant. If you look at the Video Description (below the main video) you will find two ultra-simple sketches for a transmitter (Tx) and receiver (Rx) just to get you going. But you will need two boards. :o

URL in the footer of this post. Enjoy!

Can i transmit data using serial monitor and receive on the serial monitor of receiver?

dudeism:
Can i transmit data using serial monitor and receive on the serial monitor of receiver?

Yes. Run the sketch in #5 on both Arduinos.

Its not working. I just have to connect Tx on pin 3 and Rx on pin 2 on the digital side of uno ?

dudeism: Its not working. I just have to connect Tx on pin 3 and Rx on pin 2 on the digital side of uno ?

The Arduino receives on 2 and transmits on 3 so you connect your TX to 2 and RX to 3. Also connect Ground to Ground.

johnwasser: both Arduinos.

Is he working with two Arduinos now?

INTP: Is he working with two Arduinos now?

I sure hope so, unless he switched to an Arduino MEGA.

I am using two arduino unos.

No need to supply 5V to arduino boards since they are connected to the computer using USB type A to B ?

Also will the same sketch in #5 work for both transmitter and receiver ?

dudeism: I am using two arduino unos.

Good.

dudeism: No need to supply 5V to arduino boards since they are connected to the computer using USB type A to B?

No need. USB can supply up to 500 mA of 5V to the Arduino and attached devices.

dudeism: Also will the same sketch in #5 work for both transmitter and receiver?

Yes.

Silly question. Should I use two computers; one each for transmitter arduino uno and one for receiver or one computer can work ?

I am using this circuit and arduino uno for micro controllers and function generator for oscillator. I ran sketch in #5 on both arduinos. For some reason it is not working. Please help.

dudeism:
Silly question. Should I use two computers; one each for transmitter arduino uno and one for receiver or one computer can work ?

I’m fairly sure you can use one computer. I don’t know if you can use the Serial Monitor part of the Arduino IDE on more than one port at a time. If not, you will need a terminal emulator program to connect to a second Arduino.
Test your test setup by removing the wireless transceivers and wiring the two Arduinos together with wire: 2->3 and 3->2. Get that working so characters sent to one Arduino come out of the other. THEN you put your transceivers in place for testing. If it works with wires and not with your transceivers then you can start debugging your transceivers.

This is the circuit. I tried with wires and its working.

dudeism: This is the circuit. I tried with wires and its working.

Congratulations.