Q. re: "PWM" on Battery Charging IC

B

Bleep

Guest
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a total-moron-
level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to run the
charged batteries to a white LED driver). On the example diagram, this is
shown on a portion of the diagram:



| ----->>output to LED driver
|
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_


My question is,
What attaches to the O called "PWM"? Does that just go to the ground? If
not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)
 
Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a total-moron-
level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to run the
charged batteries to a white LED driver). On the example diagram, this is
shown on a portion of the diagram:



| ----->>output to LED driver
|
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_


My question is,
What attaches to the O called "PWM"? Does that just go to the ground? If
not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a pin
without software intervention. If you filter that PWM signal then you
are left with a pretty good analog signal. It's a _very_ inexpensive,
and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period, the
higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
On Feb 26, 10:30 am, Bleep <bl...@bleep.in> wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a total-moron-
level question  ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to run the
charged batteries to a white LED driver).  On the example diagram, this is
shown on a portion of the diagram:        

                                   |             ----->>output to LED driver
                                   |
                                   |
                (resistor)         |    IC LAYOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |                  
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (ground)
                             _

My question is,
What attaches to the  O  called "PWM"?  Does that just go to the ground?  If
not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info   :)
The PWM pin (called 'CTRL' on the Maxim datasheet) is used to control
the output of the device. You could hook up a potentiometer with one
end at ground, the other end at V+, and the wiper to the PWM pin and
then you would be able to vary voltage applied to the pin and
therefore control the brightness from shutdown to 100% and everywhere
in between.

http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
 
Tim Wescott <tim@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:

Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run the charged batteries to a white LED driver). On the example
diagram, this is shown on a portion of the diagram:



| ----->>output to LED
driver |
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_


My question is,
What attaches to the O called "PWM"? Does that just go to the
ground? If not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)

Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a pin
without software intervention. If you filter that PWM signal then you
are left with a pretty good analog signal. It's a _very_ inexpensive,
and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period, the
higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.
Thank you for your answer, but what you wrote is over my head.

I just wanted to light 4 LEDs from a couple of rechargeable batteries (I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-made
assembly I could use, I couldn't find anything) and I read a while back
that using a 'driver' is the best way because to makes the current going to
the LEDs flow more consistently as the batteries drain. I was able to
figure out that I could patch together a battery-charge-incresing chip and
this 'driver' chip but I don't understand why i have to "modulate" the
current.

I guess it's a stupid question, my apologies...
 
alphamnemonic <shmotmail@gmail.com> wrote in
news:e31b9b8a-52b0-40f7-9a3c-2ca4b3f2a63c@b36g2000pri.googlegroups.com:

On Feb 26, 10:30 am, Bleep <bl...@bleep.in> wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-mo
ron-
level question  ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run
the
charged batteries to a white LED driver).  On the example diagram, this
is
shown on a portion of the diagram:        

                                   |
            ----->>output to LED driver
                                   |
                                   |
                (resistor)         |    IC LA
YOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |      
           
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (ground)
                             _

My question is,
What attaches to the  O  called "PWM"?  Does that just go to the gr
ound?  If
not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info   :)

The PWM pin (called 'CTRL' on the Maxim datasheet) is used to control
the output of the device. You could hook up a potentiometer with one
end at ground, the other end at V+, and the wiper to the PWM pin and
then you would be able to vary voltage applied to the pin and
therefore control the brightness from shutdown to 100% and everywhere
in between.

http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Thanks you for your answer but, as I wrote to Tim Wescott, it's over my
head; I just was hoping to light some of myhobby projects fromt the inside
(with 4 white LEDs) running off of a couple of rechargeable batteries, but
I just don't understand why I need to vary the voltage to run them if
they're supposed to use 3.2V or 3.6V depending on which type I get; I
don't need to run wipers, I just wanted to light some of my hobby stuff.
again, sorry for the stupid question; I'll keep searching and see whetehr
I can't find some simpler "for dummies" way to do this.

Thanks for trying, tho'...
 
Subject: Re: Q. re: "PWM" on Battery Charging IC
From: Kris Krieger <me@dowmuff.in>
Newsgroups: sci.electronics.basics

alphamnemonic <shmotmail@gmail.com> wrote in
news:e31b9b8a-52b0-40f7-9a3c-2ca4b3f2a63c@b36g2000pri.googlegroups.com:

On Feb 26, 10:30 am, Bleep <bl...@bleep.in> wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-mo
ron-
level question  ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run
the
charged batteries to a white LED driver).  On the example diagram, this
is
shown on a portion of the diagram:        

                                   |
            ----->>output to LED driver
                                   |
                                   |
                (resistor)         |    IC LA
YOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |      
           
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (ground)
                             _

My question is,
What attaches to the  O  called "PWM"?  Does that just go to the gr
ound?  If
not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info   :)

The PWM pin (called 'CTRL' on the Maxim datasheet) is used to control
the output of the device. You could hook up a potentiometer with one
end at ground, the other end at V+, and the wiper to the PWM pin and
then you would be able to vary voltage applied to the pin and
therefore control the brightness from shutdown to 100% and everywhere
in between.

