From: dagmargoodboat on
On Mar 2, 1:48 pm, Joerg <inva...(a)invalid.invalid> wrote:
> Charlie E. wrote:
> > On Mon, 01 Mar 2010 17:35:29 -0800, Joerg <inva...(a)invalid.invalid>
> > wrote:
>
> >> Charlie E. wrote:
> >>> On Mon, 01 Mar 2010 14:30:26 -0800, Joerg <inva...(a)invalid.invalid>
> >>> wrote:
>
> >>>> langw...(a)fonz.dk wrote:
> >>>>> On 1 Mar., 20:12, Joerg <inva...(a)invalid.invalid> wrote:
> >>>>>> Charlie E. wrote:
> >>>>>>> On Mon, 01 Mar 2010 10:38:45 -0800, Joerg <inva...(a)invalid.invalid>
> >>>>>>> wrote:
> >>>>>>>> Charlie E. wrote:
> >>>>>>> <snip original problem...>
> >>>>>>>>> Joerg,
> >>>>>>>>> Thanks for the advice.  Yes, I had been concentrating so hard on the
> >>>>>>>>> amplifiers I never really considered the LEDs.  In my mind, they would
> >>>>>>>>> just 'work' and I could then adjust accordingly.  Didn't realize that
> >>>>>>>>> they would vary that much.  Will have to look at maybe adding a higher
> >>>>>>>>> voltage, and go with the constant current drives for them.  This does
> >>>>>>>>> need to be pretty accurate!
> >>>>>>>> Where is your VCC coming from? Regulator? If so, what's the minimum
> >>>>>>>> voltage going into that regulator? If it is a battery that won't drop
> >>>>>>>> below about 4.5V and has low load ripple (low source resistance, added
> >>>>>>>> capacitors) fixing this part of the circuit would become fairly simple.
> >>>>>>> Hi Joerge,
> >>>>>>> I only have two AA batteries, so voltage is only about 2.5-3.1 volts.
> >>>>>>> That was why I added in the power supply, to try and stabilize that
> >>>>>>> voltage.  Most of the parts were pretty power tolerant, but I figured
> >>>>>>> (somewhat correctly) that the LEDs would be pretty voltage sensitive.
> >>>>>> That will require switch mode conversion, no other choice.
>
> >>>>>>> What do you think of this idea?  Take an LED driver chip, like an
> >>>>>>> LM3519 to do the voltage step up and current control, and then three
> >>>>>>> fets to switch that current to each of the LEDs.  Means a chip, a
> >>>>>>> small inductor and schottkey, a couple of caps, and three fets.
> >>>>>>> Shouldn't take up too much board space or budget...
> >>>>>> Nope, it ain't quite that easy. It doesn't have an external sense
> >>>>>> resistor and, consequently, the "accuracy" to which it holds the current
> >>>>>> is really horrid. Look at the Iout versus Vin, that's just not good
> >>>>>> enough. If you want to use a chip (or three) you need to find one with
> >>>>>> at least and external Rsense.
>
> >>>>>> It is usually easier and less expensive to boost that voltage from the
> >>>>>> two AA cells to 5V and add the analog current source circuits I
> >>>>>> mentioned in my other post (one per LED section). The PIC could be
> >>>>>> supplied directly from the AA cell if it's happy with 2.5V.
>
> >>>>> something like:http://www.national.com/ds/LM/LM2705.pdf
> >>>>> could be used either as constant current or as high voltage supply
>
> >>>> AFAIK those become iffy unde 2.5V. Something like this could work, and
> >>>> it's cheap:
>
> >>>>http://www.diodes.com/datasheets/AP6714.pdf
>
> >>>> If Charlie would prefer a nicely regulated 3.3V as well which would be
> >>>> nice to keep the detector side in check he could use the same chip for
> >>>> that rail.
>
> >>>>> I think you could have three npns floating on top of a shared sense
> >>>>> resistor
> >>>>> to do the switching between leds.
>
> >>>> That's a good option. Just make sure any load change reactions have
> >>>> petered out when the measurement window cometh.
> >>> Joerg, et.al.
>
> >>> Ok, I think I like the idea of using the 1253adj in the current
> >>> feedback mode, with three transistors to switch the anodes of the
> >>> LEDS.  Now, for a really controversial subject - transistor selection!
> >>> I could just throw 2N2222s in there, but are there any better options
> >>> available, like logic-level FETs that I should use?  Looking through
> >>> the Digikey selections, I found AO9926B, dual FETS that look pretty
> >>> good, while still being big enough to solder by hand!
>
> >>> Any good, cheap through hole logic level FETs for prototyping?
>
> >> Don't you need P-channel? These look good but there won't be much in
> >> through-hole, that era is over:
>
> >>http://www.diodes.com/datasheets/ds30933.pdf
>
> >> But make sure the source doesn't get much above 3.3V or it won't turn
> >> off and your current regulator could hang. IIRC on of your LEDs may
> >> require more than 3.3V. So you could, for example, hang a BAV99 up front
> >> to drop 1.2V and a resistor from gate to source.
>
> >>> Thanks again for all the great advice!
>
> >> As one SW guy put it, we are here to serve :-)
>
> >>> Charlie
>
> >>> (at least, this has been on on-topic discussion... ;-) )
>
> >> Yeah, amazing, not even the slightest rant.
>
> > Ok, this has been bothering me all night.  The circuit is now looking
> > like
>
> > Vout from regulator
> >   |                point A
> > FET switch
> >   |                point B
> > LED
> >   |                point C
> > FB resistor
> >   |
> > GND
>
> > (Ok, it isn't ASCII art, but hopefully gets the point across...)
>
> > So, working from the bottom, point C is at 1.21 volts.  The green LED
> > has a Vforward of 3.4V, so B is at 4.6V.  I have 3.1VDC (typically)
> > from the PIC pin to switch the FET.  Not an easy problem.
>
> It is easy: Spring for two logic level FETs that are guaranteed to have
> low Rdson at 3V drive. One P and one N. The P-channel goes where your
> FET switch ist between points A and B, source to point A. It's gate has
> a resistor of 10k or whatever to "Vout from regulator". Now place a
> N-channel, source to GND, drain to gate of the P-channel and it's gate
> is directly driven by the PIC.
>
> > Unfortunately, the RGB LED is common cathode, so needs to be switched
> > above, not below, so need to somehow raise the level of the turn on
> > signal to be able to control the FET, and still be able to turn it
> > off.  Of course, this is just one of three circuits, so I need to be
> > sure the others don't turn on at the same time... ;-)

The RGB LED is common-cathode? Oh. Then this would work:

+3.3v
-+-
|
.--------+--------+--------.
| | | |
|<' |<' |<' |<'
-| Q1 -| Q2 -| Q3 -| Q4
|\ |\ |\ |\
| | | |
| | | |
| | LED-R |LED-G | LED-B
| V ~> V ~> V ~>
| --- --- ---
| | | |
| D1 | | |
+---|<---+--------+--------'
| |
|_ L1 --- C1
)|| ---
)|| |
_)|| ===
|
+--->Vsense (to switching current regulator,
| e.g. ZXSC310)
.-.
| |
| | Rsense
'-'
|
===
GND

