Any interest in a LED/Battery analyzer device?

Kapton tape is VERY thin. It will add a little bit of time-lag to the reading, but it won’t really alter the absolute values to any great degree.

Thanks, I may go buy some for my tests. :)

Well, bad news… the thermocouple does not seem to be the problem… crap!

That glitch near the start went away, but those near the middle were still there. I’m charging up some batteries and letting the body cool down and will try again. I think the first glitch didn’t happen because the body started out a bit warm and the battery had a few minutes run time on it.

Hopefully that first glitch will re-appear, since it will be easier to snag on the scope. I think that I will put some code into the program to sound an alarm if it sees the current glitches… I don’t want to sit around staring at the screen waiting for digi-burps.

There is another possibility of the source of the glitches. It could be an aliasing issue where the ADC samples occasionally line up with the PWM rate. The ADC samples the channels at 10 kHz, each channel is being sampled 8/10,000 times per second. If the ADC samples happens to align with when the PWM is high or low, you can get some bogus values. I am going to put a biggish filter cap on the current sensor output and see if anything changes…

I put a filter on the output of the current sensor and did a couple of full runs… no more glitches.

The light is PWMing at around 8 kHz and I was sampling it at a little more than 1 kHz… not a good thing. You need to sample an 8 kHz signal faster than 16 kHz or you can run into trouble.

I had misread the effect of the FILTER pin on the ACS712 current sensor. It was passing a nice looking 8 kHz current waveform to the ADC.

I’d love to have this thing be able to measure the driver PWM freq… Hmmm…. I’m pretty sure that I know how…

This is gonna be one helluva gizmo when you're done with it.

Do you think average people will be able to operate it and do you take paypal??

Average people? No way, they are afraid of the dark and can’t even walk and chew gum at the same time!

Flashaholics? If you can mod a light, this should be a piece ’o cake. If you can’t mod a light, well you don’t need one and have no business trying to use it.

And yes, I do paypal…

I did kludge up a little test circuit and it indeed can measure the PWM freq by monitoring the battery (or LED) current. I already had the frequency measurement code in there since that TAOS color sensor outputs light intensity readings as a frequency.

Hmm. I was thinking about getting 2 units. One for me and one for a fellow flashaholic. But it sound like he has no need for it. Better only have one then :-)

Thanks for building these. If it does what I think it does it'll be the "Flashaholics electronic geek gadget" of the decade. But you already know that right? ;-)

If it wasn’t, I wouldn’t be building it… It slices, it dices, it makes Julienne fries! But wait! There’s more!

And by modding a light, I don’t mean just changing an o-ring or rubber switch boot. You really should be comfortable soldering and mucking around with drivers and such. Still, a noob could use the just temperature and light measuring functions and not run into any problems.

I got in a little board with the color sensor chip. Seems to work, I get readings that seem to change with the color of the object it is pointed at. The trick will be converting the readings into a lux value and color temperature estimate. It would be nice if the color sensor chip could be used instead of the lux sensor chip…

I see how that would be a neat trick to cut down cost and size at the same time. Keep it up :-)

It looks like the color sensor chip saturates at a fairly low level. As a lux sensor it probably tops out at around 20,000 lux.

I did some playing with the color sensor. I don’t think it will do a good job estimating color temperature, but it does give some interesting info. Most cool white LEDs show a 33%/33%/33% split between RED/GREEN/BLUE Some of cheaper/bluer Chinese ones do show a higher blue percentage.

I tried three high-CRI leds:
3200K Sylvania 10W PAR20 95 CRI: 59/22/19%
Nichia 219 4000K: 48/26/26%
4 Sevens Quark Mini 123 (XML?) 3200K?: 55/24/21%

Those high-CRI LEDs get their high-CRI goodness by boosting the RED considerably. I looked at the phosphor of one of the LEDs under a magnifier and you can see chunks of red granules in it.

I may wind up using an ATMEGA644 processor chip instead of the ATMEGA328P It has more pins and features available.

I have absolutely no interest in buying whatever you’re making, but the process of making it has been fascinating! Thanks!

I keep expecting to see an update that this thing will walk my dogs and wash the cars too.

Thanks for all of the work on this project - I DO want one.

Wow after reading all of this the other day was amazed at the process and brains that BLF members have! Great work, smart people live in Texas!!!


This what me and my computer felt like after reading…. :bigsmile:

Looking at the processor prices, the ’324, ’644, and ’1284 chips are all the same price. I might as well go with the ’1284 chip. It has 128K of program memory and 4K of EEPROM. It’s sort of a waste since the code right now is less that 20K. The 4K of EEPROM might come in handy to store that 2K table that compensates the ADC readings for the high impedance voltage dividers.

You’re using an EIGHT DOLLAR micro? Yikes. For those prices, use a PSoc - By FAR the best analog in the uC business.

PSOC 3
Up to 67 MHz, 33 MIPS
Flash 8 KB to 64 KB
SRAM 2 KB to 8 KB
Operation 0.5V to 5.5V

1 Delta-Sigma ADC (8 to 20-bit)
192 ksps @ 12-bit
Voltage Precision ±0.1%
Up to 4 dedicated DACs (8-bit)

Nope, it’s a $4 micro…