Unable to communicate with UC20 Module with Arduino Uno R3

I want to interface Arduino UNO and Quectel UC20 Module and EVB. And I am trying to send AT Commands from Arduino UNO and receive response via 0,1 pins of Arduino respectively. But it is not working. The code I am trying to implement on Arduino is as follows:

/* Connections
   ***********
    Arduino Uno       Quectel UART
    -----------       ------------
        0(Rx) <--------- 3(Tx)
        1(Tx) ---------> 2(Rx)
         GND ------------ GND
*/

String a;

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  Serial.print("AT");

  if(Serial.available()>0)
  {
    a= Serial.readString();// read the incoming data as string
    Serial.print("Received data: ");
    Serial.println(a);
  }
  delay(500);
}

Please explain what that means.

You are aware that pins 0 and 1 are also used for the communication with the PC so you have a conflict there.

The above will send to both the UC20 and the serial monitor. Not sure if the former knows what to do with it.

Are you stuck with the Uno; or do you have another board with an additional UART (Mega, Micro, Leonardo, ...).

What is the required baud rate for communication with the UC20? If you can bring that down to 9600 at the UC20 side, you can use SoftwareSerial on the Uno.

I mean, as you can see I am sending command "AT" via Serial port. So, I am assuming that, it should give the response "OK". But not getting any response.

I have only Arduino Uno.

The default board baud rate is 115200. That's why I, I tried to see the communication by using the same serial port. So that it could be easier.

From the board manual:

What you can do is use the Uno as a serial-to-usb converter.

  1. Keep the Uno in reset by wiring a the reset pin to ground.
  2. Connect Rx of the Uno to Rx of the UC20.
    Connect Tx of the Uno to Tx of the UC20.
  3. GND to GND
  4. Uno 5V to UC20 5V; if the UC20 required 3.3V, use 3.3V instead.

Open serial monitor, use the Uno's serial port and you should be able to communicate with the UC20.

Check the UC20 manual how you can change the baud rate and change it to 9600; change the Serial monitor's baudrate to 9600 and check that it still works.

Disconnect everything (including the reset to GND wire). Update your sketch to use SoftwareSerial on two different pins (e.g. 2 and 3) and wire it to the UC20 accordingly.

Connect the Uno to the PC and upload the sketch.

I am trying to communicate with UC20 Module via RS232 port it's Evaluation board have. So this part is not required right?

And yeah, I just found it out. I will try to set the baudrate to 9600 and check it out.

RS232 uses different signal levels and inverse logic; you need a converter between the UC20 and the Arduino. Something like SparkFun RS232 Shifter - SMD - PRT-00449 - SparkFun Electronics or SparkFun Transceiver Breakout - MAX3232 - BOB-11189 - SparkFun Electronics.

Yeah Yeah I mean.... I previously given connections like this....

That will not work for the following reasons

  1. RS232 vs TTL (see previous reply)
  2. Missing GND between Arduino and UC20; it might not be needed if both system are connected to the same PC but it is still advisable.

And for reference (from the board manual):

I also tried connecting ground pin of arduino uno to ground pin of RS232 (5th pin) according to it's manual attached below....

[Not shown in the photo, but tried it too (also included in the comment as you can see)]

Put a RS232 level converter in !! Further posts are not useful till you have done that.

1 Like

Okay!!!! :saluting_face: I'll be back soon... I dont have it as of now, I will get it and implement it by tomorrow or day after tomorrow.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.