Hotwire Regulator Design Collaboration Project Part 2

Candle Power Forums

Help Support Candle Power:

Status
Not open for further replies.
It is a good idea. I have had similar thoughts. I suspect that it needs to be tuned to the battery and bulb in use. It might be easy for a specific setup but hard for a generic application.

-- Alan
Maybe for a specific bulb and cell "type". If the cell count were fixed, then the low volt cutoff would be a simple programmed value. So it might be a good option for a certain range of bulbs (3-4 Amps, or 5-6 Amps), etc and a type of cell. A123s or eMoli, etc. Well, once I get the software working, I'll start adding the fancy stuff.
 
Well, today I chucked up a piece of 6061-T6 and let the chips fly. Turning and boring is now done on the first prototype M@gSled.

Next I need to set up the Mill and make more chips. Maybe, just maybe I'll have a working in-M@g regulator in the next few days... :whistle:

-- Alan

mgsledproto1.jpg
 
Well, today I chucked up a piece of 6061-T6 and let the chips fly. Turning and boring is now done on the first prototype M@gSled.

Next I need to set up the Mill and make more chips. Maybe, just maybe I'll have a working in-M@g regulator in the next few days... :whistle:

-- Alan

(snip)

Very nice Alan ;)

Will
 
Well, today I chucked up a piece of 6061-T6 and let the chips fly. Turning and boring is now done on the first prototype M@gSled.

Next I need to set up the Mill and make more chips. Maybe, just maybe I'll have a working in-M@g regulator in the next few days... :whistle:

-- Alan

Well, the turning went pretty fast but the milling is a stretch for my mini-mill. This is going to take awhile. Need a more efficient mechanical design or an NC mill.

-- Alan
 
OK. I have redesigned the mechanical and the PCBoard to make it easier to build this thing because my earlier design was not practical for my tooling. Now the question is should I just build a couple for myself, or a few more? My plan is sufficiently different from others that it might be worthwhile to make a few, though I don't have a lot of time for this.

I started a separate feeler thread to keep this topic on the design, and discussions about making some in the appropriate forum:

http://www.candlepowerforums.com/vb/showthread.php?t=218506

-- Alan
 
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.
Alan,
Is it possible to trigger the ADC read via an interrupt?
I've been reading the Tiny84/85 documentation.
If we use Phase Correct PWM and read the ADC every time the TOVn interrupt flag is set, we are assured to read the ADC value in the middle of the PWM ON pulse. That's good right?
 
Alan,
Is it possible to trigger the ADC read via an interrupt?
I've been reading the Tiny84/85 documentation.
If we use Phase Correct PWM and read the ADC every time the TOVn interrupt flag is set, we are assured to read the ADC value in the middle of the PWM ON pulse. That's good right?

I'd have to look into it. I'm not sure the phase correct PWM will work properly for the Tiny85 design pinout that I was using. Seems to me there was some problem with it.

I think the ADC can be triggered on certain interrupts, probably not all.

The center of the PWM cycle may not be the optimum place to read the ADC, but it is one good place. It might be better to read it at both ends and make a trapezoidal interpolation. Probably need to model some real waveforms to see.

-- Alan
 
I have an update regarding the development for the Tiny84.
I have 10-bit PWM running at 244Hz.

I read the battery voltage on ADC3 with the internal 1.1V Vref and I read the request voltage on ADC2 with Vcc as the Vref both using the full 10-bits.
The Tiny84 doesn't have the 2.56V Vref, Just 1.1 and Vcc. So I can use a 360K upper resistor for the battery voltage divider and a 10K for the bottom. A nice side effect is a reduction in "waste" current.
With that arrangement, I can get ~0.04V resolution

It works very nicely thus far.
Next to do...
1) Syncing the ADC3 read with PWM ON.
2) Start introducing the various calculations for regulation.
3) Add programmable soft start ramp.
4) Add code for reading pushbuttons. While not necessay for the JM-PhD-D1, it will be for later versions.

