S16: Forward Voltage, Current Limitation, and Preventing Clipping

The purpose of the S16 analog synthesizer communication network protocol is to make direct, machine-to-machine collaboration between experimental musicians safe and easy, guided by curiosity. Naturally, as I’ve been refining and experimenting, I’ve been finding ways to make it more difficult. But at least I don’t think it’s less safe.

Transmitter is on the left, sending control voltage through the S16 cable to the receiver on the right. There are three receiver components: an LDR-based transparent single-stud LEGO plate, another LED-based black, single-stud LEGO plate with its stud removed, and the phototransistor solution discussed in this article. The column on the right from top to bottom is a grey LEGO barrel for strain relief on the cable and a black Technic pin connector containing the LED that converts voltage to light, embedded in a Technic half-pin. Beneath is is another pin connector containing a half-pin that houses a phototransistor that is used to convert the light to a voltage.

You’ll recall that the spec for the S16 communication network requires that:

  • The receiver be designed to receive control voltage signal through optical coupling and a LEGO interface.
  • The receiver is responsible for their design from the specified LEGO connection back into their own module — the spec doesn’t care what you do with the signal, just that you receive it somehow.
  • The transmitter offers a signal of varying brightness through a LEGO connector
  • The transmitter is responsible for their design up to the specified connection to the receiver — the spec doesn’t care how you generate the varying brightness, just that it vary according to your artistic intentions and technical compromises.
  • Signal degrades gracefully as the transmitter/cable/receiver coupling is less optimal. The perfect setup will transmit and receive well. A less good one will distort the signal, but that still might be interesting. If it’s totally wrong, either nothing will happen or the cable will burn out, which is no big deal.

The following is trying to improve the specific design to give other musicians a starting point by sharing my experience. There are other people with far, far greater understanding of both synthesizers and electronics, and they may want to find their own optimalities.

Receiver components

The biggest revelation so far is discovering that using a phototransistor (a component that uses light to control the flow of current the way a transistor uses a small voltage to control a larger one) as a receiver component is extremely simple. It outputs a change in transmitted brightness as a change in voltage, which is what your synthesizer module was expecting anyway. And it’s a change in voltage that is completely in agreement with your module, from ground level to maximum because the voltage is coming right from your own power system, whatever way you’ve designed it.

Left to Right: 3mm photodiode, LEGO Technic “half-pin”, LEGO Technic “pin connector”. The incoming data cable plugs in on the right, with its control voltage converted to brightness. Superglue the phototransistor into the half-pin, then just click it into the tube connector. It’s probably best to leave the half-pin unglued because it facilitates repair and modification, allowing the pin connector to be a part of the case while the sensor is a part of the circuit board inside. When you need to fix something, you just click it apart!
The phototransistor glued in place with heatshrink over the exposed end to reduce light interference. This end goes inside the module’s case, so you might think it would be safe from interference, but there are always blinking lights SOMEWHERE.
This LDR is glued to the back of a 1×1 round LEGO plate. The single stud connection turned out to be pretty dicey. It seemed like it would get knocked out a lot in performance.

I’d been using a light-dependent resistor as a receiver before. They’re extremely simple and inexpensive (around 3.5¢ apiece when purchased in the kind of bulk you’d want anyway). They output variations in current (not voltage), though, so they needed to be coupled with another resistor to make a voltage divider, and I was having a hell of a time finding the properly tuned values for them. It seemed like the colors of light that defined their resistance was really specific, and it looks like it varies wildly from model to model.

By contrast, phototransistors cost more, but don’t require any further circuitry at all to supply voltage and are tuned at the factory to have useful values. However you’ve designed your synthesizer module, wherever it takes control voltage, you hook up the phototransistor to your V+ rail (or whatever your cockamamie power scheme is) and then solder the other end to your input, and you’re set. So, for instance, if your module is built around an Arduino, you literally plug one end into 5V and one end into the analog pin you’re reading, and you’re done. Glue it into a LEGO and you can receive signal!

Septic Snake works on his McMeat filter/oscillator box. The xOxbOx and sound effector that you can hear on the self-titled Def Sensor on are just out of frame.

