Sim800L works until I add to final circuit

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
}
}

`

I could add a solid state relay and this may work. What are your thoughts?

can you include the sim800l in your schematic above? so I can understand how is everything connected.

If you replace the Alarm input with a simple switch, does it work exactly the same?

1 Like

Thank you for the reply. Please see a better schematic. would a lower volt sim800 help? I ordered one just in case.

One option suggested to me would be for me to get s sim800 that runs straight from a lipo but I would need to go to shutdown mode to get to a reasonable idle current draw but I do not know how to wake it back up. sleep only knocks the current down to 1 mAh and that would still kill a battery much quicker than I would like. in this case still use the RTC alarm but only to wake the arduino which should wake the sim800.

Anthony

new doc 2019-11-28 10.47.19.pdf (109.5 KB)

BTW - I will try a switch. Can’t do it today but will soon.

I find it odd that you have a SIM800l module that is 5v power and logic, it must have extra electronics that are unnecessary in your (and most) cases. The chip itself is designed to work directly from a 4.2v - 3.7v lithium battery, and its logic is 2.8v (strange, I know!).

All SIM800l modules I’ve seen follow this logic, some are advertised as being “5v logic tolerant”, which deceptively is not the same as “5v logic compatible” (alas, it only means that it will survive a 5v surge in their inputs, but there is no guaranty that it will successfully communicate with a 5v device).

In case you try with some other SIM800l module that seems more like the ones I describe, you can check the official hardware guidelines. There, on page 32 the manufacturer shows a very simple circuit to interface both UARTs, for 5v and 3.3v logic devices. Keep in mind that the VVD_EXT refers to the 2.8v internal voltage reference of the chip (you should have some way to access those pins, or provide your own 2.8v source).

With respect to the alarm logic and the SIM800l, try to find a module with an exposed pin called “EN”, “RST”, “PWR_ON” or something like that, as this would enable you to easily control the on/off state of the chip. You can also shutdown the chip completely by sending a serial command, but in order to turn it on again, you have to use this pin. This pin is usually 2.8v logic also.

Hello Viedana - I really appreciate your follow up on this issue. I do have a more standard chip coming. I should have it in about a week. It has a reset button on it. I did not know I could use the RST to control on / off state.

Here is a link to the 5v module I have just for reference.


it says:
Communication interface: The TTL level serial interface compatible 2.85/3.3/5v MCU

Indeed I’ve never seen that one! There looks to be two suspicious transistors in there that probably do the work specified in the document I’ve mentioned. So it may be legit (it would be really nice if you could probe the circuit and see if it matches the one on the hardware guideline).

Regarding the RST, it depends on how the module manufacturer has wired that pin. The chip itself has various pins related to power. Sadly, we have no way of knowing how they are being used since manufacturers usually don’t provide the schematics, and the pins on the chip are hidden behind it. You’ll have to test your module and see if you can come up with something.

By using a more bare-bones module, it should be cheaper, more power efficient (since less components means less quiescent current) and you can take advantage of the build-in battery measurement of the chip (don’t remember the exact AT command right now, but there is one). But this module seems very nice if you already have it! There probably is a way to make it work as you need it, just try a little with its reset pin.