Forums

Re: Battery charging circuit

Started by Uncle Steve May 6, 2013
On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote:
> Back again for some more abuse. > > I'm building a 12V battery charger that will be controlled by a small > low-power microcontroller. I've not yet hooked up the > microcontroller, but most of the code is written and I'm trying to > finalize the charger electronics before I hook it up. > > The circuit is very simple. An 18V 2A transformer, a bridge > rectifier, and filter capacitor feeds a main power rail. A 5V > regulator produces a few mA for the microcontroller, which I won't show > here. The charger is more or less as follows, though I will leave out > the resistor/divider taps which hook up to the ADC channels on the > micro. > > > +18VDC ---------------------------+ > Q1 c e | D1 R1 > -----\_/--------->|----\/\/\--------+12(batt) > b| | > +------+ | > | | +--+----------+ > / Q2 e\_/c |
R4 \ |b |
> / | e |c Q3 > \ +--\/\/\------\_/ > | R2 |b > | | R3 SW1 > LED1 \_/ +--\/\/\-- \-- +5V > --- > | > | > GND --------------+------------------------------------ GND(batt) > > > Q1 - MJE3055 > D1 - 1N4004 > R1 - .5 5W > > Q2 - BC557 > R2 - 200K > > Q3 - 2N2222 > R3 - 1K
R4 - 2k
> > The microcontroller will strobe R3 with PCM at about 488HZ with a duty > cycle dependant on the charge profile. R1 is the sense resistor and > permits measuring instantaneous charge current. I've got the battery > attached and can watch the voltage rise (and settle) as I manually > engage a switch attached as shown. The battery voltage as it came > from Wallmart was about 12.7V. Charge current with this circuit > is 1.4A at this point in its charge cycle. The heat-sink gets rather > warm, but it isn't all that big and I'm going to target 3 or 4A as the > peak charge current so I'll probably substitute a TO-3 package with a > much beefier heat-sink when I put the project in an enclosure. > > So far, so good. The output of Q1 shows .6V ripple. Attaching my > scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a > 120Hz signal with a 70mVpp with a duty cycle of 17%. I'm not exactly > sure where this signal is coming from, although its frequency suggests > a causal relationship with the AC mains. There does not appear to be > any ripple on the 5V rail, but my scope isn't good enough to really > zoom in on it. > > The other side of the coin is that the Q2/Q3 network seems to be > rather sensitive. When I pass my hand over the breadboard the > distortion described above doubles and I can get an amplitude of 1V on > that distortion by standing up suddenly while sitting in front of the > idle circuit. It is difficult to say what is happening because I can > double the distortion by attaching the scope to a wall-wart USB > charger, and I know I haven't yet calibrated the scope all that well > either. (Scope shows 4.5V from the 5V regulator.) But the fact > that I can affect the circuit just by moving things in the general > vicinity is, um, rather shocking. > > Besides installing the circuit in a metal case, are there any easy > solutions to fix that 16mV idle voltage? Should I just change the > BC557 to a 2n2222 and work out how many of what kind of resistors I > need to supply the 3055 with the mA it needs to dump several amps into > the battery? I like this version because it is easy to set up and has > a low part count, but I'd really like to get rid of the noise and the > sensitivity to movement.
As suggested, I moved this out of the existing thread. It was an mistake that I did not remove the references header. At any rate, I set up a separate pair of 2n2222, 10K resistor, and BC557 similar to the input stage above as well as a LED. Then I connected a small spool of insulated wire to the base of the 2n2222 and then let it out a couple of feet until the LED stayed onish without my hands being near the device. The result is a strong 6-7MHz signal for a bunch of cycles and then some dead time. It looks like there could be some FM in there, and on the high part of the cycle there appears to be an additional small signal, but I can't resolve any detail with my equipment. If I hold the spool in my hand the amount of on time changes considerably depending how much of my hand is in contact with the plastic and insulation. With palm open, there is one rise/fall cycle at about 6.5MHz when my hand is about 6in from the wire. As my hand gets closer, a second peak appears and so on until there is a train of several dozen cycles at or near the measured frequency. Any idea what the hell that signal might be? Regards, Uncle Steve -- There should be a special word in the English language to identify people who create problems and then turn around and offer up their own tailor-made bogus non-solutions designed to completely avoid the root causes of the situation under consideration. 'Traitor' might be a good choice, but lacks the requisite specificity. One of the problems with contemporary English is it lacks many such words that would otherwise categorically identify certain kinds of person, place, or thing -- making it difficult or impossible to think analytically about such objects. These shortcomings of the English lexicon are representative of Orwellian linguistics at work in the real world.
On Mon, 06 May 2013 16:15:36 -0400, Uncle Steve wrote:

