Any interest in a LED/Battery analyzer device?

209 posts / 0 new
Last post

Pages

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Any interest in a LED/Battery analyzer device?

I am building a device for analyzing batteries, LEDs, drivers, flashlights. As planned it would have:

2 × 30 amp hall effect current sensors (< 2 milliohm burden resistance)

2 x type K thermocouples (good to 1000 degrees C!)

Battery and LED voltage monitoring (up to say 50 volts)

LVC cutoff FET for the battery

Light sensor input (digital and analog sensors supported, 50K-100K lux, integrating sphere supported)

RS232 link to computer / monitoring, graphing, logging software

It should be able to measure/calculate just about anything you would want to know about your batteries, drivers, LEDs, flashlights, etc

Projected cost would be in the $100 range.

Now, how many people out there will actually buy one? Serious people only, please… tire kickers, cheapskate weenies, skid row bums, etc need not answer.

Edited by: Anonymous (not verified) on 08/23/2012 - 16:06
wshyang
Offline
Last seen: 8 years 2 months ago
Joined: 07/19/2012 - 03:35
Posts: 118

What about the software package?

$100 is reasonable. I mean, I just ordered a CBA IV Smile

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
wshyang wrote:
What about the software package?

Would come with it… open source.

Bort
Bort's picture
Online
Last seen: 3 min 20 sec ago
Joined: 06/01/2012 - 17:15
Posts: 7625
Location: Holding the proverbial flashlight

Many computers don’t have RS232 anymore, how about usb?

The Journal of Alternative Facts TM

"It is critical that there is a credible academic source for the growing and important discipline of alternative facts. This field of study will just keep winning, and we knew that all the best people would want to be on board. There is a real risk in the world today that people might be getting their information about science from actual scientists"

 

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Bort wrote:
Many computers don’t have RS232 anymore, how about usb?

Use a converter dongle…

Pinetreebbs
Pinetreebbs's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 07/29/2012 - 10:39
Posts: 588
Location: South Carolina, USA, Earth

I’m most definitely a cheapskate but I am interested at a cost close to $100.

PilotPTK
Offline
Last seen: 7 years 4 months ago
Joined: 09/04/2011 - 21:53
Posts: 1736
Location: Michigan, USA
Bort wrote:
Many computers don’t have RS232 anymore, how about usb?

Agreed. Throw down a CP2102 or FT232 and it’s usable on every desktop, laptop, netbook and tablet.

Oh, and I’m in for at least one.

PPtk

I am currently extremely busy with work. Please do not expect a response from me quickly. I will be dropping in as time permits, but the amount of time I can dedicate to responding to topics and PMs is very limited.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I started playing with some code for the device and actually have most of it working. A few preliminary design decisions:

Current range is +/- 30 amps with milliamp resolution. Isolated, very low burden hall effect sensors. Measures battery current and LED current.

Voltage range is 50 volts with millivolt resolution. Only measures positive voltages (referenced to the driver negative input (i.e. battery negative)). Measures battery voltage and LED voltage (simultaneously measures the voltage at each end of the LED and subtracts the readings to get the LED Vf)

Two type K thermocouples via MAX6675 chips (usable with type T). Range is 0 to 1023.75 degrees C

Processor is an Atmel ATMEGA328 (with Aurduino bootloader for firmware upgrades)

Computer interface is RS232 (or USB with an adapter dongle). Communications format is Trimble TSIP binary compatible (used on Trimble GPS equipment) since the Windows control program is based upon something that I wrote for controlling Trimble GPS disciplined oscillators.

Connections to the LED/driver/battery are via short heavy gauge pigtails with Deans connectors.

Analog light sensor is the head off of a cheap Chinese lux meter.

Digital light sensor is a Rohm BH1750

From all the measurements it can fully characterize the battery, LED, driver efficiency, etc Should be fun…

Chicago X
Chicago X's picture
Offline
Last seen: 7 years 11 months ago
Joined: 07/22/2011 - 16:13
Posts: 4013
Location: See Name

Will it be able to put lithium primaries under load to determine capacity ?

http://wardogsmakingithome.org/index.html

War Dogs, Making it Home - Rescue Dogs for Returning Vets

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Chicago X wrote:
Will it be able to put lithium primaries under load to determine capacity ?