This approach is efficient, stable, inexpensive, small, and provides a
wide-compliance range. It needs no level-translation, which saves six
parts or so. A resistor-DAC to the Vsense node could modify the
individual LED currents, if desired.

--
Cheers,
James Arthur
From: dagmargoodboat on
On Mar 2, 1:48 pm, Joerg <inva...(a)invalid.invalid> wrote:
> Charlie E. wrote:
> > On Mon, 01 Mar 2010 17:35:29 -0800, Joerg <inva...(a)invalid.invalid>
> > wrote:
>
> >> Charlie E. wrote:
> >>> On Mon, 01 Mar 2010 14:30:26 -0800, Joerg <inva...(a)invalid.invalid>
> >>> wrote:
>
> >>>> langw...(a)fonz.dk wrote:
> >>>>> On 1 Mar., 20:12, Joerg <inva...(a)invalid.invalid> wrote:
> >>>>>> Charlie E. wrote:
> >>>>>>> On Mon, 01 Mar 2010 10:38:45 -0800, Joerg <inva...(a)invalid.invalid>
> >>>>>>> wrote:
> >>>>>>>> Charlie E. wrote:
> >>>>>>> <snip original problem...>
> >>>>>>>>> Joerg,
> >>>>>>>>> Thanks for the advice.  Yes, I had been concentrating so hard on the
> >>>>>>>>> amplifiers I never really considered the LEDs.  In my mind, they would
> >>>>>>>>> just 'work' and I could then adjust accordingly.  Didn't realize that
> >>>>>>>>> they would vary that much.  Will have to look at maybe adding a higher
> >>>>>>>>> voltage, and go with the constant current drives for them.  This does
> >>>>>>>>> need to be pretty accurate!
> >>>>>>>> Where is your VCC coming from? Regulator? If so, what's the minimum
> >>>>>>>> voltage going into that regulator? If it is a battery that won't drop
> >>>>>>>> below about 4.5V and has low load ripple (low source resistance, added
> >>>>>>>> capacitors) fixing this part of the circuit would become fairly simple.
> >>>>>>> Hi Joerge,
> >>>>>>> I only have two AA batteries, so voltage is only about 2.5-3.1 volts.
> >>>>>>> That was why I added in the power supply, to try and stabilize that
> >>>>>>> voltage.  Most of the parts were pretty power tolerant, but I figured
> >>>>>>> (somewhat correctly) that the LEDs would be pretty voltage sensitive.
> >>>>>> That will require switch mode conversion, no other choice.
>
> >>>>>>> What do you think of this idea?  Take an LED driver chip, like an
> >>>>>>> LM3519 to do the voltage step up and current control, and then three
> >>>>>>> fets to switch that current to each of the LEDs.  Means a chip, a
> >>>>>>> small inductor and schottkey, a couple of caps, and three fets.
> >>>>>>> Shouldn't take up too much board space or budget...
> >>>>>> Nope, it ain't quite that easy. It doesn't have an external sense
> >>>>>> resistor and, consequently, the "accuracy" to which it holds the current
> >>>>>> is really horrid. Look at the Iout versus Vin, that's just not good
> >>>>>> enough. If you want to use a chip (or three) you need to find one with
> >>>>>> at least and external Rsense.
>
> >>>>>> It is usually easier and less expensive to boost that voltage from the
> >>>>>> two AA cells to 5V and add the analog current source circuits I
> >>>>>> mentioned in my other post (one per LED section). The PIC could be
> >>>>>> supplied directly from the AA cell if it's happy with 2.5V.
>
> >>>>> something like:http://www.national.com/ds/LM/LM2705.pdf
> >>>>> could be used either as constant current or as high voltage supply
>
> >>>> AFAIK those become iffy unde 2.5V. Something like this could work, and
> >>>> it's cheap:
>
> >>>>http://www.diodes.com/datasheets/AP6714.pdf
>
> >>>> If Charlie would prefer a nicely regulated 3.3V as well which would be
> >>>> nice to keep the detector side in check he could use the same chip for
> >>>> that rail.
>
> >>>>> I think you could have three npns floating on top of a shared sense
> >>>>> resistor
> >>>>> to do the switching between leds.
>
> >>>> That's a good option. Just make sure any load change reactions have
> >>>> petered out when the measurement window cometh.
> >>> Joerg, et.al.
>
> >>> Ok, I think I like the idea of using the 1253adj in the current
> >>> feedback mode, with three transistors to switch the anodes of the
> >>> LEDS.  Now, for a really controversial subject - transistor selection!
> >>> I could just throw 2N2222s in there, but are there any better options
> >>> available, like logic-level FETs that I should use?  Looking through
> >>> the Digikey selections, I found AO9926B, dual FETS that look pretty
> >>> good, while still being big enough to solder by hand!
>
> >>> Any good, cheap through hole logic level FETs for prototyping?
>
> >> Don't you need P-channel? These look good but there won't be much in
> >> through-hole, that era is over:
>
> >>http://www.diodes.com/datasheets/ds30933.pdf
>
> >> But make sure the source doesn't get much above 3.3V or it won't turn
> >> off and your current regulator could hang. IIRC on of your LEDs may
> >> require more than 3.3V. So you could, for example, hang a BAV99 up front
> >> to drop 1.2V and a resistor from gate to source.
>
> >>> Thanks again for all the great advice!
>
> >> As one SW guy put it, we are here to serve :-)
>
> >>> Charlie
>
> >>> (at least, this has been on on-topic discussion... ;-) )
>
> >> Yeah, amazing, not even the slightest rant.
>
> > Ok, this has been bothering me all night.  The circuit is now looking
> > like
>
> > Vout from regulator
> >   |                point A
> > FET switch
> >   |                point B
> > LED
> >   |                point C
> > FB resistor
> >   |
> > GND
>
> > (Ok, it isn't ASCII art, but hopefully gets the point across...)
>
> > So, working from the bottom, point C is at 1.21 volts.  The green LED
> > has a Vforward of 3.4V, so B is at 4.6V.  I have 3.1VDC (typically)
> > from the PIC pin to switch the FET.  Not an easy problem.
>
> It is easy: Spring for two logic level FETs that are guaranteed to have
> low Rdson at 3V drive. One P and one N. The P-channel goes where your
> FET switch ist between points A and B, source to point A. It's gate has
> a resistor of 10k or whatever to "Vout from regulator". Now place a
> N-channel, source to GND, drain to gate of the P-channel and it's gate
> is directly driven by the PIC.
>
> > Unfortunately, the RGB LED is common cathode, so needs to be switched
> > above, not below, so need to somehow raise the level of the turn on
> > signal to be able to control the FET, and still be able to turn it
> > off.  Of course, this is just one of three circuits, so I need to be
> > sure the others don't turn on at the same time... ;-)

The RGB LED is common-cathode? Oh. Then this would work:

+3.3v
-+-
|
.--------+--------+--------.
| | | |
|<' |<' |<' |<'
-| Q1 -| Q2 -| Q3 -| Q4
|\ |\ |\ |\
| | | |
| | | |
| | LED-R |LED-G | LED-B
| V ~> V ~> V ~>
| --- --- ---
| | | |
| D1 | | |
+---|<---+--------+--------'
| |
|_ L1 --- C1
)|| ---
)|| |
_)|| ===
|
+--->Vsense (to switching current regulator,
| e.g. ZXSC310)
.-.
| |
| | Rsense
'-'
|
===
GND

