A6 GSM Module oddities

Hello

I have a little issue with A6 GSM Module (IOT-GA6 by GooUUU)

Both my Arduino Nano and WeMos D1 Mini are able to communicate with it nicely but only at the following conditions:

  1. GND pin of GSM module IS NOT connected to GND pin of MCU board ( if I do, MCU board stops working )

  2. UART is supposed to work connecting RX to partner TX and TX to partner RX, which makes sense... but mine only works if RX is connected to RX and TX is connected to TX

Therefore I've two questions

  1. is it safe to leave GND unconnected ? ( both boards are operated by the same power supply though and GSM module support both 2.8 V, 3.3V and 5V on UART according to manufacturer)

  2. Why it works with RX to RX and TX to TX ?, maybe the GSM module has wrong labels on it pins ?

(Same result with both hardware UART and SoftwareSerial)

Thanks

Hello littleIoT,
Welcome to the forum.

What you describe does not make sense, I strongly suspect that your boards are not wired as you think they are. Please post clear photos of your boards showing the wiring, and make sure it is possible for us to trace the wiring for ourselves in the photos.

Please also post a schematic of what you are doing.

It would help to have a link to where you bought the boards and a data sheet.

Thx for reply, I know it doesnt make sense, this is why I had this doubt :slight_smile:

Ok pictures follow shortly, all purchased on Amazon

These to be precise:

GSM module: https://www.amazon.fr/Ils-dextension-Sim900a-Electronics-Planche/dp/B07F6BMSQF

ESP8266: https://www.amazon.fr/IZOKEE-NodeMcu-Développement-ESP8266-Compatible/dp/B076FBY2V3/ref=sr_1_3?__mk_fr_FR=ÅMÅŽÕÑ&crid=12ID1H05CJ1HH&keywords=wemos%2Bd1%2Bmini&qid=1565550327&s=gateway&sprefix=wemos%2Bd1%2Caps%2C199&sr=8-3&th=1

Nano: https://www.amazon.fr/Arduino-A000005-Nano/dp/B0097AU5OU/ref=sr_1_7?__mk_fr_FR=ÅMÅŽÕÑ&keywords=arduino+nano&qid=1565550365&s=gateway&sr=8-7

manual:https://www.makerfabs.com/desfile/files/A6_A7_A6C_datasheet-EN.pdf

Code:

#include <ESP8266WiFi.h>
#include <ESP8266WebServer.h>
#include <SoftwareSerial.h>
#include <WiFiClient.h>
#include <ESP8266HTTPClient.h>

SoftwareSerial mySerial(D1,D2);

mySerial.begin(57600);
delay(100);
mySerial.println("+++AT&FE1");
delay(100);
mySerial.println(“ATS0=2”);
delay(100);

Red Wire D1 to GSM U_RXD
White Wire D2 to GSM U_TXD
Yellow is GND currently unconnected for the reason above and everything works perfectly but it’s strange! that’s burden.

D1 in code is pin for RX and D2 is pin for TX!

Thank you for the photos. Please read 'how to use this forum, please read', in particular part 7 about posting code and part 9 about posting images (posting images here is a pain, but as you can see, it can be done).

On an ESP8266 you will have problems using software serial with it. I tried SWS on an ESP8266, had loads of problems and eventually discovered that the interrupts that drive the WiFi make a mess of the timing that SWS uses. If you have SWS working successfully on an ESP8266 well done, you are doing better than me. You can use the hardware serial port but you lose the USB connection. You use

  Serial.swap();    //GPIO15 > Tx, GPIO 13 < Rx

Which puts the serial port on the pins as above.

I cannot tell from the photo of the back of the GSM module which wire is connected to what because the photo is out of focus and the printing on the circuit board is not legible. Even if I could read it, the symptoms you describe suggest that maybe it is mis-lablled, or maybe SWS is not starting the way round you think it is, I don't know. I guess if it works you must have it the right way round.

The 'code' you have posted does not make any sense at all, there needs to be a setup and a loop function at the very minimum, these are missing, I would be surprised if it did anything at all. Please use code tags.

Am I correct that both boards are powered from the USB cables? Are the USB cables both fed from the same power supply? When I said I wanted to be able to trace the wires from the photos I kind of meant all the wires, not some of them. I can't see where the USB cables go. Anyway, if they are from the same power supply, the grounds are connected, at the power supply. It's not about safety, it's about the electrons having a wire to return to where they came from after they had flowed from one board to the other. I can't imagine why connecting the grounds between the boards would cause a problem unless, as you have already suspected, the pins marked ground are not actually ground but are something else; that would cause problems.

I hope that helps.

Sorry im terrible at taking photos
By the way im certain wiring is as described above ( mcu d1 goes to gsm rx and mcu d2 goes to gsm labelled tx pin ) most likely the gsm module has something misplaced :slight_smile:
and actually the whole setup is 2 wires from mcu to gsm and tbe two usb power supply, nothing more, the rest are wires soldered but not used, and even if i unsolder them the issue remains (tested :))
yes both boards are fed by usb and power supply is 5v 3a supply with 2 usb ports, the assembly works very good its just curiosity.
Hardware serial also works thats why you see the two half cut wires but the behavior is exactly the same no matter if i use sws o hws :slight_smile:
i guess ill arrange a test with optocouplers and voltage dividers just to be certain wheter the gsm module has bad labels or something goes wrong elsewhere and swapping solved ( mistery ).

Code : i cut to bare minimum but the whole code has few lines about gsm ( begin and few at command sent ) so problem is hardly within code besides i pasted sws init to show im sure mcu rx is going to gsm rx etc :slight_smile:

btw thx everybody
Ill experiment a lil more and let you know