This shouldn't be too bad.
 
Last edited:
I have an update regarding the development for the Tiny84.
I have 10-bit PWM running at 244Hz.

I read the battery voltage on ADC3 with the internal 1.1V Vref and I read the request voltage on ADC2 with Vcc as the Vref both using the full 10-bits.
The Tiny84 doesn't have the 2.56V Vref, Just 1.1 and Vcc. So I can use a 360K upper resistor for the battery voltage divider and a 10K for the bottom. A nice side effect is a reduction in "waste" current.
With that arrangement, I can get ~0.04V resolution

It works very nicely thus far.
Next to do...
1) Syncing the ADC3 read with PWM ON.
2) Start introducing the various calculations for regulation.
3) Add programmable soft start ramp.
4) Add code for reading pushbuttons. While not necessay for the JM-PhD-D1, it will be for later versions.

This shouldn't be too bad.

Jim, Excellent progress! There sure are a lot of little differences between the CPUs. Perhaps we should consider changing to the 1.1Vref on all versions of the code, would make things a bit easier to follow, and keep the resistor sets the same.

Is the Tiny84 running at the same clock rate (8 mhz as I recall)?

Today I found a commercially made terminal to connect to the screw that brings in B+, and I had to move most of the components on the PCB to make it fit. I made several new PCB components and it looks really good. Before I was going to make a connector from a brass block but this will be a lot easier to do. Also the FET is now in a position where I could mount it under the PCB to the Sled for heatsinking if that was ever needed.

A few days ago I found a supplier that has what appears to be the bipin sockets that are used for these bulbs. I checked the local hardware store and they have quite a few bulbs that might work but no sockets. There are quite a few 6 and 12 volt bipin bulbs for lighting carried at the hardware store. I hadn't really seen all of them before, it seems to be an expanding market.

I've still got that chunk of milled aluminum - the Sled prototype - clamped in the mill. Maybe after dinner I'll work on that a bit, or on preparing the next regulator board to mount on it.

-- Alan
 
There are quite a few 6 and 12 volt bipin bulbs for lighting carried at the hardware store. I hadn't really seen all of them before, it seems to be an expanding market.
Really? I've seen no other than 12 V bulbs myself. The home lighting halogens tend to be rated with a 2000 hour life, so they could be over driven quite a lot to make them very bright with a 20 hour life. I'd rather be able to drive a 6 V bulb at 9 V rather than a 12 V bulb at 18 V. One drawback is that home lighting bulbs do not have very precise filament placement, unlike projector bulbs. I picked out half a dozen 20 W bulbs before I found one with a reasonably well-shaped filament.
 
Really? I've seen no other than 12 V bulbs myself. The home lighting halogens tend to be rated with a 2000 hour life, so they could be over driven quite a lot to make them very bright with a 20 hour life. I'd rather be able to drive a 6 V bulb at 9 V rather than a 12 V bulb at 18 V. One drawback is that home lighting bulbs do not have very precise filament placement, unlike projector bulbs. I picked out half a dozen 20 W bulbs before I found one with a reasonably well-shaped filament.

I wasn't thinking so much of using them in flashlights as using them for test. The 12V bulbs would be good even if the parameters were wrong they would not :poof: on a 12V test supply, and the 6V would be interesting to overdrive a bit. Some of them have pins that are a bit fat so are hard on the sockets. There are also quite a few with built in reflectors. Might make a good floodlight flashlight. It seems like most of my uses for flashlights are more toward the floody side. Throwers are fun, but don't get used much for me.

-- Alan
 
Jim, Excellent progress! There sure are a lot of little differences between the CPUs. Perhaps we should consider changing to the 1.1Vref on all versions of the code, would make things a bit easier to follow, and keep the resistor sets the same.