> On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote: >> Back again for some more abuse. >> >> I'm building a 12V battery charger that will be controlled by a small >> low-power microcontroller. I've not yet hooked up the microcontroller, >> but most of the code is written and I'm trying to finalize the charger >> electronics before I hook it up. >> >> The circuit is very simple. An 18V 2A transformer, a bridge rectifier, >> and filter capacitor feeds a main power rail. A 5V regulator produces >> a few mA for the microcontroller, which I won't show here. The charger >> is more or less as follows, though I will leave out the >> resistor/divider taps which hook up to the ADC channels on the micro. >> >> >> +18VDC ---------------------------+ >> Q1 c e | D1 R1 >> -----\_/--------->|----\/\/\--------+12(batt) >> b| | >> +------+ | >> | | +--+----------+ >> / Q2 e\_/c | > R4 \ |b | >> / | e |c Q3 >> \ +--\/\/\------\_/ >> | R2 |b >> | | R3 SW1 >> LED1 \_/ +--\/\/\-- \-- +5V >> --- >> | >> | >> GND --------------+------------------------------------ GND(batt) >> >> >> Q1 - MJE3055 >> D1 - 1N4004 >> R1 - .5 5W >> >> Q2 - BC557 >> R2 - 200K >> >> Q3 - 2N2222 >> R3 - 1K > R4 - 2k >> >> The microcontroller will strobe R3 with PCM at about 488HZ with a duty >> cycle dependant on the charge profile. R1 is the sense resistor and >> permits measuring instantaneous charge current. I've got the battery >> attached and can watch the voltage rise (and settle) as I manually >> engage a switch attached as shown. The battery voltage as it came from >> Wallmart was about 12.7V. Charge current with this circuit is 1.4A at >> this point in its charge cycle. The heat-sink gets rather warm, but it >> isn't all that big and I'm going to target 3 or 4A as the peak charge >> current so I'll probably substitute a TO-3 package with a much beefier >> heat-sink when I put the project in an enclosure. >> >> So far, so good. The output of Q1 shows .6V ripple. Attaching my >> scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a >> 120Hz signal with a 70mVpp with a duty cycle of 17%. I'm not exactly >> sure where this signal is coming from, although its frequency suggests >> a causal relationship with the AC mains. There does not appear to be >> any ripple on the 5V rail, but my scope isn't good enough to really >> zoom in on it. >> >> The other side of the coin is that the Q2/Q3 network seems to be rather >> sensitive. When I pass my hand over the breadboard the distortion >> described above doubles and I can get an amplitude of 1V on that >> distortion by standing up suddenly while sitting in front of the idle >> circuit. It is difficult to say what is happening because I can double >> the distortion by attaching the scope to a wall-wart USB charger, and I >> know I haven't yet calibrated the scope all that well either. (Scope >> shows 4.5V from the 5V regulator.) But the fact that I can affect the >> circuit just by moving things in the general vicinity is, um, rather >> shocking. >> >> Besides installing the circuit in a metal case, are there any easy >> solutions to fix that 16mV idle voltage? Should I just change the >> BC557 to a 2n2222 and work out how many of what kind of resistors I >> need to supply the 3055 with the mA it needs to dump several amps into >> the battery? I like this version because it is easy to set up and has >> a low part count, but I'd really like to get rid of the noise and the >> sensitivity to movement. > > As suggested, I moved this out of the existing thread. It was an > mistake that I did not remove the references header. > > At any rate, I set up a separate pair of 2n2222, 10K resistor, and BC557 > similar to the input stage above as well as a LED. Then I connected a > small spool of insulated wire to the base of the 2n2222 and then let it > out a couple of feet until the LED stayed onish without my hands being > near the device. > > The result is a strong 6-7MHz signal for a bunch of cycles and then some > dead time. It looks like there could be some FM in there, and on the > high part of the cycle there appears to be an additional small signal, > but I can't resolve any detail with my equipment. > > If I hold the spool in my hand the amount of on time changes > considerably depending how much of my hand is in contact with the > plastic and insulation. With palm open, there is one rise/fall cycle at > about 6.5MHz when my hand is about 6in from the wire. As my hand gets > closer, a second peak appears and so on until there is a train of > several dozen cycles at or near the measured frequency. > > Any idea what the hell that signal might be? > > > Regards, > > Uncle Steve
I'm not making sense of your schematic. If Q2 is a PNP it should have its emitter to +18V and its collector to the base of Q1. (Q1 should have its collector _connected_!!). Q3 is configured to deliver current to the base of Q2, but it needs to pull current -- ?!?!?!?! Could you be showing the emitters and collectors of Q2 and Q3 reversed? If it's doing anything at all (which presumably it is) then amongst your various transistors you have tons of uncontrolled gain, so it's not surprising that its oscillating or doing other weird stuff. What's your goal? A charge current that's proportional to the voltage at the SW1 end of R3? I'd have to think about how to take that collection of transistors and make a stable circuit out of it, but if you're really building to that schematic then I suspect that you need to make some changes! Note that if you're charging a lead-acid battery (gel or flood) the ideal charge profile is to limit both voltage and current. Voltage is limited to some magic number (which I can never remember -- look it up), and current is limited either by the charger's capabilities or the battery's. When the charge of the battery is low it accepts charge at the constant current, but then as it charges you must drop the current to hold the voltage constant. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On Mon, May 06, 2013 at 03:40:00PM -0500, Tim Wescott wrote:
> On Mon, 06 May 2013 16:15:36 -0400, Uncle Steve wrote: > > > On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote: > >> Back again for some more abuse. > >> > >> I'm building a 12V battery charger that will be controlled by a small > >> low-power microcontroller. I've not yet hooked up the microcontroller, > >> but most of the code is written and I'm trying to finalize the charger > >> electronics before I hook it up. > >> > >> The circuit is very simple. An 18V 2A transformer, a bridge rectifier, > >> and filter capacitor feeds a main power rail. A 5V regulator produces > >> a few mA for the microcontroller, which I won't show here. The charger > >> is more or less as follows, though I will leave out the > >> resistor/divider taps which hook up to the ADC channels on the micro. > >> > >> > >> +18VDC ---------------------------+ > >> Q1 c e | D1 R1 > >> -----\_/--------->|----\/\/\--------+12(batt) > >> b| | > >> +------+ | > >> | | +--+----------+ > >> / Q2 e\_/c | > > R4 \ |b | > >> / | e |c Q3 > >> \ +--\/\/\------\_/ > >> | R2 |b > >> | | R3 SW1 > >> LED1 \_/ +--\/\/\-- \-- +5V > >> --- > >> | > >> | > >> GND --------------+------------------------------------ GND(batt) > >> > >> > >> Q1 - MJE3055 > >> D1 - 1N4004 > >> R1 - .5 5W > >> > >> Q2 - BC557 > >> R2 - 200K > >> > >> Q3 - 2N2222 > >> R3 - 1K > > R4 - 2k > >> > >> The microcontroller will strobe R3 with PCM at about 488HZ with a duty > >> cycle dependant on the charge profile. R1 is the sense resistor and > >> permits measuring instantaneous charge current. I've got the battery > >> attached and can watch the voltage rise (and settle) as I manually > >> engage a switch attached as shown. The battery voltage as it came from > >> Wallmart was about 12.7V. Charge current with this circuit is 1.4A at > >> this point in its charge cycle. The heat-sink gets rather warm, but it > >> isn't all that big and I'm going to target 3 or 4A as the peak charge > >> current so I'll probably substitute a TO-3 package with a much beefier > >> heat-sink when I put the project in an enclosure. > >> > >> So far, so good. The output of Q1 shows .6V ripple. Attaching my > >> scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a > >> 120Hz signal with a 70mVpp with a duty cycle of 17%. I'm not exactly > >> sure where this signal is coming from, although its frequency suggests > >> a causal relationship with the AC mains. There does not appear to be > >> any ripple on the 5V rail, but my scope isn't good enough to really > >> zoom in on it. > >> > >> The other side of the coin is that the Q2/Q3 network seems to be rather > >> sensitive. When I pass my hand over the breadboard the distortion > >> described above doubles and I can get an amplitude of 1V on that > >> distortion by standing up suddenly while sitting in front of the idle > >> circuit. It is difficult to say what is happening because I can double > >> the distortion by attaching the scope to a wall-wart USB charger, and I > >> know I haven't yet calibrated the scope all that well either. (Scope > >> shows 4.5V from the 5V regulator.) But the fact that I can affect the > >> circuit just by moving things in the general vicinity is, um, rather > >> shocking. > >> > >> Besides installing the circuit in a metal case, are there any easy > >> solutions to fix that 16mV idle voltage? Should I just change the > >> BC557 to a 2n2222 and work out how many of what kind of resistors I > >> need to supply the 3055 with the mA it needs to dump several amps into > >> the battery? I like this version because it is easy to set up and has > >> a low part count, but I'd really like to get rid of the noise and the > >> sensitivity to movement. > > > > As suggested, I moved this out of the existing thread. It was an > > mistake that I did not remove the references header. > > > > At any rate, I set up a separate pair of 2n2222, 10K resistor, and BC557 > > similar to the input stage above as well as a LED. Then I connected a > > small spool of insulated wire to the base of the 2n2222 and then let it > > out a couple of feet until the LED stayed onish without my hands being > > near the device. > > > > The result is a strong 6-7MHz signal for a bunch of cycles and then some > > dead time. It looks like there could be some FM in there, and on the > > high part of the cycle there appears to be an additional small signal, > > but I can't resolve any detail with my equipment. > > > > If I hold the spool in my hand the amount of on time changes > > considerably depending how much of my hand is in contact with the > > plastic and insulation. With palm open, there is one rise/fall cycle at > > about 6.5MHz when my hand is about 6in from the wire. As my hand gets > > closer, a second peak appears and so on until there is a train of > > several dozen cycles at or near the measured frequency. > > > > Any idea what the hell that signal might be? > > > > > > Regards, > > > > Uncle Steve > > I'm not making sense of your schematic. If Q2 is a PNP it should have > its emitter to +18V and its collector to the base of Q1. (Q1 should have > its collector _connected_!!). Q3 is configured to deliver current to the > base of Q2, but it needs to pull current -- ?!?!?!?! > > Could you be showing the emitters and collectors of Q2 and Q3 reversed?
I don't think so. The arrangement is described as a Sziklai Pair, and is described at the following URL: http://www.talkingelectronics.com/projects/TheTransistorAmplifier/TheTransistorAmplifier-P1.html#THEDARLINGTON
> If it's doing anything at all (which presumably it is) then amongst your > various transistors you have tons of uncontrolled gain, so it's not > surprising that its oscillating or doing other weird stuff. > > What's your goal? A charge current that's proportional to the voltage at > the SW1 end of R3?
SW1 is a stand in for the TTL level output from a microcontroller pin and will operate at 488Hz PWM as described above.
> I'd have to think about how to take that collection of transistors and > make a stable circuit out of it, but if you're really building to that > schematic then I suspect that you need to make some changes!
The oscillation showing up at the base of Q1 may be the result of some sort of capacitance issue with Q2/Q3. I fiddled with a few small ceramic capacitors in a naive fashion, but I did not accomplish anything other than destroying a 2n2222. I simply haven't internalized enough information about how these things operate to figure out what I should do to eliminate the distortion.
> Note that if you're charging a lead-acid battery (gel or flood) the ideal > charge profile is to limit both voltage and current. Voltage is limited > to some magic number (which I can never remember -- look it up), and > current is limited either by the charger's capabilities or the > battery's. When the charge of the battery is low it accepts charge at > the constant current, but then as it charges you must drop the current to > hold the voltage constant.
I understand that. The preliminary figures I have suggest that the charge voltage should be 13.8V and the float voltage 13.5V. The current strategy I'm working on will limit the average current over time with PWM, measuring instantaneous current when Q1 is on to drive a feedback loop to set PWM duty-cycle. I'll be reading supply voltage, and voltage at either side of the .5 Ohm sense resister at various times throughout the PWM cycle. The software will do ADC at about 125KHz so there's lots of room to average things nicely. I assume there's no real problem with allowing current to spike at short intervals if the battery naturally wants more amps than my PS will supply on a continual basis. I may be wrong, and it may be a simple matter to install a load resistor with the sense resistor. I'm still in larval stage so this stuff is still a little mysterious. Regards, Uncle Steve -- There should be a special word in the English language to identify people who create problems and then turn around and offer up their own tailor-made bogus non-solutions designed to completely avoid the root causes of the situation under consideration. 'Traitor' might be a good choice, but lacks the requisite specificity. One of the problems with contemporary English is it lacks many such words that would otherwise categorically identify certain kinds of person, place, or thing -- making it difficult or impossible to think analytically about such objects. These shortcomings of the English lexicon are representative of Orwellian linguistics at work in the real world.
On Mon, 06 May 2013 18:04:51 -0400, Uncle Steve wrote:

