Switching a HC05 with Pro Mini

Hey everyone,

I’ve been trying to switch a HC-05 Bluetooth module on and off with a 3,3V Pro Mini.
I need to be able to switch it off because this is a battery-powered application.

There’s a circuit diagram of my current circuit attached. As you can see I am using a P-CH Mosfet as a high side switch to toggle VCC of my HC 05. The Mosfets Source is connected to 3,3V and a NPN Transistor is used to pull it’s Gate to GND and essentially switch the Mosfet on.

So far this seems to work. When I connect VCC directly to the pin the power led of the HC05 lights up and it starts working - great!

However the Pro Mini seems to be unable to drive the Mosfet.
When it tries to set Pin 7 to HIGH, it reboots the µC and begins its code from the start.

Does anyone has an idea what the reason could be?
Maybe bad resistor values that makes the circuit draw too much power from the pin? I can’t seem to get it working.

Here are the datasheets of the NDP 6020 P and the BC548C in case you want to have a look:

The resistor network associated with the MOSFET gate is not the best. Take out the 220 Ohm resistor and replace the 100K with 10K.

The reboot problem is probably due to something short circuiting the power supply, in which case you either have a bad component or have wired something backwards.

Typical high side switch (but R2 should be 1K or larger):

This way you risk phantom powering the HC-05 through its Rx pin (as the Arduino will keep its Tx at high level when idle).

The proper (and much simpler) way to accomplish your goal is the EN pin of the HC-05.

Switching modules that have a capacitive load, and a lot of modules use capacitors across their supply, can trigger a brown out reset in the Pro Mini. 3.3v Pro Minis often have brownout set to 2.7v, changing it to 1.8V helps.

The other thing to do is slow down the MOSFET switch on with an RC network.

Thanks for the answers already!

jremington: I'll apply the changes you mentioned tomorrow and I will check for a short circuit. But, as I said, connecting it manually works fine.
Although maybe I should mention that the Pro Mini still reboots when turning on the module. But afterwards it is capable of holding it on.

wvmarle:
This way you risk phantom powering the HC-05 through its Rx pin (as the Arduino will keep its Tx at high level when idle).

The proper (and much simpler) way to accomplish your goal is the EN pin of the HC-05.

The EN Pin of the HC 05 does not turn it on or off. It just allows you to reprogram the module itself.

srnet:
Switching modules that have a capacitive load, and a lot of modules use capacitors across their supply, can trigger a brown out reset in the Pro Mini. 3.3v Pro Minis often have brownout set to 2.7v, changing it to 1.8V helps.

The other thing to do is slow down the MOSFET switch on with an RC network.

Ok, I will do some research about brown-out and RC networks tomorrow. Thank you for mentioning it.

There is an enable pin on that module, maybe not broken out. That varies between boards. Sometimes the set pin is indeed mislabeled as enable pin.

Look up the pinout of that module and get out your soldering iron!

wvmarle:
There is an enable pin on that module, maybe not broken out. That varies between boards. Sometimes the set pin is indeed mislabeled as enable pin.

Look up the pinout of that module and get out your soldering iron!

I did. But I can’t seem to find the pin you mentioned.
There’s an IO pin that is broken out to the EN Pin of the breakout board. But there’s no pin that would let me toggle the module that easily. (I attach what I found)

I worked around the problem by switching GND of the board.
This eliminates the risk of phantom powering and also I don’t need an additional transistor anymore.
(which by the way seemed to cause the problem. But still don’t know what exactly is wrong with it.)

That EN pin supposedly disables the board, but as said there are different modules out there that look identical but are not (yay for brandless stuff).

It seems that the boards with working EN pin connect it to the EN of the on-board regulator. Can't find what pin 34 (PIO11) is supposed to do, I guess in your case it's to switch to ("enable") AT program mode...