Author Topic: Stuffing Serial Bluetooth Module Inside C1k Casing  (Read 409242 times)

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #210 on: March 30, 2006, 01:06:52 pm »
Boris, thanks!

Quote
Quote
1. Why do we need s NPN transistor AND a P-ch MOSFET? Can we simplify the schemantics by using a sole N-ch MOSFET? Can then we just connect active-high signal from GPIO pin directly to GATE pin of MOSFET (assuming that it's the logic level input, we don't need a resistor?). SOURCE pin of the MOSFET then would be +5VDC source, and load would be connected to DRAIN pin? Can this schemantics work, or I'm missing something? (sorry, as you can see I lack the basic knowledge of electrical engineering).
No, this will not work.  The MOSFET controlled by voltage difference between source and gate, when Gate is above (more positive than) Source by threshold voltage, the transistor starts to turn on. N-Channel MOSFET will work fine in the schematic "A" (replace pins like this base-gate, emitter-source, collector-drain), but this will disconnect ground wire from the device. Not sure if this is acceptable.

Ahh, I misplaced the SOURCE and DRAIN. I was thinking of the opposite. Thanks for confirming it!

Quote
A bit different: Vdrop = 0.5A * 0.017Ohm = 8.5e-3V (by Ohm's law).

Ohh, I'm a complete idiot in the electric engineering, and just proved it again, sorry...
-albertr

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #211 on: March 30, 2006, 01:42:44 pm »
Ok, so I'll try to use the N-channel MOSFET with logic level input, since it looks like it would allow for a much simpler schemantics (connect GPIO pin to GATE, SOURCE to GROUND and put LOAD between 5VDC and DRAIN). I just recovered some dead PCB that has a bunch of Toshiba TPC8002 and Int.Rectifier IRF7811A MOSFETs soldered on. They all seem to have a logic level GATE inputs and packaged in SO-8:

http://www.toshiba.com/taec/components/Datasheet/ee08225.pdf
http://www.irf.com/product-info/datasheets/data/irf7811a.pdf

-albertr
« Last Edit: March 30, 2006, 01:45:56 pm by albertr »

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #212 on: March 30, 2006, 06:10:24 pm »
On the same dead PCB I found the FairChild Semi's FDS6990A, which is a dual N-channel MOSFET with logic level GATE input. I decided to use it over other MOSFETs I had. It's in the same SO-8 packing, which is nice IMHO, since it's small, but not too small for comfortable soldering.

So, to make the story short, it works as expected. The only interesting side effect of using N-channel MOSFET that I see, is if 5VDC connected first via OTG regulator control, the usb hosts sees some signals on the data lines, so it tries to communicate with the device, but since the device's ground is disconnected, it fails and disables the port. So work around is to  turn MOSFET first, and then turn OTG regulator.

Boris, thanks again for your help, it's much appreciated!
-albertr
« Last Edit: March 30, 2006, 06:12:36 pm by albertr »

Boris

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #213 on: March 30, 2006, 09:37:28 pm »
Quote
On the same dead PCB I found the FairChild Semi's FDS6990A, which is a dual N-channel MOSFET with logic level GATE input.
Please note, that this transistor have very large input capacitance of 1235pF and series resistor (about 1k) between GPIO and gate are mandatory. If it missing, the GPIO pin may latch and blow the entire processor.

Also, you may wish to check if no current drawn for 5V bus via data lines when device is  not powered.

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #214 on: March 30, 2006, 09:51:12 pm »
Ahh, ok. Thanks again for valuable information.

If you have a choice to use any of the following MOSFETs:

- Toshiba TPC8203, TPC8005, TPC8002,
- International Rectifier IRF7811A, IRF7805
- FairChild Semi FDS6990A

Which one would you recommend? Or they are about the same and all of them require a 1K resistor?
Thanks,
-albertr
« Last Edit: March 30, 2006, 09:56:02 pm by albertr »

Boris

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #215 on: March 30, 2006, 10:53:21 pm »
Quote
- Toshiba TPC8203, TPC8005, TPC8002,
- International Rectifier IRF7811A, IRF7805
- FairChild Semi FDS6990A
Capabilities of IRF* are exsessive for this task, TPC* are suitable and FDS6990A are the best from this list.  But all of them are relatively high power MOSFETs and have large values of input and reverse transfer capacitances.  If I had a choice, I'd better be used something like NDS351AN from fairchild.

It is always good idea to place resitor in series with gate.

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #216 on: March 30, 2006, 11:03:08 pm »
Thanks! I guess I'll keep FDS6990A then. I already added a 1K resistor between GPIO and gate. I dont' have any other MOSFETs around, and ordering from manufacturer would take time.

IFDS6990A seems to work fine, but I'll try to measure the current leakage when gate is closed, I'm alitlle bit puzzled as of why wi-fi module signals on USB data lines when ground is supposed to be disconnected...

-albertr

Boris

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #217 on: March 31, 2006, 09:13:44 pm »
Quote
IFDS6990A seems to work fine, but I'll try to measure the current leakage when gate is closed, I'm alitlle bit puzzled as of why wi-fi module signals on USB data lines when ground is supposed to be disconnected...
Because there are pullup resistors on either D+ or D- line as per USB standard.  Thats why one usually disconnect +5V bus  .

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #218 on: March 31, 2006, 09:18:41 pm »
Boris, you're right - there're 15K resistors between USB data lines and the ground. So are you saying that some small amount of current is leaking thru data lines to the ground?

On a side note, I'll try to implement schemantics "C" from your drawing for wi-fi module, BT module seems to be fine with schemantics "A".
-albertr
« Last Edit: April 01, 2006, 08:30:47 pm by albertr »

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #219 on: March 31, 2006, 09:27:39 pm »
I just recovered a FairChild's FDC658P P-channel MOSFET from the dead PCB (this PCB is a treasure chest - so many MOSFETs soldered on) that I will try to use in your schemantics "C".
-albertr

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #220 on: April 01, 2006, 04:57:19 pm »
I'm happy to report that Boris'es schemantics "C" works great with power-hungry wi-fi module! I have one question, thou - I'd like to use schemantics "A" for bluetooth module, since it has less number of components and thus takes less space. But since 5V is connected all the time, can some amount of current leak thru the transistor? If so, could it be possible to estimate how much? From what I understand, leakage thru UART TX/RX lines is insignificant if any.
P.S. I also soldered a small orange LED to wi-fi module, it looks so cool blinking in the dark!
-albertr
« Last Edit: April 01, 2006, 08:32:17 pm by albertr »

Boris

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #221 on: April 01, 2006, 10:51:57 pm »
Quote
I have one question, thou - I'd like to use schemantics "A" for bluetooth module, since it has less number of components and thus takes less space. But since 5V is connected all the time, can some amount of current leak thru the transistor?
When thansistor is closed the leakage currect are very insignificant.  However, I'm still worry about leakage through data lines - could you please to try to break +5V line, connect a multimeter in it and meausre how much current flows when transistor is off (or just disconnect the ground) ?

If you would like to keep schematic "A", I also would recommend to check how GPIO line behaves on boot - is it tied to +3.3V via resistor (or may be to ground) ? If not, it is recommended to insert a 10k resistor between GPIO and GND to prevent chaotic power supply to the buletooth module during reboot. Schematic "C" need it less, because bipolar transistor connected with common emitter have very low input resistance.

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #222 on: April 03, 2006, 08:00:33 pm »
Boris, thanks! I'll try to measure current, and then let you know.

On a side note, it looks like schemantics "A" has problems even with the power-friendly BT module. Sometimes, it doesn't work if I connect +5V first and only then the ground. So it looks like schemantics "C" is the way to go.
-albertr
« Last Edit: April 03, 2006, 10:04:53 pm by albertr »

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #223 on: April 03, 2006, 08:56:33 pm »
As Boris suggested, I hooked up a multimeter, and got some measurements. They sure look very interesting:

Code: [Select]
1.BT ground disconnected, +5V connected:                  59mA
2.+5V & ground connected initial BSCP negotiation:    42mA
3.BCSP link established:                                               <1mA
4.HCI inquiry:                                                                  55mA
5.BCSP terminated, negotiation:                                   <1mA

Here's my interpretations (please correct me if I'm wrong):
Obviously, #1 shows that schemantics "A" is no good.
Not sure why #2 and #5 are not the same - need to check how BlueZ terminates the link, but it's interesting finding.
-albertr
« Last Edit: April 03, 2006, 10:31:13 pm by albertr »

albertr

  • Hero Member
  • *****
  • Posts: 535
    • View Profile
    • http://
Stuffing Serial Bluetooth Module Inside C1k Casing
« Reply #224 on: April 03, 2006, 09:25:56 pm »
Here's some measurements for ZD1211-based wi-fi module:

Code: [Select]
1. idle, no driver is loaded:                                                                       93mA
2. assosiated and authenticated with 802.11b AP, idle:                          196mA
3. RX:                                                                                                      215mA
4. TX:                                                                                                      270mA

Some comments:
- even simple housekeeping activity like receiving beacon adds ~100mA
- i guess that multimeter's sampling rate is rather slow, so there might be some current spikes it didn't catch, but still I don't see anything close to 500mA.
- power-saving modes were not tested, I'll try to take another look at it later

-albertr
« Last Edit: April 03, 2006, 09:27:04 pm by albertr »