> On Mon, May 06, 2013 at 03:40:00PM -0500, Tim Wescott wrote: >> On Mon, 06 May 2013 16:15:36 -0400, Uncle Steve wrote: >> >> > On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote: >> >> Back again for some more abuse. >> >> >> >> I'm building a 12V battery charger that will be controlled by a >> >> small low-power microcontroller. I've not yet hooked up the >> >> microcontroller, but most of the code is written and I'm trying to >> >> finalize the charger electronics before I hook it up. >> >> >> >> The circuit is very simple. An 18V 2A transformer, a bridge >> >> rectifier, and filter capacitor feeds a main power rail. A 5V >> >> regulator produces a few mA for the microcontroller, which I won't >> >> show here. The charger is more or less as follows, though I will >> >> leave out the resistor/divider taps which hook up to the ADC >> >> channels on the micro. >> >> >> >> >> >> +18VDC ---------------------------+ >> >> Q1 c e | D1 R1 >> >> -----\_/--------->|----\/\/\--------+12(batt) >> >> b| | >> >> +------+ | >> >> | | +--+----------+ >> >> / Q2 e\_/c | >> > R4 \ |b | >> >> / | e |c Q3 >> >> \ +--\/\/\------\_/ >> >> | R2 |b >> >> | | R3 SW1 >> >> LED1 \_/ +--\/\/\-- \-- +5V >> >> --- >> >> | >> >> | >> >> GND --------------+------------------------------------ >> >> GND(batt) >> >> >> >> >> >> Q1 - MJE3055 >> >> D1 - 1N4004 >> >> R1 - .5 5W >> >> >> >> Q2 - BC557 >> >> R2 - 200K >> >> >> >> Q3 - 2N2222 >> >> R3 - 1K >> > R4 - 2k >> >> >> >> The microcontroller will strobe R3 with PCM at about 488HZ with a >> >> duty cycle dependant on the charge profile. R1 is the sense >> >> resistor and permits measuring instantaneous charge current. I've >> >> got the battery attached and can watch the voltage rise (and settle) >> >> as I manually engage a switch attached as shown. The battery >> >> voltage as it came from Wallmart was about 12.7V. Charge current >> >> with this circuit is 1.4A at this point in its charge cycle. The >> >> heat-sink gets rather warm, but it isn't all that big and I'm going >> >> to target 3 or 4A as the peak charge current so I'll probably >> >> substitute a TO-3 package with a much beefier heat-sink when I put >> >> the project in an enclosure. >> >> >> >> So far, so good. The output of Q1 shows .6V ripple. Attaching my >> >> scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a >> >> 120Hz signal with a 70mVpp with a duty cycle of 17%. I'm not >> >> exactly sure where this signal is coming from, although its >> >> frequency suggests a causal relationship with the AC mains. There >> >> does not appear to be any ripple on the 5V rail, but my scope isn't >> >> good enough to really zoom in on it. >> >> >> >> The other side of the coin is that the Q2/Q3 network seems to be >> >> rather sensitive. When I pass my hand over the breadboard the >> >> distortion described above doubles and I can get an amplitude of 1V >> >> on that distortion by standing up suddenly while sitting in front of >> >> the idle circuit. It is difficult to say what is happening because >> >> I can double the distortion by attaching the scope to a wall-wart >> >> USB charger, and I know I haven't yet calibrated the scope all that >> >> well either. (Scope shows 4.5V from the 5V regulator.) But the >> >> fact that I can affect the circuit just by moving things in the >> >> general vicinity is, um, rather shocking. >> >> >> >> Besides installing the circuit in a metal case, are there any easy >> >> solutions to fix that 16mV idle voltage? Should I just change the >> >> BC557 to a 2n2222 and work out how many of what kind of resistors I >> >> need to supply the 3055 with the mA it needs to dump several amps >> >> into the battery? I like this version because it is easy to set up >> >> and has a low part count, but I'd really like to get rid of the >> >> noise and the sensitivity to movement. >> > >> > As suggested, I moved this out of the existing thread. It was an >> > mistake that I did not remove the references header. >> > >> > At any rate, I set up a separate pair of 2n2222, 10K resistor, and >> > BC557 similar to the input stage above as well as a LED. Then I >> > connected a small spool of insulated wire to the base of the 2n2222 >> > and then let it out a couple of feet until the LED stayed onish >> > without my hands being near the device. >> > >> > The result is a strong 6-7MHz signal for a bunch of cycles and then >> > some dead time. It looks like there could be some FM in there, and >> > on the high part of the cycle there appears to be an additional small >> > signal, but I can't resolve any detail with my equipment. >> > >> > If I hold the spool in my hand the amount of on time changes >> > considerably depending how much of my hand is in contact with the >> > plastic and insulation. With palm open, there is one rise/fall cycle >> > at about 6.5MHz when my hand is about 6in from the wire. As my hand >> > gets closer, a second peak appears and so on until there is a train >> > of several dozen cycles at or near the measured frequency. >> > >> > Any idea what the hell that signal might be? >> > >> > >> > Regards, >> > >> > Uncle Steve >> >> I'm not making sense of your schematic. If Q2 is a PNP it should have >> its emitter to +18V and its collector to the base of Q1. (Q1 should >> have its collector _connected_!!). Q3 is configured to deliver current >> to the base of Q2, but it needs to pull current -- ?!?!?!?! >> >> Could you be showing the emitters and collectors of Q2 and Q3 reversed? > > I don't think so. The arrangement is described as a Sziklai Pair, and > is described at the following URL: > > http://www.talkingelectronics.com/projects/TheTransistorAmplifier/
TheTransistorAmplifier-P1.html#THEDARLINGTON
> >> If it's doing anything at all (which presumably it is) then amongst >> your various transistors you have tons of uncontrolled gain, so it's >> not surprising that its oscillating or doing other weird stuff. >> >> What's your goal? A charge current that's proportional to the voltage >> at the SW1 end of R3? > > SW1 is a stand in for the TTL level output from a microcontroller pin > and will operate at 488Hz PWM as described above. > >> I'd have to think about how to take that collection of transistors and >> make a stable circuit out of it, but if you're really building to that >> schematic then I suspect that you need to make some changes! > > The oscillation showing up at the base of Q1 may be the result of some > sort of capacitance issue with Q2/Q3. I fiddled with a few small > ceramic capacitors in a naive fashion, but I did not accomplish anything > other than destroying a 2n2222. I simply haven't internalized enough > information about how these things operate to figure out what I should > do to eliminate the distortion. > >> Note that if you're charging a lead-acid battery (gel or flood) the >> ideal charge profile is to limit both voltage and current. Voltage is >> limited to some magic number (which I can never remember -- look it >> up), and current is limited either by the charger's capabilities or the >> battery's. When the charge of the battery is low it accepts charge at >> the constant current, but then as it charges you must drop the current >> to hold the voltage constant. > > I understand that. The preliminary figures I have suggest that the > charge voltage should be 13.8V and the float voltage 13.5V. > > The current strategy I'm working on will limit the average current over > time with PWM, measuring instantaneous current when Q1 is on to drive a > feedback loop to set PWM duty-cycle. I'll be reading supply voltage, > and voltage at either side of the .5 Ohm sense resister at various times > throughout the PWM cycle. The software will do ADC at about 125KHz so > there's lots of room to average things nicely. I assume there's no real > problem with allowing current to spike at short intervals if the battery > naturally wants more amps than my PS will supply on a continual basis. > I may be wrong, and it may be a simple matter to install a load resistor > with the sense resistor. I'm still in larval stage so this stuff is > still a little mysterious.
Look again -- I don't think you're there. One huge thing to note: your Sziklai pair is only going to work well when it's all the way off or all the way on -- PWM is good, but don't expect it to work in anything resembling a linear fashion. +18V Q1 ___ battery o---------------- ------|___|-----o \ ^ --- | | .-. | | | | '-' | | |< .---| Q2 | |\ | | | | | | PWM |/ | o---------| Q3 | |> | | | | | === === GND GND (created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de) -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On Mon, May 06, 2013 at 06:32:52PM -0500, Tim Wescott wrote:
> On Mon, 06 May 2013 18:04:51 -0400, Uncle Steve wrote: > > > On Mon, May 06, 2013 at 03:40:00PM -0500, Tim Wescott wrote: > >> On Mon, 06 May 2013 16:15:36 -0400, Uncle Steve wrote: > >> > >> > On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote: > >> >> Back again for some more abuse. > >> >> > >> >> I'm building a 12V battery charger that will be controlled by a > >> >> small low-power microcontroller. I've not yet hooked up the > >> >> microcontroller, but most of the code is written and I'm trying to > >> >> finalize the charger electronics before I hook it up. > >> >> > >> >> The circuit is very simple. An 18V 2A transformer, a bridge > >> >> rectifier, and filter capacitor feeds a main power rail. A 5V > >> >> regulator produces a few mA for the microcontroller, which I won't > >> >> show here. The charger is more or less as follows, though I will > >> >> leave out the resistor/divider taps which hook up to the ADC > >> >> channels on the micro. > >> >> > >> >> > >> >> +18VDC ---------------------------+ > >> >> Q1 c e | D1 R1 > >> >> -----\_/--------->|----\/\/\--------+12(batt) > >> >> b| | > >> >> +------+ | > >> >> | | +--+----------+ > >> >> / Q2 e\_/c | > >> > R4 \ |b | > >> >> / | e |c Q3 > >> >> \ +--\/\/\------\_/ > >> >> | R2 |b > >> >> | | R3 SW1 > >> >> LED1 \_/ +--\/\/\-- \-- +5V > >> >> --- > >> >> | > >> >> | > >> >> GND --------------+------------------------------------ > >> >> GND(batt) > >> >> > >> >> > >> >> Q1 - MJE3055 > >> >> D1 - 1N4004 > >> >> R1 - .5 5W > >> >> > >> >> Q2 - BC557 > >> >> R2 - 200K > >> >> > >> >> Q3 - 2N2222 > >> >> R3 - 1K > >> > R4 - 2k > >> >> > >> >> The microcontroller will strobe R3 with PCM at about 488HZ with a > >> >> duty cycle dependant on the charge profile. R1 is the sense > >> >> resistor and permits measuring instantaneous charge current. I've > >> >> got the battery attached and can watch the voltage rise (and settle) > >> >> as I manually engage a switch attached as shown. The battery > >> >> voltage as it came from Wallmart was about 12.7V. Charge current > >> >> with this circuit is 1.4A at this point in its charge cycle. The > >> >> heat-sink gets rather warm, but it isn't all that big and I'm going > >> >> to target 3 or 4A as the peak charge current so I'll probably > >> >> substitute a TO-3 package with a much beefier heat-sink when I put > >> >> the project in an enclosure. > >> >> > >> >> So far, so good. The output of Q1 shows .6V ripple. Attaching my > >> >> scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a > >> >> 120Hz signal with a 70mVpp with a duty cycle of 17%. I'm not > >> >> exactly sure where this signal is coming from, although its > >> >> frequency suggests a causal relationship with the AC mains. There > >> >> does not appear to be any ripple on the 5V rail, but my scope isn't > >> >> good enough to really zoom in on it. > >> >> > >> >> The other side of the coin is that the Q2/Q3 network seems to be > >> >> rather sensitive. When I pass my hand over the breadboard the > >> >> distortion described above doubles and I can get an amplitude of 1V > >> >> on that distortion by standing up suddenly while sitting in front of > >> >> the idle circuit. It is difficult to say what is happening because > >> >> I can double the distortion by attaching the scope to a wall-wart > >> >> USB charger, and I know I haven't yet calibrated the scope all that > >> >> well either. (Scope shows 4.5V from the 5V regulator.) But the > >> >> fact that I can affect the circuit just by moving things in the > >> >> general vicinity is, um, rather shocking. > >> >> > >> >> Besides installing the circuit in a metal case, are there any easy > >> >> solutions to fix that 16mV idle voltage? Should I just change the > >> >> BC557 to a 2n2222 and work out how many of what kind of resistors I > >> >> need to supply the 3055 with the mA it needs to dump several amps > >> >> into the battery? I like this version because it is easy to set up > >> >> and has a low part count, but I'd really like to get rid of the > >> >> noise and the sensitivity to movement. > >> > > >> > As suggested, I moved this out of the existing thread. It was an > >> > mistake that I did not remove the references header. > >> > > >> > At any rate, I set up a separate pair of 2n2222, 10K resistor, and > >> > BC557 similar to the input stage above as well as a LED. Then I > >> > connected a small spool of insulated wire to the base of the 2n2222 > >> > and then let it out a couple of feet until the LED stayed onish > >> > without my hands being near the device. > >> > > >> > The result is a strong 6-7MHz signal for a bunch of cycles and then > >> > some dead time. It looks like there could be some FM in there, and > >> > on the high part of the cycle there appears to be an additional small > >> > signal, but I can't resolve any detail with my equipment. > >> > > >> > If I hold the spool in my hand the amount of on time changes > >> > considerably depending how much of my hand is in contact with the > >> > plastic and insulation. With palm open, there is one rise/fall cycle > >> > at about 6.5MHz when my hand is about 6in from the wire. As my hand > >> > gets closer, a second peak appears and so on until there is a train > >> > of several dozen cycles at or near the measured frequency. > >> > > >> > Any idea what the hell that signal might be? > >> > > >> > > >> > Regards, > >> > > >> > Uncle Steve > >> > >> I'm not making sense of your schematic. If Q2 is a PNP it should have > >> its emitter to +18V and its collector to the base of Q1. (Q1 should > >> have its collector _connected_!!). Q3 is configured to deliver current > >> to the base of Q2, but it needs to pull current -- ?!?!?!?! > >> > >> Could you be showing the emitters and collectors of Q2 and Q3 reversed? > > > > I don't think so. The arrangement is described as a Sziklai Pair, and > > is described at the following URL: > > > > http://www.talkingelectronics.com/projects/TheTransistorAmplifier/ > TheTransistorAmplifier-P1.html#THEDARLINGTON > > > >> If it's doing anything at all (which presumably it is) then amongst > >> your various transistors you have tons of uncontrolled gain, so it's > >> not surprising that its oscillating or doing other weird stuff. > >> > >> What's your goal? A charge current that's proportional to the voltage > >> at the SW1 end of R3? > > > > SW1 is a stand in for the TTL level output from a microcontroller pin > > and will operate at 488Hz PWM as described above. > > > >> I'd have to think about how to take that collection of transistors and > >> make a stable circuit out of it, but if you're really building to that > >> schematic then I suspect that you need to make some changes! > > > > The oscillation showing up at the base of Q1 may be the result of some > > sort of capacitance issue with Q2/Q3. I fiddled with a few small > > ceramic capacitors in a naive fashion, but I did not accomplish anything > > other than destroying a 2n2222. I simply haven't internalized enough > > information about how these things operate to figure out what I should > > do to eliminate the distortion. > > > >> Note that if you're charging a lead-acid battery (gel or flood) the > >> ideal charge profile is to limit both voltage and current. Voltage is > >> limited to some magic number (which I can never remember -- look it > >> up), and current is limited either by the charger's capabilities or the > >> battery's. When the charge of the battery is low it accepts charge at > >> the constant current, but then as it charges you must drop the current > >> to hold the voltage constant. > > > > I understand that. The preliminary figures I have suggest that the > > charge voltage should be 13.8V and the float voltage 13.5V. > > > > The current strategy I'm working on will limit the average current over > > time with PWM, measuring instantaneous current when Q1 is on to drive a > > feedback loop to set PWM duty-cycle. I'll be reading supply voltage, > > and voltage at either side of the .5 Ohm sense resister at various times > > throughout the PWM cycle. The software will do ADC at about 125KHz so > > there's lots of room to average things nicely. I assume there's no real > > problem with allowing current to spike at short intervals if the battery > > naturally wants more amps than my PS will supply on a continual basis. > > I may be wrong, and it may be a simple matter to install a load resistor > > with the sense resistor. I'm still in larval stage so this stuff is > > still a little mysterious. > > Look again -- I don't think you're there. One huge thing to note: your > Sziklai pair is only going to work well when it's all the way off or all > the way on -- PWM is good, but don't expect it to work in anything > resembling a linear fashion. > > > +18V Q1 ___ battery > o---------------- ------|___|-----o > \ ^ > --- > | > | > .-. > | | > | | > '-' > | > | > |< > .---| Q2 > | |\ > | | > | | > | | > PWM |/ | > o---------| Q3 | > |> | > | | > | | > === === > GND GND
I will consider that, but note that Q1 is NPN. What you propose suggests I was counting on current-limiting to occur in the wrong place. The software feedback loop ought to allow the ideal pulse width to 'fly' automatically at the correct setting, assuming the ADC readings are reasonably accurate. Theoretically, I should also be able to detect collapse (?) of the transformer flux if the current draw grows too large, which would be a nice bonus. Regards, Uncle Steve -- There should be a special word in the English language to identify people who create problems and then turn around and offer up their own tailor-made bogus non-solutions designed to completely avoid the root causes of the situation under consideration. 'Traitor' might be a good choice, but lacks the requisite specificity. One of the problems with contemporary English is it lacks many such words that would otherwise categorically identify certain kinds of person, place, or thing -- making it difficult or impossible to think analytically about such objects. These shortcomings of the English lexicon are representative of Orwellian linguistics at work in the real world.
On 2013-05-07, Uncle Steve <stevet810@gmail.com> wrote:

