summaryrefslogtreecommitdiff
path: root/content/posts/multichannel-led-driver
diff options
context:
space:
mode:
authorjaseg <git@jaseg.net>2018-05-21 13:17:30 +0200
committerjaseg <git@jaseg.net>2018-05-21 13:17:30 +0200
commitdd025431a0c6f994509d374b7c416df2cedd9497 (patch)
treeb07c5ed5457b6710607b0d36241d5365012bbf47 /content/posts/multichannel-led-driver
parent7bc656ca2a026d91a845dd4d8bfeb812021cdf4d (diff)
downloadblog-dd025431a0c6f994509d374b7c416df2cedd9497.tar.gz
blog-dd025431a0c6f994509d374b7c416df2cedd9497.tar.bz2
blog-dd025431a0c6f994509d374b7c416df2cedd9497.zip
Add a few links and fix a spelling mistake
Diffstat (limited to 'content/posts/multichannel-led-driver')
-rw-r--r--content/posts/multichannel-led-driver/index.rst47
1 files changed, 23 insertions, 24 deletions
diff --git a/content/posts/multichannel-led-driver/index.rst b/content/posts/multichannel-led-driver/index.rst
index 8d5ad42..7de03d5 100644
--- a/content/posts/multichannel-led-driver/index.rst
+++ b/content/posts/multichannel-led-driver/index.rst
@@ -1,7 +1,6 @@
---
title: "32-Channel LED tape driver"
date: 2018-05-02T11:31:14+02:00
-draft: true
---
Theoretical basics
@@ -238,20 +237,19 @@ driver.
due to feed-through of the ringing at the output through the MOSFET's parasitic Cgd.</figcaption>
</figure>
-We were able to reduce the rining and limit the effect somewhat by
-putting a 220Ω series resistor in between the shift register output and the MOSFET gate. This resistor forms an RC
-circuit with the MOSFET's nanofarad or two of gate capacitance. The result of this is that the LED current passing the
-wire's ESL rises slightly more slowly and thus the series inductance gets excited slightly less, and the overshoot
-decreases. Below is a picture of the waveform with the dampening resistor in place and a picture of our measurement for
-comparison. The resistor values don't agree perfectly since the estimated ESL and stray capacitance of the wiring is
-probably way off.
+We were able to reduce the rining and limit the effect somewhat by putting a 220Ω series resistor in between the shift
+register output and the MOSFET gate. This resistor forms an RC circuit with the MOSFET's nanofarad or two of gate
+capacitance. The result of this is that the LED current passing the wire's ESL rises slightly more slowly and thus the
+series inductance gets excited slightly less, and the overshoot decreases. Below is a picture of the waveform with the
+damping resistor in place and a picture of our measurement for comparison. The resistor values don't agree perfectly
+since the estimated ESL and stray capacitance of the wiring is probably way off.
.. raw:: html
<figure>
<img src="images/driver_ringing_weak.jpg" alt="Weak ringing on the LED voltage waveform edge at about 30%
overshoot during about 20% of the cycle time.">
- <figcaption>Adding a resistor in front of the MOSFET gate to slow the transition dampened the ringing somewhat,
+ <figcaption>Adding a resistor in front of the MOSFET gate to slow the transition damped the ringing somewhat,
but ultimately it cannot be eliminated entirely. Note how you can actually see the miller plateau on the
trailing edge of this signal.
</figcaption>
@@ -270,28 +268,28 @@ probably way off.
A side effect of this fix is that now the effective on-time of the LED tape is much longer than the duty cycle at the
shift register's output at very small duty cycles (1µs or less). This is caused by the MOSFET's `miller
plateau`_. For illustration, below is a graph of both the excitation waveform (the boxy line) and the resulting LED
-current (the other ones) both without dampening (top) and with 220Ω dampening (bottom). As you can see the effective
-duty cycle of the LED current is not at all equal to the 50% duty cycle of the excitation square wave.
+current (the other ones) both without damping (top) and with 220Ω damping (bottom). As you can see the effective duty
+cycle of the LED current is not at all equal to the 50% duty cycle of the excitation square wave.
.. raw:: html
<figure>
<img src="images/asymmetric_iled.svg" alt="The result of an LTSpice simulation of the LED duty cycle without and
- with dampening. Dampening widens the LED current waveform from 50% duty cycle with sharp edges to about 80% duty
+ with damping. Dampening widens the LED current waveform from 50% duty cycle with sharp edges to about 80% duty
cycle with soft edges.">
- <figcaption>Simulated LED duty cycle with and without dampening. The dampening resistance used in this
- simulation was 220Ω.</figcaption>
+ <figcaption>Simulated LED duty cycle with and without damping. The damping resistance used in this simulation
+ was 220Ω.</figcaption>
</figure>
.. raw:: html
<figure>
- <img src="images/asymmetric_vgate.svg" alt="The gate voltages in the spice simulation above. The undampened
+ <img src="images/asymmetric_vgate.svg" alt="The gate voltages in the spice simulation above. The undamped
response shows sharp edges with the miller plateau being a barely noticeable step, but with strong ringing on
- the trailing edge. The dampened response shows RC-like slow-edges, but has wide miller plateaus on both edges
+ the trailing edge. The damped response shows RC-like slow-edges, but has wide miller plateaus on both edges
adding up to about 50% of the pulse width.">
<figcaption>The MOSFET gate voltage from the simulation in the figure above. You can clearly see how the miller
- plateau (the horizontal part of the trace at about 1V) is getting much wider with added dampening, and how the
+ plateau (the horizontal part of the trace at about 1V) is getting much wider with added damped, and how the
resulting gate charge/discharge curve is not at all that of a capacitor anymore.</figcaption>
</figure>
@@ -301,8 +299,8 @@ In conclusion, we have three major causes for our calculated LED brightness not
* Ringing of the equivalent series inductance of the wiring leading up to the LED tape
* Miller plateau lag
-* The dampening resistor and the MOSFET gate forming an RC filter that helps with wire ESL ringing but worsens the
- miller plateau issue and deforms the LED current edges.
+* The damping resistor and the MOSFET gate forming an RC filter that helps with wire ESL ringing but worsens the miller
+ plateau issue and deforms the LED current edges.
Added up, these three effects yield a picture that agrees well with our simulations and measurements. The overall effect
is neglegible at long period durations (>10µs), but gets really bad at short period durations (<1µs). The effect is
@@ -341,9 +339,9 @@ sensitive owing to their physically large die area.
</figure>
The photodiode's photocurrent is converted into a voltage using a very simple transimpedance amplifier based around a
-MCP6002_ opamp that was dampened into oblivion with a couple nanofarads of capacitance in its feedback loop. The
-MCP6002_ is a fine choice here since I had a bunch and because it is a CMOS opamp, meaning it has low bias current that
-would mess up our measurements. For many applications, opamp bias current is not a big issue but when using the opamp to
+MCP6002_ opamp that was damped into oblivion with a couple nanofarads of capacitance in its feedback loop. The MCP6002_
+is a fine choice here since I had a bunch and because it is a CMOS opamp, meaning it has low bias current that would
+mess up our measurements. For many applications, opamp bias current is not a big issue but when using the opamp to
directly measure very small currents at its input it quickly swamps out the signal for most BJT-input types.
The transimpedance amplifier's output is read from the computer using the ADC input of a buspirate USB thinggamajob. In
@@ -452,6 +450,7 @@ using extremely inexpensive driving hardware without any compromises on dynamic
drive 32 channels of LED tape with a dynamic range of 14bit at a BOM cost of below 10€. All it really takes is a couple
of shift registers and a mildly bored STM32 microcontroller.
-Get a PDF file of the schematic and PCB layout `here <olsndot_v02_schematics_and_pcb.pdf>`_ or download the CAD files
-and the firmware sources `from github <https://github.com/jaseg/led_drv>`_.
+Get a PDF file of the schematic and PCB layout `here <olsndot_v02_schematics_and_pcb.pdf>`__ or download the CAD files
+and the firmware sources `from github <https://github.com/jaseg/led_drv>`_. You can view the Jupyter notebook used to
+analyze the brightness measurement data `here <http://nbviewer.jupyter.org/github/jaseg/led_drv/blob/master/doc/Run_analysis.ipynb>`__.