http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Thanks you for your answer but, as I wrote to Tim Wescott, the answer over
my
head; I just was hoping to light some of my hobby projects from the inside
(with 4 white LEDs) running off of a couple of rechargeable batteries, but
I don't even understand why I need to vary the voltage to run them if
they're supposed to use 3.2V or 3.6V depending on which type I get; so I
guess that shows the level of my ignorancebt this stuff, sorry - also, I
don't need to run wipers, I just wanted to light some of my hobby stuff.

Again, sorry for the stupid question; I'll keep searching and see whetehr
I can't find some simpler way to do this that's more appropriate for
dummies like me =:-o

Thank you for trying, tho'...
 
Bleep wrote:
Tim Wescott <tim@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:

Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run the charged batteries to a white LED driver). On the example
diagram, this is shown on a portion of the diagram:



| ----->>output to LED
driver |
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_


My question is,
What attaches to the O called "PWM"? Does that just go to the
ground? If not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a pin
without software intervention. If you filter that PWM signal then you
are left with a pretty good analog signal. It's a _very_ inexpensive,
and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period, the
higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.


Thank you for your answer, but what you wrote is over my head.

I just wanted to light 4 LEDs from a couple of rechargeable batteries (I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-made
assembly I could use, I couldn't find anything) and I read a while back
that using a 'driver' is the best way because to makes the current going to
the LEDs flow more consistently as the batteries drain. I was able to
figure out that I could patch together a battery-charge-incresing chip and
this 'driver' chip but I don't understand why i have to "modulate" the
current.

I guess it's a stupid question, my apologies...
Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the bulb.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you see:

____
from uC o----|____|-----o----- to IC
|
.-.
| |
| |
'-'
|
---
gnd


--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
George Herold wrote:
On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:
Bleep wrote:
Hello, Group!
I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)
I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run the charged batteries to a white LED driver). On the example
diagram, this is shown on a portion of the diagram:
| ----->>output to LED
driver |
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_
My question is,
What attaches to the O called "PWM"? Does that just go to the
ground? If not, what do I need to do to get it to do "0 to 3.3V"?
I did a lot fo google searches for clues, but I couldn't find any...
Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a pin
without software intervention. If you filter that PWM signal then you
are left with a pretty good analog signal. It's a _very_ inexpensive,
and not altogether cheap* way to get a DAC.
Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period, the
higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.
* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.
Thank you for your answer, but what you wrote is over my head.
I just wanted to light 4 LEDs from a couple of rechargeable batteries (I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-made
assembly I could use, I couldn't find anything) and I read a while back
that using a 'driver' is the best way because to makes the current going to
the LEDs flow more consistently as the batteries drain. I was able to
figure out that I could patch together a battery-charge-incresing chip and
this 'driver' chip but I don't understand why i have to "modulate" the
current.
I guess it's a stupid question, my apologies...
Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the bulb.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you see:

____
from uC o----|____|-----o----- to IC
|
.-.
| |
| |
'-'
|
---
gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com- Hide quoted text -

- Show quoted text -

Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply. You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)
OP: Do you just want to make an LED light up? If so we're _all_
borrowing way too much trouble!

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:

Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-moron- level question  ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run the charged batteries to a white LED driver).  On the example
diagram, this is shown on a portion of the diagram:        

                                   |             ----->>output to LED
                             driver       |
                                   |
                (resistor)         |    IC LAYOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |                  
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (ground)
                             _

My question is,
What attaches to the  O  called "PWM"?  Does that just go to the
ground?  If not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info   :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a pin
without software intervention.  If you filter that PWM signal then you
are left with a pretty good analog signal.  It's a _very_ inexpensive,
and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register).  The longer the pulse width within the period, the
higher the average voltage of the PWM signal.  Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.

Thank you for your answer, but what you wrote is over my head.

I just wanted to light 4 LEDs from a couple of rechargeable batteries (I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-made
assembly I could use, I couldn't find anything) and I read a while back
that using a 'driver' is the best way because to makes the current going to
the LEDs flow more consistently as the batteries drain.  I was able to
figure out that I could patch together a battery-charge-incresing chip and
this 'driver' chip but I don't understand why i have to "modulate" the
current.

I guess it's a stupid question, my apologies...

Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the bulb.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you see:

               ____
from uC o----|____|-----o----- to IC
                         |
                        .-.
                        | |
                        | |
                        '-'
                         |
                        ---
                        gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com- Hide quoted text -

- Show quoted text -
Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply. You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)

George H.
 
Kris Krieger wrote:
alphamnemonic <shmotmail@gmail.com> wrote in
news:e31b9b8a-52b0-40f7-9a3c-2ca4b3f2a63c@b36g2000pri.googlegroups.com:


On Feb 26, 10:30 am, Bleep <bl...@bleep.in> wrote:

Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-mo

ron-

level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run

the

charged batteries to a white LED driver). On the example diagram, this

is

shown on a portion of the diagram:

|

