Hey, I am making a vehicle accident system, in which I am using Arduino R3, SIM900A GSM Module. I have done everything in my project, but still my SIM900A is not sending SMS to the desired number. The SIM900A is connected to the network (the LED light around the antenna is blinking slowly), but still it is not sending any SMS. I tried my code and ChatGPT's code too, but still nothing seems to work, and also the SIM900A is not responding to AT commands. What should I know as I have already replaced my SIM900A with a new one but still no response from SIM900A as of now? The most shocking part the module is connected to network and when I ring the sim the ring goes and the sim is not switched off but still the sim900a is not responsing on the serial monitor. Please help me and tell me whats wrong with my code.
Code -
#include <SoftwareSerial.h>
SoftwareSerial sim900a(8, 9); // RX, TX
void setup() {
Serial.begin(9600);
sim900a.begin(9600);
delay(1000);
Serial.println("Type your AT commands:");
}
void loop() {
if (Serial.available()) {
while (Serial.available()) {
sim900a.write(Serial.read());
}
}
if (sim900a.available()) {
while (sim900a.available()) {
Serial.write(sim900a.read());
}
}
}
It's a very simple connection I have done:-
(from SIM900A) VCC - 5v (on Arduino)
(from SIM900A) GND - GND (on Arduino)
(from SIM900A) RX - 8 (on Arduino)
(from SIM900A) TX - 9 (on Arduino)
I am powering the module with the help of the Arduino Cable itself as of now (USB 3.0 on my pc) otherwise I will be using a 5V adapter but as of now for coding and seeing if it works I will be using USB ig.
Although it seems fine as the module connects and rings - This might not provide enough current to your module - which one is it and what are the requirements and how do you power the Arduino (if through USB quoi only have 500mA to play with).
those are even worse than using the 5V pin from your arduino. They are good for smoke detector but can't provide high current for a long time. Also your module does not need 9V, it probably needs 5V...
should I use a 9v adapter to Adruino. Adruino can power up sim900a then?
But I don't think there is a power supply issue cause the module is connected to network and sim is accepting calls (bell is ringing) but the main problem is the module is not responsing in serial monitor
The SIM900A GSM module has an operating voltage of 3.4V – 4.5V indeed but it draws high current — up to 2A when transmitting data — so I would advise using a good quality power supply with capacity of 2.5A for example. Don't forget to join the GNDs with the Arduino.
Hey,
I added a new code and everything seems to working fine, the module is responding when message is beint recieved but not sending messages and showing question mark.... is it something with my module or baud rate or anything else?