XBEE Pro S2C does not transmit using Arduino Nano BLE 33 Sense

Hello! I had recently started to work on a project that requires me to establish a wireless communication between two XBEE Pro S2C modules for the purpose of sending data of the sensors present on the Arduino Nano BLE 33 Sense.

What I have done so far: One of the XBEE (XBEE1) is connected to my laptop using one of the USB-port, and the other (XBEE2) to Arduino. The Arduino is also connected to the same laptop using another one of the USB ports. Using the XBEE and Arduino pinout diagrams, I connected Vcc, Dout, Din and GND of XBEE 2 to 3.3V, D3, D4 and GND pins of the Arduino respectively. Both the XBEES have been configured using XCTU software and are operating in AT mode. The XBEES are able to talk to each other on the XCTU console if I directly plug both of them into the laptop using the USB ports.

Now, I uploaded the following code to Arduino to check the serial connection:

UART Xbee(digitalPinToPinName(4), digitalPinToPinName(3));
void setup() {
  Serial.begin(9600);
  Xbee.begin(9600);
}

void loop() {
  while(Xbee.available())
  {
    Serial.write(Xbee.read());
  }

  while(Serial.available())
  {
    Xbee.write(Serial.read());
  }
}

After uploading the sketch, when I type the characters into the XCTU serial console of XBEE1, it is immediately displayed on the Serial monitor of IDE, which is expected. The TX of the adapter for XBEE 1 and the RX of the adapter for XBEE 2 also blinks at the same moment, confirming that the character is being sent by the XBEE 1 and it is being received by XBEE 2 for the Arduino to print (The adapters that I am using are CP2012 XBEE Explorer).

The Problem: When I type into the Serial Monitor for the Arduino to do the reverse job, nothing is displayed on the XCTU serial console. The respective TX and RX lights of the adapter do not blink either, meaning that XBEE2 is not able to transmit only.

What I have done to fix: I tried using a different board, Arduino Uno, and the code (after some modifications, removing UART and adding SoftwareSerial) works flawlessly. Both the XBEES are able to receive and transmit. However as soon as I run the code on Arduino Nano BLE 33 Sense, the problem persists, XBEE 2 receives but doesn't transmit. I have checked the connections to Arduino Nano, and even soldered the pins. I tried using different digital pins instead of D4 and D3, but the problem remains exactly the same.
I also found a similar problem on this forum itself, but I have tried upgrading the XBEE firmware to all the possible options that were listed on the XCTU, and the result was still the same.

I would be extremely thankful to anyone who would be able to point me into the right direction and tell me where I am going wrong. Thanks a lot!

Remove both Xbees.
Do an individual Tx/Rx loopback test on both Arduinos.
Connect the two Arduino's together using Tx Rx crossover wiring.
Check that they can communicate in both directions.
Substitute the direct wired connection with the two Xbee devices.

I connected the RX and TX pins of Arduino Nano together, and I am able to receive, on the serial monitor, whatever I send to it. Arduino Uno also passes this test.

I also connected the two Arduinos together, and both the boards were able to communicate with each perfectly. Both the Arduinos received and transmitted the characters.

However, as soon as I replace the wires with XBEE devices, the problem resurfaces. The one connected to Uno transmits, and the one connected to Nano is able to receive and print on the serial monitor, but the Nano XBEE is not able to transmit anything for the Uno XBEE to print.

Could be a problem with Xbee adaptor.
Carefully unplug the Xbees from the adaptors and swap them over (without bending the pins).
If the problem follows the adaptor rather then following the Xbee then it's an adaptor problem.

When I swap the XBEES with the adapters, the XBEE which is now connected to Arduino doesn't transmit but is able to receive, but the one connected to laptop transmits. The result is the same when I swap just the XBEES, the one connected to Arduino doesn't transmit. The whole setup worked perfectly when I just used Arduino Uno instead of Arduino Nano, and the XBEES were even able to talk to each other when they both were directly plugged into laptop on XCTU console, so I can't see how there would be a problem with the adapters itself :smiling_face_with_tear:

Post a link to the specific type of Xbee adaptor you are using.

I posted in the question, this is the adapter that I am using .

Do you have a circuit diagram for the adaptor?

It's impossible to tell if it's designed to interface with 3.3 or 5V Arduinos.

If it's designed for 3.3v Arduinos then using it with a 5v Arduino will damage the Xbee. If it's designed for use with 5v Arduinos then using it with a 3.3v Arduino will probably cause the Tx to fail.

