Hotwire Regulator Design Collaboration Project part 3

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
I started working on a feature that I thought about a long time ago but never pursued. This relates to using the three Vref's of the ADC for three voltage ranges. The Vref's are 5.0, 2.56 and 1.1 volts. Switching between these ADC ranges gives a very nice set of three fullscale voltages. I just need to set up the code so everything compensates for the change, including the scaling, the ADC initialization, and the calibration.

I will probably set it up so that the calibration voltage changes as well. So on the low voltage range the cal voltage will be 5.00 volts, 10.00 on the midrange and 20.00 volts on the high range, subject to change as I get the code done.

So by changing the settings in the compiler there will be three voltage ranges. That way there won't be any resistor swaps.

Seems like a better choice for everyone.

-- Alan

I have added a resistor and jumper so that two ranges of three voltages can be selected. The code is under development.

The ranges are

jumper in: 2,4,8S

jumper out: 3,6,*12S

nS is 4.2V per cell for n Li-Ion cells. Cell chemistry selection is separate, but the voltage ranges are designed in terms of this 4.2V unit, though they run slightly higher due to tolerances.

* NOTE that 12S requires high voltage parts for the regulator and FET.

This was mentioned in the other thread already, I just add it here for completeness.
 
Last edited:

sylathnie

Enlightened
Joined
Jan 19, 2008
Messages
250
I'd like to see more information about the requirements to convert Alan B's design to high voltage applications. I have limited electronics knowledge but I would be glad to learn what I can.

Thus far we have determined that [URL="http://www.newark.com/national-semic...-92/dp/92K6133"]http://www.newark.com/national-semic...-92/dp/92K6133 [/URL]would be a potential candidate for a replacement regulator. Please double check me on this.

I'm a little confused as to how the requirements for the FET work out. Thus far I have:
Gate Voltage 5V
Source to Drain Voltage >51VDC
Resistance <5mOhm
Rated for >40A
Through hole leads
TO220 Case

What other requirements do I need to look for?

Thanks folks!
 

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
I'd like to see more information about the requirements to convert Alan B's design to high voltage applications. I have limited electronics knowledge but I would be glad to learn what I can.

Thus far we have determined that http://www.newark.com/national-semiconductor/lm2936z-5-0/v-reg-ldo-low-iq-5-0v-2936-to-92/dp/92K6133http://www.newark.com/national-semic...-92/dp/92K6133 would be a potential candidate for a replacement regulator. Please double check me on this.

I'm a little confused as to how the requirements for the FET work out. Thus far I have:
Gate Voltage 5V
Source to Drain Voltage >51VDC
Resistance <5mOhm
Rated for >40A
Through hole leads
TO220 Case

What other requirements do I need to look for?

Thanks folks!

Sounds about right. Probably want 55V or 60V min, need some headroom there for the inductive kick from the filament. And the type is N channel enhancement mode Power FET.

The clearance is tight so some of the FET tab must be cut off. I recall that a TO220 in open air can dissipate about 2 watts, but we don't have airflow here and we don't have the whole tab, so I would think keeping it under 1 watt is prudent. That would be about 5.1 milli-ohms at 14 amps.

It might be possible to thermally couple the FET with the aluminum sled, but it must be electrically isolated and this is tricky to do in the tight volume available. I put my first one of these together today and it is tight.

The first aluminum sleds are back from the machinist. Photos in the interest thread...
 

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
Well, as seems to happen often in this business, the FET that I am using is not so available now and I am looking for a new choice.

I have also been converting the layout to surface mount, not sure if I will go this way but it might lower costs/effort a bit. However there is not enough room for a surface mount FET on this board with all the terminals, holes, and socket for the programming/switch, so the FET will probably be through-hole even if the board goes SMT.

I'm using a TO220 but there is insufficient height for the tab, so I have to cut that off. I found one package that has the tab already shortened, and that is a good thing here. It has 0.090 pin spacing and is a bit smaller than TO220.

At any rate, anyone found any great FETs for this? 3-5 milliohms, N channel, 40V or better, low cost, etc. ?
 

JimmyM

Flashlight Enthusiast
Joined
Aug 30, 2006
Messages
2,853
Location
Boston, MA, USA
I'd like to see more information about the requirements to convert Alan B's design to high voltage applications. I have limited electronics knowledge but I would be glad to learn what I can.

Thus far we have determined that http://www.newark.com/national-semiconductor/lm2936z-5-0/v-reg-ldo-low-iq-5-0v-2936-to-92/dp/92K6133http://www.newark.com/national-semic...-92/dp/92K6133 would be a potential candidate for a replacement regulator. Please double check me on this.

I'm a little confused as to how the requirements for the FET work out. Thus far I have:
Gate Voltage 5V
Source to Drain Voltage >51VDC
Resistance <5mOhm
Rated for >40A
Through hole leads
TO220 Case

What other requirements do I need to look for?

Thanks folks!
Try the Linear LT3014B. It's adjustable, so it requires 2 external resistors. But it's good up to 80V.
 

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
Thanks for the suggestions, Jim.

I have pretty much settled on the TO262, which is a TO220 with almost no tab. Very nice size package.

For the regulator we need something TO92 with no external parts to fit the PCB. There is a 60V version of the regulator I'm already using, but it seems to be hard to find. The only stock I see is in UK.

I found a 60V FET that looks great. Don't have the number handy here, have to dig it up again at some point. I might have purchased one, not sure.
 

JimmyM

Flashlight Enthusiast
Joined
Aug 30, 2006
Messages
2,853
Location
Boston, MA, USA
Thanks for the suggestions, Jim.

I have pretty much settled on the TO262, which is a TO220 with almost no tab. Very nice size package.