This approach is efficient, stable, inexpensive, small, and provides a
wide-compliance range. It needs no level-translation, which saves six
parts or so. A resistor-DAC to the Vsense node could modify the
individual LED currents, if desired.

--
Cheers,
James Arthur
From: Joerg on
dagmargoodboat(a)yahoo.com wrote:
> On Mar 2, 1:48 pm, Joerg <inva...(a)invalid.invalid> wrote:
>> Charlie E. wrote:
>>> On Mon, 01 Mar 2010 17:35:29 -0800, Joerg <inva...(a)invalid.invalid>
>>> wrote:
>>>> Charlie E. wrote:
>>>>> On Mon, 01 Mar 2010 14:30:26 -0800, Joerg <inva...(a)invalid.invalid>
>>>>> wrote:
>>>>>> langw...(a)fonz.dk wrote:
>>>>>>> On 1 Mar., 20:12, Joerg <inva...(a)invalid.invalid> wrote:
>>>>>>>> Charlie E. wrote:
>>>>>>>>> On Mon, 01 Mar 2010 10:38:45 -0800, Joerg <inva...(a)invalid.invalid>
>>>>>>>>> wrote:
>>>>>>>>>> Charlie E. wrote:
>>>>>>>>> <snip original problem...>
>>>>>>>>>>> Joerg,
>>>>>>>>>>> Thanks for the advice. Yes, I had been concentrating so hard on the
>>>>>>>>>>> amplifiers I never really considered the LEDs. In my mind, they would
>>>>>>>>>>> just 'work' and I could then adjust accordingly. Didn't realize that
>>>>>>>>>>> they would vary that much. Will have to look at maybe adding a higher
>>>>>>>>>>> voltage, and go with the constant current drives for them. This does
>>>>>>>>>>> need to be pretty accurate!
>>>>>>>>>> Where is your VCC coming from? Regulator? If so, what's the minimum
>>>>>>>>>> voltage going into that regulator? If it is a battery that won't drop
>>>>>>>>>> below about 4.5V and has low load ripple (low source resistance, added
>>>>>>>>>> capacitors) fixing this part of the circuit would become fairly simple.
>>>>>>>>> Hi Joerge,
>>>>>>>>> I only have two AA batteries, so voltage is only about 2.5-3.1 volts.
>>>>>>>>> That was why I added in the power supply, to try and stabilize that
>>>>>>>>> voltage. Most of the parts were pretty power tolerant, but I figured
>>>>>>>>> (somewhat correctly) that the LEDs would be pretty voltage sensitive.
>>>>>>>> That will require switch mode conversion, no other choice.
>>>>>>>>> What do you think of this idea? Take an LED driver chip, like an
>>>>>>>>> LM3519 to do the voltage step up and current control, and then three
>>>>>>>>> fets to switch that current to each of the LEDs. Means a chip, a
>>>>>>>>> small inductor and schottkey, a couple of caps, and three fets.
>>>>>>>>> Shouldn't take up too much board space or budget...
>>>>>>>> Nope, it ain't quite that easy. It doesn't have an external sense
>>>>>>>> resistor and, consequently, the "accuracy" to which it holds the current
>>>>>>>> is really horrid. Look at the Iout versus Vin, that's just not good
>>>>>>>> enough. If you want to use a chip (or three) you need to find one with
>>>>>>>> at least and external Rsense.
>>>>>>>> It is usually easier and less expensive to boost that voltage from the
>>>>>>>> two AA cells to 5V and add the analog current source circuits I
>>>>>>>> mentioned in my other post (one per LED section). The PIC could be
>>>>>>>> supplied directly from the AA cell if it's happy with 2.5V.
>>>>>>> something like:http://www.national.com/ds/LM/LM2705.pdf
>>>>>>> could be used either as constant current or as high voltage supply
>>>>>> AFAIK those become iffy unde 2.5V. Something like this could work, and
>>>>>> it's cheap:
>>>>>> http://www.diodes.com/datasheets/AP6714.pdf
>>>>>> If Charlie would prefer a nicely regulated 3.3V as well which would be
>>>>>> nice to keep the detector side in check he could use the same chip for
>>>>>> that rail.
>>>>>>> I think you could have three npns floating on top of a shared sense
>>>>>>> resistor
>>>>>>> to do the switching between leds.
>>>>>> That's a good option. Just make sure any load change reactions have
>>>>>> petered out when the measurement window cometh.
>>>>> Joerg, et.al.
>>>>> Ok, I think I like the idea of using the 1253adj in the current
>>>>> feedback mode, with three transistors to switch the anodes of the
>>>>> LEDS. Now, for a really controversial subject - transistor selection!
>>>>> I could just throw 2N2222s in there, but are there any better options
>>>>> available, like logic-level FETs that I should use? Looking through
>>>>> the Digikey selections, I found AO9926B, dual FETS that look pretty
>>>>> good, while still being big enough to solder by hand!
>>>>> Any good, cheap through hole logic level FETs for prototyping?
>>>> Don't you need P-channel? These look good but there won't be much in
>>>> through-hole, that era is over:
>>>> http://www.diodes.com/datasheets/ds30933.pdf
>>>> But make sure the source doesn't get much above 3.3V or it won't turn
>>>> off and your current regulator could hang. IIRC on of your LEDs may
>>>> require more than 3.3V. So you could, for example, hang a BAV99 up front
>>>> to drop 1.2V and a resistor from gate to source.
>>>>> Thanks again for all the great advice!
>>>> As one SW guy put it, we are here to serve :-)
>>>>> Charlie
>>>>> (at least, this has been on on-topic discussion... ;-) )
>>>> Yeah, amazing, not even the slightest rant.
>>> Ok, this has been bothering me all night. The circuit is now looking
>>> like
>>> Vout from regulator
>>> | point A
>>> FET switch
>>> | point B
>>> LED
>>> | point C
>>> FB resistor
>>> |
>>> GND
>>> (Ok, it isn't ASCII art, but hopefully gets the point across...)
>>> So, working from the bottom, point C is at 1.21 volts. The green LED
>>> has a Vforward of 3.4V, so B is at 4.6V. I have 3.1VDC (typically)
>>> from the PIC pin to switch the FET. Not an easy problem.
>> It is easy: Spring for two logic level FETs that are guaranteed to have
>> low Rdson at 3V drive. One P and one N. The P-channel goes where your
>> FET switch ist between points A and B, source to point A. It's gate has
>> a resistor of 10k or whatever to "Vout from regulator". Now place a
>> N-channel, source to GND, drain to gate of the P-channel and it's gate
>> is directly driven by the PIC.
>>
>>> Unfortunately, the RGB LED is common cathode, so needs to be switched
>>> above, not below, so need to somehow raise the level of the turn on
>>> signal to be able to control the FET, and still be able to turn it
>>> off. Of course, this is just one of three circuits, so I need to be
>>> sure the others don't turn on at the same time... ;-)
>
> The RGB LED is common-cathode? Oh. Then this would work:
>
> +3.3v
> -+-
> |
> .--------+--------+--------.
> | | | |
> |<' |<' |<' |<'
> -| Q1 -| Q2 -| Q3 -| Q4
> |\ |\ |\ |\
> | | | |
> | | | |
> | | LED-R |LED-G | LED-B
> | V ~> V ~> V ~>
> | --- --- ---
> | | | |
> | D1 | | |
> +---|<---+--------+--------'
> | |
> |_ L1 --- C1
> )|| ---
> )|| |
> _)|| ===
> |
> +--->Vsense (to switching current regulator,
> | e.g. ZXSC310)
> .-.
> | |
> | | Rsense
> '-'
> |
> ===
> GND
>
> This approach is efficient, stable, inexpensive, small, and provides a
> wide-compliance range. It needs no level-translation, which saves six
> parts or so. A resistor-DAC to the Vsense node could modify the
> individual LED currents, if desired.
>

