Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

PIC microcontroller 16 bit serial voltmeter

nospin

0
Joined
Feb 13, 2010
Messages
182
Points
0
I am looking for some help putting together data logging on my custom
LPM I will be selling

It has to have 0 to 5 volt capability at better than 8 bit resolution
to give a 4 digit readout IE ( 4.132 ) for a 1 mw resolution
as my meter can read 1mw to 5 watts. I know 8 bits is only good for 0 to 255
which is a 10 mw resolution.
My meter puts out .001 volt for 1mw and 5 volts for 5 watts
Right now I have a 4 1/2 digit display and that works perfect

any input would be great
Jim
 





Hey jim....

if you are going to be selling these LPMs...
why would anyone want to do the Research and
Development for your product for free so that you
can make profits in the future...:undecided:

Obviously it would be a bad business decision for us
to help you on this..:whistle:

How about some pics and more info so someone can
help you... Sounds like you're building a Kenometer
Lite..
What kind of Sensor are you using and what are you
using to calibrate your LPM...:thinking:


Jerry
 
Last edited:
Sounds like your a little paranoid Jerry...:mad:

The details will be out very soon!

Stay tuned
Jim
 
Last edited:
Sounds like your a little paranoid Jerry...:mad:

The details will be out very soon!

Stay tuned
Jim

Far from Paranoid..... No need to get mad..

I just can't see why we should feed you FREE information
for your project that you will sell for profit..

That is not ethical... It's called ripping someone off...
I haven't seen any offer of compensation...
Will you pay our monthly expenses or our Hourly R&D
rates...:thinking:

I don't know about anyone else... but our company
doesn't work for FREE... that is bad business sense...

I'll tell you what... I'll GIVE you the information you require
for FREE if you GIVE your LPM to the Forum members here
for FREE...


Jerry
 
Last edited:
Jerry
I have been involved in electronics continuously since 1965 when I built a diode
smart switch for a science fair entry

I built my first laser in 1982 and I still have it today!

in your posts the word we should be replaced with I as you don't
speak for everyone here!

Also these jabs look similar to the one's stuck in Kenom's side!

I will gladly compensate for the right ideas here

Jim
 
Jerry
I have been involved in electronics continuously since 1965 when I built a diode
smart switch for a science fair entry

I built my first laser in 1982 and I still have it today!

in your posts the word we should be replaced with I as you don't
speak for everyone here!

Also these jabs look similar to the one's stuck in Kenom's side!

I will gladly compensate for the right ideas here

Jim
I have not made mention to your electronic expertise..
that is not in question...

BTW.... I refer to J.BAUER Electronics in the plural at times
since I am not alone in the shop.

I take offense at you insinuating that I'm jabbing at
you or anyone else...

You asked for FREE help to make a personal Profit using
anyone's expertise that gives you the info gratis..
I still haven't seen an offer of compensation to anyone
that will help you make a profit from what you require..

I simply put what you posted in a clear perspective...
I'm sorry if you are offended by my fair evaluation of the facts
presented by you in your posts...

I'm sorry it is not what you want to hear... but it is my opinion
based on what you posted...

I am looking for some help putting together data logging on my custom
LPM I will be selling

It has to have 0 to 5 volt capability at better than 8 bit resolution
to give a 4 digit readout IE ( 4.132 ) for a 1 mw resolution
as my meter can read 1mw to 5 watts. I know 8 bits is only good for 0 to 255
which is a 10 mw resolution.
My meter puts out .001 volt for 1mw and 5 volts for 5 watts
Right now I have a 4 1/2 digit display and that works perfect

any input would be great
Jim


Good luck with that.....:cool:


Jerry
 
Last edited:
Free Laser Power meter for the best Tested design!!!!!!!!!!!!!!!!!!!!!!
 
Last edited:
...I will gladly compensate for the right ideas here...
Jerry jump a little less high, as you see it's not that he's asking us to work for free...

Nospin, you're simply put looking for an ADC with a 5V input range and better than 1mv resolution that can talk to a computer? A 12 bits ADC has 4096 counts, just a bit too low. Next stop is 16 bit (14 bit is a bit odd), but that gets more expensive. But would give 65536 counts, roughly 0.1mV resolution.

In theory this is just a microprocessor with an ADC chip and some software, but I didn't have the time lately to learn programming of uC and stuff, or I would've helpd you out :)
 
A 12 bit ADC might be usable with a little twist. Some of PIC uC's come with built in 12 bits dacs that can be configured to read between 0 and 5 volt supply voltage if you so desire.

It would give you only 4096 steps, whereas you require 5000, so its at least one bit short. These is a trick of sorts to get around it: Add a small noise (or triangle) signal to the voltage you are measuring, such that it effects about 1 or 2 of the least signficiant bits. Now take a number of samples, and use their average. A practical number of samples to average to gain 1 bit of resulotion this way is 4.

Since these DAC's are quite fast compared to how fast you'd need to update a display, i'd take 16. With 64 samples a second you can still have 0.25s time resolution with 13-14 bit accuracy. Adding up 16 12-bit samples would result in a value that is within a signed 2-byte integer in any case, so no need to do any complext calculation - just addition.

This approach is not a 'hack' per se, but its in fact a speed vs accuracy tradeoff that requires a bit of hardware intervention (to inject the noise/triangle signal). You could use an output pin of the pic and a RC network to get something thats close enough to a triangle to make this work, so it doesnt even require any additional active components. I'm sure you can find some good information on this online, since its a trick commonly used with uC's that are just a bit or two short of whats required.
 
Last edited:
Jerry jump a little less high, as you see it's not that he's asking us to work for free...

If he would have offered compensation to anyone that would help
him right from the start... I wouldn't even have mentioned anything...

The compensation was only offered after I posed the question...:cool:

@ benm.... actually the Heads he's using have a convection cooled max
range of 4Watts according to the Data Sheets.. so 12 bits would be
enough... IMO

It would give you only 4096 steps, whereas you require 5000, so its at least one bit short.


Jerry
 
Last edited:
I intended it as a generic solution when you lack a bit or two of resolution on a DAC. I have no idea about the hardware used here or its limitations.

Obviously the solution will only work if the sole thing you lack is dac resolution, if you already have problems with noise, limited ranges and such it won't be very valuable.
 
Nice trick benm, a small triangle wave is easily made by putting a square wave though a low pass filter. I always though PIC's only went up to 10 bit ADC, I'd have to look again.
 
As far as i know some of the PIC18 family chips have 12 bit adc's. The typical 16f877 only supports 10 bits, which would be problematic in this application, unless you can affort to take a lot (say 64) of samples and average them.
 
The LaserBee I needs to use a 12 bit ADC to accurately read 1000mW...


Jerry
 
You probably do some conversion in software though, right?

If the response from your sensor is not linear with laser power, you will require additional accuracy to remain within 1 mW steps over the whole range. If there is any non-linearity, you need to have a resolution that reads <1 mW increments in the most shallow region of the response curve.

Since i have no idea about the sensor being used here or its response curve, i cannot guarantee that you would be able to read 0-5000 mW in 1 mW steps even if you had 13 bits (8192 steps) resolution, though it would have to be fairly bad for that not to suffice.

Rule of thumb is you need a 4 fold increase in number of samples for every bit you 'smuggle' on with this approach. So from 12 to 13 bits it takes 4 samples, 12 to 14 takes 16, and 12 to 15 would take 64... though this doesnt really work to infinity in practice. I'd say adding 3 bits is the practical limit.
 


Back
Top