<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>how about an orange?</title>
<link rel="alternate" type="text/html" href="https://howaboutanorange.com/blog/" />
<link rel="self" type="application/atom+xml" href="https://howaboutanorange.com/blog/index.xml" />
<id>http://howaboutanorange.com/feeds/blog</id>
<updated>2026-02-22T15:25:40Z</updated>
<author><name>Mats Mattsson</name></author>
<rights>Copyright (c) 2026, Mats Mattsson</rights>
<entry>
<id>tag:howaboutanorange.com,2011:2026-02-22-11-00-00</id>
<title>LED Exponential Current Control</title>
<link rel="alternate" type="text/html" href="https://howaboutanorange.com/blog/2026/led_exp_current_control/" />
<published>2026-02-22T11:00:00Z</published>
<updated>2026-02-22T11:00:00Z</updated>
<author><name>Mats Mattsson</name></author>
<content type="html" xml:base="https://howaboutanorange.com/blog/2026/led_exp_current_control/" xml:lang="en"><![CDATA[
<p>
Human vision is better at noticing a small change in brightness
for darker objects than lighter objects. This is a good thing,
but it makes it harder to create a brightness controller.
</p>
<p>
A naive circuit for brightness control will use most of its
range for bright values and very little for darker values. So
it is very hard to set a dim value.
</p>
<p>
Most models of human vision uses gamma-correction to fix this,
but it is hard to do using an analog electric circuit. Instead
an exponential correction can provide a similar result.
</p>
<p>
I put together an LED control circuit to test this:
</p>
<center><img src='https://howaboutanorange.com/blog/2026/led_exp_current_control/led_exp_cc_circuit.jpg' width='450' height='143' alt='LED exponential current control circuit diagram.'/></center>

<p>
The circuit built on a breadboard:
</p>
<center><img src='https://howaboutanorange.com/blog/2026/led_exp_current_control/led_exp_cc_breadboard.jpg' width='450' height='342' alt='LED exponential current control circuit on a breadboard.'/></center>

<h2>Notes</h2>

<p>
I tried several resistors and potentiometers to the input range for the
exponential amplifier.
</p>

<p>
The LMV358 operational amplifier minimum output level is typically 120mV.
This prevents it from generating a 0V control signal and to turn the LED fully off.
</p>

<p>
Voltage ranges:
</p>
<table>
<tr><th>Location</th><th>Range</th><th>Inverted</th></tr>
<tr><td>Potentiometer</td><td>2.78 - 2.98 V</td><td></td></tr>
<tr><td>Exponential amplifier</td><td>2.47 - 0.20 V</td><td>Yes</td></tr>
<tr><td>Inverting amplifier</td><td>0.10 - 2.28 V</td><td></td></tr>
<tr><td>Current control input</td><td>0.04 - 0.91 V</td><td></td></tr>
</table>

<h2>References</h2>
<ol>
<li>
	<cite>Gamma correction</cite>, Wikipedia.
	<a href='https://en.wikipedia.org/wiki/Gamma_correction'>https://en.wikipedia.org/wiki/Gamma_correction</a>
</li>
<li>
	<cite>LMV358 Operational Amplifier</cite>, Texas Instruments.
	<a href='https://www.ti.com/product/LMV358'>https://www.ti.com/product/LMV358</a>
</li>
<li>
	<cite>1N4003 Diode</cite>, Diotec Semiconductor.
	<a href='https://diotec.com/en/product/1N4003.html'>https://diotec.com/en/product/1N4003.html</a>
</li>

<li>
	<cite>BC548 NPN Bipolar transistor</cite>, Wikipedia.
	<a href='https://en.wikipedia.org/wiki/BC548'>https://en.wikipedia.org/wiki/BC548</a>
</li>
</ol>
]]></content>
</entry><entry>
<id>tag:howaboutanorange.com,2011:2024-10-18-10-00-00</id>
<title>Spectroscope Tear Down</title>
<link rel="alternate" type="text/html" href="https://howaboutanorange.com/blog/2024/spectroscope_tear_down/" />
<published>2024-10-18T10:00:00Z</published>
<updated>2024-10-18T10:00:00Z</updated>
<author><name>Mats Mattsson</name></author>
<content type="html" xml:base="https://howaboutanorange.com/blog/2024/spectroscope_tear_down/" xml:lang="en"><![CDATA[
<p>
I bought two spectrscopes and have illustrated how I think they work.
</p>
<p>
One of them is using a diffraction grating to separate light into different
wavelengths, while the other is using a prism to separate light using refraction.
</p>

<h2>Diffraction spectroscope</h2>
<p>
The spectroscope consists of an entrance slit, a collimating lens, and
 a diffraction grating. It is housed in an aluminium tube
and the ends are press fit into the tube. The slit and lens are held in place with
retaining rings and the grating is glued into place.
</p>
<center><img src='https://howaboutanorange.com/blog/2024/spectroscope_tear_down/Spectroscope grating.svg' width='450' height='225' alt='Grating spectroscope illustration.'/></center>
<p>
Photo of the dismantled spectroscope:
</p>
<center><img src='https://howaboutanorange.com/blog/2024/spectroscope_tear_down/Spectroscope grating.jpg' width='450' height='407' alt='Grating spectroscope tear down photo.'/></center>

<h2>Refraction spectroscope</h2>
<p>
The prism spectroscope consists of an entrance slit, a collimating lens, and
a stack of three prisms glued together.
</p>
<p>
The first and last prisms are made of low dispersion glass and the middle prism
is made of high dispersion glass.
</p>
<center><img src='https://howaboutanorange.com/blog/2024/spectroscope_tear_down/Spectroscope prism.svg' width='450' height='225' alt='Prism spectroscope illustration.'/></center>
<p>
Photo of the dismantled spectroscope:
</p>
<center><img src='https://howaboutanorange.com/blog/2024/spectroscope_tear_down/Spectroscope prism.jpg' width='450' height='420' alt='Prism spectroscope tear down photo.'/></center>

<h2>Comparison</h2>

<p>
The grating spectroscope shows a more uniform spectrum compared to the prism spectroscope
It is also harder to find the correct
position for the eye when using the prism spectroscope.
</p>
<p>
The prism spectroscope allows for adjusting the focus, which makes it possible
to see more detail in the spectrum.
</p>

<h2>References</h2>
<ol>
<li><cite>Abbe number</cite>, Wikipedia. <a href='https://en.wikipedia.org/wiki/Abbe_number'>https://en.wikipedia.org/wiki/Abbe_number</a></li>
<li><cite>Sellmeier equation</cite>, Wikipedia. <a href='https://en.wikipedia.org/wiki/Sellmeier_equation'>https://en.wikipedia.org/wiki/Sellmeier_equation</a></li>
<li><cite>M. N. Polyanskiy. <a href='https://refractiveindex.info'>Refractiveindex.info</a> database of optical constants.</cite> Sci. Data 11, 94 (2024) <a href='https://doi.org/10.1038/s41597-023-02898-2'>https://doi.org/10.1038/s41597-023-02898-2/</a></li>

</ol>
]]></content>
</entry>
</feed>