I posted this on the Arduino forum but I am posting here because this seems to be the expert SIM800L site. I hope this is not an issue.
Well - I am at wits end again.
Working condition:
I have a Sim800L EVB hooked to a Nano through softwareserial. I am powering the Nano and the Sim800L through a 3A boost converter hooked to a 3.7v 3000mAh Lipo. I am boosting to 5v since this particular SIM800L takes a 5v in and its logic is safe with 5v. With this setup I can consistently connect to the network and send an SMS text.
Non-working condition:
I added a RTC circuit that turns the power on once per minute (at this point - in the future, once per day). This circuit works when hooked to the Nano and it works when connected to the Nano and the Sim800L once again hooked through the boost converter, but the Sim800L only powers on, does not find a network and does not send a text. Attached is the circuit for the RTC. I would think based on the MOSFET IRLZ44N, it would be able to handle the 2A current needed by the SIM800L.
Any thoughts would be appreciated.
Code (I have some items commented out for testing):`#include <DS3231.h>
#include <Wire.h>
#include <SoftwareSerial.h>
//Create software serial object to communicate with A6
SoftwareSerial mySerial(3, 2); //A6 Tx & Rx is connected to Arduino #3 & #2
DS3231 Clock;
// constants won’t change. They’re used here to set pin numbers:
const int FloatPin1 = 6; // the number of the pushbutton pin
// variables will change:
int FloatState1 = 0; // variable for reading the pushbutton status
void setup() {
// Start the serial port
Serial.begin(9600);
//Begin serial communication with Arduino and A6
mySerial.begin(9600);
// Start the I2C interface
Wire.begin();
// initialize the pushbutton pin as an input:
pinMode(FloatPin1, INPUT);
FloatState1 = digitalRead(FloatPin1);
Serial.println(FloatState1);
// Alarm is not enabled! Should set alarm
if(!Clock.checkAlarmEnabled(1))
{
Clock.setClockMode(false);
// 0b1111 // each second
// 0b1110 // Once per minute (when second matches)
// 0b1100 // Once per hour (when minute and second matches)
// 0b1000 // Once per day (when hour, minute and second matches)
// 0b0000 // Once per month when date, hour, minute and second matches. Once per week if day of the week and A1Dy=true
// Set alarm to happen every minute (change to your wanted interval)
Clock.setA1Time(1, 1, 1, 0, 0b1110, false, false, false);
Clock.turnOnAlarm(1);
}
Serial.println(“Initializing…”);
delay(10000);
mySerial.println(“AT”); //Once the handshake test is successful, it will back to OK
updateSerial();
delay(10000);
mySerial.println(“AT+CSQ”); //Signal quality test, value range is 0-31 , 31 is the best
updateSerial();
mySerial.println(“AT+CCID”); //Read SIM information to confirm whether the SIM is plugged
updateSerial();
mySerial.println(“AT+CREG?”); //Check whether it has registered in the network
updateSerial();
// read the state of the float switch value:
FloatState1 = digitalRead(FloatPin1);
mySerial.println(“AT+CMGF=1”); // Configuring TEXT mode
updateSerial();
mySerial.println(“AT+CMGS=”+17175755931"");//change ZZ with country code and xxxxxxxxxxx with phone number to sms
updateSerial();
// check if the pushbutton is pressed. If it is, the buttonState is HIGH:
// if (FloatState1 == HIGH) {
// Send text below 1/3:
// mySerial.print(“Tote 1 - National Drive, Garland, Below 1/3”); //text content
// updateSerial();
// mySerial.write(26);
// Serial.println("");
// Serial.println(“FloatState1 High”);
// delay(10000);
// } else {
// Send text above 1/3:
mySerial.print(“Tote 1 - National Drive, Garland, Above 1/3”); //text content
updateSerial();
mySerial.write(26);
Serial.println("");
Serial.println(“FloatState1 Low”);
// }
// Reset alarm to turn off the device
Clock.checkIfAlarm(1);
}
void loop()
{
// Serial.println(“Hello”);
// Nothing to loop
}
void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}