Another interesting characteristic turned out to be that phototransistors are really sensitive. At first, I only had the tiniest bit of play — I’d send ~3.3V down the cable, which produced a dim light, which was what I expected. But then the receiver would hit 100% output way before the LED was at maximum brightness (which to be fair, is too bright to really look at). To keep the 9V signal (chosen in order to work with my creative partner Septic Snake’s xOxbOX) from clipping, I started with a 330Ω resistor — but then had to keep adding resistance to the output until I got to an incredible 1.5MΩ. The LED at the end of the S16 cable was visible, if dim, but at that brightness (encased as it was by a LEGO technic pin connector and only a couple of millimeters from the receiver), I got a really smooth transition from the forward voltage of the LED (3.3V) up through max voltage (9V). A lower voltage like 5V probably requires about 833Ω, but see the Forward Voltage issue below.

Another exciting discovery was that the phototransistors I have respond reasonably well to all visible wavelengths of light, which means that you can send any color LED into it, and, while the response curve will be different for different colors, they will all induce a response as long as they’re bright enough.

This is what we call very interesting. It means on the one hand that the same signal coming down the cable will make different waveforms if the cable has a differently colored LED at the end. This is the kind of experimentation I want to encourage.

On the other hand, it also means that white light gives a very even response because it spans the wavelengths — where it becomes less sensitive to red, it’s already becoming more sensitive to green, and where it’s becoming less sensitive to green, it’s becoming more sensitive to blue. I don’t know how it responds to infrared or ultraviolet.

Transmitter/Cable Forward Voltage

An LED doesn’t start to light (or even conduct electricity) until its power supply exceeds the “backpressure” of voltage called Forward Voltage. That value is determined by the precise chemistry of the LED and the energy level of the light (which is determined unequivocally by General Relativity— this is a fundamental feature of LEDs that can’t get better within our universe), which means there’s some manufacturing variation in the precise color and therefore forward voltage, but in general, you can’t light an infrared LED with less than 1.5V; or a red, yellow, or green LED without at least 1.8V; and a blue LED doesn’t light until there’s at least 3.3V behind it. White LEDs, which are actually blue LEDs with a yellow phosphorescent coating that respond to blue light, therefore also require at least 3.3V before they start to conduct, and therefore produce light.

What this means is that, if my output is 5V and I’m slowly turning it up from 0V to 5V, the output is 0 until the output reaches 3.3V, and then as I turn the voltage up to 5V, the LED only responds to the power increase from 3.3V to 5V. That’s only 1.7V of the total range. It means that all control signals below 3.3V come out as 0, and higher level changes come out as between 0V and 1.7V. If you were to listen to an audio signal that did this, it would sound like the blown subwoofer in the back of a 1994 Celica from two blocks away as 67% of the signal gets lost to a speaker cone long ago drenched in Zima that keeps that cone from moving except under the strongest pressure.

The first way I tried overcoming this was by using a voltage averager circuit to make sure that 3.3V was always against the output and the output ran from 3.3V to 5V, which gave a full, smooth, linear output. But that defies one of the core design objectives of S16: that the transmitter does not need to be purpose-built — and, even worse, it’s only appropriate for a blue or white LED. If I wanted to use a different color, the values would be wrong.

My subsequent attempt, using an op-amp to accomplish the same thing (but additionally working for any forward voltage, (including 0V, which means it would work with a regular wire to another VC module), didn’t work for no reason that I could discern even though it worked fine in my circuit simulator. And, in any event, still would require modification to the transmitter, so I bailed on that solution, though of course anyone who wants to implement it in their designs probably won’t have the frustration I was having.

My intention next is to forward bias the LED with an inline battery and run the voltage through it in series. With the low brightness of the LED, the current drain can be very low. Using three Size 13 hearing aid batteries would forward bias the LED with 4.2V. I’m even thinking about putting a tiny 3.3V voltage regulator in there to make it give good signal for as long as possible.

Of course, then you have a cable with batteries that can die.

They don’t call it Mad Science for nothing.

Modular systems are a function of industrial society. But do people of The Fifth World still know how to agree to standards? With their acute interest in efficiency, I think they might have carried that lesson forward!

One thought on “S16: Forward Voltage, Current Limitation, and Preventing Clipping”

Leave a Reply

Your email address will not be published. Required fields are marked *