Tuesday, April 23, 2019

Light profile tweaking for IBM 1130 console replacement display

Improving the incandescent simulation

I chose to wire up one of the incandescent lamps from the 1130 and subject it to testing, using both direct visual comparison and a light sensor to record the brightness over time. I picked up a TSL2591 light sensor module from Adafruit, which operates over an I2C link to an Arduino. I configured it to record the intensity of the light as ran the lamp through its paces.
  1. Turn the lamp full on from a cold condition, recording the brightness curve
  2. Turn the lamp off from a fully on condition, recording the brightness curve
  3. Iterate with 1 to 60 half-cycles of power out of each second, at a steady state
  4. for each state above, record the brightness
  5. For each of the states, adjust the color of a Neopixel until they subjectively match
  6. (optional) Test that the incandescent performs the same whether the on half-waves are contiguous or spaced throughout the second; verify that the only factor is number of on half-waves
The incandescent lamps are installed onto long narrow PCBs that host the SCRs used with the IBM lighting circuit. They are all soldered to a common wiring harness, thus I will be powering all 154 lamp positions in this test, but only energizing one of them.

The boards receive common voltages of .ground reference, 7.5VAC and lamp test state. The lamp test state biases the gate of the SCR thru an internal 6.8K resistor in each SCR package. The logic signal that controls the gate is fed through a 6.2K resistor external to the lighting PCB.

This set of resistors forms a voltage divider delivering 52.4% of the signal voltage to the gate of the SCR. It is built that way because when Lamp Test is desired, the voltage on that rail is +3V, thus even with a logic signal that is off (0V), the resulting voltage divider delivers about 48% of the 3V on level.

Thus, with the Lamp Test rail held at ground, all logic signals are either 0V or 1.572V at the gate due to the voltage divider action, but when the Lamp Test rail is pulled up to 3V, all gates are either at 1.44V or 3V depending on the logic signal state. This ensures that all bulbs fire when LT is on.

I only need to connect the 7.5VAC wall-wart transformer to the 7.5V and ground reference terminals of the lamp boards, while tying the LT rail to ground. Then, if I apply a voltage level above about 2V to the input pin of any SCR, it should fire the attached bulb. My Arduino provides the 'logic signal' to control the SCR.
My test circuit to drive IBM incandescent lamp boards
My first runs were with the naked eye (and video of the bulb). These do allow me to figure out the bloom and fade time of the bulbs. Capturing video on my iPhone and trying to time it, the speed of the fade is noticeably slower than the time to bloom on. That makes sense, as the filament has to lose heat primarily by radiation in order to cool back down, while turn-on involves the increase in resistance as the bulb turns on. The surge in current causes relatively rapid heating.

I wanted to hook up the sensor board and record the actual brightness curves to get a more accurate view. I quickly discovered that the Adafruit TSL9251 board is far too slow to capture enough slices during the bloom and fade. It appears to take about 100ms, reducing me to a slice each 1/10th second in a process that may be complete in less than a slice for bloom and just over two for fade. Not a big loss at $7 for the board.

The outcome of this testing was intended to produce a table of the brightness and color for all 31 levels, from 0 to 30 half-wave cycles on per second. Further, I had the brightness curves for a full turnon and a full turnoff to compare against the values of the 31 levels.

With the maximum brightness of the LEDs dialed down, so too the current consumption dropped. The Arduino testing, with all positions lit to full on state, drew under 3A total. This is a side effect, although the power supply is capable of driving full white brightness of all LEDs.

At this point I have some design decisions to make. I can cheat a bit since lamps which have a mix of logic states applied during a second might be matched to the average brightness and color of that average value. Thus, for lights that are flickering, I would get a realistic appearance this way. However, this won't work for rapidly brightening or fading lamps, particularly the edge cases of full on to off or full off to on.

I am toying with changes to the algorithm, such as taking dimming steps of the index value 3.5 times slower than brightening steps. This would adjust for the differences in bloom and fade speed of the filament. If I sample the logic states 38 times per second, then I can step up the index value for brightness 7 levels when the logic level is true and step down 2 when the logic level is false. That gives me a full bloom of about .13 seconds and a full fade of about .42 seconds.

The other change I have to make is in the color of each level. I am going to drive the incandescent to roughly 32 steps of brightness from off to on, then use the Arduino to tweak the LED color and brightness to match by eye. This is going to be a bit more complicated test setup, but I should be able to complete this by the end of this week.

No comments:

Post a Comment