Hotwire Regulator Design Collaboration Project Part 2

Candle Power Forums

Help Support Candle Power:

Status
Not open for further replies.
I don't believe my USB scope can see those. I keep looking for a reason to get a better one :naughty:

I do have a 60 mhz Heathkit dual trace buried in the garage. Wonder if it still works.

Remind me what the traces are and the parameters of your test.

Any data on bulb inductance?

-- Alan

No data on the bulb inductance - it is a standard automotive 12V bulb (this one rated at 12V 1Amp or so).

Yellow trace= Vbatt vs. GND (which is also Vbulb+
Blue trace = Vgate vs. GND (this is the trigger signal for the scope, set at 4.0V)
Purple trace = Vbulb- vs. GND
Red trace = Yellow trace - Purple trace = Voltage across the bulb

Will
 
I did more testing, but I decided to try a new bulb, a 4-5V incandescent. To my surprise, as soon as I connected it, it gave out a very brief but very bright output pulse, and then went down to very little or nothing. I tried like 10 times, but I could not always do it. Somehow, at startup, there was a wider output pulse that was not visible on the 12 volt bulb.

Here is the standard 12V bulb I am using (I can't see the pulse in this one):
dscf1882.jpg



and here is the smaller voltage bulb - very easy to see the pulse:
dscf1883.jpg



It took me many tries to get the scope right, but here is the actual capture of the elusive first pulse, right as the system is starting up - you can see that the "normal" tiny pulses follow as expected (this is at 20mS/div). Also note that at this resolution the spikes are not visible:
dscf1884.jpg



I then changed the scale in each of these shots so that you can see more detail, of course with lower resolution (this is at 10mS/div):
dscf1885.jpg



(this is at 4mS/div):
dscf1885.jpg



(this is at 2mS/div):
dscf1886.jpg



Here is the dimly lit bulb with the "normal" tiny pulses, before I pushed the button:
dscf1887.jpg



So at first pass, it looks like we "might" have a problem with instability as the Tiny85 wakes up or as the routine gets ready to output its first pulse.

Alan, can you try with a small voltage bulb (like a 2 or 3 cell Mag bulb) to see if your circuit will also show the brief, bright pulse of light upon starting?

Will
 
Last edited:
Alan,

As I noted above, I couldn't always see this on startup, but I was finally able to get it to happen repeatedly, "if" I wait long enough for the capacitors to fully discharge. Then it happens every time.

Maybe something with Vcc taking a little too long to come up and while it is coming up the Tiny85 starts doing "its thing" before the Vcc is stable? Also remember that I am using Vcc as my reference - this might also explain what is going on, if the algorithm makes a decision before the Capacitor for Vcc is fully charged. Could the solution be as simple as waiting a few mili-seconds before "starting" for good?

Makes me wonder if the internal 1.1V and 2.56V references also have a "setup" time?

Will
 
Will:

Precisely what kind of startup are you doing? Applying power to the micro?? Or pushing the button??

I presume this is on application of power. I have not tested that very much.

I have not enabled the chip's Brownout Detection circuitry. I suspect that might solve the problem.

-- Alan
 
Looking at the timing of this first pulse, I would guess that it is an initialization problem in the code. Have to review that in detail.

-- Alan
 
Will:

Precisely what kind of startup are you doing? Applying power to the micro?? Or pushing the button??

I presume this is on application of power. I have not tested that very much.

I have not enabled the chip's Brownout Detection circuitry. I suspect that might solve the problem.

-- Alan

Alan,

No button involved, just during first power application. Basically:

- use a low Voltage bulb (mine I used to DD with 4x AA NiMH cells)
- wait until caps are discharged (at least 30 seconds)
- setup scope to trigger once
- switch ON the power supply
- bulb grows VERY bright for a very short while
- bulb goes down quickly to a steady state level (barely see the red glow)
dscf1888.jpg



Will
 
Last edited:
As an Amazon Associate we earn from qualifying purchases. Product prices and availability are accurate as of the date/time indicated and are subject to change.
The output being used to drive the FET is a complementary output (normally high). It looks to me from your excellent scope capture that the first cycle is high, which makes a lot of sense. Probably need to initialize it a bit differently to coerce the first cycle to be low or very short...

Try putting

OCR1B = 255

right before the GTCCR = ... line and see if this problem goes away.

Thanks!

-- Alan
 
Alan,

Yup, that fixed it. Initializing the value to 255 so that the initial inverted output is zero works. I have tried several times tonight, and I can't get it to do it again - good job dude!

It is so cool to be able to run a flicker-free 4-5V bulb from a 13V PS without the bulb exploding!!!

Now, we need to go back and work on the FET=OFF glitches - they are pretty nasty :( . I think I am going to experiment with a single fast diode across the bulb terminals to see if that helps.

Will
 
Alan,

Yup, that fixed it. Initializing the value to 255 so that the initial inverted output is zero works. I have tried several times tonight, and I can't get it to do it again - good job dude!

It is so cool to be able to run a flicker-free 4-5V bulb from a 13V PS without the bulb exploding!!!

Now, we need to go back and work on the FET=OFF glitches - they are pretty nasty :( . I think I am going to experiment with a single fast diode across the bulb terminals to see if that helps.

Will

Great :thumbsup:. I'll have to put that into the various codes, though it really only matters in the final code, the older test programs don't really matter much for that. I should have thought of that when I wrote the initialization, but at that time I was driving the STK500 which is upside down and so didn't have the problem. :ohgeez:

On the FET OFF Transient - It doesn't endanger the bulb, but might the FET or the regulator. The real question is what is the magnitude of this peak (in various conditions), and does it endanger the ratings of the regulator and FET. It certainly appears as though it could.

The other question is where is it coming from. It might be interesting to measure the inductance of some bulbs and see if it can account for it. The complicated coil within a coil winding of filaments might product some interesting inductance.

Incidentally, the clarity of your scope traces is really excellent and very helpful in sorting these phenomena out. As soon as I really looked at your capture of the starting flash I knew what the problem was, and that it was not my first guess which I made before really focussing on the information that was available in the scope. Similarly with the FET off-glitch, the clarity of the information is really excellent and helpful in quickly narrowing down the issues.

It really does appear to be filament inductance. I have not tried to put numbers on it, but that has other implications as well regarding the RMS power in the filament vs the frequency content of the PWM. :sick2:

As far as a diode helping, I don't see where to dump the energy. Normally the supply would be used, but clearly here the supply/battery is being driven by this spike, so that may not help - maybe it will, see below. The traditional absorber is an RC snubber across the switch (FET), and that may be a good tool tool here. Actually, the diode just might help. Worth a test at least. The snubber is faster, but using the energy in the filament may help with the problem I mentioned above - the energy that was soaked up and diverted by the inductance at the onset of the PWM pulse will get dumped into the filament at the end of the PWM pulse. Excellent.

For the inductive kickback to get to the battery it must couple through the FET drain-source capacitance, which is substantial. Interesting.

Also, the scope trace clearly shows the miller effect of the drain transition coupling internally to and slowing the gate transition. That is what will drive the dissipation of this FET and it shows us where the linear region is. Nice :thumbsup:

So it might make sense to look at snubber design and see what might be reasonable there. I wonder if other designs have done that?

-- Alan
 
Last edited:
Alan,

I will post pictures of the scope tonight, but a couple of additional data points from my testing last night:

- I though I was hearing a low buzz but I always ignored thinking it was some noise in my office. Last night I tried to listen better, and sure enough, the low buzz/humming noise "is" coming from the PhD board.

- I tried a resistor for a load (1K) instead of the bulb - not only the buzz/humming is gone, but the signals look almost perfect, and with no pulses as the FET turns off.

- I put back the bulb, and sure enough, I got the buzz back, and the pulses there again.

- I tried replacing the PS with the 3x18650 cells, and the pulses were there again if I used the bulb.

The amplitude is substantial - on a PS of 13.6V, the peaks seem to be at least 5-10 volts This is why I said earlier that these pulses do look rather "nasty". I will try to take additional measurements tonight.

Question: Have you tried placing the 68 Ohm resistor on the other side of the 100K resistor? I ask since that is how Willie Hunt drives his FET - I wonder if this would improve the switching behavior:
http://www.cs.indiana.edu/~willie/LVR3I.PDF

Will
 
Alan,

I will post pictures of the scope tonight, but a couple of additional data points from my testing last night:

- I though I was hearing a low buzz but I always ignored thinking it was some noise in my office. Last night I tried to listen better, and sure enough, the low buzz/humming noise "is" coming from the PhD board.

- I tried a resistor for a load (1K) instead of the bulb - not only the buzz/humming is gone, but the signals look almost perfect, and with no pulses as the FET turns off.

- I put back the bulb, and sure enough, I got the buzz back, and the pulses there again.

- I tried replacing the PS with the 3x18650 cells, and the pulses were there again if I used the bulb.

The amplitude is substantial - on a PS of 13.6V, the peaks seem to be at least 5-10 volts This is why I said earlier that these pulses do look rather "nasty". I will try to take additional measurements tonight.

Question: Have you tried placing the 68 Ohm resistor on the other side of the 100K resistor? I ask since that is how Willie Hunt drives his FET - I wonder if this would improve the switching behavior:
http://www.cs.indiana.edu/~willie/LVR3I.PDF

Will

Interesting. That is good evidence that it is bulb inductance.

I have heard the buzz on my WA1185. I think it was only at very very low settings, and it was not very loud, but it was audible.

I don't think moving the 68 ohm resistor on the other side of the 100k will matter. :thinking:

I do think the diode across the bulb is worth trying. I didn't at first, but the more I think about it that may be a good solution. That will redirect the inductive kick back into the filament. It should clean up the supply overshoot a lot. The energy in the inductance was taken from the bulb RMS, so if we return it to the bulb it will minimize the RMS error at the same time. All-around better.

Ideally it would be a schottky diode, but a power supply diode should be adequate for an initial test. Watch the direction of course, if put in backwards it will short the supply/battery through the FET and bad things may happen. :popcorn:

I am building a new battery. LiFePO4. 4 cells in series. 31AH each. I will use it for general purpose stuff including powering Ham Radios, but it will also be used for this flashlight regulator testing and powering battery chargers used for RC and flashlight batteries. It should be a good example of a low impedance source, quite similar to A123 cells. I also have some A123 cells but have not set them up for use yet. Don't short these cells, though, they will get even. :poof:

-- Alan
 
Last edited:
Interesting. That is good evidence that it is bulb inductance.

I have heard the buzz on my WA1185. I think it was only at very very low settings, and it was not very loud, but it was audible.

I don't think moving the 68 ohm resistor on the other side of the 100k will matter. :thinking:

I do think the diode across the bulb is worth trying. I didn't at first, but the more I think about it that may be a good solution. That will redirect the inductive kick back into the filament. It should clean up the supply overshoot a lot. The energy in the inductance was taken from the bulb RMS, so if we return it to the bulb it will minimize the RMS error at the same time. All-around better.

Ideally it would be a schottky diode, but a power supply diode should be adequate for an initial test. Watch the direction of course, if put in backwards it will short the supply/battery through the FET and bad things may happen. :popcorn:

I agree, it should be a schottky diode. I am pretty sure I have some at home - I will try tonight and let you know what happens.

Any word on when I can play with a more recent version of the firmware, even if not final?

Will
 
Alan,

Yup, that fixed it. Initializing the value to 255 so that the initial inverted output is zero works. I have tried several times tonight, and I can't get it to do it again - good job dude!

It is so cool to be able to run a flicker-free 4-5V bulb from a 13V PS without the bulb exploding!!!

Now, we need to go back and work on the FET=OFF glitches - they are pretty nasty :( . I think I am going to experiment with a single fast diode across the bulb terminals to see if that helps.

Will
That diode is a great idea. A schotkey diode will dump the inductive pulse. If that's what it is. It sure looks inductive. Those 12V automotive bulbs do have a long filament...

Arrrrrgggghhhh. BONUS PLEASE GET HERE!!
I have a shopping cart at Digikey ready to go. As well as Tigerdirect.com. Hmmmm 22" LCD monitor for my bench PC.
 
I agree, it should be a schottky diode. I am pretty sure I have some at home - I will try tonight and let you know what happens.

Any word on when I can play with a more recent version of the firmware, even if not final?

Will

Maybe an Alpha tonite. :whistle:

If I do one, it will be mostly untested, though. I did some testing the other night and it wasn't starting the bulb on my PS unless I ramped the voltage up higher. I think it is just the power supply current limiting on the short pulses into a cold filament, but I didn't have time to fire up the scope to find out. So as long as our expectations are set for some bugs, we are about ready.

- - Alan
 
Maybe an Alpha tonite. :whistle:

If I do one, it will be mostly untested, though. I did some testing the other night and it wasn't starting the bulb on my PS unless I ramped the voltage up higher. I think it is just the power supply current limiting on the short pulses into a cold filament, but I didn't have time to fire up the scope to find out. So as long as our expectations are set for some bugs, we are about ready.

- - Alan

Understood - thanks ;)



The Alpha code is on the server. :popcorn:

-- Alan

Got it downloaded. If CPF goes down, I will continue communicating with you via email ;)

Will
 
Good news and bad news.

Bad news, the schottky diode (50V 2A rating) did not work. I also tried a 6A Power Supply Rectifying diode - no go either.

Good news, I collected some interesting data on the "evil" pulses.

I found the schottky diodes I though I had, but they were surface mount:
dscf1894.jpg


dscf1895.jpg



I soldered to short legs so that I could use them:
dscf1897.jpg



Here is data on a 1K resistor as the load - note this is pretty much picture perfect shape on all waveforms (this is at startup, before any push buttons):
dscf1899.jpg



Here are the ugly pulses on the small 5V bulb (this is at startup, before any push buttons):
dscf1900.jpg



Same but with the schottky diode - basically no difference:
dscf1901.jpg



Here I am using the 100 Ohm 100Watt power resistor set to about 6 Ohms (notice this has some inductance, but also, that it puts a bigger load on the PS than the 1K resistor):
dscf1902.jpg




I kept playing with the system and swaping bulbs, and I noted that as the duty cycle increases, and the Vrms increases, that the spikes become "smaller" in magnitude!

To capture these better, I am now triggering on the negative slow of the gate voltage.

Here is the 12 volt bulb - at startup:
dscf1904.jpg



Here is the 12 volt bulb - after one press:
dscf1905.jpg



Here is the 12 volt bulb - after twp press:
dscf1906.jpg



Here is the 12 volt bulb - after three press:
dscf1907.jpg



Here is the 12 volt bulb - after four press:
dscf1908.jpg



Here is the 12 volt bulb - after five press:
dscf1909.jpg



Here is the 12 volt bulb - after six press:
dscf1910.jpg



Here is the 12 volt bulb - after seven press:
dscf1911.jpg



Here is the 12 volt bulb - after eight press:
dscf1912.jpg



Here is the 12 volt bulb - after nine press:
dscf1913.jpg





Now I changed back to the smaller 5V bulb. Note that the spikes are much larger!


Here is the 5 volt bulb - after startup:
dscf1914.jpg



Here is the 5 volt bulb - after one press:
dscf1915.jpg



Here is the 5 volt bulb - after two press:
dscf1916.jpg



Here is the 5 volt bulb - after three press:
dscf1917.jpg



Here is the 5 volt bulb - after four press:
dscf1918.jpg



Here is the 5 volt bulb - after five press:
dscf1919.jpg



So it looks like the bulb's inductance plays a key role, but also the current draw on the battery.

I will keep testing over the weekend - I still don't understand why neither the schottky diode nor the regular diode seemed to help :confused:

Will
 
Status
Not open for further replies.
Back
Top