Prev: Magnetism is really -- WHAT?
Next: low-end scope
From: whit3rd on 1 Mar 2010 14:56 On Mar 1, 11:16 am, Jim Thompson <To-Email-Use-The-Envelope-I...(a)My- Web-Site.com> wrote: > On Mon, 01 Mar 2010 11:11:55 -0800, Charlie E. <edmond...(a)ieee.org> > wrote: > >this is my first foray into photometry. Wanted something cheap > Maybe 3xAA (or 4xAA), run uP off of two cells, then some little Mickey > mouse OpAmp mirror games to hold the LED currents constant? > > Does uP have an on-board reference? Good question (probably the DAC has or needs one). Not the full solution, though: what about a bridge sensor configuration? To get a current source, one uses a high impedance and high voltage (neither is present in the current design). One can add this by a Cockcroft-Walton or other voltage multiplier, as has been discussed recently on this newsgroup; the output impedance of such an array is relatively high. Then, you can run two photodiodes in series, one in an optoisolator and one illuminating your target (this guarantees same-current). The amplified difference or ratio of the optoisolator's output and the target-sensor output tells you of the reflectivity-at-color of the target. As in a bridge sensor, this is insensitive to voltage fluctuations, will work well even at low battery voltage. The multiple lamp diodes just hang from the (-) terminal of the optoisolator diode, ground the cathode of whichever lamp is needed.
From: Charlie E. on 1 Mar 2010 14:59 On Mon, 01 Mar 2010 11:12:58 -0800, Joerg <invalid(a)invalid.invalid> wrote: >Charlie E. wrote: >> On Mon, 01 Mar 2010 10:38:45 -0800, Joerg <invalid(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. You are probably right. One problem is that the opamps for the phototransistor (ambient light sensor) should also probably stay on the battery, to prevent overdriving the ADC inputs for the PIC. There are the other LED drivers with an external current sense resistor, so will look into the tradeoffs involved... Thanks! Charlie
From: Charlie E. on 1 Mar 2010 15:03 On Mon, 01 Mar 2010 12:16:52 -0700, Jim Thompson <To-Email-Use-The-Envelope-Icon(a)My-Web-Site.com> wrote: >On Mon, 01 Mar 2010 11:11:55 -0800, Charlie E. <edmondson(a)ieee.org> >wrote: > >>On Mon, 01 Mar 2010 12:08:17 -0700, Jim Thompson >><To-Email-Use-The-Envelope-Icon(a)My-Web-Site.com> wrote: >> >>>On Mon, 01 Mar 2010 09:30:34 -0800, Charlie E. <edmondson(a)ieee.org> >>>wrote: >>> >>>>On Mon, 01 Mar 2010 10:25:21 -0700, Jim Thompson >>>><To-Email-Use-The-Envelope-Icon(a)My-Web-Site.com> wrote: >>>> >>>>>On Mon, 01 Mar 2010 08:54:53 -0800, Charlie E. <edmondson(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%20Schematic.pdf >>>>>> >>>>>>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 >>>>> >>>>>What keeps the LED's at their _constant_ current? >>>>> >>>>> ...Jim Thompson >>>> >>>>Hi Jim, >>>>Basically, it is whatever the PIC outputs will put out. They are >>>>rated at 18mA, but I suspect that they are putting out a whole lot >>>>less... >>>> >>>>Charlie >>> >>>Don't you want them to stay at a constant current? >>> >>> ...Jim Thompson >>Yeah, I realize this now... ;-) >> >>this is my first foray into photometry. Wanted something cheap and >>easily reproducible. I just 'assumed' that an LED would give the same >>output with the same drive... >> >>Oh well, I guess the boss will just fire me! >> >>Charlie > >Maybe 3xAA (or 4xAA), run uP off of two cells, then some little Mickey >mouse OpAmp mirror games to hold the LED currents constant? > >Does uP have an on-board reference? > > ...Jim Thompson Object is to have this as light and small as possible. Using AAs instead of AAAs only because Serpak has their little M-6 enclosure that fits right. Would weight too much with 3 or 4 AAs... Charlie
From: Charlie E. on 1 Mar 2010 15:08 On Mon, 1 Mar 2010 11:15:52 -0800 (PST), George Herold <ggherold(a)gmail.com> wrote: >On Mar 1, 2:01�pm, Charlie E. <edmond...(a)ieee.org> 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. >> >> 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... >> >> Charlie > >Could you run the whole thing from a 5 volt supply? Regulate that >down to 3.3 for the PIC and have the 5 volts for the LED's. (making >some sort of constant current source.) > >George H. Yes, that is pretty much what Joerge is suggesting. It looks like I will pretty much have a two voltage system - 3.3 for the PIC and the detector, probably also the speaker amp, and then 5.0 for the LEDs. Charlie
From: linnix on 1 Mar 2010 15:11
On Mar 1, 12:03 pm, Charlie E. <edmond...(a)ieee.org> wrote: > On Mon, 01 Mar 2010 12:16:52 -0700, Jim Thompson > > > > <To-Email-Use-The-Envelope-I...(a)My-Web-Site.com> wrote: > >On Mon, 01 Mar 2010 11:11:55 -0800, Charlie E. <edmond...(a)ieee.org> > >wrote: > > >>On Mon, 01 Mar 2010 12:08:17 -0700, Jim Thompson > >><To-Email-Use-The-Envelope-I...(a)My-Web-Site.com> wrote: > > >>>On Mon, 01 Mar 2010 09:30:34 -0800, Charlie E. <edmond...(a)ieee.org> > >>>wrote: > > >>>>On Mon, 01 Mar 2010 10:25:21 -0700, Jim Thompson > >>>><To-Email-Use-The-Envelope-I...(a)My-Web-Site.com> wrote: > > >>>>>On Mon, 01 Mar 2010 08:54:53 -0800, 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 > > >>>>>What keeps the LED's at their _constant_ current? > > >>>>> ...Jim Thompson > > >>>>Hi Jim, > >>>>Basically, it is whatever the PIC outputs will put out. They are > >>>>rated at 18mA, but I suspect that they are putting out a whole lot > >>>>less... > > >>>>Charlie > > >>>Don't you want them to stay at a constant current? > > >>> ...Jim Thompson > >>Yeah, I realize this now... ;-) > > >>this is my first foray into photometry. Wanted something cheap and > >>easily reproducible. I just 'assumed' that an LED would give the same > >>output with the same drive... > > >>Oh well, I guess the boss will just fire me! > > >>Charlie > > >Maybe 3xAA (or 4xAA), run uP off of two cells, then some little Mickey > >mouse OpAmp mirror games to hold the LED currents constant? > > >Does uP have an on-board reference? > > > ...Jim Thompson > > Object is to have this as light and small as possible. Using AAs > instead of AAAs only because Serpak has their little M-6 enclosure > that fits right. Would weight too much with 3 or 4 AAs... > > Charlie You can have a couple of 3V CR2032 button cells. 150mAHr could last quite a while. |