----->>output to LED driver

|
|
(resistor) | IC LA

YOUT PIC

5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |



(capacitor) | |-----------
|
|
_____
___ (ground)
_

My question is,
What attaches to the O called "PWM"? Does that just go to the gr

ound? If

not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)

The PWM pin (called 'CTRL' on the Maxim datasheet) is used to control
the output of the device. You could hook up a potentiometer with one
end at ground, the other end at V+, and the wiper to the PWM pin and
then you would be able to vary voltage applied to the pin and
therefore control the brightness from shutdown to 100% and everywhere
in between.

http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf


Thanks you for your answer but, as I wrote to Tim Wescott, it's over my
head; I just was hoping to light some of myhobby projects fromt the inside
(with 4 white LEDs) running off of a couple of rechargeable batteries, but
I just don't understand why I need to vary the voltage to run them if
they're supposed to use 3.2V or 3.6V depending on which type I get; I
don't need to run wipers, I just wanted to light some of my hobby stuff.
again, sorry for the stupid question; I'll keep searching and see whetehr
I can't find some simpler "for dummies" way to do this.

Thanks for trying, tho'...
Kris,

Your choice of a MAX1848 suggests that you are using 2 NiCd cells
and therfore require a boost circuit. The datasheet shows you how
to wire it up, and your question seems to be what to do about the
control (CTRL) pin, since you don't want to use PWM.

Ok, *if* the above paragraph is true, wire the thing up as shown on
the datasheet, figure 2 & table 1 on page 7
http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Where the diagram shows 3 LEDs in series, use 2 LEDs instead.

Where it shows "Logic or DAC" connected to the CTRL pin, all you need
to do is provide a voltage. The level of that voltage and value of
the sense resistor (Rsense) determines how bright the LEDs will be, by
controlling the current through them. The formula is given in the
datasheet: Iled = Vctrl/(13.33 + Rsense)

You can derive the voltage for the CTRL pin as follows:

Batt + ---+
|
[100K]
|
+----------CTRL
|
[D1] diodes are 1N4148
|k
[D2]
|k
Gnd-------+

The CTRL voltage will be ~1.2 volts, and current through the
LEDs will be about 18 mA. For less LED current, use the formula
mentioned above to determine a different value for Rsense.

Ed
 
Tim Wescott <tim@seemywebsite.now> wrote in
news:u9CdnY5B_c4p9hHWnZ2dnUVZ_umdnZ2d@web-ster.com:

Bleep wrote:
Tim Wescott <tim@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:

Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is to
run the charged batteries to a white LED driver). On the example
diagram, this is shown on a portion of the diagram:



| ----->>output to LED
driver |
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_


My question is,
What attaches to the O called "PWM"? Does that just go to the
ground? If not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a
pin without software intervention. If you filter that PWM signal then
you are left with a pretty good analog signal. It's a _very_
inexpensive, and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period,
the higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.


Thank you for your answer, but what you wrote is over my head.

I just wanted to light 4 LEDs from a couple of rechargeable batteries
(I was hoping to light up some of my hobby projects from the inside
and, although I spent a whole huge boatload of hours looking for some
pre-made assembly I could use, I couldn't find anything) and I read a
while back that using a 'driver' is the best way because to makes the
current going to the LEDs flow more consistently as the batteries
drain. I was able to figure out that I could patch together a
battery-charge-incresing chip and this 'driver' chip but I don't
understand why i have to "modulate" the current.

I guess it's a stupid question, my apologies...

Not stupid.
I guess I'm just intimidated by peope with so much knowledge - math and
math-related things are, for me, like learning Chinese would be to most
people.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the
bulb.
I didn't actually even realize that's wat would happen =:-o (IOw that
thebulb brightness would change). Total rube. I really would have
preferred to buy whatI want, but I still haven't found what i'm looking
for, so...

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you
see:

____
from uC o----|____|-----o----- to IC
|
.-.
| |
| |
'-'
|
---
gnd

Okie Dokie, thank you for the additional info! :)
 
George Herold <ggherold@gmail.com> wrote in news:97e3d134-b03e-44fc-b097-
42018d2a957e@j27g2000yqn.googlegroups.com:

On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:

Bleep wrote:
Hello, Group!

I am a rube, so thanks in advance for your patience if this is a
total-moron- level question  ;)

I was lookng at a MAX1848 battery-charge-control IC (the intent is
to
run the charged batteries to a white LED driver).  On the example
diagram, this is shown on a portion of the diagram:        

                                 
 |             ----->>output to LED
                             driver  
    |
                                 
 |
                (resistor)         |    I
C LAYOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |    
             
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (grou
nd)
                             _

My question is,
What attaches to the  O  called "PWM"?  Does that just go to th
e
ground?  If not, what do I need to do to get it to do "0 to 3.3V"?

I did a lot fo google searches for clues, but I couldn't find any...