Is the Tiny84 running at the same clock rate (8 mhz as I recall)?
It, by default, uses the 8MHz oscillator as the clock source. The clock prescale divider = 1 allows the CPU to run at 8MHz. But to get the PWM frequency I need, I had to step down to a 4MHz CPU clock by using the clock divider = 2. It can run up to 20MHz by external crystal.
Today I found a commercially made terminal to connect to the screw that brings in B+, and I had to move most of the components on the PCB to make it fit. I made several new PCB components and it looks really good. Before I was going to make a connector from a brass block but this will be a lot easier to do. Also the FET is now in a position where I could mount it under the PCB to the Sled for heatsinking if that was ever needed.
I would mount it on the back of the board and heat sink it there anyway! Why not? You've got a giant chunk of aluminum there, why not use it.
A few days ago I found a supplier that has what appears to be the bipin sockets that are used for these bulbs. I checked the local hardware store and they have quite a few bulbs that might work but no sockets. There are quite a few 6 and 12 volt bipin bulbs for lighting carried at the hardware store. I hadn't really seen all of them before, it seems to be an expanding market.

I've still got that chunk of milled aluminum - the Sled prototype - clamped in the mill. Maybe after dinner I'll work on that a bit, or on preparing the next regulator board to mount on it.

-- Alan
 
I bought 3 14DIP Tiny84s. It would appear as though I "bricked" one. Initially, I could read the chip signature and all was goodness and light. I went to set the BOD to 4.3V and it all went south. Afterwards the AVRISP MkII light flashed orange and gave errors about RESET pin pull-ups. If I swap chips, the different chip works great.
Do you know what I can do to un-brick it?
 
I bought 3 14DIP Tiny84s. It would appear as though I "bricked" one. Initially, I could read the chip signature and all was goodness and light. I went to set the BOD to 4.3V and it all went south. Afterwards the AVRISP MkII light flashed orange and gave errors about RESET pin pull-ups. If I swap chips, the different chip works great.
Do you know what I can do to un-brick it?

Seems to me that if some of the programming fuses get set in certain ways it will no longer be able to program with "low voltage serial programming", or it requires an external clock which is not present. In that case you have to use "high voltage serial programming" or some other mode, depending on the particulars of the CPU chip. This can be done with the STK500 board by following a procedure in the manual. It requires some jumpers etc. I did it once to recover a chip. I don't think the AVRISP can do it.

-- Alan
 
On a related note, I picked up a precision voltage reference on eBay. 5.000V, 0.01%. A guy builds them and auctions one every week for $24.50. This one is a PC board with a 9V battery holder underneath and is very small. It even includes a battery.

Actually there are a couple of folks who make similar ones, this one is smaller and appears to be better made. Anyway, it is a good idea to check those meters for calibration. Some are pretty bad. My Exceltech is right on according to this reference, it reads either 5.00 or 4.99V on this source.

Lux, do you cal check your meters? Making bulb measurements for life, etc, it would be good to know how accurate the readings actually are.

This one is what I got:

ebay item number 280299727669

If you are patient you can get one for 24.50, I had to wait about a month for some higher bidders to get theirs, then I got mine. The seller measures the actual voltage with a precision meter and gives you better numbers cold and warmed up, so you can get more precision. It is better than any meter I own.

There is an even better one available from Geller Labs.

http://www.gellerlabs.com/SVR Series.htm

It is not very expensive but is a bit larger and requires a power supply or some batteries to run it, so it is a bit more of a project. If you put a good power supply on it you can get 0.0005% (5 PPM) accuracy.

-- Alan
 
I have an update regarding the development for the Tiny84.
I have 10-bit PWM running at 244Hz.

I read the battery voltage on ADC3 with the internal 1.1V Vref and I read the request voltage on ADC2 with Vcc as the Vref both using the full 10-bits.
The Tiny84 doesn't have the 2.56V Vref, Just 1.1 and Vcc. So I can use a 360K upper resistor for the battery voltage divider and a 10K for the bottom. A nice side effect is a reduction in "waste" current.
With that arrangement, I can get ~0.04V resolution