> I will consider that, but note that Q1 is NPN. What you propose > suggests I was counting on current-limiting to occur in the wrong > place.
You can do it like this using the transistors you have. +18V ----+---+ _+----->|--[Rsense]-----> BAT+ | \ /| | ----- '3055 | | + + _\| / ------ BC557 | [100] 0.25W | + / pwm in |/ ---[1K]--| PN2222 |\ _\| + | 0V ---+---
> The software feedback loop ought to allow the ideal pulse width to > 'fly' automatically at the correct setting, assuming the ADC readings > are reasonably accurate.
> Theoretically, I should also be able to > detect collapse (?) of the transformer flux if the current draw grows > too large, which would be a nice bonus.
saturation will show in the primary current much more than anything on in the secondary circuit and the by detecting it you're measuring the line voltage more than any other variable. -- &#9858;&#9859; 100% natural --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
On Tue, May 07, 2013 at 06:43:00AM +0000, Jasen Betts wrote:
> On 2013-05-07, Uncle Steve <stevet810@gmail.com> wrote: > > > I will consider that, but note that Q1 is NPN. What you propose > > suggests I was counting on current-limiting to occur in the wrong > > place. > > You can do it like this using the transistors you have. > > +18V ----+---+ _+----->|--[Rsense]-----> BAT+ > | \ /| > | ----- '3055 > | | > + + > _\| / > ------ BC557 > | > [100] 0.25W > | > + > / > pwm in |/ > ---[1K]--| PN2222 > |\ > _\| > + > | > 0V ---+---
How do you arrive at 100 ohms? I was using 200K because the value is close to the threshold where it allows something like full power to flow through the 3055. With 100k or less I was seeing my (cheap) meter show fluxuating nonsense voltages at the emitter of up to 1500V, although my scope showed nothing much amiss at lower frequency settings. I was thinking that the 3055 was somehow generating large spikes with the rising edge of the pulse, but I did not test it exhaustively.
> > The software feedback loop ought to allow the ideal pulse width to > > 'fly' automatically at the correct setting, assuming the ADC readings > > are reasonably accurate. > > > Theoretically, I should also be able to > > detect collapse (?) of the transformer flux if the current draw grows > > too large, which would be a nice bonus. > > saturation will show in the primary current much more than anything on > in the secondary circuit and the by detecting it you're measuring the > line voltage more than any other variable.
That's what I meant. I don't like to be wrong, so it bugs me that I am not familiar enough with the nomenclature to avoid stepping on my dick. I probably should say that the PWM will limit the average /power/ going in the battery, which is what really matters. As I understand it, volts are sort of like the size of the pipe; amperes are like the pressure or the rate of flow, and power is the throughput. Of course it isn't plumbing and there isn't any water. Regards, Uncle Steve -- There should be a special word in the English language to identify people who create problems and then turn around and offer up their own tailor-made bogus non-solutions designed to completely avoid the root causes of the situation under consideration. 'Traitor' might be a good choice, but lacks the requisite specificity. One of the problems with contemporary English is it lacks many such words that would otherwise categorically identify certain kinds of person, place, or thing -- making it difficult or impossible to think analytically about such objects. These shortcomings of the English lexicon are representative of Orwellian linguistics at work in the real world.
On Tue, May 07, 2013 at 08:52:59AM -0400, Uncle Steve wrote:
> On Tue, May 07, 2013 at 06:43:00AM +0000, Jasen Betts wrote: > > On 2013-05-07, Uncle Steve <stevet810@gmail.com> wrote: > > > > > I will consider that, but note that Q1 is NPN. What you propose > > > suggests I was counting on current-limiting to occur in the wrong > > > place. > > > > You can do it like this using the transistors you have. > > > > +18V ----+---+ _+----->|--[Rsense]-----> BAT+ > > | \ /| > > | ----- '3055 > > | | > > + + > > _\| / > > ------ BC557 > > | > > [100] 0.25W > > | > > + > > / > > pwm in |/ > > ---[1K]--| PN2222 > > |\ > > _\| > > + > > | > > 0V ---+--- > > How do you arrive at 100 ohms? I was using 200K because the value is > close to the threshold where it allows something like full power to > flow through the 3055. With 100k or less I was seeing my (cheap) > meter show fluxuating nonsense voltages at the emitter of up to 1500V, > although my scope showed nothing much amiss at lower frequency > settings. I was thinking that the 3055 was somehow generating large > spikes with the rising edge of the pulse, but I did not test it > exhaustively.
I quickly experimented with some lower value resisters and found that the primary effect of using anything lower than 10K is damage to either the 2n2222 or the BC557. The failure mode appears to be mainly permanently shorting collector and emitter, but I observed partially damaged transistors which would produce 1V at the base of Q1 in the idle state. Since I've been doing a fair bit of fooling around in the last 24 hours, it seems I've collected a half-dozen damaged transistors, which probably contributed to some of the anomalous readings I have had. Using fresh parts and 100K between Q3 and Q2, everything is good. The battery is only drawing 1.6A at this time so I can't easily test the circuit at higher currents without draining the battery a whole lot. The ripple at the base of Q1 is still there at 60mVpp which propagates to the emitter, although I wouldn't see it without the diode. My guess is that the Sziklai pair is too sensitive for this application, but I don't really know why or what to do about it. The proximal sensitivity to mass is another concern, and I don't know whether there is an internal oscillation occuring that is amplified by a proximal mass, or whether a proximal mass is triggering the amplification of power-line hum. An extra .22uF filter capacitor on the 5V rail has no effect. Regards, Uncle Steve -- There should be a special word in the English language to identify people who create problems and then turn around and offer up their own tailor-made bogus non-solutions designed to completely avoid the root causes of the situation under consideration. 'Traitor' might be a good choice, but lacks the requisite specificity. One of the problems with contemporary English is it lacks many such words that would otherwise categorically identify certain kinds of person, place, or thing -- making it difficult or impossible to think analytically about such objects. These shortcomings of the English lexicon are representative of Orwellian linguistics at work in the real world.
On May 6, 6:04=A0pm, Uncle Steve <stevet...@gmail.com> wrote:
> On Mon, May 06, 2013 at 03:40:00PM -0500, Tim Wescott wrote: > > On Mon, 06 May 2013 16:15:36 -0400, Uncle Steve wrote: > > > > On Mon, May 06, 2013 at 12:01:44PM -0400, Uncle Steve wrote: > > >> Back again for some more abuse. > > > >> I'm building a 12V battery charger that will be controlled by a smal=
l
> > >> low-power microcontroller. =A0I've not yet hooked up the microcontro=
ller,
> > >> but most of the code is written and I'm trying to finalize the charg=
er
> > >> electronics before I hook it up. > > > >> The circuit is very simple. =A0An 18V 2A transformer, a bridge recti=
fier,
> > >> and filter capacitor feeds a main power rail. =A0A 5V regulator prod=
uces
> > >> a few mA for the microcontroller, which I won't show here. =A0The ch=
arger
> > >> is more or less as follows, though I will leave out the > > >> resistor/divider taps which hook up to the ADC channels on the micro=
.
> > > >> =A0+18VDC ---------------------------+ > > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Q1 c =A0 e =A0 | =A0=
=A0D1 =A0 =A0 R1
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-----\_/--------->|--=
--\/\/\--------+12(batt)
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 b| =A0 =A0 | > > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +------+ =A0 =A0 | > > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0| =A0+--+--=
--------+
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 / =A0Q2 e\_/c =A0 =A0 =
=A0 =A0 =A0 =A0 |
> > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0R4 \ =A0 =A0 =A0 |b =A0 =
=A0 =A0 =A0 =A0 =A0 =A0|
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 / =A0 =A0 =A0 | =A0 =A0 =
=A0 =A0 =A0 =A0e =A0|c Q3
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ =A0 =A0 =A0 +--\/\/\--=
----\_/
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 R2=
=A0 =A0 =A0 =A0 |b
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0| =A0 R3 =A0 =A0 SW1
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 LED1 \_/ =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 +--\/\/\-- \-- +5V
> > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0--- > > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | > > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | > > >> =A0GND =A0 =A0--------------+------------------------------------ GN=
D(batt)
> > > >> Q1 - MJE3055 > > >> D1 - 1N4004 > > >> R1 - .5 5W > > > >> Q2 - BC557 > > >> R2 - 200K > > > >> Q3 - 2N2222 > > >> R3 - 1K > > > =A0R4 - 2k > > > >> The microcontroller will strobe R3 with PCM at about 488HZ with a du=
ty
> > >> cycle dependant on the charge profile. =A0R1 is the sense resistor a=
nd
> > >> permits measuring instantaneous charge current. =A0I've got the batt=
ery
> > >> attached and can watch the voltage rise (and settle) as I manually > > >> engage a switch attached as shown. =A0The battery voltage as it came=
from
> > >> Wallmart was about 12.7V. =A0Charge current with this circuit is 1.4=
A at
> > >> this point in its charge cycle. =A0The heat-sink gets rather warm, b=
ut it
> > >> isn't all that big and I'm going to target 3 or 4A as the peak charg=
e
> > >> current so I'll probably substitute a TO-3 package with a much beefi=
er
> > >> heat-sink when I put the project in an enclosure. > > > >> So far, so good. =A0The output of Q1 shows .6V ripple. =A0Attaching =
my
> > >> scope to the base of Q1 shows an idle (SW off) voltage of 16mV and a > > >> 120Hz signal with a 70mVpp with a duty cycle of 17%. =A0I'm not exac=
tly
> > >> sure where this signal is coming from, although its frequency sugges=
ts
> > >> a causal relationship with the AC mains. =A0There does not appear to=
be
> > >> any ripple on the 5V rail, but my scope isn't good enough to really > > >> zoom in on it. > > > >> The other side of the coin is that the Q2/Q3 network seems to be rat=
her
> > >> sensitive. =A0When I pass my hand over the breadboard the distortion > > >> described above doubles and I can get an amplitude of 1V on that > > >> distortion by standing up suddenly while sitting in front of the idl=
e
> > >> circuit. =A0It is difficult to say what is happening because I can d=
ouble
> > >> the distortion by attaching the scope to a wall-wart USB charger, an=
d I
> > >> know I haven't yet calibrated the scope all that well either. =A0(Sc=
ope
> > >> shows 4.5V from the 5V regulator.) =A0But the fact that I can affect=
the
> > >> circuit just by moving things in the general vicinity is, um, rather > > >> shocking. > > > >> Besides installing the circuit in a metal case, are there any easy > > >> solutions to fix that 16mV idle voltage? =A0Should I just change the > > >> BC557 to a 2n2222 and work out how many of what kind of resistors I > > >> need to supply the 3055 with the mA it needs to dump several amps in=
to
> > >> the battery? =A0I like this version because it is easy to set up and=
has
> > >> a low part count, but I'd really like to get rid of the noise and th=
e
> > >> sensitivity to movement. > > > > As suggested, I moved this out of the existing thread. =A0It was an > > > mistake that I did not remove the references header. > > > > At any rate, I set up a separate pair of 2n2222, 10K resistor, and BC=
557
> > > similar to the input stage above as well as a LED. =A0Then I connecte=
d a
> > > small spool of insulated wire to the base of the 2n2222 and then let =
it
> > > out a couple of feet until the LED stayed onish without my hands bein=
g
> > > near the device. > > > > The result is a strong 6-7MHz signal for a bunch of cycles and then s=
ome
> > > dead time. =A0It looks like there could be some FM in there, and on t=
he
> > > high part of the cycle there appears to be an additional small signal=
,
> > > but I can't resolve any detail with my equipment. > > > > If I hold the spool in my hand the amount of on time changes > > > considerably depending how much of my hand is in contact with the > > > plastic and insulation. =A0With palm open, there is one rise/fall cyc=
le at
> > > about 6.5MHz when my hand is about 6in from the wire. =A0As my hand g=
ets
> > > closer, a second peak appears and so on until there is a train of > > > several dozen cycles at or near the measured frequency. > > > > Any idea what the hell that signal might be? > > > > Regards, > > > > Uncle Steve > > > I'm not making sense of your schematic. =A0If Q2 is a PNP it should hav=
e
> > its emitter to +18V and its collector to the base of Q1. =A0(Q1 should =
have
> > its collector _connected_!!). =A0Q3 is configured to deliver current to=
the
> > base of Q2, but it needs to pull current -- ?!?!?!?! > > > Could you be showing the emitters and collectors of Q2 and Q3 reversed? > > I don't think so. =A0The arrangement is described as a Sziklai Pair, and > is described at the following URL:
I redrew your circuit and tried to make Q2/Q3 look like a Darlington or Sziklai.. didn't work. One issue I have with your 'pair' is that the idea of the pair is to get more current gain. So a transistor with only a small maximum current drives the bigger transistor. I your case you've got it backwards. The BC557 has a max Ic of 100mA and the 2n2222 is 500mA. It also seems like the BC557 wiil driven right near it's max current... Maybe a beefier pnp is in order? George H.
> > http://www.talkingelectronics.com/projects/TheTransistorAmplifier/The... > > > If it's doing anything at all (which presumably it is) then amongst you=
r
> > various transistors you have tons of uncontrolled gain, so it's not > > surprising that its oscillating or doing other weird stuff. > > > What's your goal? =A0A charge current that's proportional to the voltag=
e at
> > the SW1 end of R3? > > SW1 is a stand in for the TTL level output from a microcontroller pin > and will operate at 488Hz PWM as described above. > > > I'd have to think about how to take that collection of transistors and > > make a stable circuit out of it, but if you're really building to that > > schematic then I suspect that you need to make some changes! > > The oscillation showing up at the base of Q1 may be the result of some > sort of capacitance issue with Q2/Q3. =A0I fiddled with a few small > ceramic capacitors in a naive fashion, but I did not accomplish > anything other than destroying a 2n2222. =A0I simply haven't > internalized enough information about how these things operate to > figure out what I should do to eliminate the distortion. > > > Note that if you're charging a lead-acid battery (gel or flood) the ide=
al
> > charge profile is to limit both voltage and current. =A0Voltage is limi=
ted
> > to some magic number (which I can never remember -- look it up), and > > current is limited either by the charger's capabilities or the > > battery's. =A0When the charge of the battery is low it accepts charge a=
t
> > the constant current, but then as it charges you must drop the current =
to
> > hold the voltage constant. > > I understand that. =A0The preliminary figures I have suggest that the > charge voltage should be 13.8V and the float voltage 13.5V. > > The current strategy I'm working on will limit the average current > over time with PWM, measuring instantaneous current when Q1 is on to > drive a feedback loop to set PWM duty-cycle. =A0I'll be reading supply > voltage, and voltage at either side of the .5 Ohm sense resister at > various times throughout the PWM cycle. =A0The software will do ADC at > about 125KHz so there's lots of room to average things nicely. =A0I > assume there's no real problem with allowing current to spike at short > intervals if the battery naturally wants more amps than my PS will > supply on a continual basis. =A0I may be wrong, and it may be a simple > matter to install a load resistor with the sense resistor. =A0I'm still > in larval stage so this stuff is still a little mysterious. > > Regards, > > Uncle Steve > > -- > There should be a special word in the English language to identify > people who create problems and then turn around and offer up their own > tailor-made bogus non-solutions designed to completely avoid the root > causes of the situation under consideration. =A0'Traitor' might be a > good choice, but lacks the requisite specificity. =A0One of the problems > with contemporary English is it lacks many such words that would > otherwise categorically identify certain kinds of person, place, or > thing -- making it difficult or impossible to think analytically about > such objects. =A0These shortcomings of the English lexicon are > representative of Orwellian linguistics at work in the real world.- Hide =
quoted text -
> > - Show quoted text -
On 5/7/2013 8:52 AM, Uncle Steve wrote:

> As I understand it, volts are sort of like the size of the pipe; > amperes are like the pressure or the rate of flow, and power is the > throughput. Of course it isn't plumbing and there isn't any water. > > > Regards, > > Uncle Steve >
Even with water, pressure and rate of flow are not the same thing. Power is the rate of doing work.