Power supply for GSM module

Good day!

Please tell me the MOSFET ( Q1, Q2) values ​​that are not indicated on the diagram.
image

Hi,

Could you remind me where this diagram comes from?

https://docs.openmqttgateway.com/setitup/gsm.html#hardware-setup

For VCC5 you can power it directly all the time with an USB cable or use a MOSFET like here

Unfortunately I powered my test board with USB and not by a MOSFET

Good day. I have done a lot of tests with the GSM module A6. Assembled the power supply circuit of the module through the MOSFET. In order for it to work, you need pin D5 to be logical 1, and to reset to logical 0. Now in OpenMQTTGateway, on the contrary, when you start ESP8266 on pin D5, logical 0. Where can I fix it in the code so that it works as needed?

MOSFETs I used:

Hi,

Thanks for your feedback:

Here is the setup for the GSM module:

You can add a pinmode and digitalwrite command in it.

I went the other way. rewrote the part of the library that is responsible for resetting.

void A6lib::powerCycle(int pin) {
logln("Power-cycling module...");

powerOff(pin);
delay(2000);

powerOn(pin);
delay(4000);

powerOff(pin);
// Give the module some time to settle.
logln("Done, waiting for the module to initialize...");
delay(20000);
logln("Done.");

A6conn->flush();

}

// Turn the modem power completely off.
void A6lib::powerOff(int pin) {
pinMode(pin, OUTPUT);
digitalWrite(pin, HIGH);
}

// Turn the modem power on.
void A6lib::powerOn(int pin) {
pinMode(pin, OUTPUT);
digitalWrite(pin, LOW);
}

I think it will work

That’s better indeed, if it works do not hesitate to share it!

Hi everyone! I was waiting for the delivery of the power supply for the 2G gateway to test it right away.
Hi-Link HLK-10M05 which I ordered from AliExpress works great. I also tweaked the library a bit to make the power supply work. Thank you for working with OpenMqttGateway.

that's how I fixed the library, not very nice and everything is correct. I just made it simple and quick.

    void A6lib::powerCycle(int pin) {
    logln("Power-cycling module...");

    powerOff(pin);
    delay(2000);

    powerOn(pin);
    delay(4000);

    powerOff(pin);
    // Give the module some time to settle.
    logln("Done, waiting for the module to initialize...");
    delay(20000);
    logln("Done.");

    A6conn->flush();
    ```

    }

    // Turn the modem power completely off.
    void A6lib::powerOff(int pin) {
    pinMode(pin, OUTPUT);
    **digitalWrite(pin, HIGH);**
    }

    // Turn the modem power on.
    void A6lib::powerOn(int pin) {
    pinMode(pin, OUTPUT);
    **digitalWrite(pin, LOW);**
1 Like