source code of /projects/light-sensor/index.html.src

Last modified
Lines 76

Parent directory Download CGIread sitemap Main page

Quick links: content title

  1. __HTML5__
  2.         <title>Bloody light sensor</title>
  3.         <meta name="description" content="Analog light sensor"/>
  4.     </head>
  5.     <body>
  6. __NAVIGATION__
  7. <main><div id="content">
  8.     <h1 id="title">Analog light sensor</h1>
  9.     <p>This is a report on an assignment for a course in process measurement
  10.         technology at Novia UAS. The task is to design, simulate, construct,
  11.         test and calibrate an analog illuminance sensor based on an LDR.</p>
  12.     <ul>
  13.         <li><a href="light-sensor-part-1-design.pdf"
  14.             >Report part 1: Design</a></li>
  15.         <li><a href="light-sensor-part-2-testing.lowres.pdf"
  16.             >Report part 2: Construction, testing, and calibration</a>
  17.             <a download="" href="light-sensor-part-2-testing.pdf"
  18.             >(Download high quality version)</a></li>
  19.         <li><a href="https://gitlab.com/osksko-novia/light-sensor"
  20.             >Browse the project files on GitLab</a> or
  21.             <a href="/archive/light-sensor/light-sensor.tar.xz" download=""
  22.             >download entire project as compressed tape archive</a></li>
  23.     </ul>
  24.     (Downloads are throttled, go make a cup of coffee)
  25.     <h2>Sneak peek at the schematic</h2>
  26.     <img src="schematic.png" alt="(Picture of schematic)"/>
  27.     <h2>LDR characteristic curve</h2>
  28.     <p>It's surprisingly difficult to find any information about
  29.         resistance/illuminance characteristics for photoresistors/LDRs.
  30.         At best you get a straight line on a log-log graph which looks
  31.         too good to be true considering that datasheets specify at which
  32.         illuminance the gamma value is measured.</p>
  33.     <p><var>R = R<sub>10</sub>*(10/E)<sup>gamma</sup></var></p>
  34.     <p><var>R</var> is the resistance, <var>R<sub>10</sub></var> is the
  35.         resistance at 10 lux, <var>E</var> is the illuminance and gamma is a
  36.         "constant"</p>
  37.     <p>Datasheets tend to define
  38.         <var>gamma = log<sub>10</sub>(R<sub>10</sub>/R<sub>100</sub>)</var></p>
  39.     <p>
  40.         Adafruit is the only source I've found with <a class="print"
  41. href="https://cdn-learn.adafruit.com/downloads/pdf/photocells.pdf#page=6"
  42.         >more detailed information about typical characteristics of LDRs:</a>
  43.         slightly curvy traces on a log-log plot.  I meant to add this as a
  44.         reference in part 2, but unfortunately I forgot about and I don't feel
  45.         like making any more late ammendments.</p>
  46.     <h3>Own "research"</h3>
  47.     <p>The sensor is designed to translate conductance (the inverse of
  48.         resistance) directly into a voltage: <var>U = k/R</var></p>
  49.     <p>Approximate model:
  50.        <var>log<sub>10</sub>(U) = a*log<sub>10</sub>(E)<sup>2</sup>
  51.                                 + b*log<sub>10</sub>(E) + c</var></p>
  52.     <img src="curve.svg" alt=""/>
  53.     <p>A lot more details are in the second PDF</p>
  54.     <p>The inverse formula is a bit more funny:</p>
  55.     <img src="formula.svg"
  56.         alt="Sprechen Sie LaTeX?
  57.         $$ E = 10^(\frac{0.789-\sqrt{0.488-0.124 log_{10}(U)}}{0.0621}) $$
  58.         E is the illuminance in lux, U is the voltage in volts. $E \pm 9.4\%$"
  59.     />
  60.     <p>I like to call this "unevenly engineered". If it was over-engineered
  61.         it wouldn't use a sucky LDR and have a sucky 10% accuracy.</p>
  62.     <h2>Copyright</h2>
  63.     <p>I won't bother cluttering the reports any further with explicit
  64.     permissions unless someone actually wants permission to use them.
  65.     If you do please send me a message and I'll do something about it.</p>
  66.     <p>I also may have to do something about one of the images, I'd rather
  67.     make an equivalent myself than trusting fair use if I were to open source
  68.     this project.</p>
  69. </div></main>
  70. __FOOTER__
  71.     </body>
  72. </html>