Using mosfet to switch GSM module. Can I use the serial voltage to drive the MOSFET?

Thread Starter

dan1010

Joined Jul 13, 2017
10
I use a transistor to switch on and off a 5v gsm module with its own battery. The mosfet is connected by a 3v driver signal and ground coming from a micro controller.

Once the the GSM is switched on, there is a serial connection to control it. That is connected to the micro controller with Tx, Rx, GND, V(3v).

So there is a total of 6 connection from the microcontroller to the GSM/mosfet.

I was wondering, because the serial connection voltage is used at the same time the GSM module has to be switched on, would it be possible to use the voltage from the serial as the driver of the mosfet? That would save me two connection wouldn't it?
 

ebeowulf17

Joined Aug 12, 2014
3,307
I use a transistor to switch on and off a 5v gsm module with its own battery. The mosfet is connected by a 3v driver signal and ground coming from a micro controller.

Once the the GSM is switched on, there is a serial connection to control it. That is connected to the micro controller with Tx, Rx, GND, V(3v).

So there is a total of 6 connection from the microcontroller to the GSM/mosfet.

I was wondering, because the serial connection voltage is used at the same time the GSM module has to be switched on, would it be possible to use the voltage from the serial as the driver of the mosfet? That would save me two connection wouldn't it?
I'm not 100% sure I'm understanding your plan.

Are you talking about using the 3V line in the serial connection to switch the MOSFET? If so, are you sure that line is low when the serial communication is inactive? Does it come from the microcontroller 3V supply directly, or is it from a switched output on the microcontroller?

Alternately, are you talking about using the actual Tx or Rx lines as the voltage to control the MOSFET? If it's this one, I can't say for sure, but I'd be wary of attempting that.
 

Thread Starter

dan1010

Joined Jul 13, 2017
10
I need a GSM to send a daily sms with sensor data coming from the microcontroller. When I am not using it I want it the GSM to be off.

I can control the GSM main power with a mosfet, where a signal and ground are connected to the micro controller, and a 5V and GND coming from the GMS battery. It all works fine, but it is a lot off connections to the controller.

The GSM module has Rx, Tx, 3V and GND for the serial connection, all coming from a microcontroller. So I can set the v to 0 or 3v whenever I want. Because I thought the 3V and GND as used for the serial connection are on and off at the same time i want the GSM to be on, I was wondering if I could use it to just power on the GSM. So as soon as I set the serial connections power, that should also go to the mosfet signal, enabling main power to the GSM module.

I could just test it, but I was afraid of overlooking something obvious that might short it all out..
 

DickCappels

Joined Aug 21, 2008
10,179
Yes, you can. Use a retriggerable one-shot with a reasonably long period. The one-shot triggers on the trailing edge of the first start pulse. During the one-shot's period 5V is applied to the GSM module. Every time data is sent the one-shot is retriggered so the module stays on as long as data is sent. After the last byte is sent and the one-shot times out the 5V is switched off.

I suggest sending an ASCII NULL to trigger the one-shot because it consist of only a start pulse and since the circuit will trigger on the falling edge of that pulse, the module will not see any data until, after an appropriate delay, actual data are sent.
 
Top