0
\$\begingroup\$

I completely rewrote my question as I found the source of the issue is related to the level shifter only.

bss138 levelshifter

This is the circuit for a 3.3V to 5V bidirectional levelshifter, used frequently.

My problem: I have the same circuit, and I built it 3 times now to go sure.
When I connect one side (3.3 or 5V) to ground the other side also goes to ground (works so far).
However, it draws 40mA current!

This caused my atmega128 to saturate the port pin current, effectively raising the voltage above 0V.

I simulated it on pspice, it says the current draw has to be at 500uA (10k pullups).

I tested it on 3 different BSS138 mosfets, they show the marking K38 on top (smt devices) which seems to be right (so it is the right mosfet).
I am clueless, why does it draw so high current in low state ?

\$\endgroup\$
  • \$\begingroup\$ possible duplicate of I2C/TWI Problem with lov voltage level of 3.3V side on 5V<->3.3v bus \$\endgroup\$ – Matt Young May 12 '14 at 20:00
  • \$\begingroup\$ Wonder what reason someone might have to downvote my question without comment. \$\endgroup\$ – John May 12 '14 at 20:52
  • \$\begingroup\$ Does the schematic have any relevance with what you describe? The resistor values are different and there is no AVR D0 pin. Why don't you provide the actual schematic you are using? \$\endgroup\$ – alexan_e May 12 '14 at 22:22
  • \$\begingroup\$ That's the circuit I use, I made a PCB of it and it supplies the chips and offers the level shifter. I was able to reduce the problem more, it is not related to the AVR. The problem is that the level shifter circuit (one BSS138, two pullups) consumes 39mA when one pin is drawn to ground. The level shifter I posted here is the same as here: circuit-diagram.hqew.net/… Just trying to figure out why it consumes 40mA. \$\endgroup\$ – John May 12 '14 at 22:30
  • 1
    \$\begingroup\$ I'm going to go out on a limb and say your BSS138 pinout is wrong. \$\endgroup\$ – Matt Young May 12 '14 at 22:52
3
\$\begingroup\$

If you are correct that shorting either side to ground draws 40mA then your part number is wrong or the parts are damaged (gate shorted). No incorrect pinout can give those exact symptoms.

However, it's more likely that you got the pinout wrong and just one being shorted to ground draws the 40mA.

Take a part you've used and measure the resistance (on the diode range of your multimeter) from gate to drain and gate to source, and see if you get any continuity at all. There should be nothing (open circuit). Short gate to source with a bit of wire and measure drain to source and source to drain. You should get conductivity in one direction (usually the meter will show 500-700) and no conductivity in the other (open circuit). See the below pinout from the datasheet.

If it passes the above four tests, then chances are the part is okay.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ ohm mode: G-S : 130ohm G-D 6m Also in diode mode I can see connectivity Going to get a 4th part now from the strip, if I destroyed them I wonder HOW ? I soldered them at low temperature as short as possible and the usage itself is low current (well should be) I had also verified that the high current indeed come from the gate path. It seems all nfets I have in use (on breadboard as well as on pcb) are broken \$\endgroup\$ – John May 12 '14 at 23:16
  • \$\begingroup\$ I had 4 of those circuits and I used 3 of them in my tests, all showed the same sort of behaviour! 3 of 4 BSS138 were dead, thanks for pointing that possibility out! They seem to be extremely sensitive, either to ESD or to temperature when soldering. I replaced them with freh ones and it works perfectly now. \$\endgroup\$ – John May 12 '14 at 23:59
  • \$\begingroup\$ Glad it worked out for you. It might be worth your while reading up on ESD damage prevention. \$\endgroup\$ – Spehro Pefhany May 13 '14 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.