LM3914 - enabling via Opctocoupler.

Discussion in 'The Projects Forum' started by rhd, Jul 1, 2014.

  1. rhd

    Thread Starter New Member

    Jul 1, 2014
    I hope it is okay / appropriate to have started a new thread to ask this question (the thread that this question would have more appropriately fit in was apparently too old to reply to - so the forum seems to have blocked what admittedly would have been a bit of a necropost).

    A previous user came up with a neat circuit for creating a lithium ion battery gauge:

    I'm planning to use 2x the above circuit in order to create a battery gauge for a 2S lithium pack, with a separate bar graph for each cell within the pack. The challenge arises from the fact that I want to trigger the guage using a momentary switch, rather than keeping it on at all times. The only way I could come up with to do so (given that this is a 2S cell, and two of the above circuits) is by use of a DPST switch, cutting the V+ on both circuits at once. However, since since I have only mm to spare in my design, I need to use a tactile switch, and DPST tactile switches are nearly impossible to find (though they do exist). I needed a workaround, which lead me to the idea of using a DPST optocoupler (like this) triggered by a standard SPST tactile switch.

    I hope this makes sense so far?

    The glitch in my plan, is that I'm concerned by the fact that a solid state relay (optocoupler), unlike a physical relay, will probably drop a little bit of voltage, which may throw off the measurement conducted by the LM3914, and thus make the results inaccurate.

    I'm wondering if there is anything akin to an "enable" pin on the LM3914 IC that I could instead tie the optocoupler's output switches to, rather than simply cutting the V+ feed entirely? IE, still take the measurement voltage straight from the cells, but introduce the opctocoupler between the cell and an enable pin, or a supply voltage pin, such that the LM914 wouldn't do anything until the optocoupler closed?

    EDIT: Schematic added. I know it's helpful to see a schematic, so here's how my setup would look, if we were to imagine that the two switches (on the right hand side) were one DPST switch. If this looks a little different than the circuit referred to above, it's because I'm using the SMD version of the chip rather than the DIP.


    Last edited: Jul 1, 2014
  2. k7elp60

    Distinguished Member

    Nov 4, 2008
    Why don't you use a couple of p channel mosfets with the gates turned on with
    the spst switch?
  3. rhd

    Thread Starter New Member

    Jul 1, 2014
    Wouldn't a MOSFET still have the same issue with dropping some (even if not much) voltage?
  4. crutschow


    Mar 14, 2008
    If you use a P-MOSFET as a high side switch, when you ground the gate to turn it on the voltage drop is very low, determined by its ON resistance (which can be less than a few tens of mΩ or less) times the current through it. You just need a Logic-level type MOSFET for the switches which can fully turn on at <5V Vgs (not the Vthreshold value).
  5. rhd

    Thread Starter New Member

    Jul 1, 2014
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    Since both ICs have a common connection at the 4.2V+ point, won't a simple SPST switch in the 4.2V+ line do the job?

    Edit: No, perhaps not; since the two ICs would then be effectively series-connected. Not sure how they'd behave. I feel a sim coming on .....

    Edit2: Sim done. The single switch in the 4.2V+ line won't work :(.
    Last edited: Jul 2, 2014
  7. rhd

    Thread Starter New Member

    Jul 1, 2014
    I had the same initial thought, following by the same concern :)

    But I think the MOSFET solution will work (below).

    EDIT: Actually, I'm wondering if I'll run into problems with the polarity of the middle MOSFET preventing operation of the upper meter, given that it's effectively on the ground line of the upper meter?