0

Can anyone explain to me what i did wrong with this circuit, I guess it is down to my lack on understanding of how transistors and MOSFETs work.

Up the right hand side is headers GND, S1, S2, S3, through to S14 that connect to a lithium iron battery stack.

Up the left hand side is SHIFT-xx that connect to 5v microcontroller logic.

The principle being the microcontroller can activate any bleed resistor if any cell has reached its capacity.

If I apply 5v to the microcontroller trigger pins only the bottom 2 LEDs light up, If I apply 7v only the bottom 3 LEDs light up, and so on, the higher the voltage the more LEDs light up.

Since the microcontroller only outputs 5v this is a complete failure.

I think I am going to try changing resistor R126 for a lower value, but as the board is printed with SMD 0402 resistors this may be a challenge in itself and i would like to know if I am barking up the wrong tree before i try.

Should I have gone about this a completely different way?

enter image description here

Jay Dee
  • 319
  • 1
  • 11
  • "Lithium iron"? See your question title. – Transistor Jul 23 '22 at 11:28
  • @Transistor: [Lithium Iron Phosphate Battery](https://en.wikipedia.org/wiki/Lithium_iron_phosphate_battery) is a thing. – Dave Tweed Jul 23 '22 at 16:07
  • @DaveTweed, but it's been tagged lithium-ion. – Transistor Jul 23 '22 at 18:48
  • @Transistor: So? It can be both. There is no tag for lithium-iron, but there is one for LiFePO4. The point is, you can't assume that the title is a typo. – Dave Tweed Jul 23 '22 at 19:58
  • 1
    @DaveTweed, I *can* assume, but I could be wrong! Thanks. – Transistor Jul 23 '22 at 20:11
  • Continuing Dave's list -- third thing: R127, 122, 119 have to be at collector or respective BJT, not emitter (that's primary reason for "insufficient" control voltage). – Martin Jul 23 '22 at 20:17
  • @DaveTweed thanks dave, great help, i never realised, I built the circuit in Falsad's circuit simulator and it worked exactly as planed. i then built the same circuit in EasyEDA and had it printed and it failed miserably, looking more closely, if you place a PNP transistor onto the page in Falstad simulator the emitter defaults to the top. but if you drag the transistor in question onto the page in EasyEDA the emitter is at the bottom and you have to flip it over. very frustrating, i wish i noticed that before printing £130 of scrap boards. – Jay Dee Jul 24 '22 at 13:02
  • @Transistor curiosity but if "Lithium iron" is possibly not a tab for "Lithium iron Battery" like "LifePo4" what would any other uses be for the tag "Lithium iron" to do with electronics that had nothing to do with battery's or energy storage? – Jay Dee Jul 24 '22 at 17:34

1 Answers1

1

Two things:

  • Your PNP transistors are connected upside-down -- swap the collector and emitter connections. This is not immediately fatal, however -- transistors do have some gain in "reverse active" mode.
  • I think the bigger problem is that R120, R121, R128, etc. are tied to ground. They should each be tied to the source of their MOSFET.1

And of course, you need to be connected to the battery stack to power the LEDs.

It was suggested in a comment that the NPN transistors need to be wired differently, but no, having the resistors on the emitters is correct. The NPNs are being used as current sources (well, sinks, actually). 5V on the base means that each one sinks about 43 µA when turned on. Which should be plenty in this application.


1 This way, when the PNP is off, VGS on the MOSFET is zero. The way you have it, VGS for the MOSFETs farther up the stack becomes an ever-larger negative voltage. If your stack is tall enough, it could exceed the rating of the MOSFET.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
  • can you explain in any more detail why R120, R121, R128 should be tied to the MOSFET source, i have tried it both ways round and it seems to work fine ether way – Jay Dee Jul 24 '22 at 17:00
  • See the footnote I added above. – Dave Tweed Jul 24 '22 at 19:26
  • 1
    Ironically, connecting the PNP transistor backwards solves the reverse Gate voltage problem, because the Emitter/Base junction 'zeners' at ~7V. Simulation may not show this! It will also cause the 100k Gate resistor to draw some current (more from higher cells), eventually unbalancing the battery if left idle. – Bruce Abbott Jul 25 '22 at 06:50