A negative voltage can work and if you use FETs instead of the BJTs you
save three more parts, the base resistors.

However, make sure the 3.3V hangs on, is strong enough. Also the
switcher frequency must be high so load changes are handled fast enough.
C1 can't be too large.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
From: dagmargoodboat on
On Mar 2, 9:15 pm, Joerg <inva...(a)invalid.invalid> wrote:
> dagmargoodb...(a)yahoo.com wrote:
> > On Mar 2, 1:48 pm, Joerg <inva...(a)invalid.invalid> wrote:
> >> Charlie E. wrote:
> >>> On Mon, 01 Mar 2010 17:35:29 -0800, Joerg <inva...(a)invalid.invalid>
> >>> wrote:
> >>>> Charlie E. wrote:
> >>>>> On Mon, 01 Mar 2010 14:30:26 -0800, Joerg <inva...(a)invalid.invalid>
> >>>>> wrote:
> >>>>>> langw...(a)fonz.dk wrote:
> >>>>>>> On 1 Mar., 20:12, Joerg <inva...(a)invalid.invalid> wrote:
> >>>>>>>> Charlie E. wrote:
> >>>>>>>>> On Mon, 01 Mar 2010 10:38:45 -0800, Joerg <inva...(a)invalid.invalid>
> >>>>>>>>> wrote:
> >>>>>>>>>> Charlie E. wrote:
> >>>>>>>>> <snip original problem...>
> >>>>>>>>>>> Joerg,
> >>>>>>>>>>> Thanks for the advice.  Yes, I had been concentrating so hard on the
> >>>>>>>>>>> amplifiers I never really considered the LEDs.  In my mind, they would
> >>>>>>>>>>> just 'work' and I could then adjust accordingly.  Didn't realize that
> >>>>>>>>>>> they would vary that much.  Will have to look at maybe adding a higher
> >>>>>>>>>>> voltage, and go with the constant current drives for them.  This does
> >>>>>>>>>>> need to be pretty accurate!
> >>>>>>>>>> Where is your VCC coming from? Regulator? If so, what's the minimum
> >>>>>>>>>> voltage going into that regulator? If it is a battery that won't drop
> >>>>>>>>>> below about 4.5V and has low load ripple (low source resistance, added
> >>>>>>>>>> capacitors) fixing this part of the circuit would become fairly simple.
> >>>>>>>>> Hi Joerge,
> >>>>>>>>> I only have two AA batteries, so voltage is only about 2.5-3.1 volts.
> >>>>>>>>> That was why I added in the power supply, to try and stabilize that
> >>>>>>>>> voltage.  Most of the parts were pretty power tolerant, but I figured
> >>>>>>>>> (somewhat correctly) that the LEDs would be pretty voltage sensitive.
> >>>>>>>> That will require switch mode conversion, no other choice.
> >>>>>>>>> What do you think of this idea?  Take an LED driver chip, like an
> >>>>>>>>> LM3519 to do the voltage step up and current control, and then three
> >>>>>>>>> fets to switch that current to each of the LEDs.  Means a chip, a
> >>>>>>>>> small inductor and schottkey, a couple of caps, and three fets.
> >>>>>>>>> Shouldn't take up too much board space or budget...
> >>>>>>>> Nope, it ain't quite that easy. It doesn't have an external sense
> >>>>>>>> resistor and, consequently, the "accuracy" to which it holds the current
> >>>>>>>> is really horrid. Look at the Iout versus Vin, that's just not good
> >>>>>>>> enough. If you want to use a chip (or three) you need to find one with
> >>>>>>>> at least and external Rsense.
> >>>>>>>> It is usually easier and less expensive to boost that voltage from the
> >>>>>>>> two AA cells to 5V and add the analog current source circuits I
> >>>>>>>> mentioned in my other post (one per LED section). The PIC could be
> >>>>>>>> supplied directly from the AA cell if it's happy with 2.5V.
> >>>>>>> something like:http://www.national.com/ds/LM/LM2705.pdf
> >>>>>>> could be used either as constant current or as high voltage supply
> >>>>>> AFAIK those become iffy unde 2.5V. Something like this could work, and
> >>>>>> it's cheap:
> >>>>>>http://www.diodes.com/datasheets/AP6714.pdf
> >>>>>> If Charlie would prefer a nicely regulated 3.3V as well which would be
> >>>>>> nice to keep the detector side in check he could use the same chip for
> >>>>>> that rail.
> >>>>>>> I think you could have three npns floating on top of a shared sense
> >>>>>>> resistor
> >>>>>>> to do the switching between leds.
> >>>>>> That's a good option. Just make sure any load change reactions have
> >>>>>> petered out when the measurement window cometh.
> >>>>> Joerg, et.al.
> >>>>> Ok, I think I like the idea of using the 1253adj in the current
> >>>>> feedback mode, with three transistors to switch the anodes of the
> >>>>> LEDS.  Now, for a really controversial subject - transistor selection!
> >>>>> I could just throw 2N2222s in there, but are there any better options
> >>>>> available, like logic-level FETs that I should use?  Looking through
> >>>>> the Digikey selections, I found AO9926B, dual FETS that look pretty
> >>>>> good, while still being big enough to solder by hand!
> >>>>> Any good, cheap through hole logic level FETs for prototyping?
> >>>> Don't you need P-channel? These look good but there won't be much in
> >>>> through-hole, that era is over:
> >>>>http://www.diodes.com/datasheets/ds30933.pdf
> >>>> But make sure the source doesn't get much above 3.3V or it won't turn
> >>>> off and your current regulator could hang. IIRC on of your LEDs may
> >>>> require more than 3.3V. So you could, for example, hang a BAV99 up front
> >>>> to drop 1.2V and a resistor from gate to source.
> >>>>> Thanks again for all the great advice!
> >>>> As one SW guy put it, we are here to serve :-)
> >>>>> Charlie
> >>>>> (at least, this has been on on-topic discussion... ;-) )
> >>>> Yeah, amazing, not even the slightest rant.
> >>> Ok, this has been bothering me all night.  The circuit is now looking
> >>> like
> >>> Vout from regulator
> >>>   |                point A
> >>> FET switch
> >>>   |                point B
> >>> LED
> >>>   |                point C
> >>> FB resistor
> >>>   |
> >>> GND
> >>> (Ok, it isn't ASCII art, but hopefully gets the point across...)
> >>> So, working from the bottom, point C is at 1.21 volts.  The green LED
> >>> has a Vforward of 3.4V, so B is at 4.6V.  I have 3.1VDC (typically)
> >>> from the PIC pin to switch the FET.  Not an easy problem.
> >> It is easy: Spring for two logic level FETs that are guaranteed to have
> >> low Rdson at 3V drive. One P and one N. The P-channel goes where your
> >> FET switch ist between points A and B, source to point A. It's gate has
> >> a resistor of 10k or whatever to "Vout from regulator". Now place a
> >> N-channel, source to GND, drain to gate of the P-channel and it's gate
> >> is directly driven by the PIC.
>
> >>> Unfortunately, the RGB LED is common cathode, so needs to be switched
> >>> above, not below, so need to somehow raise the level of the turn on
> >>> signal to be able to control the FET, and still be able to turn it
> >>> off.  Of course, this is just one of three circuits, so I need to be
> >>> sure the others don't turn on at the same time... ;-)
>
> > The RGB LED is common-cathode?  Oh.  Then this would work:
>
> >                     +3.3v
> >                      -+-
> >                       |
> >     .--------+--------+--------.
> >     |        |        |        |
> >   |<'      |<'      |<'      |<'
> >  -| Q1    -| Q2    -| Q3    -| Q4
> >   |\       |\       |\       |\
> >     |        |        |        |
> >     |        |        |        |
> >     |        | LED-R  |LED-G   | LED-B
> >     |        V ~>     V ~>     V ~>
> >     |       ---      ---      ---
> >     |        |        |        |
> >     |   D1   |        |        |
> >     +---|<---+--------+--------'
> >     |                 |
> >     |_ L1            --- C1
> >       )||            ---
> >       )||             |
> >      _)||            ===
> >     |
> >     +--->Vsense (to switching current regulator,
> >     |            e.g. ZXSC310)
> >    .-.
> >    | |
> >    | | Rsense
> >    '-'
> >     |
> >    ===
> >    GND
>
> > This approach is efficient, stable, inexpensive, small, and provides a
> > wide-compliance range.  It needs no level-translation, which saves six
> > parts or so.  A resistor-DAC to the Vsense node could modify the
> > individual LED currents, if desired.
>
> A negative voltage can work and if you use FETs instead of the BJTs you
> save three more parts, the base resistors.

