PDA

View Full Version : Any Electronics Guru's out there?



aviator4
12-16-2005, 05:07 PM
Hey guys,

I'm not an electronics expert, by any means. I have been working on NiCad Charging circuit for the last couple of days that has me stumped.

It uses an op/amp some basic transistors and several capacitors to do peak detection. (one capacitor charges on a "delay" rate, once the peak is hit, there is a small voltage drop and the op/amp shuts the charging circuit off.

Anyway, I can't get the two capacitors to "do their thing." I can forward the link to the page where I got the schematic and a more detailed description if someone out there would be willing to help.

If you know anything about electronics and think you can help, please let me know.

wilkin250r
12-16-2005, 05:40 PM
Anyone? Anyone?


Ok, I guess I'll field this one. Send me the link and description.

aviator4
12-16-2005, 05:46 PM
Thanks Wilkin, This is a real head scratcher.

http://homepages.paradise.net.nz/bhabbott/charger.html

that description show what it's SUPPOSED to do... but here's what it REALLY does...

C3 does what it's supposed to do, it reflects the voltage of the battery. C1, however the voltage just starts to climb uncontrollably. When the switch is pressed, C1 does short out and the circuit starts to charge, but in only charges 1-2 seconds before it shuts off.

When I take voltage readins on both, C3 shows the proper coltage (3.7 to 3.9 volts) but C1just continues to climb up to 9-10 volts.

I'm confused.

wilkin250r
12-16-2005, 05:52 PM
It's 5 o-clock on a Friday, I probably won't be able to get to this until Monday.

But, I do happen to dabble a little in electronics, I should be able to help you.

wilkin250r
12-19-2005, 09:48 AM
Check your value of R3 and C2. That's my first guess. In fact, check ALL values around that area. C2, R2 and R3, and R4.

I assume, if you're playing with electronics, then you understand a little about them, and how capacitors work and such, so I can give you a basic explanation.

As you know, C1 is supposed to be a time delay of C3. In reality, the time delay occurs at C2. It's 200 times larger than C3, and 2000 times larger than C1.

C2 and C3 recieve the same input, but because C2 is so much larger, it takes MUCH longer for it to reach the same charge. Like filling a teacup and a 5 gallon bucket from the same hose, which one do you think fills up first? Basically, the voltage on C2 trickles through R2 to fill up C1, the real time delay occurs at C2.

This might be the problem. Do you have two meters? Check the voltage on C1 and C2 at the same time. Pull D4 out of the circuit, and start it up (push the button for at least 2 seconds, to allow the charge in C2 to drop). If they have the same voltage, and climb at the same speed, then it's working properly.

If C1 climbs faster than C2, the the problem is somewhere else, probably around Q4.

wilkin250r
12-19-2005, 10:09 AM
The charge on C1 can only come from one of two places. It either comes from C2, or from Q4.

In theory, when the circuit is "charging", C1 is just a reflection of C2. It should never get any higher than C2 while it is charging.

When the circuit is done charging, Q4 turns on and pushes C1 even higher, to ensure the circuit stays off. It will push C1 up almost to supply voltage of 12V.

So, if the problem isn't in the delay around C2, then the problem must be in Q4, either at R11 and R12, or around R8 and R10.

aviator4
12-19-2005, 10:17 AM
Okay. so I did the check. the discharge rates are extremely fast, s the only way to really check this is to "rough estimate" how fast the voltage rises, since I am using a digital multimeter.

C1 does seem to charge at a faster rate than c2. I also noticed that C2 never really fully discharges when the button is pushed. It dropped to .113 volts (using a 12 volt 1A supply as source and 3 700Mah cells as load). It's almost like Q4 is backfeeing power to through R1.

I did a double check just to make sure I have the transistors in the right orientation and they are right.

According to the author, just abuot any PNP transistor will work, so I am using a set of fairchild 2N3906. With gains of a max of ic -100mA Vce -1v. I would assume this is sufficient, but I can't pull the data on the transistors he's referring to. Could this be an issue.

Oh, I also realized that I am using a 200uf 16V capacitor for C2, not a 220uf 25V. How will this affect the circuit?

wilkin250r
12-19-2005, 10:28 AM
Originally posted by aviator4
Oh, I also realized that I am using a 200uf 16V capacitor for C2, not a 220uf 25V. How will this affect the circuit?

This shouldn't be a problem. With a 100K resistor and a 220uF cap, your time constant is 22 seconds. With a 200uf cap, it becomes 20 seconds, which is still just fine. 20 seconds is plenty long enough to lag behind C3.

Now, you are sure you have 200uF, and not 200nF, right? What kind of cap(s) are you using for this?


Did you try pulling D4 out of the circuit? The only reason D4 is in place is to provide C2 with a quick boost. If you pull it out of the circuit, you should be able to watch C2 charge up 0.1V at a time. It should take the full 20 seconds to reach full charge. If it charges anything less than 5 seconds, then the problem is somewhere around Q4.

aviator4
12-19-2005, 10:31 AM
Also, he states that the IC to be used should have a Bias current should less than 100nA and Input offset voltage should be less than 3mV.

The specs on the OpAmp I am using (Fairchild KA358S - required restructuring of the board... it's been quadruple checked)

Input bias current: Typical 45na Maximum 250na
Offset Voltage: Typical 2.9v, Maximum 7v

These seem to fall into his specs, but who knows, maybe I was reading the specs wrong.

wilkin250r
12-19-2005, 10:34 AM
In fact, even better, try this. R1 feeds from Q4 into C1. Instead, remove it from C1 and have it feed into a completely separate 100nF capacitor (or, really, ANY value capacitor). Hook the other side of that capacitor to ground.

So, rather than having Q4 charge up C1, it will be charging a completely separate capacitor. Monitor the voltage on this other capacitor, and see what readings it gives you. If it climbes quickly, then it will be obvious that somewhere around Q4 is the problem.

wilkin250r
12-19-2005, 10:38 AM
Originally posted by aviator4
Also, he states that the IC to be used should have a Bias current should less than 100nA and Input offset voltage should be less than 3mV.

The specs on the OpAmp I am using (Fairchild KA358S - required restructuring of the board... it's been quadruple checked)

Input bias current: Typical 45na Maximum 250na
Offset Voltage: Typical 2.9v, Maximum 7v

These seem to fall into his specs, but who knows, maybe I was reading the specs wrong.

Am I reading this wrong? I'm hoping it's a typo, and you're just missing the "m". A 2.9 Volt offset voltage is HUGE. I'm hoping it's actually 2.9mv.

aviator4
12-19-2005, 10:40 AM
Yess. Sorry. Values are in mV, not V

aviator4
12-19-2005, 10:54 AM
Now, you are sure you have 200uF, and not 200nF, right? What kind of cap(s) are you using for this?

C4 (47uf voltage smoothing capacitor) is electrolytic and is actually a 35V capactor
C2 (220uf 16V) is electrolytic
all of the 100nf are small surface-mout style ceramic capacitors.
C3 is the 1uf 25V capacitor that he claims must have low leakage so he recommends a tantallium capacitor, so thats what I am using - they had to be ordered.

The resistors are all ceramic barrel resistors, most are 1/4 watt 5%, except where he calls for 2W and 5 Watt resistors.... I kept those in spec they are 5% tol as well..

I went back through the circuit board to double checke all the values. I am reporthing the correctly.

Okay, on to the test. For reasons of being able to measure time, I stuck a bog 'ol 1100uf capacitor in place of C1 and when I pressed the button, the charge light stayed on... for a while. (about 5 sec) then went out. Once this capacitor reaches roughly the same voltage stored in C3, the circuit goes dead, which is what it's supposed to do. The problem is that C1 charges all the way up to near the supply voltage, and never stops.

C1 stops around 2.5-2.6 volts (using a dead battery pack to test with)
C2 just starts to climb and never stops.

I think you're right, I am starting to suspect Q4 as being the culprit, but I don't know how to go about testing this.... any suggestions?

aviator4
12-19-2005, 10:57 AM
Did you try pulling D4 out of the circuit? The only reason D4 is in place is to provide C2 with a quick boost. If you pull it out of the circuit, you should be able to watch C2 charge up 0.1V at a time. It should take the full 20 seconds to reach full charge. If it charges anything less than 5 seconds, then the problem is somewhere around Q4.

Yep, pulled it out and it doesn't change the charge rate. It's still close to 5 seconds or so.

wilkin250r
12-19-2005, 10:58 AM
I doubt the opamp is the problem. The more I think about it, I'm thinking you're having a problem at Q4.

I'm sure you read the description. When the NiCad cells "peak", the voltage on C3 drops below the voltage on C1 and C2. Are you familiar with opamps and how they work?

So, when C1 is higher than C3, the opamp turns off Q1. When Q1 turns off, Q2 also turns off, which stop the charging current.

What is going to happen to C2 and C3 if the charging current stops? They will begin to discharge, and so will C1. Since all the monitoring of the circuit depends on the voltages on these capacitors, who knows what's going to happen once they start to fall off. The circuit might turn itself on again.

So, Q4 is responsible to provide a charge to C1 to make sure that once it goes higher than C3, it STAYS higher than C3 to keep the circuit turned off.

I'm thinking Q4 is coming on before it's supposed to.

wilkin250r
12-19-2005, 11:00 AM
Ok, so we are on the same page. I'll figure out a way to test Q4.

aviator4
12-19-2005, 11:12 AM
I am failry familiar with them. Thiere is a steep learning curve in electronics. So the first thing I did was pick up a couple of opams and start building some simple circuits (low battery warning, etc..)

the all worked beautifully.

I've also messed around with transistors enough to know the difference between a PNP and an NPN and I've built a few timer circuits using a 555 IC (one's actually on my quad... it makes my nitrous available for 8 seconds after the first trigger of the button, then shuts off until I reset it, guaranteeing I don't blow my bike up!it uses an astable timer circuit circuit and a flip/flop dual transistor circuit together to trigger a relay, etc..etc..)

Needless to say, I am comfortable with the concepts, but even though the author seems to think this is a simple circuit (and it is, I am sure) it's putting combinations of things together that I've never done before. It's the most complicated thing I've made thus far... which isn't saying much, but hey you gotta start somewhere!

So, with that being said, I am still very much an amature, but I am starting to get the basic concepts down.

I guess my question is, if Q4 is the culprit, what should the voltage be (roughly) at the collector of Q4 during the charge phase? Shouldn't it be "robbing voltage" through R1 to get triggered? IF so, how could it be the culprit?

I do know that if I short the switch, it WILL charge the packs in the right amount of time at the right amperage, so I think the charge side of the circuit is working okay.

Let me know if I am off base here... just trying to learn.

Thanks again for you help Wilkin!

wilkin250r
12-19-2005, 11:17 AM
According to the description, the voltage at the base of Q4 should be 0.9V. I'm trying to work on that right now to determine what the circuit tells me it should be, rather than the description.

wilkin250r
12-19-2005, 11:23 AM
Do you have the circuit in front of you? Whether charging or stopped, the voltage at the base of Q4 should be the same.

Measure the voltage at the base of Q4, and also at the high side of R13.

aviator4
12-19-2005, 11:36 AM
Yes, I have it in front of me.

Okay, sitting idle (not charging, but battery connected) the voltage is 12.96v

Pressing the butting, the voltage goes to 11.85 volts, it's a nominal change, but could it be enough to be causing the problem?

I don't know if it helps. but here's the acutal circuit that I am using (you will notice there are several R8's in there... thats for different charging times, I only have one connected at the moment)

aviator4
12-19-2005, 11:51 AM
Periodically checking the base of Q4 reveals that the voltage is going up It's now at 13.12 volts at idle.

Pressing the charge light with no battery attached causes the "charge" light to stay lit for about 5 seconds.

Pressing it with a battery connected causes the charge light (D2) to stay lit one second or less.

Oh, and curiously, the "battery" indicator light (D3) seems to stay on all the time, only changing how bright it is when the charge button is pushed.

wilkin250r
12-19-2005, 11:52 AM
Originally posted by aviator4
Yes, I have it in front of me.

Okay, sitting idle (not charging, but battery connected) the voltage is 12.96v

Pressing the butting, the voltage goes to 11.85 volts, it's a nominal change, but could it be enough to be causing the problem?

I don't know if it helps. but here's the acutal circuit that I am using (you will notice there are several R8's in there... thats for different charging times, I only have one connected at the moment)

I'm not sure we are on the same page. The voltage at the base of Q4 should not change, whether the button is pressed or not. You are measuring right between R11 and R12, correct?

aviator4
12-19-2005, 11:56 AM
I am testing at the red and black dots indicated below. Is this right?

aviator4
12-19-2005, 11:59 AM
Um... well no, thats not right... here, let me do it right..

BETWENN R11 and R12... there.. okay, the voltage is holding steady, as long as there is no battery connect. When there is a fully discharged battry connectd, I lose .5v when the button is pressed.

aviator4
12-19-2005, 12:01 PM
Here is where I tested

wilkin250r
12-19-2005, 12:03 PM
Yeah, those would be the right spots.

If I were you, I would check the specs on your transistor. You said you were using different transistors, just make sure the base is really the base, that the collector is really the collector, ect ect. Most follow a basic pinout, but there are a few that are different.

If that checks out, I would try a new Q4. Your's might be fried. The voltage at the base shouldn't change more than 0.1V at most between charging and cut-off.

aviator4
12-19-2005, 12:11 PM
Oh yeah, just to eliminate one more variable.

The board I've posted is exactly what I am using. I used the 'ol toner transfer method to etch the board. the image is what I printed to make transfer. I made two transfers. One to etch the board and one to silk-screen the top. just to make sure I have everything in the right place.

wilkin250r
12-19-2005, 12:16 PM
You made your own board?

That's not "bad", but it does introduce one more variable.

How certain are you that you don't have any mistakes in the board?

aviator4
12-19-2005, 12:17 PM
Okay. I did a double check on the specs of the transistor

http://www.st.com/stonline/books/pdf/docs/8851.pdf

and they are in the right orientation. This is the second Q4 I've tried, both with the same results. Any other ideas or is it a lost cause?

aviator4
12-19-2005, 12:25 PM
You're right, it does present some other variable.

Luckily, the board is directly off his site (with a mod for a different OpAmp thats straight in orientation).

I double, tripple, and quadruble checked it to make SURE there were no errors... thats bitten me before.

Once the board was etched, I checked each individual copper runner to make sure it wasn't connecting anyhwere inadvertantly.

Everything check out just fine.

This was all done before I started soldering anything.

But I know what you're thinking, so I made the same board on a breadboard... all with the same results. Soldering leads onto the 100nf ceramic capacitors was a you-know-what, but I got it done.

wilkin250r
12-19-2005, 12:37 PM
Let me give it some more thought. This may take a while, I may not respond today, but I think we can solve it. We are pretty sure where the problem is located.

For some reason, Q4 comes on before it is supposed to.

As you have seen with this project, electronics is often about using "building blocks". A current source, a comparator (the peak detect), ect ect.

If nothing else, I might be able to design an equivalent to replace the Q4 portion of the circuit. Are you opposed to changing a few traces?

aviator4
12-19-2005, 12:42 PM
I'm not opposed in the least! This has been a great learning experience for me. If I get a working charger out of it, great! I mainly did it to learn. Peak chargers are pretty darn inexpensive, and I am quickly learning that there is no cost savings in trying to do it yourself when it comes to electronic circuitry.

Thanks again for you help.

If we can get this solved, you've got a $100 credit at my ATV shop.

wilkin250r
12-19-2005, 01:11 PM
Ok, let's do a recap. I've noticed some errors in your theory, and I will correct them, but I need some information, first.

I thought I saw you post your supply, but I don't see it when I look back through. What is your supply voltage? The circuit is designed around 12V, but you have measurements above 13V.

What is your value for R8?

aviator4
12-19-2005, 01:17 PM
for my power supply, I am using a 12V 0-2A DC wall cube. Voltage measure from the cube is actually 13.12Volts.

R8 is .54 Ohms, Giving me roughtly 1300mA (battery packs are 3.6V 700MaH packs, so this falls below the C/2 equation given by him)

is it possible that my power supply is causing this? He says "a 7 cell pack may need to be charged at a lower rate to keep the peak voltage below 11.2V (1.6V per cell), otherwise premature shutoff "

Maybe my peak voltage is going too high? If so, I have access to a 12 Volt 3A regulated power supply that I could try.

If you've found some errors.. please let me know what they are!

wilkin250r
12-19-2005, 01:43 PM
Ok, there should be a 0.9V drop across R11, so if you have a 13.12V supply, then the voltage at the base of Q4 should be 12.22V

I should have responded to this question directly:


Originally posted by aviator4
I guess my question is, if Q4 is the culprit, what should the voltage be (roughly) at the collector of Q4 during the charge phase? Shouldn't it be "robbing voltage" through R1 to get triggered? IF so, how could it be the culprit?

Q4 doesn't "rob" the voltage through R1. When Q4 is off, there should be NO current flowing through R1 in either direction, as if Q4 wasn't even in the circuit at all.

Q4 doesn't come on until the charging current drops.

The emitter of Q4 is tied to the low side of R8, so the emitter voltage depends on the voltage drop, which depends on the current through R8. More current=More drop.

So, if the high side of R8 is at 13.12V, then the low side is:

13.12-(R8*I)

If The current I=1300mA, and R8=0.54 ohm, then the emitter voltage of Q4 is at 12.42V.

If the current through R8 drops, this will raise the emitter voltage of Q4, because less current equals less voltage drop. If it drops to zero, then the emitter will be the same as the supply voltage, because there will be no drop across R8.

The emitter must be at least 0.6V higher than the base before Q4 will turn on.

If the emitter of Q4 goes above 12.82V (or, above the supply voltage minus 0.3V)), then Q4 comes ON, and it supplies voltage to C1 through R1. This ensures that C1 stays higher than C3, making sure the circuit stays off.

wilkin250r
12-19-2005, 01:58 PM
In a nutshell, here is how the circuit works:

The combination of Q2 and Q3 form a constant-current supply. Regardless of the supply voltage, or the voltage present on the NiCad cells, these transistors and resistor push a constant current that is determined by R8. For you, that's about 1300mA. Pumping this current into the NiCad cells is what actually charges them.

As you know, C3 reflects the cell voltage. The combination of the high resistor value for R3, and the high capacitor value for C2, means that C2 will be a reflection of C3, only delayed. So when the voltage drops across the cells, the voltage will drop across C3 before it drops across C2 and C1. This is the "peak detect".

When C1 is higher than C3, this turns the op-amp on, and turns off Q1, which then turns off Q2. This drops the current through R8, which turns on Q4. Q4 then makes sure that C1 stays higher than C3. Basically, when the charging circuit turns off, Q4 makes sure it stays off.

aviator4
12-19-2005, 02:07 PM
Okay, I think I am understanding this... but I need to take it one step at a time here...

you said "Q4 doesn't "rob" the voltage through R1. When Q4 is off, there should be NO current flowing through R1 in either direction, as if Q4 wasn't even in the circuit at all."

So I should be able to put my voltmeter accross the emitter and the positive side of the power supply and see nothing, until I trigger the circuit.. then I should see voltage, right?

wilkin250r
12-19-2005, 02:12 PM
Right.

Anytime you want me to slow down and explain things step-by-step, I can do it.

So, we know that the charging current flows through R8. That current also creates a voltage drop across R8 according to Ohms Law.

If there is no current through R8, then the is no voltage drop. If the high side is 13.12V, then the low side is also 13.12V. The emitter must then be at supply voltage.

wilkin250r
12-19-2005, 02:16 PM
So, in order for a transistor to turn "on", there must be at least 0.6 volts difference between the base and emitter. For a NPN transistor, the base must be higher. A PNP transistor is opposite, the emitter must be higher.

So, for a PNP transistor to turn "on", the emitter must be 0.6V higher than the base. (the emitter is the one with the arrow on it, I'm sure you knew that)

aviator4
12-19-2005, 02:34 PM
Hmm.. that could be a problem then.

According to my voltmeter,

the base voltage is only about .6 volts less than the power supply. When the circuit is activated, it drops about 1 Volt.

the Emitter voltage at rest is .002 Volts. When the circuit is activated, it jumps to 1.025 Volts

The Collector is about .2 volts less than the power supply. When the circuit is activated, it drops 1.21 volts.

So what does this mean to you?

wilkin250r
12-19-2005, 02:43 PM
It means something is goofy.

The base voltage shouldn't change at all, regardless if the circuit is charging or not. It should always be 0.9V below the supply voltage.

Does your supply voltage drop when the circuit is activated?

aviator4
12-19-2005, 02:46 PM
it drops .17 volts.

wilkin250r
12-19-2005, 03:05 PM
So, the supply drops to 12.95 when the system is "charging"?

Try this. Pull Q4 out of the circuit completely. It doesn't have any effect while the system is charging, the only reason it is in there is to make sure that once the circuit turns off, it staysoff.

When you pull it out, you have to start the circuit a little different. Connect the batteries, and push the button before you connect the supply voltage. When you release the button, this will automatically start the charging mode.

Measure the supply voltage.

Measure the voltage at the point between R11 and R12. The "red" lead on the meter should be hooked at this point, and "black" lead on the supply negative.

Measure the voltage drop across R11. The "Red" should be at supply positive, the "black" should be at the point between R11 and R12.

Do the same for R8. I want the voltage at the low side, (referenced to ground), and the voltage drop across it directly (from supply positive to the low-side of R8).

wilkin250r
12-19-2005, 03:11 PM
You understand the difference when I say the voltage AT and the voltage across, right?

When I say AT, I'm talking about referenced to ground. So the voltage at the low-side of R8, the "red" lead of your meter will be hooked to the low-side of R8, and the "black" lead will be hooked to ground.

When I say "across" R8, the red lead should be hooked to the high-side of R8, and the black lead should be hooked to the low side of R8.

aviator4
12-19-2005, 03:22 PM
Measure the supply voltage.
).15.24 ?? - I don't understand this.... it's rated as 12 Volts.

Measure the voltage at the point between R11 and R12. The "red" lead on the meter should be hooked at this point, and "black" lead on the supply negative.
).11.99.

Measure the voltage drop across R11. The "Red" should be at supply positive, the "black" should be at the point between R11 and R12.
3.22.

Do the same for R8. I want the voltage at the low side, (referenced to ground), and the voltage drop across it directly (from supply positive to the low-side of R8).
14.28.

I Double Checked these values.

aviator4
12-19-2005, 03:35 PM
Okay, the voltage values are funky coming out of this cube, so I put my volmeter on it and watched it.

It starts out at 12 volts, but them climbs slowly up past 15 volts and finally comes to rest about 15.5 volts. I don't get it.

wilkin250r
12-19-2005, 03:38 PM
Hmm, this seems odd. I'm not too worried about the supply voltage, it might not be a well-regulated supply. If it does become a problem, we can use a car battery for the supply voltage, because you KNOW that sucker won't budge more than a few millivolts.

What has me confused is the huge drop across R11. 3.22 volts is really big, you should be getting around 0.9V drop.

What are your values for R11 and R12? Your LED for D1 should have about 1.8V across it when it's "on", and R11 and R12 should split this voltage. So you should measure 0.9V across R11, and another 0.9V across R12, and together they add to the total 1.8V that you see across D1.

wilkin250r
12-19-2005, 03:40 PM
Do you have a fully-charged car battery handy? It's easily large enough to handle the current, and it's self-regulated. It may possibly eliminate one variable out of the loop, and provide consistency in measurement. It's kinda hard to get meaningful measurments when your supply voltage is changing all the time.

aviator4
12-19-2005, 03:49 PM
Okay, I found a part of the problem. Being the genius that I am, I used a set of LED's that had resistors on them, ugh.

I removed the resistors and now the voltage drop there is only 1.2 volts.

R11 and R12 are both 10K ohm resistors. They were checked with the Ohm Meter.

aviator4
12-19-2005, 03:51 PM
Yes, thats true. I do have a battery available. but an ATV battery would be easier. Lemme go grab one that is fully charged.

wilkin250r
12-19-2005, 03:55 PM
Ok, first order of business. Make sure all LEDs do not have resistors.

Ok, 1.2V sounds a little more reasonable, but I would still like to see 0.9 volts. Believe it or not, this value is fairly critical.

This tells me that you are probably using a green LED for D1?

aviator4
12-19-2005, 04:03 PM
No, acutally it's yellow. 2.2 Forward Voltage. And yes, I've taken out all the resistor. Sorry. my bad. (Thats what I get for using used parts for the LED's. Everything else is new. Right out of the static bags.

D2 is Red

D3 is Yellow mini LED

These were all temporary to test with. Eventually, they will be Green for power (D1)
Yellow for Charge (D2)
Red for Battery (D3)

This is getting a litle further along, but I'd like to use a dial LED for the charge light, coming up with a way to show it red when it's charging and gree when it's done or there is no battery connected.

wilkin250r
12-19-2005, 04:23 PM
The 2.2V foward voltage is creating a little bit of a problem, because R11 and R12 split this voltage. So, you should be seeing a 1.1V drop across R11, and we would like it to be a little closer to 0.9V

That 0.2V actually makes a difference. We want the base of Q4 to only be 0.9V less than the supply voltage.

Let me put it into perspective. When the circuit is "charging", there is a 0.7V drop across R8, and we want to trigger Q4 when that voltage drop goes from 0.7V to 0.3V

That's only a swing of 0.4V, and we already have half of that in error at the base of Q4.

What kind of resistors do you have at your disposal? Can you quickly throw a 15K resistor in parallel with R11? That should bring us real close to our needed 0.9V drop.

I'm betting this is your whole problem right here, especially the LED with the resistor in it. You end up with a HUGE voltage drop across R11, and you still have the standard 0.7V drop across R8.

These factor combine to make Q4 always on. You need the base of Q4 to be dang near exact 0.9V below the supply.

It might work with the 1.2V drop, if you want you can throw Q4 back in and try it.

wilkin250r
12-19-2005, 04:25 PM
D3 certainly isn't critical, and I don't think D2 is critical (I'd have to analyze the circuit better to be able to tell).

However, the voltage drop across D1 is critical, because it helps to determine the voltage drop across R11, which is the base voltage to Q4.

aviator4
12-19-2005, 04:26 PM
Okay, even hooked up to a 12 volt ATV battery I am still getting 1.18 voltage drop there.

wilkin250r
12-19-2005, 04:31 PM
Yeah, you have to get it closer to 0.9V

What kind of extra resistors do you have? Tell me anything you have between 1k and 20K, and I'll figure out a combination that will give you 0.9V drop for the base of Q4.

aviator4
12-19-2005, 04:43 PM
Okay. lemme get that all back together with a 15K in paralell with R11.

This may take a moment because I think I just popped the op-am, not sure yet.

I'll post what I find out. If you don't get a chance to reply until tomorrow, no worries.

Thanks again for all your help, I REALLY appreciate it!

wilkin250r
12-19-2005, 04:49 PM
I'm betting we found your problem.

The 15K resistor in parallel with R11 is just a temporary fix. Also, you said you wanted to change D1 to a Green LED. This will change the values of R11 and R12 to get the required 0.9V drop.

So, even if the 15K resistor DOES work, don't go off and etch a new board just yet. Get a complete working circuit, first, with all the bells and whistles you want.

wilkin250r
12-19-2005, 04:52 PM
Ok, now my question is, how many people have looked into this thread and are saying to themselves "What the F**K?!?"

aviator4
12-19-2005, 05:16 PM
Well, I think that was it.

I put Q4 back into place, and put the resistor in paralell, plugged it in and, as I sit right here, it appears to be charging! I need to rig something up so I cen see how many mA it's pushing to the battery, but other than that, I think it's good.

How would you put in an LED that shows "charge finished" in this ciruict? Where would you put it?

I've learned a valuable lesson about voltage drop accross the base of a transitos, thats for sure! Thanks for the lesson Wilkin!

Okay, $100 is yours. Just lemme know what I can get for you. I'm a dealer for just about every major part company there is from Shift to Elka.

Cheers!

Victor.

I will post the results of the first "cycle" of charging.

watts16
12-19-2005, 05:17 PM
Originally posted by wilkin250r
Ok, now my question is, how many people have looked into this thread and are saying to themselves "What the F**K?!?"

myself its been interesting reading about it though:p

aviator4
12-19-2005, 05:35 PM
Okay... part way there anyway.

This thing needs to go into a case with a fan on it. A small fan. It draws .08Amps.... the thing is, when I connetc it up, the supply voltage jumps to 17Volts and the circuit starts acting strangley, and yes, cutting out again... of course... so does this mean that I need to re-evaluate R11 again to get the .9Volts back at the base of Q4 to include the .08 amp draw?

wilkin250r
12-19-2005, 05:37 PM
For a "charge finished" light, I would probably put it on the output of the opamp.

The opamp output goes high to turn off Q1. As you probably know, opamp stands for Operational Amplifier. It's designed to push power, an extra load of an LED won't affect that opamp much. They are typically designed to push at least 100mA, and you're not pushing anywhere NEAR that into the base of Q1 to turn it off. It can easily handle another 10-20mA without affecting the rest of the circuit one bit.

I would stick it right on the output of the opamp, with a resistor in series to limit the current through the LED. The resistor can be anywhere from 500 ohm to 1.2k, depending on how bright you want it.

wilkin250r
12-19-2005, 05:44 PM
Originally posted by aviator4
so does this mean that I need to re-evaluate R11 again to get the .9Volts back at the base of Q4 to include the .08 amp draw?

It shouldn't. That 0.9V drop should stay fairly consistent, no matter what the supply voltage is. If the supply is 15V, you should see 14.1V at the base of Q4. If the supply is 16.8V, you should see 15.9V at the base Q4.

The voltage at that point will obviously fluctuate, but the drop across R11 should stay consistent. And the drop is really the only key for that portion of the circuit, because it's compared to the drop across R8. It doesn't really matter if you start a little higher up or further down, it's the drop that really matters.

wilkin250r
12-19-2005, 05:48 PM
So, let's get to the next key question. What do you mean by "starts acting strangley". Give me some specifics. What's the voltage drop across R11?

When you say "cutting out", what do you mean? Does it shut itself off? What are the voltages on C3 and C1 at the moment this happens?

wilkin250r
12-19-2005, 06:17 PM
On that note, we'll pick up this discussion again tomorrow. I'm out for the day.

aviator4
12-19-2005, 07:02 PM
Nevermind. In my haste to get it everything running. It didn't occur to me that perhaps we had inadvertantly fully charged the battery pack we were using all day. LOL...

I change to another discharged pack and everything works just fine.

There is one little odd thing:

D3 never fully goes out, whether there is a battery connected or not. It just changes brightness with the battery load, thats all. Weird.

Again, I can't thank you enough for all your help!

wilkin250r
12-20-2005, 09:33 AM
Originally posted by aviator4
D3 never fully goes out, whether there is a battery connected or not. It just changes brightness with the battery load, thats all. Weird.

It will always be on when the battery is connected. When Q2 turns off, the battery becomes the power source for the LED. It's only pulling a few milliamps, so it's not a huge problem.

However, it shouldn't stay on when the battery is disconnected. When Q2 turns off, there shouldn't be any current at all flowing down through R9 and R5. When Q4 comes on, there is a path from R1, R2, R3, R5 and into D3, but R3 should be high enough resistance to stop anything coming that way. There shouldn't be enough current through that path to light the LED.

If D3 stays on when the battery is disconnected, there is something else funny in the circuit.

When the circuit stops charging, pull the battery pack off and take a few measurements. Look at the voltage at the base of Q2, and the voltage at the low-side of R8. Also, look at the voltage drop across R8, and the voltage drop across R5.

aviator4
12-20-2005, 09:34 AM
Okay, so here's a question about calculating resistance.

You had me put a 15K resistor in paralell with the 100K resistor at R11, so to substitute a single resistor, I would need an 115K, right? Thats the number I have come up with.

Tell me if I'm wrong here.

wilkin250r
12-20-2005, 09:58 AM
Originally posted by aviator4
Okay, so here's a question about calculating resistance.

You had me put a 15K resistor in paralell with the 100K resistor at R11, so to substitute a single resistor, I would need an 115K, right? Thats the number I have come up with.

Tell me if I'm wrong here.

Unfortunately, you're way off.

First of all, R11 should be a 10K resistor, not 100K.

Second, you need to learn about parallel and series resistances.

In series, they are additive. R1 + R2 = R total


In parallel, they actually decrease. The official equation is:

1/R1 + 1/R2 + 1/R3 + 1/R4 ... = 1/Rtotal


For only two resistors, the can be simplified to:

(R1 * R2)/(R1 + R2) = Rtotal

So, for a 10k and 15k, you have (150k)/(25k) = 6k

wilkin250r
12-20-2005, 10:06 AM
The other thing is, you're planning on putting a green LED in for D1. That green LED is going to have a slightly different voltage drop across it, which will change the voltage drop across R11 and R12. You may need to find another set of resistors to give you the necessary 0.9V drop across R11.

aviator4
12-20-2005, 11:13 AM
Okay.. here are the results.

When the circuit stops charging, pull the battery pack off and take a few measurements. Look at the voltage at the base of Q2

16.32

and the voltage at the low-side of R8.

17.3 (17.5 supply reading)

Also, look at the voltage drop across R8,

.009

and the voltage drop across R5.

2.66

Okay, so let me see if I can't trouble shoot and you correct. if Q2 isn't turning completley off, then it's leaking voltage to the battery LED.

Now, I know that when the charge circuit is running, Q2 gets VERY hot (yes, it's on a HeatSink), so I knowo that it's at least turning down. So, I test... at idle, the Collector is 17.9 Volts,
during charge. it's 6.5 (roughly) But shoultn't it be droppting to somewhere close to 0? So the next logical step is, whats "holding the gate open" right?

aviator4
12-20-2005, 11:33 AM
Now, if what I've learned is corect about transistors, then they act as a "gate"

1. The Collector is "unmanaged" power
2. the base is the"manager"
3. the emitter is the "managed power"

small change in base, opens the gate for the collector sending a specific amount of power out the emitter.. right?

However, in the case of the schematic, the emitter is conntected to a constant voltage (through R8) and the collector is connected to the battery for charging. My first inclination is to think that Q2 is backwards in the schematic.. so how does that work?

wilkin250r
12-20-2005, 11:41 AM
Originally posted by aviator4
Okay, so let me see if I can't trouble shoot and you correct. if Q2 isn't turning completley off, then it's leaking voltage to the battery LED.

Now, I know that when the charge circuit is running, Q2 gets VERY hot (yes, it's on a HeatSink), so I knowo that it's at least turning down. So, I test... at idle, the Collector is 17.9 Volts,
during charge. it's 6.5 (roughly) But shoultn't it be droppting to somewhere close to 0? So the next logical step is, whats "holding the gate open" right?

Right. Q2 isn't turning off all the way, there is still some leakage going through.

During charge, the collector is basically the "output" of the transistor, and it's pushing charge into the battery. It will reflect the battery voltage.

R14 is supposed to be in place to make sure that Q2 turns off completely. Double-check to make sure it has good connections. If it still doesn't work, pull it out of the circuit and check it, make sure it's 330 ohm, and not 330k ohm or something silly like that.

Basically, the the emitter and base have to be LESS than 0.6V apart for the transistor to turn off. You have almost a full volt.

After you check R14, and it STILL is leaking, check the base to emitter voltage directly on Q2, and also on Q1.

wilkin250r
12-20-2005, 11:49 AM
Originally posted by aviator4
Now, if what I've learned is corect about transistors, then they act as a "gate"

1. The Collector is "unmanaged" power
2. the base is the"manager"
3. the emitter is the "managed power"

small change in base, opens the gate for the collector sending a specific amount of power out the emitter.. right?

However, in the case of the schematic, the emitter is conntected to a constant voltage (through R8) and the collector is connected to the battery for charging. My first inclination is to think that Q2 is backwards in the schematic.. so how does that work?

Yes, and no.

What you have described above is an NPN transistor. They are the most logical. You provide a positive voltage to the collector, and the emitter goes to ground (often through a resistor). When you apply a voltage to the base, it opens the path between collector and emitter. When used as a "gate", the collector is the input, the emitter is the output, and the base is the trigger that opens it up, or closes it off. The base voltage must be 0.6V higher than the emitter voltage in order to turn it "on".

You are working with PNP transistors. They are basically opposite. The emitter must be higher than the base before it turns "on". So, in effect, the emitter becomes the "input", and you supply a positive voltage to the base to turn it "off".

There are advantages and disadvantages to each.

SGA
12-20-2005, 11:50 AM
This is good reading!:)

wilkin250r
12-20-2005, 11:54 AM
Originally posted by SGA
This is good reading!:)

Yeah, good for insomnia. :blah:



And you guys thought I only knew stuff about motors...

aviator4
12-20-2005, 12:03 PM
Okay, they've been checked.

R14 is definatley 330 Ohms, not 330K

the Base-Emitter Voltage on Q2 is .93 Volts

The Base-Emitter voltage on Q1 is .96 Volts

Nut I'm not wholly sure what this tells me.

parkers30
12-20-2005, 12:06 PM
Originally posted by SGA
This is good reading!:)

sure is, I have learned a few new things

aviator4
12-20-2005, 12:11 PM
Glad to see everyone is enjoying my lack of electronics knowledge! LOL.

wilkin250r
12-20-2005, 12:28 PM
Try decreasing R14 to somewhere around 200 ohms, and see if that solves anything.

aviator4
12-20-2005, 12:46 PM
Okay, tried a 220 first, it got dimmer, but not out.

So, I went all the way down to a 120.. it's still on, just very dim.

wilkin250r
12-20-2005, 01:02 PM
We don't want to go TOO low.

Ok, maybe R14 isn't the problem.

Rather than the base to emitter voltage, give me the actual voltage readings at the base of Q1, and the emitter of Q1.

If the opamp isn't turning Q1 off completely, you may have to either live with the problem, or we may have to get creative with a solution.

aviator4
12-20-2005, 01:05 PM
Okay. Base is 16.12 Emitter is 17.13 with the supply now being 18.15.

Not a very stable voltage source.

aviator4
12-20-2005, 01:07 PM
if I have to live with it, it'd be fine. Would it be possible to just remove the LED all together? Afterall, it's just telling me the batter yis connected.... well duh, I know that... I connected it. If it's not connected, the charge cycle just stops.

wilkin250r
12-20-2005, 01:31 PM
Yeah, you can get rid of it. Won't hurt nothin'.

I'm thinking the problem is the opamp. I'm sure you read the description, the opamp can't supply FULL supply voltage. The top rail is about 1v down from the supply voltage.

We could get tricky and boost the voltage a little at the base of Q1, but it would get complicated. Chasing a volt isn't quite as easy as you would think, especially when it's full supply voltage you're after. Almost any component has at least a 0.7V drop.

aviator4
12-20-2005, 01:43 PM
Okay. So I'm off to get the real thing built. Let see how it goes.

wilkin250r
12-20-2005, 01:53 PM
Bet you never thought you'd find this level of help on an ATV forum, did you?

aviator4
12-20-2005, 02:00 PM
Honestly... heck no! For some reason, I figured if anyone could help me, it would be you though. You seem to have a head full of knowledge about every topic!

Thanks a million!!

What exaclty do you do? Whats your profession?

wilkin250r
12-20-2005, 03:01 PM
Originally posted by wilkin250r
But, I do happen to dabble a little in electronics, I should be able to help you.

I'm an Electrical Engineer. ;)

aviator4
12-20-2005, 05:06 PM
Ah. Well, that explains a lot.

I guess this little circuit was just childs play to you.

wilkin250r
12-20-2005, 05:45 PM
No, I still need to analyze the circuit for at least 30 seconds before I understand the whole thing ;)


And if you're serious about that $100 credit, I'll stick that little tidbit in my pocket for future use, because I can't think of anything at all I need at the moment.

If/when I do use it, I'll make sure it's a big-ticket item, so that you're not losing money on it.

aviator4
12-20-2005, 05:48 PM
Yup, I', serious. Hang onto that and let me know when you wanna use it. I don't mind if it's several small items, thats okay with me.

Okay, one last thing.

I have the final circuit built and it charges, but it appears as though it's shutting off before the battery is fully charged. Is it possible that this poorly regulated power supply is causing some problems with the charge/discharge rate of the capacitors that are detecting the peak?

wilkin250r
12-20-2005, 05:58 PM
How close to fully charged are they?

The power supply shouldn't really have a significant effect. You end up pushing a current into the batteries, and the level of that current isn't terribly critical.

You saw the description and the board, you can select various values of R8 to get different charging rates. Take that concept one step further, you can charge NiCad batteries with various different charge rates, even if it's in the same cycle. So if your power supply voltage wanders from 12V up to 18V, it still shouldn't have any problems.

wilkin250r
12-20-2005, 06:02 PM
Now, here is the one thing the circuit IS doing that might likely be the culprit.

It is measuring heat. Or, more precisely, it's measuring the effects of heat. When the pack gets hot, the voltage on the individual cells drop a little bit.

Is your pack heating up as you charge it? Maybe a higher value for R8 might fix it, in order to bring the charge current down and control that heat. Don't go too low, because you still need SOME heat in order to trigger the peak-detect.

If that doesn't fix it, we may need to do some more troubleshooting.

aviator4
12-20-2005, 06:33 PM
Well, maybe they are fully charged. I dunno.

These are also new packs, so lemme play with them overnight.

They are 3.6V packs, and are showing about 5 Volts when they are fully charged right now.

As far as heat. They are getting very slightly warm to the touch at the moment. Mabe thats what's going on.

I'll play with 'em overnight and see if I can't figure it out. Maybe They just need to be cycled a few times.

aviator4
12-21-2005, 08:17 AM
Okay. The charger works just fine.

Iive been able to watch the voltage accross the battery packs closely during the charge cycle and they are charging fully then shutting off at the peak, just litke it's supposed to.

Turns out that the "peak detect" part of the circuit is so sensitive that just josseling the battery (an in turn moving the connector) can cause enough voltage fluctuation to cause the charger to think it's peaked and stop the charge cycle.

I actually took the authors advice and put multiple R8 resistors in the circuit with a switch. Looks like I have a "fast" and a "slow" charge cycle.

the fast cycle is about30 minutes. The slow cycle is about an hour. Both cycles work great.

Now, Wilkin, if you're interested in continuing to help me learn... here's here's a mod for this circuit.

How would the schematic change if I wanted to set up the charger so that, if you leave a battery connected after the charging cycle, the charger would monitor the battery. If the voltage drops (because nicads lose part of their charge over time), it kick on a TRICKLE charge until the battery is back up to peak performance.

If you don't have time I understand. I will continue to play with the breadboard version of the circuit to see if I can't make the mod.

Thanks again for the valuable lesson in electronics. I've taken so much away from this little project, you just wouldn't believe. It's funny I expected to learn about OpAmps, but ended up learning about transistors!

wilkin250r
12-22-2005, 11:01 AM
Setting up a trickle charge might be a little complex. I don't know enough about the nicad batteries to determine what kind of trickle it needs, and how to shut it off.

I know electronics, but we are talking material science here. I don't know the molecular internal structure of the batteries, and how they respond to trickle charges.

Now, we could possibly set up something to monitor the voltage on the batteries, and restart the FULL charge cycle. It would be simple, another opamp, some relays, and a few resistors.

However, that's a little risky. The Nicad batteries probably won't respond very well to repeated shocks of the full charge current, not to mention the THERMAL effects of constantly heating and cooling over and over. In the long run, you would probably do more damage than good.

It would probably be best to just let them sit, rather than constantly try to trickle them to keep them topped off. It works well for Lead Acid, but I don't know about NiCad.