Most definitely. The load can be any driver/led or a power resistor.

It does not have a true constant current or power load capability like a CBA 3 or 4, but it could easily be set up to do that by PWMing the load resistor. There is a high current FET switch in series with the battery input (used for LVC/HVC shutdown).

Other uses of the board could be a high power boost converter (add an inductor/diode/filter cap) or something like a controller for a composite materials curing oven. At 50V/30 amps, it can handle 1500 watts. The basic design is very flexible. I use something very similar in my 15,000 lumen/150 watt Bridgelux drivers.

wquiles
Offline
Last seen: 4 years 3 months ago
Joined: 04/07/2012 - 09:09
Posts: 79
Location: United States

Sounds really interesting – subscribed Smile

Will

Custom machining and electronics - www.atdms.com  Email: wquiles (at) gmail [dot] com

Chicago X
Chicago X's picture
Offline
Last seen: 7 years 11 months ago
Joined: 07/22/2011 - 16:13
Posts: 4013
Location: See Name

As long as I don’t need to write any code, I’m very interested.

http://wardogsmakingithome.org/index.html

War Dogs, Making it Home - Rescue Dogs for Returning Vets

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I found some current sensor chips that go to 50 and 100 amps… they do cost twice what the 30A ones do. They also have 1/10th the burden resistance of the smaller chips (130 micro-ohms!). Using the 100A sensors, the current resolution might be 5 mA… decisions, decisions, decisions…

I slung some more code today. I am doing the work on a MegaDonkey LCD touchscreen micro controller for now. I have some current sensors and thermocouple amps on the way from Old Cathay.

I can now send TSIP messages to the board and it responds properly. I also did some hacking to the Windows control program and have it talking to the thing… there’s gonna be a bunch of crapwork involved working over the GPSDO controller user interface.

PilotPTK
Offline
Last seen: 7 years 4 months ago
Joined: 09/04/2011 - 21:53
Posts: 1736
Location: Michigan, USA

The ACS756 is a really nice part. I use it for lots of things.

PPtk

I am currently extremely busy with work. Please do not expect a response from me quickly. I will be dropping in as time permits, but the amount of time I can dedicate to responding to topics and PMs is very limited.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

PilotPTK wrote:
The ACS756 is a really nice part. I use it for lots of things.

PPtk

That’s the big guy…

The ACS712 series is the lower current one. It is in a SO-8 package. It should be easy to lay out the board for either one.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I got in some of the MAX6675 thermocouple processor chips. They seem to work very well! The temperature readings agree with my Wahl thermocouple calibrator within 1 degree F… not too shabby.

The way that I am processing the readings, I get a resolution of around 1/8 degree C. You can easily see the temp change in the room if I open the refrigerator door to get a beer. You can also detect the body heat given off by a person entering the room (as long as the air conditioner isn’t cycling).

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I’ll probably not implement the analog light sensor (using heads removed from cheap lux meters as the sensor). There are better uses for the required pins and ADC channel on the microcontroller. Plus, my testing of the photodiode amplifier circuit that those meters use is not encouraging…

I do have the code for attaching two of the digital sensors written.

Also it auto-detects the thermocouple amplifier types (MAX6674 or MAX6675).

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I added a couple of 10:1 voltage dividers to the ADC inputs on my prototype so that I can measure voltages higher than 5V (i.e. 50 volts). I used 90K/10K ohm resistors and ran into a small problem. The ADC (analog to digital converter) in the micro controller works by first charging an internal sampling capacitor to store the input voltage while it makes the measurement.

They say the the chip is optimized for a 10K ohm source and I am using a 90K source. The problem is that the chip can’t charge the sampling capacitor fast enough at low input voltages. A 1.60V AA cell was measuring 1.450V and a 0.10V source was measuring as 0.035V. Signals over 10V or so were pretty much correct. The measurement error is exponential (increases dramatically at low voltages) and not linear. The simple solution was to add a calibration lookup table to compensate for the funky readings. Now all the readings are within around 0.5% accurate (with millivolt resolution).