I personally like FETs; I put in the PNPs for you. They're cheaper.
<grin>

> However, make sure the 3.3V hangs on, is strong enough. Also the
> switcher frequency must be high so load changes are handled fast enough.
>   C1 can't be too large.

Or omit it altogether. C1's optional, really.

Cheers,
James Arthur
From: George Herold on
On Mar 1, 10:03 pm, MooseFET <kensm...(a)rahul.net> wrote:
> On Mar 1, 8:54 am, Charlie E. <edmond...(a)ieee.org> wrote:
>
>
>
>
>
> > Hi Guys,
> > Ok, going to put myself in harms way, and ask for a little design
> > advice.  I have been working on this project for a while now, and it
> > has gone through several iterations, and I keep having the same
> > problem!
>
> > First, the project:  I am designing a small color reader for the
> > visually impaired.  Really simple operation - put it against the
> > object you want to tell the color of, and it will say "RED" or
> > whatever the color is.  Sensor is simply an RGB LED and a
> > phototransistor, buffered by some amps, and then digitized by a PIC24.
> > So, what's the problem?  I can't get a stable reading.  In normal
> > operation, this thing will run for about two seconds, and then be
> > turned off.  To test, however, I run it in debug mode for hours.  When
> > I first turn it on, and calibrate it to a white sample, I will get one
> > set of calibrations.  Let it sit for about two minutes, and it starts
> > to drift.  In about half an hour, I will have readings totally off the
> > scale.
>
> > So, why am I baring my soul to ya'll?  I need your help identifying
> > where the gain drift is coming from, and some ideas on how to control
> > them.  I have the schematic here:
>
> >http://edmondsonengineering.com/Documents/Rainbow%20color%20Reader%20...
>
> > Basic description - MCU turns on an LED.  The phototransistor is first
> > buffered by a non-inverting opamp with a gain of 2, and the signal is
> > split.  Part goes directly to a PGA where it is first attenuated, and
> > then the PGA boosts it up.  This gives me a calibration control to
> > deal with difference in output of the LEDs.  The original and PGA
> > signal are added, and this is then applied to another non-inverting
> > opamp with a gain of 2.  I also have one feed before this opamp to an
> > ADC input on the PIC.
>
> > Problems I have already solved:
> > First, each LED has a different output level.  Red needs a gain of
> > around 2, BLUE a gain of around 5, and GREEN a gain of about 7.  The
> > PGA was added to give me an adjustable gain from around 2 to 14, with
> > the two different taps into the separate input channels of the PGA.
> > This gives me 16 different gain levels to play with.  Using the tap to
> > the second ADC channel, it actually gives me 32 different levels.
>
> > Right now, RED uses this lower gain channel, and is steady as a rock.
> > Part of this may be that my VCC is 3.3 volts, and only RED has a
> > forward voltage below this.  Both GREEN and BLUE have forward voltages
> > of 3.4 volts.
>
> > So, potential problems?  could it be that repeated use warms up the
> > GREEN and BLUE LEDs so that they become more efficient?  Could the
> > power supply drift higher as it warms up?  Could the opamps drift with
> > slight changes in temperature?  Any advice ya'll can give will be most
> > appreciated.
>
> > Thanks,
> > Charlie
>
> How about:
>
>          Schottky               LED
>  Vcc ---->!--------+-----/\/\---->!----GND
>                    !
>                   ===C
>                    !
>                 PIC port
>
> When you pull the port pin low, the capacitor gets
> charged.  When you take it high again you get a pulse
> of light from the LED.
>
> From the shape of the pulse, you can get a reasonable
> guess at the forward voltage of the LED.  Thus you can
> normalize for that drop.- Hide quoted text -
>
> - Show quoted text -

That's cool. Thanks

George H.
First  |  Prev  |  Next  |  Last
Pages: 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
Prev: Magnetism is really -- WHAT?
Next: low-end scope