|
-
Dec 4th, 2009, 04:01 AM
#1
Thread Starter
Lively Member
Conversion of Voltage to LUX
-
Dec 4th, 2009, 04:11 AM
#2
Re: Conversion of Voltage to LUX
You shouldn't really be getting the voltage from the TextBox. You must have had a numerical value in the first place in order to display it in the voltage TextBox. It's that numerical value that you should be multiplying by your conversion factor. Ideally you would then convert the result to a String before displaying it:
vb.net Code:
TextBoxVoltage.Text = voltage.ToString() TextBoxLux.Text = (voltage * 1333).ToString()
The Text property of a TextBox is type String so, ideally, you should be assigning a String to it. With Option Strict Off the system will make the conversion implicitly. The sooner you turn Option Strict On and force yourself to make conversions explicit the better because you'll learn better habits and your code will perform better and be less brittle.
That said, your conversion isn't going to be a simple multiplication by a constant like that. That only applies to that specific piece of equipment. Think about it. If lux is a measure of luminous emittance then it can't be a linear relationship to voltage. Different light sources are going to emit different levels of illumination for the same voltage. That page says:
Coupled to a 10Kohm resistor, and given the specification of the BPW34
You would need to determine the conversion factor that applies to your own combination of resistor and photodiode or whatever equipment you're using.
-
Dec 4th, 2009, 05:23 AM
#3
Re: Conversion of Voltage to LUX
Since I know from other threads that Catherine is working with a solar cell, I have some good news and some bad news. First of all, the good news:
An important feature of solar cells is that the voltage of the cell does not depend on its size, and remains fairly constant with changing light intensity.
So there's no point in doing a conversion.
And now for the bad news:
However, the current in a device is almost directly proportional to light intensity and size.
So maybe you should have built an ammeter after all.
How did I know this? Mr. Google and http://www.solarbotics.net/starting/..._cell_use.html
bye, BB
-
Dec 4th, 2009, 11:07 AM
#4
Re: Conversion of Voltage to LUX
Yes.
A solar device is a current source and not a voltage source.
-
Dec 4th, 2009, 11:33 AM
#5
Re: Conversion of Voltage to LUX
 Originally Posted by boops boops
And now for the bad news:
So maybe you should have built an ammeter after all.
I was kidding about it being bad news. Your analogue voltmeter will work equally well as an ammeter, as long as you can feed it an amps measurement instead of volts. (And you change the text from Volts to Amperes, of course .)
Maybe you can get hold of a manufacturer's data sheet for the solar cell, to see if it gives a conversion factor for Lux to Amps for that type of cell. If you can find the information, doing the conversion in VB.Net will be easy.
bye, BB
-
Dec 5th, 2009, 07:04 AM
#6
Thread Starter
Lively Member
Re: Conversion of Voltage to LUX
Arh... Ok.. I understand what you all mean already.
Will take note of it. =)
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|