I did some more testing with the recommended 10K source impedance and found that the readings were also at least 2% low. Without an input resistor they were spot on. So much for trusting chip maker’s data sheets… people using AVR chips to measure low/high impedance voltages need to be aware of the issue.

PilotPTK
Offline
Last seen: 7 years 4 months ago
Joined: 09/04/2011 - 21:53
Posts: 1736
Location: Michigan, USA

Not sure if you require extremely high speed acquisition or high sample rates, but our solution to the crappy AVR ADC has always been to simply slow down the ADC clock and give the cap time to charge.. If we require high speed ADC, we don’t use AVR.

I suspect you’ll find look-up tables to be highly error-prone. The chips vary greatly in how far they’re off when you don’t give the sample cap time to charge.

Additionally, You’ll almost certainly have to calibrate the readings for reference voltage (unless you’re using an external ADCVref) as the ATMega328 has a terrible internal reference (1.1V nominal with a tolerance range from 1.0V to 1.2V).

PPtk

I am currently extremely busy with work. Please do not expect a response from me quickly. I will be dropping in as time permits, but the amount of time I can dedicate to responding to topics and PMs is very limited.

Lothar
Lothar's picture
Offline
Last seen: 38 min 52 sec ago
Joined: 10/26/2011 - 11:22
Posts: 546
Location: Stellenbosch, South Africa

Will it be able to measure/calculate the tint (Kelvin) of the LED?

Current Collection:

BLF: BLF-GT90, BLF-GT70 (CW Sliced), BLF GTmini, BLF-LT1; 

BTU: Shocker (3 x SST-40 @ 8A)

Solarforce: L2P (XM-L2 U3 @ 4A), MPP-1 (XP-L HI @ 6A), MPP-3 (3 x XM-L2 U2 @ 12A), M6 (Nichia 319A @ 6A), M8 (XHP-50.2 @ 9A), 9x (9 x XM-L2 U2 @ 2A)

Coming Soon: Lumintop: BLF-GT4; 

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Lothar wrote:
Will it be able to measure/calculate the tint (Kelvin) of the LED?

Nope… that would take a spectrometer to do correctly.

Hikelite
Offline
Last seen: 2 months 4 weeks ago
Joined: 07/13/2011 - 16:18
Posts: 3888
Location: Honeyland

Lothar wrote:
Will it be able to measure/calculate the tint (Kelvin) of the LED?

Under the same Kelvin temperature you have various tints, Let's say 5700K, you have 2S and 2R one is Green and one is Pink. So by knowing the Kelvin you still do not know how it looks.

 

 

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

PilotPTK wrote:
Not sure if you require extremely high speed acquisition or high sample rates, but our solution to the crappy AVR ADC has always been to simply slow down the ADC clock and give the cap time to charge.. If we require high speed ADC, we don’t use AVR.

I suspect you’ll find look-up tables to be highly error-prone. The chips vary greatly in how far they’re off when you don’t give the sample cap time to charge.

Additionally, You’ll almost certainly have to calibrate the readings for reference voltage (unless you’re using an external ADCVref) as the ATMega328 has a terrible internal reference (1.1V nominal with a tolerance range from 1.0V to 1.2V).

PPtk

I have a reference voltage calibration factor in there… it currently uses the 5V Vcc as the reference. I could use the internal bandgap. It’s pretty good, as long as you measure it and don’t just assume what its value is. I’d have to put voltage dividers on the current reference chips to do that (and would lose the ratiometric goodness of driving them with the ADC reference voltage)

I am trying to sample the ADC at 10 kHz. Each of the six channels are sequentially sampled (1667 samples a second). The samples are averaged over 1 second intervals to get an effective 15 bit resolution.

I am going to play with slowing the sample rate down and see how that works out. I tried sampling each channel multiple times in a row, but it looks like they zero the sampling cap each sample.

The lookup table is used more for the shape of the error curve, not exact calibration numbers. Absolute errors can be handled by the reference voltage calibration factor. I could also automatically generate a custom table for each individual chip.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
PilotPTK wrote:
but our solution to the crappy AVR ADC has always been to simply slow down the ADC clock and give the cap time to charge..

I checked the code… the ADC is already running as slow as it can (prescaler is divide by 128) with the 16 MHz CPU clock. Even slowing the system clock to 1 MHz did not help. Looks like the software compensation is going to be the way to go.