For the regulator we need something TO92 with no external parts to fit the PCB. There is a 60V version of the regulator I'm already using, but it seems to be hard to find. The only stock I see is in UK.

I found a 60V FET that looks great. Don't have the number handy here, have to dig it up again at some point. I might have purchased one, not sure.
Oh OK. I thought you meant all SMD. While redesigning the board for SMD I thought you were redesigning for the 60V version. So a TO92 case 5V regulator good to 60V. That's a narrow focus. No wonder you have a tough time finding them.
OK. Gotcha.
 

JimmyM

Flashlight Enthusiast
Joined
Aug 30, 2006
Messages
2,853
Location
Boston, MA, USA
I'm working on the low voltage safety shutdown in my D1.
I have the code to determine the shutdown condition...
when Vbat falls to 87.5% of Vlow it engages low volt shutdown.
When it does, PWM goes to 0, but I'd like to go a little further.
I'd like to try putting it to sleep. I don't need to monitor interrupts because it will re quire a power cycle to clear. So I thought I'd use the "Power-Down" sleep mode. I know you're using sleep modes in your design to minimize power consumption in "off" mode. Would you mind sharing the code?
I'm guessing so far...
MCUCR = _BV(SE); // Enables sleep Mode
MCUCR = _BV(SM1); // Enter sleep mode = Power-Down
 

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
Code:
/*
 *-------------------------------------------------------------------------*
 *                                                                         *
 *  This program is free software: you can redistribute it and/or modify   *
 *  it under the terms of the GNU General Public License as published by   *
 *  the Free Software Foundation, either version 3 of the License, or      *
 *  (at your option) any later version.                                    *
 *                                                                         *
 *  This program is distributed in the hope that it will be useful,        *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
 *  GNU General Public License for more details.                           *
 *                                                                         *
 *  You should have received a copy of the GNU General Public License      *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
 *                                                                         *
 *-------------------------------------------------------------------------*
 */

#ifdef LOPWR
            // set to low power, prepare wakeup interrupt, go to sleep
            // button is on INT0 pin, use low level int, no clocks req'd
            // insure output is low. only run when PWM is off
            // disable brownout detection? (BOD not enabled)
            ADCSRA = 0;                // disable ADC to save power
            sleep_enable();            // prepare for sleep
            sei();                    // enable interrupts
            MCUCR = 0b00100000;      // int on INT0 low level, conserve power
            GIMSK = 0b01000000;      // INTO mask enable
            sleep_cpu();            // sleep, interrupt on button push

            sleep_disable();        // waking up
            cli();                    // disable interrupts
            init();                    // wake up, re-init, ADC on, etc
#endif
 
Last edited:

JimmyM

Flashlight Enthusiast
Joined
Aug 30, 2006
Messages
2,853
Location
Boston, MA, USA
Code:
/*
 *-------------------------------------------------------------------------*
 *                                                                         *
 *  This program is free software: you can redistribute it and/or modify   *
 *  it under the terms of the GNU General Public License as published by   *
 *  the Free Software Foundation, either version 3 of the License, or      *
 *  (at your option) any later version.                                    *
 *                                                                         *
 *  This program is distributed in the hope that it will be useful,        *
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
 *  GNU General Public License for more details.                           *
 *                                                                         *
 *  You should have received a copy of the GNU General Public License      *
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.  *
 *                                                                         *
 *-------------------------------------------------------------------------*
 */

#ifdef LOPWR
            // set to low power, prepare wakeup interrupt, go to sleep
            // button is on INT0 pin, use low level int, no clocks req'd
            // insure output is low. only run when PWM is off
            // disable brownout detection? (BOD not enabled)
            ADCSRA = 0;                // disable ADC to save power
            sleep_enable();            // prepare for sleep
            sei();                    // enable interrupts
            MCUCR = 0b00100000;      // int on INT0 low level, conserve power
            GIMSK = 0b01000000;      // INTO mask enable
            sleep_cpu();            // sleep, interrupt on button push

            sleep_disable();        // waking up
            cli();                    // disable interrupts
            init();                    // wake up, re-init, ADC on, etc
#endif
Are the sleep_cpu(), sleep_enable(), and sei() your defined functions?
If so, can you post the the details of those functions?
Is your code posted anywhere so I don't have to bother with these questions?
Thanks, Alan.
 
Last edited:

mpteach

Enlightened
Joined
May 24, 2005
Messages
240
Why does it need to be 60V, Is that because of inductive kick from the filament? Could you use a diode to absorb that or would that hurt efficiency signifiantly?
 
Last edited:

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
Why does it need to be 60V, Is that because of inductive kick from the filament? Could you use a diode to absorb that or would that hurt efficiency signifiantly?

Some users want to use 52V (12S Li-Ion). The present parts are rated at 40V so we need to stay below that.

For most users the 40V parts are fine.

Diodes were investigated to reduce the inductive overshoot, they did not appear to help.
 

Alan B

Flashlight Enthusiast
Joined
Nov 19, 2007
Messages
1,963
Location
San Francisco Bay Area
Oh OK. I thought you meant all SMD. While redesigning the board for SMD I thought you were redesigning for the 60V version. So a TO92 case 5V regulator good to 60V. That's a narrow focus. No wonder you have a tough time finding them.
OK. Gotcha.

There did not seem to be enough room to go fully SMD. The terminal is through-hole and mechanically things are based on that, and it bisects the PCB and constrains the parts locations. The SMD fuse took a lot of board space and would be hard to change, so I stayed with through-hole. Also the traces on one side only would not carry the current well. The jumper could have been SMD but through hole seems easier there, as did the rather tight programming plug. Probably not enough room for SMD there. So the board is mostly SMD. The micro, resistors and capacitors are SMD. The jumper, ISP connector, fuse, socket wire connections, battery and negative terminals are through-hole.
 
Top