Again, Many thanks in Advance for any info   :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a
p
in
without software intervention.  If you filter that PWM signal then y
ou
are left with a pretty good analog signal.  It's a _very_ inexpensiv
e,
and not altogether cheap* way to get a DAC.

Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated
by
some other signal (in the case of a microcontroller it's a number you
write to a register).  The longer the pulse width within the period,
the
higher the average voltage of the PWM signal.  Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.

* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.

Thank you for your answer, but what you wrote is over my head.

I just wanted to light 4 LEDs from a couple of rechargeable batteries
(
I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-
ma
de
assembly I could use, I couldn't find anything) and I read a while
back
that using a 'driver' is the best way because to makes the current
goin
g to
the LEDs flow more consistently as the batteries drain.  I was able t
o
figure out that I could patch together a battery-charge-incresing chip
and
this 'driver' chip but I don't understand why i have to "modulate" the
current.

I guess it's a stupid question, my apologies...

Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the
bul
b.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you
see:

               ____
from uC o----|____|-----o----- to IC
                         |
                        .-.
                        | |
                        | |
                        '-'
                         |
                        ---
                        gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com-
Hid
e quoted text -

- Show quoted text -

Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply. You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)

George H.
Hello, George, I am looking at this:
http://www.maxim-ic.com/app-notes/index.mvp/id/1736
which is called "Powering Four White LEDs"
(Im looking at it because that's exactly what I want to do, light 4 white
LEDs and found it by googling "light 4 whte LEDs" - I also read about "high
power' leds but the problem is that I only have space for 2 AA batteries in
the base of the thing I want to light and I couldn't tell that 2 AA
batteries would be enough for the high-power ones to run).

Anyway, there isn't anything about what to attachthe "CTRL" pin to. I
don't want "dimming", I just want light. Maybe I can just not attach
"ctrl" to anything? or does it attach to the ground wire? There aren't any
clues about that; I've done every Google search I can figure out how to
form, but nothing tells me what to do with that attachments following the
5K resistor. I don't understand he purpose because, if I wanted dim bulbs,
I wouldn't spend the extra money to get 4 LEDs, I'd just stick together a
"button" CR2032 battery and one LED...

(((Is a 'wiper' part of a pontentiometer/"tuner"?)))

Anyway, I'm running on, sorry! Thanks for the additional info and I'll see
what some more seahing turns up using what you mentioned.
 
Tim Wescott <tim@seemywebsite.now> wrote in
news:jI2dnebyAv70GRHWnZ2dnUVZ_hAAAAAA@web-ster.com:

George Herold wrote:
On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:
Bleep wrote:
Hello, Group!
I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)
I was lookng at a MAX1848 battery-charge-control IC (the intent is
to run the charged batteries to a white LED driver). On the
example diagram, this is shown on a portion of the diagram:
| ----->>output to
LED driver |
|
(resistor) | IC LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |
(capacitor) | |-----------
|
|
_____
___ (ground)
_
My question is,
What attaches to the O called "PWM"? Does that just go to the
ground? If not, what do I need to do to get it to do "0 to 3.3V"?
I did a lot fo google searches for clues, but I couldn't find
any... Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a
pin without software intervention. If you filter that PWM signal
then you are left with a pretty good analog signal. It's a _very_
inexpensive, and not altogether cheap* way to get a DAC.
Pulse width modulation is just what it says -- you have hardware
that outputs a pulse with a fixed period and a duration that's
modulated by some other signal (in the case of a microcontroller
it's a number you write to a register). The longer the pulse width
within the period, the higher the average voltage of the PWM signal.
Run that through a low-pass filter like the resistor and cap in the
diagram above, and you'll find most of the ripple blocked but the
average voltage coming through unscathed.
* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.
Thank you for your answer, but what you wrote is over my head.
I just wanted to light 4 LEDs from a couple of rechargeable batteries
(I was hoping to light up some of my hobby projects from the inside
and, although I spent a whole huge boatload of hours looking for some
pre-made assembly I could use, I couldn't find anything) and I read a
while back that using a 'driver' is the best way because to makes the
current going to the LEDs flow more consistently as the batteries
drain. I was able to figure out that I could patch together a
battery-charge-incresing chip and this 'driver' chip but I don't
understand why i have to "modulate" the current.
I guess it's a stupid question, my apologies...
Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the
bulb.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you
see:

____
from uC o----|____|-----o----- to IC
|
.-.
| |
| |
'-'
|
---
gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com-
Hide quoted text -

- Show quoted text -

Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply. You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)

OP: Do you just want to make an LED light up? If so we're _all_
borrowing way too much trouble!
Hello!, I want four LEDs in my craft project.

I'veonly seen battery-powered units that have 20 LEDs on separate wires, nd
10 mini-lights on a string but the mini-lights burn through batteries like
mad, even if you take out most of the bulbs (and if theremaining lights
still light). So I thought "Oh, simple, I'll just stick in 4 white
LEDs..."

I got a ouple of books and was able to learn *some* stuff, but really, i'm
just a crafts-and-anguages doof, Math is to me like what learniing Chinese
and Arabic at the same time (while designing multimedia sculptures) would
be to most people...
 
ehsjr <ehsjr@nospamverizon.net> wrote in news:hmihc0$8q4$1@news.eternal-
september.org:

Your choice of a MAX1848 suggests that you are using 2 NiCd cells
and therfore require a boost circuit. The datasheet shows you how
to wire it up, and your question seems to be what to do about the
control (CTRL) pin, since you don't want to use PWM.
YES!, Exactly! =:-D I want the LEDs to be bright, not dim. ((As I
mentioned in the other post, if I only needed it dim, I wouldn't buy 4
LEDs, just one, and then pretty much just stick it onto one of those round
CR2032 "button" batteries...I did that exactly that for a small project,
just a holder or thebattery, a sliding-switch, an LED, and some wire I got
from Radio Shack...but this construct is larger so I wanted more light...))


Ok, *if* the above paragraph is true, wire the thing up as shown on
the datasheet, figure 2 & table 1 on page 7
http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Where the diagram shows 3 LEDs in series, use 2 LEDs instead.
Okie dokie, that looks also like this:
http://www.maxim-ic.com/app-notes/index.mvp/id/1736
(except for "DAC"...) which also lists the various parts to get (I did
discover DigiKey =;-) )


