Electronics > Projects, Designs, and Technical Stuff
Troubleshooting help needed
(1/1)
peper:
Hi,
A couple of years ago I built my own bike light for my daily commute and it's worked pretty much flawlessly since. That was until last Friday when suddenly turned off as I was about half way home. I have a 'low battery' LED that is steady when the supply voltage is getting low and then blinks when it's critical and that's what it was doing. Once it decides the voltage from the battery is below a certain threshold, it turns off the light to avoid discharging the battery too far. On Friday it went from LED off (voltage fine) to blinking (critical).
As a quick overview, a small 12v battery powers a halogen bulb and my rear light. A PIC allows me to control the brightness and checks the battery voltage.
Because of a lack of pins on the PIC, I use the PWM output to the main bulb to feed a 'smoothing' circuit to give me a power supply feed that is only on when the light is on. This feed is used for a voltage divider so that the PIC can measure the supply voltage and supplies a voltage regulator for the rear light. The problem seems to be in this smoother circuit somewhere.
I've attached the schematic and two oscilloscope traces that I don't quite understand.
R4 is where the smoother circuit begins. If I measure on the left of R4, I get the nice square wave signal shown in R4_left.png.
If I measure on the right of R4, the square wave is suddenly not getting any lower than 11.6V.
If anyone has any ideas why this should be the case, I'd love to hear them. I welcome any constructive criticism about the circuit, but be gentle on me. I'm teaching myself this as I go along.
I've noticed a one or two things I would probably do differently were I to do it again, but as I said, it's worked flawlessly for the last couple of years so either it's not that bad, or I've just been extremely lucky :)
I appreciate any help anyone can give me.
Regards,
Richard.
Wim_L:
It seems to make sense that it would be hard to get that point much lower than a diode drop below battery voltage, because a diode (base-emiter junction of Q1) is all that sits between the battery and the right side of R4. What did you expect to happen?
peper:
--- Quote ---It seems to make sense that it would be hard to get that point much lower than a diode drop below battery voltage, because a diode (base-emiter junction of Q1) is all that sits between the battery and the right side of R4. What did you expect to happen?
--- End quote ---
I expected the signal on the base to be the same as the one the left side of R4. Then Q1 would switch as expected
When T1 is turned on, the lower side of the bulb is grounded so that it lights, and since the base of Q1 is also connected (via R4) to this line, it too should be pulled low.
R4 itself is fine. I've also replaced Q1 in case that was somehow blown. The clearances on the board could be better but I've not found a short or anything else obvious. All resistances seem to be fine.
What I don't understand is why the signal is fine on one side of R4 but completely different on the other. It's only there as a current limiter so what's causing this effect?
Regards,
Richard.
peper:
--- Quote from: Wim_L on March 06, 2011, 03:27:02 am ---It seems to make sense that it would be hard to get that point much lower than a diode drop below battery voltage, because a diode (base-emiter junction of Q1) is all that sits between the battery and the right side of R4. What did you expect to happen?
--- End quote ---
Ok, now I understand what you mean :) Notionally replacing the transistor with a diode to simulate the base-emitter junction, with the left side of R4 pulled down to GND (i.e. PNP transistor is on) gives a 'simpler' representation (at least for me).
I simulated the 'smoother' circuit last night which helped me understand what the voltages would/should be at each point in the circuit.
I just went over my board again and found Q2 was blown. I had actually replaced that but I must have blown it again whilst checking other things. I have to admit that I forgot to disconnect the battery a couple of times whilst going over the board. I probably shorted it out by accident.
Anyway, it's all working again now and I'm happy. As they say, you learn a lot more when something doesn't work :)
Regards,
Richard.
Navigation
[0] Message Index
Go to full version