PilotPTK
Offline
Last seen: 7 years 4 months ago
Joined: 09/04/2011 - 21:53
Posts: 1736
Location: Michigan, USA
texaspyro wrote:
PilotPTK wrote:
but our solution to the crappy AVR ADC has always been to simply slow down the ADC clock and give the cap time to charge..

I checked the code… the ADC is already running as slow as it can (prescaler is divide by 128) with the 16 MHz CPU clock. Even slowing the system clock to 1 MHz did not help. Looks like the software compensation is going to be the way to go.

That’s really wierd. I’ve had issues with AVR ADC’s, but never anything that couldn’t be fixed by slowing them down. This sounds more like an ohm’s law problem (AKA Voltage drop accross the resistor). Do you have one of the other peripherials turned on (Digital Input, maybe?) that could be leaking some current to ground and causing a delta V across your input resistor (ie, acting as a voltage divider)?

I am currently extremely busy with work. Please do not expect a response from me quickly. I will be dropping in as time permits, but the amount of time I can dedicate to responding to topics and PMs is very limited.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
PilotPTK wrote:
Do you have one of the other peripherials turned on (Digital Input, maybe?) that could be leaking some current to ground and causing a delta V across your input resistor (ie, acting as a voltage divider)?

Nope, DIDR reg has the digital inputs disabled and the internal pullups are disabled. I measured the input leakage current on the ADC pins and it is in the low nanoamp range.

I may go to a lower impedance voltage divider to lower the error, but it still needs to be compensated for. A 10K input impedance is pushing the power dissipation limits of 1/4 watt resistors, so 20K would be as low as I would like to go. Since one of the dividers is connected directly across the battery input, I’d like to keep the impedance high so that it would not drain a cell as fast if one accidentally left a battery connected for an extended period of time. 20K would draw around 5 mAh a day from a single lithium cell.

PilotPTK
Offline
Last seen: 7 years 4 months ago
Joined: 09/04/2011 - 21:53
Posts: 1736
Location: Michigan, USA

Very strange. Personally, I guess I’d nix the ATMEGA and replace with, oh, I dunno, maybe a PIC24? That’s actually one of my go-to chips when I need reasonable speed and good analog functionality.

I am currently extremely busy with work. Please do not expect a response from me quickly. I will be dropping in as time permits, but the amount of time I can dedicate to responding to topics and PMs is very limited.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
PilotPTK wrote:
Very strange. Personally, I guess I’d nix the ATMEGA and replace with, oh, I dunno, maybe a PIC24? That’s actually one of my go-to chips when I need reasonable speed and good analog functionality.

I’m too set up for doing AVR’s at the moment to change…

If you find yourself with some time and an AVR, try reading an ADC channel. Drive it with a AA/AAA cell (or even better something below 0.5V). Take readings through 0, 10K, and 100K resistors and see what happens…

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593

I just ordered a 16” sphere from Barnards to go with my LED analyzer project . The price is quite reasonable (go up a couple of inches and it’s no quite so). http://www.barnardltd.com/product.jsp?prodId=1878&catId=950 No way you could justify making your own sphere at that price.

If it works out, I’ll probably get a 24” one.

texaspyro
Offline
Last seen: 1 year 11 months ago
Joined: 04/29/2011 - 12:43
Posts: 4593
Lothar wrote:
Will it be able to measure/calculate the tint (Kelvin) of the LED?

Actually, it may be able to do so! I’m looking at supporting the Taos color sensor chips. It can measure the light output in the red, green, and blue bands. With that data, one could probably cobble together a color temperature value. No telling how accurate, though.

resley.elvisp
Offline
Last seen: 7 years 10 months ago
Joined: 08/26/2011 - 15:43
Posts: 37
Location: Sweden

I would prefer having the sensor parts as an open source HW Arduino shield.
That maybe would trigger this community to write fantastic applications for battery/flashlight analysis?

I would also like to bring up the topic of absolute and relative accuracy.
What is good enough? Personally I am really not interested in extreme accuracy or resolution.
Is it really necessary to have millivolt resolution?

ATMEGA328 with an external Vref is fine with me.

Pages