Where it shows "Logic or DAC" connected to the CTRL pin, all you need
to do is provide a voltage. The level of that voltage and value of
the sense resistor (Rsense) determines how bright the LEDs will be, by
controlling the current through them. The formula is given in the
datasheet: Iled = Vctrl/(13.33 + Rsense)
OkieDokie, the diagram I linked to above shows a 12.1 Ohm resistor-symbol
in the same place where the diagram you referenced on page 7 of the Data
Sheet shows "R-sense 5 Ohm". IOW, it is stronger, so it reduces the
voltage (or is it current...?) going into the ground (return/negative)
wire...

You can derive the voltage for the CTRL pin as follows:

Batt + ---+
|
[100K]
|
+----------CTRL
|
[D1] diodes are 1N4148
|k
[D2]
|k
Gnd-------+

The CTRL voltage will be ~1.2 volts, and current through the
LEDs will be about 18 mA. For less LED current, use the formula
mentioned above to determine a different value for Rsense.
I remember reading that diodes can be used sort-of like resistors (t lower
voltage) except that they don't "burn it off" in the form of heat, which
wastesthe energy. But I'm confused about where the voltage comes from -
does some sort of "backwash" seep up through the diodes, or is the voltage
already "inside" of the MAX1848 and you're using the diodes to close down
the spigot, to use what's probably a horrible analogy, and let the bakwash
"fill up" the "ctrl"...?

Maybe i've been so confused because current moves oppositetowat I'vebeen
thinking? Doesthe current come out from the negative end of the battery
(which would make sense because I remember that electrons have a negative
charge) or does the current come out of the positive end of the battery?
THe "ground" is just the negative end of the battery, right...? If so,
then it's more clear wherethe voltage comes from in yourexample.

Jeez I feel like a dummy =:-o but I DO really aprreciate your explanation
and diagram!! =:-D

K.
 
Bleep wrote:
George Herold <ggherold@gmail.com> wrote in news:97e3d134-b03e-44fc-b097-
42018d2a957e@j27g2000yqn.googlegroups.com:

On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:
Bleep wrote:
Hello, Group!
I am a rube, so thanks in advance for your patience if this is a
total-moron- level question ;)
I was lookng at a MAX1848 battery-charge-control IC (the intent is
to
run the charged batteries to a white LED driver). On the example
diagram, this is shown on a portion of the diagram:

| ----->>output to LED
driver
|

|
(resistor) | I
C LAYOUT PIC
5K |
PWM Dimming O-----/\/\/\-----------|CTRL
0 to 3.3V | |
f>15KHz | |
0%=shdn | |
100%=20mA 0.1uF = |

(capacitor) | |-----------
|
|
_____
___ (grou
nd)
_
My question is,
What attaches to the O called "PWM"? Does that just go to th
e
ground? If not, what do I need to do to get it to do "0 to 3.3V"?
I did a lot fo google searches for clues, but I couldn't find any...
Again, Many thanks in Advance for any info :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a
p
in
without software intervention. If you filter that PWM signal then y
ou
are left with a pretty good analog signal. It's a _very_ inexpensiv
e,
and not altogether cheap* way to get a DAC.
Pulse width modulation is just what it says -- you have hardware that
outputs a pulse with a fixed period and a duration that's modulated
by
some other signal (in the case of a microcontroller it's a number you
write to a register). The longer the pulse width within the period,
the
higher the average voltage of the PWM signal. Run that through a
low-pass filter like the resistor and cap in the diagram above, and
you'll find most of the ripple blocked but the average voltage coming
through unscathed.
* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.
Thank you for your answer, but what you wrote is over my head.
I just wanted to light 4 LEDs from a couple of rechargeable batteries
(
I
was hoping to light up some of my hobby projects from the inside and,
although I spent a whole huge boatload of hours looking for some pre-
ma
de
assembly I could use, I couldn't find anything) and I read a while
back
that using a 'driver' is the best way because to makes the current
goin
g to
the LEDs flow more consistently as the batteries drain. I was able t
o
figure out that I could patch together a battery-charge-incresing chip
and
this 'driver' chip but I don't understand why i have to "modulate" the
current.
I guess it's a stupid question, my apologies...
Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the
bul
b.
If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you
see:
____
from uC o----|____|-----o----- to IC
|
.-.
| |
| |
'-'
|
---
gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com-
Hid
e quoted text -
- Show quoted text -
Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply. You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)

