source code of /projects/light-sensor/index.html.src
Last modified | |
Lines | 76 |
Parent directory Download CGIread sitemap Main page
__HTML5__
<title>Bloody light sensor</title>
<meta name="description" content="Analog light sensor"/>
</head>
<body>
__NAVIGATION__
<main><div id="content">
<h1 id="title">Analog light sensor</h1>
<p>This is a report on an assignment for a course in process measurement
technology at Novia UAS. The task is to design, simulate, construct,
test and calibrate an analog illuminance sensor based on an LDR.</p>
<ul>
<li><a href="light-sensor-part-1-design.pdf"
>Report part 1: Design</a></li>
<li><a href="light-sensor-part-2-testing.lowres.pdf"
>Report part 2: Construction, testing, and calibration</a>
<a download="" href="light-sensor-part-2-testing.pdf"
>(Download high quality version)</a></li>
<li><a href="https://gitlab.com/osksko-novia/light-sensor"
>Browse the project files on GitLab</a> or
<a href="/archive/light-sensor/light-sensor.tar.xz" download=""
>download entire project as compressed tape archive</a></li>
</ul>
(Downloads are throttled, go make a cup of coffee)
<h2>Sneak peek at the schematic</h2>
<img src="schematic.png" alt="(Picture of schematic)"/>
<h2>LDR characteristic curve</h2>
<p>It's surprisingly difficult to find any information about
resistance/illuminance characteristics for photoresistors/LDRs.
At best you get a straight line on a log-log graph which looks
too good to be true considering that datasheets specify at which
illuminance the gamma value is measured.</p>
<p><var>R = R<sub>10</sub>*(10/E)<sup>gamma</sup></var></p>
<p><var>R</var> is the resistance, <var>R<sub>10</sub></var> is the
resistance at 10 lux, <var>E</var> is the illuminance and gamma is a
"constant"</p>
<p>Datasheets tend to define
<var>gamma = log<sub>10</sub>(R<sub>10</sub>/R<sub>100</sub>)</var></p>
<p>
Adafruit is the only source I've found with <a class="print"
href="https://cdn-learn.adafruit.com/downloads/pdf/photocells.pdf#page=6"
>more detailed information about typical characteristics of LDRs:</a>
slightly curvy traces on a log-log plot. I meant to add this as a
reference in part 2, but unfortunately I forgot about and I don't feel
like making any more late ammendments.</p>
<h3>Own "research"</h3>
<p>The sensor is designed to translate conductance (the inverse of
resistance) directly into a voltage: <var>U = k/R</var></p>
<p>Approximate model:
<var>log<sub>10</sub>(U) = a*log<sub>10</sub>(E)<sup>2</sup>
+ b*log<sub>10</sub>(E) + c</var></p>
<img src="curve.svg" alt=""/>
<p>A lot more details are in the second PDF</p>
<p>The inverse formula is a bit more funny:</p>
<img src="formula.svg"
alt="Sprechen Sie LaTeX?
$$ E = 10^(\frac{0.789-\sqrt{0.488-0.124 log_{10}(U)}}{0.0621}) $$
E is the illuminance in lux, U is the voltage in volts. $E \pm 9.4\%$"
/>
<p>I like to call this "unevenly engineered". If it was over-engineered
it wouldn't use a sucky LDR and have a sucky 10% accuracy.</p>
<h2>Copyright</h2>
<p>I won't bother cluttering the reports any further with explicit
permissions unless someone actually wants permission to use them.
If you do please send me a message and I'll do something about it.</p>
<p>I also may have to do something about one of the images, I'd rather
make an equivalent myself than trusting fair use if I were to open source
this project.</p>
</div></main>
__FOOTER__
</body>
</html>