Author Topic: Why isn't this circuit working?  (Read 2106 times)

0 Members and 1 Guest are viewing this topic.

Offline rexxarTopic starter

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
Why isn't this circuit working?
« on: June 16, 2014, 04:50:34 am »
So I tried to build a little constant current/constant voltage supply to charge a lithium battery. Individually, the CC and CV sections work as expected. Originally I used an Arduino to read the voltage and switch to CC or CV, but I wanted to try to do the same thing with a voltage comparator.

So I'm using one comparator to switch the CC section in, and another set up as inverting to switch CV mode. For some reason the comparators both output the same voltage, and never go above 0V. :o I've got diodes in there because I got negative voltage leaking from collector to base, and because sometimes the opamp would output negative voltages while the transistor was on. I'm using an LM358 opamp and an LM339 comparator.

I'm sure I've done something terribly wrong, but please don't throw things, I just came up with this off the top of my head!
 

Offline edavid

  • Super Contributor
  • ***
  • Posts: 3381
  • Country: us
Re: Why isn't this circuit working?
« Reply #1 on: June 16, 2014, 05:21:17 am »
Your first problem is that the LM339 has an open collector output.
 

Offline w2aew

  • Super Contributor
  • ***
  • Posts: 1780
  • Country: us
  • I usTa cuDnt speL enjinere, noW I aR wuN
    • My YouTube Channel
Re: Why isn't this circuit working?
« Reply #2 on: June 16, 2014, 01:56:52 pm »
Your first problem is that the LM339 has an open collector output.

In other words, you need pull-up resistors on the LM339 outputs.
YouTube channel: https://www.youtube.com/w2aew
FAE for Tektronix
Technical Coordinator for the ARRL Northern NJ Section
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2082
Re: Why isn't this circuit working?
« Reply #3 on: June 16, 2014, 02:08:11 pm »
Your first problem is that the LM339 has an open collector output.
And your next problem will be the operation of the PNP transistors - they turn on with current leaving the base - which is at odds with the diodes. But, with a little thought it should be possible to make use of  the open collector output of the LM339 to remove the PNP transistors and four diodes.
 

Offline rexxarTopic starter

  • Frequent Contributor
  • **
  • Posts: 439
  • Country: us
    • Forever Tinkering
Re: Why isn't this circuit working?
« Reply #4 on: June 16, 2014, 02:47:18 pm »
And your next problem will be the operation of the PNP transistors - they turn on with current leaving the base - which is at odds with the diodes. But, with a little thought it should be possible to make use of  the open collector output of the LM339 to remove the PNP transistors and four diodes.

Oops, those are supposed to be NPN transistors, I used the wrong symbol.

Your first problem is that the LM339 has an open collector output.

That would explain it then. I dunno why I just assumed it'd operate like an opamp. I'll try again when I get home from work. Thanks, guys. :-+
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf