Hello, I am currently having trouble with my GSM SIM900A MINI with its connection. The connection LED of the sim module doesn't blink but it's always on and I have already connected it to an outer power source (2 3.7V Lithium ion batteries) while having common ground with my Arduino Nano 33 IoT. I have already searched youtube videos about it but their modules seem to have to problem with the connection and i can't figure out why my LED doesn't blink. Is there a way to resolve this problem? Thank you.
Hi there! A diagram would be very helpful to us.
Hello, here would be the picture of the circuit
And here would be the code that i used but it wouldn't send the text message or receive messages. I have also tried changing the baud rates but it's still the same
#include <Arduino.h>
void readGSMResponse() {
unsigned long timeout = millis() + 2000; // 2-second timeout
while (millis() < timeout) {
while (Serial1.available()) {
char c = Serial1.read();
Serial.write(c);
}
}
}
void setup() {
Serial.begin(9600);
while (!Serial);
Serial.println("Initializing GSM module...");
Serial1.begin(9600);
delay(1000);
Serial1.println("AT");
delay(500);
readGSMResponse();
Serial1.println("AT+CMGF=1");
delay(500);
readGSMResponse();
Serial1.println("AT+CMGS=\"+639391803733\"");
delay(500);
readGSMResponse();
Serial1.print("Hello, this is a test SMS from Arduino Nano 33 IoT");
delay(500);
Serial1.write(26);
delay(500);
readGSMResponse();
Serial.println("SMS command sent. Check your phone for the message.");
}
void loop() {
if (Serial1.available()) {
char c = Serial1.read();
Serial.write(c);
}
}
It looks like the batteries are in parallel = 3.7 V is that correct?
From what I find it needs 5 V, so there's a difference of 1.3 V. Can it work with that? Another issue is that the Arduino works with 3.3 V, does the module have any voltage level translation for that?
Thank you for the suggestion. I will try with a series battery holder, and yes the sim module has a 3.3V TX and RX connection for the arduino
That will give 7.2 V instead. If the module is rated for 5 V only, it will certainly be fried.
For this setup to work you need three things:
- A battery holder that put the batteries in series, and in addition to that..
- a 5 V voltage regulator
- Edit: Not needed (Level conversion between 5 and 3.3 V, for the Tx and Rx pins)
Yes thank you for the suggestion and I am planning to buy an LM7805 5V Voltage regulator for the module
Those waste a lot of power as heat. Will your batteries last?
An LDO regulator will be much more friendly to your batteries.
I currently don't have an LDO regulator on hand and I can just recharge the batteries if they're out of power
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
