I would like to have my pic MCU turn on/off a bluetooth module via a NPN transistor. Previously I had connected only one of the BT's ground pin (pin 13) to the collector pin of the transistor. It didn't work. The BT module just cannot be turned off.
I suppose I had to connect the 3 ground pins on the BT module. See attached. Is this the right way to do so? Thanks!
It's perfectly valid to switch the ground side, and no different to switching the +ve side - it's only a 'convention' to switch the positive, and prior to that the 'convention; was to switch the negative
I'm presuming the OP is planning having a resistor feeding the base?, and (for NorthGuy) switching this way will lose very little voltage, and 'possibly' less than an FET.
It's perfectly valid to switch the ground side, and no different to switching the +ve side - it's only a 'convention' to switch the positive, and prior to that the 'convention; was to switch the negative ...
It is NOT valid if there are low inputs to a logic chip. You can get some weird behaviors when you float the ground pin on the logic chip, and the chip tries to find a ground by forcing unnatural currents into the low outputs of the driving logic sources...
It is NOT valid if there are low inputs to a logic chip. You can get some weird behaviors when you float the ground pin on the logic chip, and the chip tries to find a ground by forcing unnatural currents into the low outputs of the driving logic sources...
Just as bad removing the positive supply, and leaving inputs high from the micro - essentially in either case you have to set the I/O pins accordingly.
Without the rest of the circuit (and the software) though we're all just guessing
Assuming micro and module run off the same supply?, how about feeding it directly from an I/O pin (or a few paralleled) - but again, no specs on micro or module.
There should indeed be a resistor between the mcu pin and the npn in the picture (missed that one, sorry).
I am less familiar with fet and a quick search suggest that it has a minimum voltage requirement. My circuit is only 3.3v. What component should i use and how should they be connected? i tend towards a pnp solution but am open to the fet possibility.
If you want to consider a FET, you should look for so called "logic level" MOSFET. I looked at Digi-key and there are hunderds of FETs matching your criteria, for example this one:
**broken link removed**
FET connects very similar to BJT. It has 3 terminals - gate, which plays the same role as base in BJT, drain takes place of collector, and source takes place of emmiter. It's a good idea to connect a rsistor (1M or so) between gate and source to prevent the FET from accidentally turning on when gate is floating.
If you want to switch on the high side, you can use a P-channel FET for that.
The BT module consumes max 50mA. If we can feed two MCU pins into the 3.3V pin of the BT module, then that would be a fuss-free way to turn on-off the BT module. Saves me some money too .
The BT module consumes max 50mA. If we can feed two MCU pins into the 3.3V pin of the BT module, then that would be a fuss-free way to turn on-off the BT module. Saves me some money too .
My guess is that you accidentally turned one pin high and the other low for relatively long period of time, after which one of the pins (or both) burned down.