<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I’m testing out LEDs as a substitute for the expensive UV photodiode in my UVI business card. I’ve found a good one, in terms of visible light blindness and UV-A response. However, it outputs a bit more voltage than the internal 2.56 vref of the ATTINY85 above a UVI of 5. It works great with a 3.3v ref, but even a fresh coin cell is only 3.2v.<div class=""><br class=""></div><div class="">I can knock it down with a divided negative feedback op-amp arrangement, which isn’t expensive, but I’m trying to make this as cheap as possible.</div><div class=""><br class=""></div><div class="">I tried a 10K 1/2 voltage divider, but that was too much of a drag on the tiny current from the LED. I have a feeling going higher than 10K is not a good idea with the ATTINY ADC.</div><div class=""><br class=""></div><div class="">It is possible to have the ATTINY read it’s own voltage, and then use that with Vcc connected to AREF, but I know from practice that the bandgap measurement has pretty poor accuracy.</div><div class=""><br class=""></div><div class="">Looks like external voltage reference is no-go; they’re way too expensive.</div><div class=""><br class=""></div><div class="">So, op amp it is? 1.0K 1% resistor is cheap, and a 1.2K 1% is a few pennies more. That would give me -0.833 gain which would work within the 2.56V AREF.</div><div class=""><br class=""></div><div class="">Alex</div><div class=""><br class=""></div><div class=""><div class=""><div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|</div><div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |</div><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class=""></div></body></html>