George H.


Hello, George, I am looking at this:
http://www.maxim-ic.com/app-notes/index.mvp/id/1736
which is called "Powering Four White LEDs"
(Im looking at it because that's exactly what I want to do, light 4 white
LEDs and found it by googling "light 4 whte LEDs" - I also read about "high
power' leds but the problem is that I only have space for 2 AA batteries in
the base of the thing I want to light and I couldn't tell that 2 AA
batteries would be enough for the high-power ones to run).

Anyway, there isn't anything about what to attachthe "CTRL" pin to. I
don't want "dimming", I just want light. Maybe I can just not attach
"ctrl" to anything? or does it attach to the ground wire? There aren't any
clues about that; I've done every Google search I can figure out how to
form, but nothing tells me what to do with that attachments following the
5K resistor. I don't understand he purpose because, if I wanted dim bulbs,
I wouldn't spend the extra money to get 4 LEDs, I'd just stick together a
"button" CR2032 battery and one LED...

(((Is a 'wiper' part of a pontentiometer/"tuner"?)))

Anyway, I'm running on, sorry! Thanks for the additional info and I'll see
what some more seahing turns up using what you mentioned.


If you just want light, and you have the room for enough cells
(batteries) in series, this is all you need:


resistor
___
.-----|___|-----.
| |
| |
--- V ->
- battery - -> LED
| |
| |
=== ===
GND GND
(created by AACircuit v1.28.6 beta 04/19/05 www.tech-chat.de)

Add a switch if you want it to turn on and off. Tell us the LED you're
planning on using (different LEDs drop different voltages, and not all
white LEDs are created equal) and we'll tell you how many cells you need
in series and what resistor values to use.

An example would be a common red LED which drops 1.5V, and would need
two cells (for 3V), and a 150 ohm or so resistor (for 10mA with the
batteries at full charge). It'd get dim as the batteries crap out, but
hey -- it's a craft project, right?

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
Bleep wrote:
ehsjr <ehsjr@nospamverizon.net> wrote in news:hmihc0$8q4$1@news.eternal-
september.org:

Your choice of a MAX1848 suggests that you are using 2 NiCd cells
and therfore require a boost circuit. The datasheet shows you how
to wire it up, and your question seems to be what to do about the
control (CTRL) pin, since you don't want to use PWM.

YES!, Exactly! =:-D I want the LEDs to be bright, not dim. ((As I
mentioned in the other post, if I only needed it dim, I wouldn't buy 4
LEDs, just one, and then pretty much just stick it onto one of those round
CR2032 "button" batteries...I did that exactly that for a small project,
just a holder or thebattery, a sliding-switch, an LED, and some wire I got
from Radio Shack...but this construct is larger so I wanted more light...))


Ok, *if* the above paragraph is true, wire the thing up as shown on
the datasheet, figure 2 & table 1 on page 7
http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Where the diagram shows 3 LEDs in series, use 2 LEDs instead.

Okie dokie, that looks also like this:
http://www.maxim-ic.com/app-notes/index.mvp/id/1736
(except for "DAC"...) which also lists the various parts to get (I did
discover DigiKey =;-) )


Where it shows "Logic or DAC" connected to the CTRL pin, all you need
to do is provide a voltage. The level of that voltage and value of
the sense resistor (Rsense) determines how bright the LEDs will be, by
controlling the current through them. The formula is given in the
datasheet: Iled = Vctrl/(13.33 + Rsense)

OkieDokie, the diagram I linked to above shows a 12.1 Ohm resistor-symbol
in the same place where the diagram you referenced on page 7 of the Data
Sheet shows "R-sense 5 Ohm". IOW, it is stronger, so it reduces the
voltage (or is it current...?) going into the ground (return/negative)
wire...

You can derive the voltage for the CTRL pin as follows:

Batt + ---+
|
[100K]
|
+----------CTRL
|
[D1] diodes are 1N4148
|k
[D2]
|k
Gnd-------+

The CTRL voltage will be ~1.2 volts, and current through the
LEDs will be about 18 mA. For less LED current, use the formula
mentioned above to determine a different value for Rsense.

I remember reading that diodes can be used sort-of like resistors (t lower
voltage) except that they don't "burn it off" in the form of heat, which
wastesthe energy.
Diodes _do_ burn off power in the form of heat. Unlike resistors they
tend to have a much more constant voltage drop -- at least at a given
temperature.