It works very nicely thus far.
Next to do...
1) Syncing the ADC3 read with PWM ON.
2) Start introducing the various calculations for regulation.
3) Add programmable soft start ramp.
4) Add code for reading pushbuttons. While not necessay for the JM-PhD-D1, it will be for later versions.

This shouldn't be too bad.

That is awesome progress Jim - way to go !!!

At this rate, since you are so far along, I might just use the same processor for the PhD-M6 to share on the PWB layout size/packages that you have for it ;)

Will
 
On a related note, I picked up a precision voltage reference on eBay. 5.000V, 0.01%. A guy builds them and auctions one every week for $24.50. This one is a PC board with a 9V battery holder underneath and is very small. It even includes a battery.

Actually there are a couple of folks who make similar ones, this one is smaller and appears to be better made. Anyway, it is a good idea to check those meters for calibration. Some are pretty bad. My Exceltech is right on according to this reference, it reads either 5.00 or 4.99V on this source.

Lux, do you cal check your meters? Making bulb measurements for life, etc, it would be good to know how accurate the readings actually are.

This one is what I got:

ebay item number 280299727669

If you are patient you can get one for 24.50, I had to wait about a month for some higher bidders to get theirs, then I got mine. The seller measures the actual voltage with a precision meter and gives you better numbers cold and warmed up, so you can get more precision. It is better than any meter I own.

There is an even better one available from Geller Labs.

http://www.gellerlabs.com/SVR Series.htm

It is not very expensive but is a bit larger and requires a power supply or some batteries to run it, so it is a bit more of a project. If you put a good power supply on it you can get 0.0005% (5 PPM) accuracy.

-- Alan

Great tip Alan - I need to get one of these to check the accuracy of my own meters ;)

Will
 
On a related note, I picked up a precision voltage reference on eBay. 5.000V, 0.01%. A guy builds them and auctions one every week for $24.50. This one is a PC board with a 9V battery holder underneath and is very small. It even includes a battery.

Actually there are a couple of folks who make similar ones, this one is smaller and appears to be better made. Anyway, it is a good idea to check those meters for calibration. Some are pretty bad. My Exceltech is right on according to this reference, it reads either 5.00 or 4.99V on this source.

Lux, do you cal check your meters? Making bulb measurements for life, etc, it would be good to know how accurate the readings actually are.

This one is what I got:

ebay item number 280299727669

If you are patient you can get one for 24.50, I had to wait about a month for some higher bidders to get theirs, then I got mine. The seller measures the actual voltage with a precision meter and gives you better numbers cold and warmed up, so you can get more precision. It is better than any meter I own.

There is an even better one available from Geller Labs.

http://www.gellerlabs.com/SVR Series.htm

It is not very expensive but is a bit larger and requires a power supply or some batteries to run it, so it is a bit more of a project. If you put a good power supply on it you can get 0.0005% (5 PPM) accuracy.

-- Alan
Those are neat little toys. I'm not sure I really need one. My Fluke is one if the best portable DMMs available. It has a basic DC accuracy of 0.025%. I think for my purposes it should be OK. Even if it was off, I'd have to send it off to Fluke for recalibration.
 
Seems to me that if some of the programming fuses get set in certain ways it will no longer be able to program with "low voltage serial programming", or it requires an external clock which is not present. In that case you have to use "high voltage serial programming" or some other mode, depending on the particulars of the CPU chip. This can be done with the STK500 board by following a procedure in the manual. It requires some jumpers etc. I did it once to recover a chip. I don't think the AVRISP can do it.

-- Alan
The only problem there is that the STK500 would require and accessory board to accept the Tiny84. Unless I can just jumper from the STK500 to the breadboard where the Tiny84 is mounted.
 
Status
Not open for further replies.
Back
Top