Reset switch. Close switch to cut power.

I have a project that uses an Arduino and a HC-06 BT module. The project works fine except that sometimes I need to reset the HC-06 and do this I have to remove the power. Therefore, I want to add a reset switch.

The HC-06 is powered independently from the Arduino and I want to add a momentary push button switch that when closed cuts the power to the BT module. I had thought I could use a NPN transistor but all the guides I have found (so far) show only how to turn things on when you press the button switch. I want to do the opposite. I want to turn the BT module off when I close the switch. How do I do this and is a NPN transistor the right part?

You need a PNP transistor, not an NPN, as it must go in the positive supply line. It's not negotiable.

You bias the transistor on with a resistor, and have the switch short the base to the emitter to turn it off.

Turning off the positive supply is no different than turning off the negative supply.

If the NPN on the Gnd side of the BT is biased on by a say 10k R from positive to the base, taking the base low would turn the NPN off.

The NPN could be replaced by a logic level low power MOSFET to drop less voltage C to E of the transistor. In fact this would be better than the PNP as there is full voltage to the BT module.

Weedpharma

Thanks for the replies. Put me on the right path. I also found a basic guide on sparkfun which gave me what I wanted Transistors - learn.sparkfun.com (second diagram)

Seems very straight forward to use a PNP transistor as a high side switch.

Paul,
In the sparkfun example, they simply have the base connected to the control signal (0V for ON, +5V for OFF) this is what I want but does not appear to be what you suggested. There isn't a connection between the base (the control signal) and the emitter (in the example this is 12V).

Weedpharma,
can you explain the mosfet more. In one of my projects I am using a mosfet (F9Z24N)for polarity protection on an Arduino 5V out pin but I don't fully understand what is happening (copy and paste electronics).

Hi,
If all you want to do is disconnect power from the HC, use a normally closed momentary press button in the positive wire to the HC.
When you press it the switch opens and disconnects the HC, releasing the button closes the switch and reconnects power.

Tom...... :slight_smile:

MartynC:
In the sparkfun example, they simply have the base connected to the control signal (0V for ON, +5V for OFF) this is what I want but does not appear to be what you suggested.

No it is not what you want, so the circuit is irrelevant.

In that circuit, the button turns ON to turn the device on. You want the switch to turn the device OFF, so that circuit is irrelevant.

TomGeorge is clearly correct, but normally closed push-buttons (Fridge door switches) are generally not available in the smaller form factor.

If this would suit however:![](http://i.ebayimg.com/00/s/NTI4WDUxNQ==/z/R64AAOxyTyBSX4vU/$(KGrHqEOKpwFJEFUGjDoBS(4vTl-wQ~~60_57.JPG)

The Sparkfun circuit will never turn off if the pin is configured as an output. The base will have either 5v or 0v, but the emitter always has 12v. There will always be a forward bias.

"Can you explain the mosfet more......" You will need to supply the circuit you are using.

Weedpharma

Hi,

the smaller form factor.

http://www.radioshack.com/pushbutton-normally-closed-momentary-switch4-pack/2751548.html#.VOfDHPmUdv8

http://www.amazon.com/SPST-NORMALLY-CLOSED-BUTTON-SWITCH/dp/B006WRVOS2

Google search, biblical filing system, "Seek and yea shall find".

Tom..... :slight_smile:

weedpharma:
The Sparkfun circuit will never turn off if the pin is configured as an output.

Why then would it make any difference if it is configured as an input?

(Hint: No difference.)

Those links from TomGeorge again:

Radio Shack Normally closed momentary switches Good price for 4 if you can pick up.

Amazon NC button Shipping costs much more than the item.

eBay Normally closed switch That search, when refined, is from where the link I posted in reply #5 came.

The impedance of the input being very high would mean there is virtually no current path.

Weedpharma

weedpharma:
The impedance of the input being very high would mean there is virtually no current path.

You need to think about that a little more.

Ok, so the sparkfun idea is not what I want. I had thought that if I put the button switch on the 5V line and then connect to the transistor it would cut the power when closed. ie close the switch puts the transistor base high and so stops the flow between emitter and collector. I don't understand why this is not right but I will research more.

The sparkfun circuit:


Is it ok to link to 3rd party websites like this?

I did try to find normally closed push-buttons but the local shops don't have anything and although I can find on line the shipping costs don't justify the purchase (to me anyway). At the moment the project is on a bread board so no real problem with resetting the HC-06 but I am starting to think about making it permanent and so started looking for a better solution.

Here is the set up for the HC-06. 7.5V from the power regulator also goes to an Arduino vin.

Paul__B:
You need to think about that a little more.

I am open to enlightenment.

Weedpharma

weedpharma:
I am open to enlightenment.

OK, OK, the input pin will be pulled down to Vcc, just as if it was a HIGH output.

MartynC:
I did try to find normally closed push-buttons but the local shops don't have anything and although I can find on line the shipping costs don't justify the purchase (to me anyway). At the moment the project is on a bread board so no real problem with resetting the HC-06 but I am starting to think about making it permanent and so started looking for a better solution.

OK, so I explained it to you before.

Use your "sparkfun" circuit as a starter - you need a PNP transistor. The "control" voltage that is fed to that 1k resistor is simply connected to ground to switch the transistor ON. But you put a normally open push-button between base and emitter of the transistor. Press the button, the base voltage is shorted out, the transistor turns OFF as long as you press the button.

It certainly is not rocket science (or - maybe it is - who knows?).