But I'm confused about where the voltage comes from -
does some sort of "backwash" seep up through the diodes, or is the voltage
already "inside" of the MAX1848 and you're using the diodes to close down
the spigot, to use what's probably a horrible analogy, and let the bakwash
"fill up" the "ctrl"...?
In the schematic above the voltage is coming from the battery. It's
being dropped by the 100k-ohm resistor to provide a more-or-less
constant current to the diode string, which will drop 1.3V - 1.4V at
room temperature.

Maybe i've been so confused because current moves oppositetowat I'vebeen
thinking? Doesthe current come out from the negative end of the battery
(which would make sense because I remember that electrons have a negative
charge) or does the current come out of the positive end of the battery?
THe "ground" is just the negative end of the battery, right...? If so,
then it's more clear wherethe voltage comes from in yourexample.
Benjamin Franklin should come back from the dead once a decade just to
apologize to all and sundry for the current vs. electron flow conundrum.
They (with Ben in the van) took their best guess, and said that charge
carriers were '+'. They were wrong, but they tried.

Conventional current flows from the '+' end of the battery to the '-'
end when it's powering a circuit. Trying to think about conventional
current and electron flow at the same time will just make your head hurt.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
 
On Mar 2, 3:26 pm, Bleep <bl...@bleep.in> wrote:
Tim Wescott <t...@seemywebsite.now> wrote innews:jI2dnebyAv70GRHWnZ2dnUVZ_hAAAAAA@web-ster.com:





George Herold wrote:
On Mar 1, 8:35 pm, Tim Wescott <t...@seemywebsite.now> wrote:
Bleep wrote:
Tim Wescott <t...@seemywebsite.now> wrote in
news:A6mdneA6Rpi8jhXWnZ2dnUVZ_sudnZ2d@web-ster.com:
Bleep wrote:
Hello, Group!
I am a rube, so thanks in advance for your patience if this is a
total-moron- level question  ;)
I was lookng at a MAX1848 battery-charge-control IC (the intent is
to run the charged batteries to a white LED driver).  On the
example diagram, this is shown on a portion of the diagram:        
                                   |             ----->>output to
                         LED     driver       |
                                   |
                (resistor)         |    IC LAYOUT PIC
                    5K             |
PWM Dimming O-----/\/\/\-----------|CTRL
   0 to 3.3V                 |     |
   f>15KHz                   |     |
   0%=shdn                   |     |
   100%=20mA           0.1uF =     |                  
                (capacitor)  |     |-----------
                             |
                             |
                           _____
                            ___   (ground)
                             _