I tried to find for the one that I am using, but unfortunately I couldn't. But since it worked perfectly with Arduino Uno, and assuming Uno is a 5v Arduino, while I connected the Vcc of XBEE to its 3.3V pin, should I change the connection to 5V pin?

You have two options:

  • Reverse engineer the adaptor to give a circuit diagram. Find the level shifting circuitry, then bypass it.
  • Find an adaptor that is designed to work with 3.3v Arduinos.

Is this a student project? If so, your supervisor has given you hardware that cannot be used to fulfil the project requirements therefore they either need to revise the requirements, or else give you 3.3v compatible hardware.

Actually, it is possible. According to the product page, the adapter has 5V to 3.3V level shifters built in.

Unfortunately it's not so simple. Recently on this forum there was a case of an adaptor that contained a 5 to 3.3v regulator but no level shifting circuitry for the signal lines. There seem to be a growing number of poorly designed or poorly documented interface boards, so you really do need the circuit diagram.

I did not say it was simple. Either you don't believe the manufacturer, or you do. One or even a few bad examples does not indict all of them.

Agreed, a schematic would be great.

What we really need is a schematic diagram showing what the OP did, since that is completely unclear. The XBEE adapter linked is for a USB connection, not for an Arduino connection.

@rayford03 please post a photo of a complete, hand drawn (pencil and paper) wiring diagram of your entire setup, with modules, pins and connections clearly labeled.

Sure, I'll post it as soon as I get back home.
@mikb55 The project is student run but there is no supervisor involved, we bought this equipment ourselves.
I have a doubt about one thing though. The Nano indeed is a 3.3V board, so if we assume that the adpater is built for 5V boards, why is only the TX pin failing to do its job? Why not both the RX and TX pins, as I am able to receive with Nano perfectly? Shouldn't the RX pin fail to work too?
Also I did some more research and found that USB ports on laptop provide a 5V of power. When I directly plug in the XBEES on adapters to the USB ports, they work perfectly. So then, is it actually the case that Nano is not providing enough power to XBEE just to transmit, but receive?

Some adaptors designed for use with 5v Arduinos have a simple 66% resistive divider circuit on the signal input to knock the 5v logic HIGH from a 5v Arduino down to the 3.3v that the Xbee can safely handle.

If you use the same adaptor with a 3.3v Arduino, the HIGH signal going into the Xbee is now reduced from 3.3v to 2.2v which is only slightly above the 2v HIGH detection threshold used by 3.3v circuits. Operation is likely to be unreliable.

Other adaptors may use more sophisticated 5-3.3v level shifting circuits but I don't know how they behave when fed a 3.3 instead of a 5v signal.

For Xbee outputs some adaptors use a proper 3.3-5v level shifter, others do nothing and simply rely on the 2.4v-3.3v output voltage being high enough to be recognized as a logic HIGH by a 5v Arduino.

See Logic Levels - SparkFun Learn

Please post a wiring diagram.
'
Please post a link to the adapter that you are actually using. It is not the one linked in post #1, or post #7, which is for a USB connection.

You do not need a logic level shifter to use the Xbee with a 3.3V processor. You do need one with a 5V processor.

This is the setup that I am using. Also I am using the same adapters for USB connection and for connection to Arduino, the adapter has pins and I used jumper cables to power it from Arduino by connecting them in the same fashion as in the diagram. Using the same connections, and just replacing Nano BLE 33 Sense with Uno, the whole setup worked perfectly.

@mikb55 I tried researching about the built in voltage regulator on the XBEE Adaptor that the product page talked about. The IC mentions its name as AMS1117 3.3 H103MC. I tried giving 5V through the voltage regulator to the XBEE, but the problem still remains exactly as it was before, it received but didn't transmit.

Sorry, I can't make any sense out of your drawing, and can't imagine what "Jumper cable CP2102 adapter" might be doing between an Arduino and an XBEE.

Good luck with your project!

Can you explain what exactly is still unclear to you? The Xbee is seated on the adapter just like any other normal Xbee shield. This adapter provides the convenience to use jumper cables to make an electrical contact between Arduino and Xbee, and not by just using USB connection, and it does so by extending the 20 pins of Xbee out of the adapter. These are the same jumper cables that we use for connecting different components on a breadboard. I honestly don't know how to elaborate more.

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