My question is,
What attaches to the  O  called "PWM"?  Does that just go to the
ground?  If not, what do I need to do to get it to do "0 to 3.3V"?
I did a lot fo google searches for clues, but I couldn't find
any... Again, Many thanks in Advance for any info   :)
Few microcontrollers come with DACs, however many of them come with
timer outputs that are easily set up to pulse-width modulate (PWM) a
pin without software intervention.  If you filter that PWM signal
then you are left with a pretty good analog signal.  It's a _very_
inexpensive, and not altogether cheap* way to get a DAC.
Pulse width modulation is just what it says -- you have hardware
that outputs a pulse with a fixed period and a duration that's
modulated by some other signal (in the case of a microcontroller
it's a number you write to a register).  The longer the pulse width
within the period, the higher the average voltage of the PWM signal..
 Run that through a low-pass filter like the resistor and cap in the
diagram above, and you'll find most of the ripple blocked but the
average voltage coming through unscathed.
* Volkswagen bugs are inexpensive, Chevy Vegas are _cheap_.
Thank you for your answer, but what you wrote is over my head.
I just wanted to light 4 LEDs from a couple of rechargeable batteries
(I was hoping to light up some of my hobby projects from the inside
and, although I spent a whole huge boatload of hours looking for some
pre-made assembly I could use, I couldn't find anything) and I read a
while back that using a 'driver' is the best way because to makes the
current going to the LEDs flow more consistently as the batteries
drain.  I was able to figure out that I could patch together a
battery-charge-incresing chip and this 'driver' chip but I don't
understand why i have to "modulate" the current.
I guess it's a stupid question, my apologies...
Not stupid.

I doubt that you _have_ to modulate the current -- I was assuming that
you _wanted_ to modulate the current, to change the brightness of the
bulb.

If just want to light up the stupid bulb, use a resistive divider from
the microprocessor, and dink with the values until you like what you
see:

               ____
from uC o----|____|-----o----- to IC
                         |
                        .-.
                        | |
                        | |
                        '-'
                         |
                        ---
                        gnd

--
Tim Wescott
Control system and signal processing consultingwww.wescottdesign.com-
Hide quoted text -

- Show quoted text -

Hi Tim, I'm not sure he has a micro controller.

So (OP) if you don't have a uC connect that to the positive power
supply.  You could even replace the resistors with a potentiometer.
(Connect the wiper to control input.)

OP:  Do you just want to make an LED light up?  If so we're _all_
borrowing way too much trouble!

Hello!, I want four LEDs in my craft project.  

I'veonly seen battery-powered units that have 20 LEDs on separate wires, nd
10 mini-lights on a string but the mini-lights burn through batteries like
mad, even if you take out most of the bulbs (and if theremaining lights
still light).  So I thought "Oh, simple, I'll just stick in 4 white
LEDs..."

I got a ouple of books and was able to learn *some* stuff, but really, i'm
just a crafts-and-anguages doof, Math is to me like what learniing Chinese
and Arabic at the same time (while designing multimedia sculptures) would
be to most people...- Hide quoted text -

- Show quoted text -

Bleep, you want to light up four white LEDs, with no dimming. You've
got room for 2 AA batteries for power. Do you want a switch or is
plugging the batteries in enough of a switch? How bright do you want
the light? And how long do the batteries have to last? Do you have
room for 3 AAA's instead? Do you mind if the LED's dim as the
batteries become depleted? To me it sounds like the simplest circuit
possible is going to be the one that will serve you best. Perhaps even
with a chance to learn a bit of simple electronics? (like volts and
amps and amp-hours.)

If you can answer most of these questions then I think we can draw you
a very simple circuit. And you might learn something. (I'm guessing
that you don't really understand what the Maxim circuit is doing. If
I'm mistaken in this please accept my apology in advance.)

George H.
 
Bleep wrote:
ehsjr <ehsjr@nospamverizon.net> wrote in news:hmihc0$8q4$1@news.eternal-
september.org:


Your choice of a MAX1848 suggests that you are using 2 NiCd cells
and therfore require a boost circuit. The datasheet shows you how
to wire it up, and your question seems to be what to do about the
control (CTRL) pin, since you don't want to use PWM.


YES!, Exactly! =:-D I want the LEDs to be bright, not dim. ((As I
mentioned in the other post, if I only needed it dim, I wouldn't buy 4
LEDs, just one, and then pretty much just stick it onto one of those round
CR2032 "button" batteries...I did that exactly that for a small project,
just a holder or thebattery, a sliding-switch, an LED, and some wire I got
from Radio Shack...but this construct is larger so I wanted more light...))



Ok, *if* the above paragraph is true, wire the thing up as shown on
the datasheet, figure 2 & table 1 on page 7
http://datasheets.maxim-ic.com/en/ds/MAX1848.pdf
Where the diagram shows 3 LEDs in series, use 2 LEDs instead.


Okie dokie, that looks also like this:
http://www.maxim-ic.com/app-notes/index.mvp/id/1736
(except for "DAC"...) which also lists the various parts to get (I did
discover DigiKey =;-) )
That diagram presents a problem that is not obvious: it
"wants" 3.3 volts at the CTRL pin for 100% brightness.
With 2 NiCd cells, you don't have that voltage available.
If you use that diagram, you'll need to change the
value for the sense resistor to 4.5 ohms, and change the
47.5 to 40.5. You still need to use the diode circuit
I mentioned.

Where it shows "Logic or DAC" connected to the CTRL pin, all you need
to do is provide a voltage. The level of that voltage and value of
the sense resistor (Rsense) determines how bright the LEDs will be, by
controlling the current through them. The formula is given in the
datasheet: Iled = Vctrl/(13.33 + Rsense)
Correction: Iled = Vctrl/(13.33 * Rsense)

OkieDokie, the diagram I linked to above shows a 12.1 Ohm resistor-symbol
in the same place where the diagram you referenced on page 7 of the Data
Sheet shows "R-sense 5 Ohm". IOW, it is stronger, so it reduces the
voltage (or is it current...?) going into the ground (return/negative)
wire...
That resistor, in conjunction with the voltage at the CTRL pin,
sets the current through the LEDs. The larger the resistor, the
lower the current.

Ed

You can derive the voltage for the CTRL pin as follows:

Batt + ---+
|
[100K]
|
+----------CTRL
|
[D1] diodes are 1N4148
|k
[D2]
|k
Gnd-------+

The CTRL voltage will be ~1.2 volts, and current through the
LEDs will be about 18 mA. For less LED current, use the formula
mentioned above to determine a different value for Rsense.


I remember reading that diodes can be used sort-of like resistors (t lower
voltage) except that they don't "burn it off" in the form of heat, which
wastesthe energy. But I'm confused about where the voltage comes from -
does some sort of "backwash" seep up through the diodes, or is the voltage
already "inside" of the MAX1848 and you're using the diodes to close down
the spigot, to use what's probably a horrible analogy, and let the bakwash
"fill up" the "ctrl"...?

Maybe i've been so confused because current moves oppositetowat I'vebeen
thinking? Doesthe current come out from the negative end of the battery
(which would make sense because I remember that electrons have a negative
charge) or does the current come out of the positive end of the battery?
THe "ground" is just the negative end of the battery, right...? If so,
then it's more clear wherethe voltage comes from in yourexample.

Jeez I feel like a dummy =:-o but I DO really aprreciate your explanation
and diagram!! =:-D

K.
 

Welcome to EDABoard.com

Sponsor

Back
Top