Archive for the ‘Electronics stuff’ Category

Arduino Drives 7-segment LED Display

23 March 2018
7-segment LED display

A standard 4-digit display. I fiddled with the image to make it look lit up.

7-segment Displays

This type of LED (Light Emitting Diode) display has been around for a long time, and you can still find them in many devices. For most applications they have been replaced with LCDs which use less power and are more versatile. But if all you need to do is display numbers, and you have some old parts around that you want to use, then you might be interested in putting one of these things into a “modern” project, such as one using an Arduino (programmable microcontroller).

Pin Count

The simplest Arduino has only 20 pins that can be used for digital I/O (inputs/outputs). A 7-segment display requires 8 pins to drive the segments (if you want to use the decimal point) and a pin for every digit. For 4 digits, that’s 12 pins. For 8 digits, that’s 16 pins. That doesn’t leave many pins for other functions in your project. But, you might not need many other pins.

There are ways to reduce pin count. One way is to use ICs (integrated circuits) that will take a binary number at the input, say from 0 (B0000) to 9 (B1001) and output the appropriate pattern to the segments to display those numerals. You can also use a simpler encoder to run the digits; 3 (binary) lines in, 8 lines (or digits) out. That means you could operate an 8-digit display using only 7 Arduino pins.

Drive Current

An older LED, like you find in these displays, requires at least 5ma (milli-amps) of current to look reasonably bright. Most are rated for 20ma. These arrays are actually scanned (only one digit on at a time), so it helps to make them look brighter if you drive them with more current than the LEDs would need if they stayed on all the time. However, unless you can find a special IC to do your decoding, one specifically designed to drive LED arrays at those current levels, most ICs won’t be able to do the job. The average CMOS (complementary metal oxide semiconductor) IC that hobbyists use is only rated for about 2ma output current.

However, the Arduino itself is rated for about 20mA output. So the Arduino pins can run the LED segments unassisted. I use transistor arrays to run the digits. They take about 1ma in and can output up to 500ma or so. However, these drive transistors invert the input signal (in high, out low), so to drive the digits requires a signal of opposite polarity to what you would use if you weren’t using the transistors.

Existing Solutions

Most – but not all – of these factors are taken into account by an Arduino code add-on (called a library) named “SevSeg” (for “seven segments”). What it does not take into account is using encoder ICs to lower the pin count. My design uses an encoder to select the digits, but runs the segments directly from the Arduino. So, I could not use the library that had already been written for this purpose.

My Own Solution

I am writing this because I thought I could come up with something relatively simple that would do the job, but I wasn’t sure.

The basic cycle of action is fairly straightforward:

  1. Set up the 8 segment drivers to be high or low depending which segments you need on or off to display the desired numeral (or other pattern) for the first digit.
  2. Select that digit by outputting the binary number corresponding to that digit’s hardware position. (Say, B000, three low lines for binary zero, “digit zero.”)
  3. Keep that pattern on for a little while (a milli-second maybe), then switch to the pattern for the next digit.
  4. Repeat this process for each digit, until all have been lit, then repeat the entire cycle as long as you want the display to show something.

I used what is sometimes referred to as a “brute force” method to select the digits. For each digit, I just tell the Arduino which lines to make high and which lines to make low. It’s only 3 lines, so not that hard to do it that way. Those lines will stay that way until I tell the Arduino to change them, so it’s just three commands for each digit. Pretty easy.

I could have done the same for the segments, but I was hoping for a simpler solution. I found one by using a built-in Arduino function (built into the code writing system, not the microcontroller!). This function is one of several that treat a number as a string of binary bits. They are called the “bit functions.” The one I used is called “bitRead().” You give this function almost any number and it can tell you whether there is a “1” or a “0” in any of the places in its binary form. For example, the number 255 is binary “11111111.” All its places are ones. The number 254, one less, is B11111110. There’s a zero at the end instead of a one. So bitRead(254,0) would return zero, while bitRead(254,1) would return 1. As is customary in most of these programming languages, lists of things usually start with “item 0” instead of “item 1” as most of us would assume. So, if you want the first item in the list you have to ask for “0” and if you want the 8th item you ask for “7”. Seems weird but you get used to it after a while.

For the eight segments on an LED display (including the decimal point) there are 256 possible different patterns, each represented by a number from 0 to 255. So I just had to figure out which numbers would produce the correct patterns to display numerals 0 to 9 on the display, then put those numbers in a list, with their position in the list corresponding to the numeral they represented. Then to display that numeral, I would just have to use bitRead() on the number selected from the list, going through each of the 8 binary places, and matching up each place with the pin I used for that segment (another list) and I would have the entire pattern properly outputted.

For my hardware, I wasn’t using the decimal point, and the list I came up with was: {63,6,91,79,102,109,125,7,127,111} for numerals 0 to 9. The numeral 8 has all seven segments on, so would be 127 (B1111111) in almost any system using this idea. The other numbers could change if the wiring of pins to segments was different than the one I used.

Note on touch screen styluses

I’ve been playing around with my touch screen devices, an iPod Touch and an HP Stream tablet. They both have “capacitive” screens and therefore require a conductive rubber stylus if you don’t want to use your fingers. I found a nice ballpoint pen downtown that uses the “eraser” as a stylus tip, and two children’s styluses at Walmart. I like to use the styluses instead of fingers, and hope to locate a drawing program for my tablet before too long.

styluses for touch screens

Advertisements

Patterns caused by different frequencies

21 January 2018

interference pattern
The above photo (which I have colorized and cropped) from Wikimedia Commons illustrates how two similar wave patterns can interfere with each other.

I have been working with this basic phenomenon as a possible way to create interesting patterns in LED displays that could be configured to interact with the environment.

My simpler prototype uses 12 yellow LEDs in a circle. The illustrations below show them in rows. This made it much easier to draw the illustrations.

Two Signals

The basic idea is to compare two different signals in a way that is interesting.

This design uses voltage-controlled oscillators to create a pair of square waves.

Each wave is then applied to a circuit that turns it into a repeating pattern with twelve parts. The corresponding outputs are then compared, and an LED is turned on or off depending on the result of that comparison.

The comparison logic I used for my first prototype turns the LEDs on only when both outputs being compared are “on” (about +5 volts in this case). There are other types of logic possible. This particular one gives the lowest current usage from the power supply.

So there are 12 LEDs, and each LED can only be on for one-twelfth of the time it takes for the pattern to repeat. But they will all fully light during their time slot only if the two signals being compared are exactly the same.

Otherwise, the LEDs will turn on and off in a pattern based on how different the two signals are. Here I have illustrated a few possible patterns. The yellow strip is the “reference” frequency, and the light blue strip is the other frequency. The lime green bands depict which LEDs will turn on, and for how long, based on my chosen comparison logic.

If the two signals are close but not exactly the same, the circle of LEDs will dim and brighten as the signals slowly go in and out of alignment. This is similar to how two musical notes that are close to each other will “beat” (get louder and softer).

two similar frequencies

If the two signals are a lot different, but related mathematically, they will produce a pattern of light and dark in the display.

As it is almost impossible to adjust the two oscillators to exact frequency multiples, the actual result is a fast or slow rotation of the pattern, depending on how far off they are.

Oddly, a 3 times difference in frequency produces a 2-node pattern.

frequencies different by factor of three

And a 4 times difference in frequency produces a 3-node pattern.

frequencies different by factor of four

Here is an image of my prototype – doctored to remove most of the distracting details of wiring and so forth on the circuit boards – showing a 3-node pattern that is slowly rotating. Here, three LEDs are much brighter, and three others are just beginning to turn on as the pattern slowly rotates.

3 nodes in circle

Three node pattern with LEDs in a circle.

Other Designs

I also made a display that uses my “signature” pattern of 8 concentric circles, starting with one having only three LEDs in it, and ending with one that has ten LEDs. This is a more interesting display to watch, but the results are more difficult to interpret. It is also more difficult to make. So I will likely continue to work with simpler designs as I develop this idea.

Software

These designs don’t use any software; totally hard-wired, as they say. My experience with software that runs on controllers that I can afford is that it doesn’t run fast enough to provide a smooth display that doesn’t blink. So, though I plan to use controllers in some of these designs, I prefer designs where they are not needed and we are dealing totally with the real-time interactions of signals.

Motors Demo

25 October 2017

motors-demo-20171025-2-cropped

I don’t use motors much in my projects, but they are everywhere now on our very mechanical world. So I am always running into them, and had a bunch set aside mostly from tearing down old printers. I have been particularly interested in stepper motors, as I had read about them a long time ago, and they are used a lot in industry.

Stepper Motors

This isn’t going to be a huge technical article, but: Stepper motors are used for positioning in all sorts of equipment, computer printers just being one example. They are designed to be moved an exact rotational amount (by counting the step signals sent to the motor) and to hold that position while energized.

The ordinary stepper motor is driven by two overlapping signals, as mentioned in my recent post about SerDes design. Finding new data about how these motors are driven inspired me to take another shot at creating a working driver. My previous attempt, based on sine waves amplified by audio amps, had not been successful.

Design by Numbers

Here is a rear view of my project, with numbers added to match the discussion below:

motors-demo-20171025-4-cropped-annotated

  1. AC terminals and connectors. I like to run my projects off AC-powered supplies. I get them cheap from thrift stores. Usually they are “wall warts” or otherwise portable / external power supplies, and I remove the plastic cover and use the board inside. Sometimes I keep half the cover if it helps for mounting purposes.The funny thing about all modern power supplies is that the first thing they do is convert your AC power to DC. Then they step down the DC (about 120V in the US, about twice that in many other places) to the power supply voltage. Most of these modules provide good regulation, because that’s built into the controller electronics, and it helps protect people and equipment.
  2. I stacked the two power supplies I used. The top one runs my control electronics. Most of it is 5V, but I also have some 12V relays.
  3. I used a 9 volt 3-1/2 amp module to run the motors. These are a little hard to find, so when I run across one I grab it for later use. 5V supplies are ubiquitous, as they are used now for phone chargers (phones generally have 4V batteries). But other voltages and power levels can be more scarce.
  4. Next in line is a board that monitors the motor supply for voltage and current output. You can buy panel meters with these features built in, but I built my own, as it’s not too hard. It then feeds generic panel meters. The hardest part to get right on this board was the current shunt. I used a bunch of SMT (surface mount) resistors in parallel.
  5. The motor driver module was purchased online from China. This particular one had some problems, and I basically had to repair it before I could use it. That sometimes happens with cheap stuff from China. They had installed the wrong part to function as a 5V auxiliary supply. It was supposed to be a fixed-voltage part and an adjustable-voltage part was installed. So I had to lift the adjustment pin off the board and add some components to get my 5V output.One of the drivers was also poorly soldered, so I went over the solder joints and added more solder as needed.

    The board uses a part that has been around for a long time (LM298). It is designed to drive stepper motors. It has four logic-level inputs (plus enable) and four power outputs. It can work up to 48V. I had planned to add a second higher-voltage motor driver supply to the project, but all the motors worked fine with 9V, so I left it out.

    You have to feed the driver the correct signals, and I made two more boards to do that. One board provides the four steps needed to generate the “quadrature” drive pattern and a pulse-width-modulated (PWM) signal to vary the amount of drive. The other board converts these signals to those needed to feed to the driver board.

  6. Another board just gets all the connections right.
  7. I used a four-position rotary switch to select between four different motors. Only one is a stepper motor. The ordinary DC motors are very easy to power on; you just apply power. You can modify their speed somewhat by changing the drive voltage or using a PWM signal which essentially does the same thing. I used one driver IC on the driver board to power the DC motors. I paired up the four drivers to make two. I can run the load in forward, reverse or braking mode.
  8. Here are the front panel controls for stepper speed, PWM, and forward – brake – reverse.
  9. Cheap panel meters from China indicate the drive voltage and total current being used. They have a nice auto-ranging feature which makes them usable up to about 50 volts input. Their electronics run on 5 volts. These digital meters only have three decimal places, but that was enough for this application.

Closing Comments

The biggest problem with motors is having them stall out due to mechanical overload, which can ruin both the motor and the drive electronics. As these motors are running no-load, that’s not a problem. You can grab the motor shaft with your fingers if you want to, and see what mechanical loading does to the current draw. But for real use, the electronics should include overcurrent protection to turn the power off if the motor stalls. Many industrial motor drivers also monitor motor temperature, which is another way to tell that something is going wrong with your motor.

I am very happy that I was finally able to get my stepper motor to run (both forwards and reverse!) and at a variety of different speeds. It turns out steppers are a bit sensitive to what speed you drive them at. Try to go too fast and they just won’t run. Go too slow and they use too much power (though there are ways around this). Most steppers have an optimum speed, and in most applications, you will see them operated at a constant speed, or maybe two, high and low (like in a scanner).

The driver module was designed for robotics hobbyists. It’s a neat design, but not well-documented. I had to look up the datasheets for the various parts used to get details. This is par for the course in hobby electronics.

In search of a better SerDes

17 October 2017

Oh no! Another dry technical article! True, true. Just pass it by if you’re not interested.

Serdes sounds like a Greek word, but it isn’t really. There are some people with the name Serdes, but it is uncommon. I learned it as an engineering acronym thus (lightly edited):

A Serializer/Deserializer (SerDes) – usually pronounced “sir-deez” – is a pair of functional blocks commonly used in high speed communications to compensate for limited input/output. These blocks convert data between serial data and parallel interfaces in each direction. The term “SerDes” generically refers to interfaces used in various technologies and applications. The primary use of a SerDes is to provide data transmission over a single/differential line in order to minimize the number of I/O pins and interconnects.

https://en.wikipedia.org/wiki/SerDes

Electronic Art

I am trying to work out some cool things to do with LED arrays that would respond to environmental or observer inputs. There are many pieces to such a system. This includes the possibility that the display itself may be some distance from the electronics that collects the input signals and decides what the display should do. The same way a computer monitor can be separate from the computer. And in this case, the two are connected with a cable.

Some of us remember the old printer cables. They were thick, had up to 25 separate wires in them, and couldn’t be much longer than 15 feet. I could probably use such a cable in my projects. But that’s a lot of bulk, and it comes with many limitations. Those cables connected a parallel port on the computer to a parallel port on the printer. There were usually 8 data lines plus a bunch of handshaking signals to make it so the computer would not send data faster than the printer could print it out. If you wanted to get a lot of data back from the printer, you could add another 8 data lines going in the opposite direction.

8 bits can encode into 256 different numbers (0 to 255). That’s enough for an alphabet – both upper and lower case – and a bunch of other symbols. Each symbol has a number “code” that stands for that symbol. Both ends of the line have to use the same code system.

An 8 bit parallel system could go pretty fast; millions of symbols per second. But try pushing parallel data through a long cable that fast and you will quickly run into problems. You would need to shield the cable so external signals won’t interfere with it, and so it won’t radiate signals into external equipment. And the wires in the cable, when they get quite long, resist fast signals going through them in at least three different ways (resistance, inductance and capacitance). So if you want to send data fast through a long cable, you have a whole hardware design challenge on your hands.

SerDes concept

Illustration of the SerDes concept. Original graphic by GrĂ©goire Surrel – Own work, CC BY-SA 4.0

The solutions to these problems usually involve reducing the number of wires carrying signals (ideally just one pair would be enough) and creating special hardware interfaces that alter the signals so that they will make it through the cable successfully, even though the cable presents various barriers to proper transmission.

A standard solution for many years was the “RS-232” serial cable. In this system the signal is amplified to make it more resistant to interference and cable attenuation. And the signal is “serialized” so it only has to use one pair of wires. That means each symbol of 7 or 8 bits would be transmitted as a sequence of bits that would have to be reassembled into 7 or 8 parallel bits at the receiving end. That was an early SerDes system. But we didn’t call it that in the old days. The acronym only came into wide use after the internet and its various forms of information exchange came into wide use. The term commonly refers to high speed data transmissions, but the basic concepts are the same regardless of data rate. My projects use quite low data rates just to make sure I don’t run into too many design problems and can use cheap parts.

The RS-232 standard could probably work for me, but I wanted to try another more modern data transmission standard, TIA-485. (RS = Recommended Standard, as published by the EIA, Electronics Industries Alliance, but now taken over by the TIA, Telecommunications Industry Association). This standard uses two wires for each signal plus a third wire used as a ground (zero volts) reference. The signal is transmitted in an attenuated form, differentially. That means a “zero” would be transmitted by putting maybe 3-1/2 volts on one wire and 1 volt on the other. And a “one” would be transmitted by reversing those. Smaller signals in a cable create less external interference and are easier to pass through longer cable lengths.

I have a connector that is used for MIDI (Musical Instrument Digital Interface) that has five pins, which means it can carry two differential serial signals (or 4 RS-232 signals) plus a ground reference wire. I wanted to use this connector and a 5-wire cable, but there was one problem:

SerDes Timing

Just as in the old parallel printer cables, where handshaking signals were necessary to tell the printer when a symbol to print was put onto the connecting cable, and tell the computer when the printer was busy, serial systems also need a way of at least telling the receiver when the transmitted data is good, how fast it is going, and when an entire symbol has been sent. This requires, minimum, clock and end-of-symbol signals for data rate and data synchronization. In the RS-232 system, the data rate had to be set at both ends in advance. And the end-of-symbol signal was coded into the data stream. It takes a computer to figure out how to decode this data stream, but if you send all three signals separately, you don’t need any computing at the receiving end. Deserialization can be done with one piece of hardware called a shift register.

But I can’t transmit three signals over a five-wire TIA-485 cable, only two. So I thought I’d figure out how to combine the three signals into two so that my system could work with the hardware I have. I devised a rather simple system to do this, and built an initial working system several years ago for my “Christmas” project (Christmas because it used strings of holiday lights for the visual display). Recently I have built two more systems that use this method.

Glitches

I like to re-design systems each time I build them. This is partly because I might not have the same parts available that I used in an earlier design. Or it might be just to explore different ways the problem could be solved. All the heavy work in my SerDes system is on the transmitting site. The receiver is very easy to make. And for this transmitter design I wanted to use counters to run ICs (integrated circuits, now often known as “chips”) called multiplexers. You put parallel data on the 8 inputs of a multiplexer, then tell it which input to put on the output using a counter. And if the counter repeats a regular pattern (as most do) then the parallel data at the inputs will come out of the output in a predictable serial sequence. And so you have achieved serialization.

In my first design I was getting “glitches” at the outputs of some of my multiplexers. This is because I was using “ripple” counters. In this type of counter, the counting outputs don’t all change at exactly the same time. They might be a little off (usually much less than a microsecond, but that’s enough time to cause trouble). In other words, when changing from count 1 to count 2 for instance, the ones bit has to change from one to zero, while the twos bit has to change from zero to one. If the twos bit lagged a little, both outputs might be zero for a split second, telling the multiplexer to go to the wrong input. Such glitches can be filtered out, which is what I did in the first design. But in the second design I decided to try a different counting scheme, where only one counting bit would change at any one time. This should make counting glitches impossible (it does). But it means the count is no longer in number sequence. In other words to do this with a 4-count pattern, you have to use the pattern 0-2-3-1 (or 0-1-3-2) to get a glitchless count. This different sequence is not a problem when using a multiplexer, though it is more confusing to design if you are used to using ripple counters that count 0-1-2-3 (etc.).

I looked at the waveforms associated with this kind of counting, and they were just two square waves offset by one count. I found a PDF online that describes how to implement this kind of counter. It’s called a “quadrature” counter, and it’s pretty simple to do. Getting a similar sequence of 8 is a little more tricky, but basically just interleaves a quadrature signal with a square wave. I built my second system this way and it works fine (though I had to scratch my head a bit to get the input sequence right, as it is sensitive to the place value given to the various counting signals).

quadrature waveform illustration

A four-count pattern implemented using a quadrature counter.

What form should the data take?

So I now have a hardware system that can be used with either 2 TIA-485 signals over quite long distances (if the cables are made well) or with 4 RS-232 signals (but not the RS-232 encoding system). The RS-232 version is much easier to build, but does have distance and speed limitations compared to the TIA-485 system.

The original intention of the system was to enable transmission of 8-bit-wide signals that would be used to control an array of LEDs. But it could also be used to transmit serial control streams of any bit length. This means a wide variety of displays could be controlled, as long as they didn’t have to change at a very fast rate. In other words, we’re not talking about full-motion video, like TV, but that’s not the sort of display I’m working with. My average display contains less than 100 LEDs, while a modern TV screen contains millions.

I have also tried transmitting analog data using digital serial techniques by using pulse-width encoding, which is very simple to implement in hardware. This gives me the option of using digital data transmission instead of long analog signal lines. This may come in handy in some of my projects.

Electronics Design Case Study – ADSR

23 September 2017

ADSR module homemade

This is a technical article and if you have no particular interest in electronics design feel free to skip it. It will get into some terminology that won’t all be explained in the text…

Music Synthesis

My interest in synthesizers goes back to my early days studying electronics. I always wanted to make my own synth.

But by 1983, MIDI had come out, and I was in the Sea Org.

MIDI stands for Musical Instrument Digital Interface. Musical instruments were an early target for embedded controllers (software-controlled electronic circuits) for many reasons. This ended (mostly) the era when synthesizers were controlled by analog (continuous) signals. Voltage sources were terrible when it came to keeping all the electronic instruments in an ensemble in tune with each other. So tuning was an obvious feature to turn over to the digital world, where crystal-controlled oscillators could stabilize pitch to within a few parts in a million.

The advent of digital signal processing meant things like voltage-controlled filters and unusual effects like ring modulation could be implemented with algorithms instead of hardware.

Voltage-controlled amplitude, however, is so straightforward in the hardware realm that it remains somewhat popular. A basic part of synthesizing a real-world note or sound is approximating its amplitude envelope. This envelope has long been analyzed by acoustics engineers into four parts: Attack; Decay; Sustain and Release. If you play a note on a stringed instrument you can easily see each of these parts in action. How hard and fast you hit (or pluck) the string determines the initial attack and to some extent how that attack decays. Then if you don’t damp the string it will continue to ring until it is damped or played over. This is sustain. And when it is damped, the sound will die out, which is the release phase.

There are many many possible ways to imitate this amplitude envelope with electronics. The most common methods use parts that I had run out of (1 Meg-ohm potentiometers) so I decided to try an alternative design of my own creation.

Design Requirements

Most traditional ADSRs take a “gate” signal from a keyboard which tells the electronics how long the key is being held down (“note on” in MIDI). My electronic art projects use sensors, not keyboards, so I couldn’t rely on a gate signal to determine how much sustain the sound would have. I also kind of wanted a circuit that could be adapted so that each part of the envelope could be controlled by a separate sensor. That means it couldn’t just use pots, like the super-simple designs do. I also wanted to try straight-line segments rather than the traditional curved segments you get using just resistors and capacitors, even though this is less “realistic” for decay slopes.

I had a front panel I was reusing from an earlier project, and originally loaded it with just three pots – all that seemed to fit – which is two less than you need to control the five main parameters of the envelope. But I thought I could skip setting a sustain level, and use one pot to control both decay and release slopes. This panel had to fit into a eurorack-style chassis I had put together earlier, with power coming in the front.

The unit was also to include the voltage-controlled amplifiers, using an IC I had never worked with before.

First Try

I decided to use an op amp integrator at the core of the design, as it would give straight-line slopes and could be dependably controlled. However, I wasn’t sure how to set up my 100K pots to imitate a wider range of resistance. I used three comparators and a couple of flip-flops to detect voltage levels and turn the various slopes on and off.

Mounted at the bottom of the front panel was a backplane board that has become standard in most of my designs. Circuit boards then plug into this backplane, which ideally handles all the interconnects. Front panel parts that could not be mounted directly on the backplane board would be wired down to the backplane using jumpers.

I made the envelope generator board first and then the VCA board. The VCA datasheet was confusing at first, but by wiring an actual circuit I was able to figure out what was going on. This VCA could accept a wide range of control voltages (0 to 30 roughly), but they were referenced to the negative voltage rail! So I needed both an amplifier and offset for my envelope, as it would go from 0 to 5V only, my standard range for control voltages. I realized at this point that I would need a sound source to test this with, and it would also be nice to monitor the envelope waveform on an analog meter. I then spent about a day creating an oscillator and a meter for these purposes.

An incomplete design with too many questions about “will it work this way?” resulted in my running out of room on my envelope module. To solve this I piggybacked an extra module onto the main one. I got some sort of envelope out of this design, but the pots worked only over an extremely narrow range of their total rotation. I had to decide whether to stick with these pots and basic design, or start over.

Second Try

I looked around at what my alternatives were. I had a nice set of six quite small 5K pots from an old piece of audio equipment. They would all fit into the panel if I drilled new holes for them. So I decided to go for it. Five of these pots went onto a new backplane board. I modified this board to hold circuitry and figured the majority of my new design would fit on this board, with the rest put on a new plug-in module on the original backplane.

Now that I was beginning to recognize that this was a challenging project, I went to a build a section and test it approach to my work. 5K pots could only yield 1:100 output variations (comparable to using a 1Meg pot in series with a 10K resistor) by using the turn-on “knee” of transistors to stretch out the transfer curve. I have used this before so didn’t bother to work it out in complete detail, or plot the curves graphically, but below gives you a graphical idea of what I’m referring to:

transistor turn-on graph

Using a curve found on the internet, note that a 0.1 change in input voltage produces a ten-fold change in output current. Extend this input range a little more and you can squeeze out a 1:100 input/output ratio, or even more.

I built my current sources and sinks using discrete transistors. This gives worse consistency and stability than using matched pairs or some specialized IC, but usable for my purposes. I built one and tested it. I gave me a range of 50 to roughly 1500 microamps. This was good enough. I put the rest on the board, then added a dual timer (LM556) and some inverters and connected it up to run continuously (astable mode). I powered up and checked with my oscilloscope. This part of the design worked fine. The timers have two comparators and a flip-flop inside each of them, so this decreased my parts count.

I thought that I could get the timers to stop after just one cycle using some sort of edge detection scheme. But it didn’t work. I was using two timers so that the attack-decay and sustain-release cycles were separate and could be put in sequence. But my difficulties in making the circuit cycle just once and stop caused me to rethink this approach.

The next day I rewired the timers for one-shot (monostable mode) operation. Now the timers could be triggered by my sensor, fire – producing the envelope waveforms – and would then stop, waiting for a new trigger. I used two control flip-flops with NAND gates (CD4093B) to lock out new trigger signals until the current envelope had finished. I really needed only one flip-flop, but the package (CD4013B) has two in it, so I used one for each of the timers.

Next I had to get all the analog levels of the envelope right. I put this circuitry on the new module board. I only needed 8 wires to connect the new envelope module to this analog module. It has six opamps and a comparator. The comparator detects when the envelope signal goes to zero, and resets the flip-flops so they can allow in another trigger signal. This circuit wasn’t working at first. What was wrong? The envelope waveforms were only going down to 0.5 volts, not to ground. I had the comparator set below this, so it was never firing. I was powering my envelope generator with only ground and +12V. The current sinks (set up as mirrors for my current sources) could only pull the load capacitors down to 1/2 a volt. I compensated for this by adding some offset to my summing opamp. I set the output to go a little below ground so the comparator would for sure fire. I had to find a missing wire on the envelope board before I got the unit totally working. It’s not perfect, but it now works as it was designed to work, and will serve it purpose in helping me develop electronic art that uses sounds.

Legacy Pan-Tilt for Video Camera

22 April 2017

pan-tilt for video camera

pan-tilt side cover removed

This piece of “legacy” tech isn’t much to look at. It was the first item I photographed but the last I am making a post about.

I got it from my brother when his company upgraded all their video equipment to more modern stuff.

This was possibly made to sit on a pole and hold one of those large surveillance cameras that you still see some places. But this unit was being used inside to hold a camera much smaller than it is (though heavier than modern cameras that are fully electronic).

pan-tilt with main cover removed

It originally had a long control cable so it could be moved around from a remote location. The controller (shown underneath) simply switched the motor drive voltage (about 24 volts AC) between four different drive windings on two different motors – forward and reverse for each motor. There are little switches installed in the housing to turn the motor off if it tries to move beyond the mechanical limits of the housing. And that’s all there is to it.

With the advent of much smaller cameras, pan-tilt units no longer need to be this large and heavy.

Voltage Divider Assembly

10 April 2017

voltage divider assembly inside
A few years ago I purchased a pair of differential voltmeters because I was looking for aluminum equipment cabinets and thought these might work. The front panels were actually a full 1/4-inch think, which was a little more than I bargained for. These were military-grade equipment, and I think both of these items had been in use by the Army.

I got them from Fair Radio Sales “as-is.” The shipping cost almost as much as the equipment did. These meters were made by John Fluke Mfg Co, Inc, of Seattle in the early 1960s. They used mostly vacuum tubes and various other technologies now considered Legacy. The idea behind a differential voltmeter is that you compare a known voltage with an unknown one, and use a meter to tell when they are equal. The settings you used to get the known voltage are then equal to the voltage you wanted to measure. Ponderous. Today’s digital voltmeters do the same thing, except they “turn the dials” for you and present the result on a readout screen.

voltage selection dials

Marked dials function as an old-school digital readout.

This assembly is just the voltage divider for the known voltage. It consists of a set of switches and precision resistors arranged so that when you put in a reference voltage, the output equals the voltage you dial in. For accuracy, the resistors used have to be high-precision. These ones have a tolerance of +/- .02% which these days is unheard of. I saw a refurbished working version of this equipment for sale for over $1,000. It’s considered an ultra-precise laboratory-grade device.

inside the voltage divider

From what I can tell this equipment was entirely hand-assembled. That was how it was done in the “old days” of electronics. The colors involved are kind of pretty but they also served to help the assembler be sure he or she had the right part or was sticking the right wire in the right place. All the resistors were made of lengths of fine wire wound onto forms then glued in place with clear paint. Fluke may have constructed the rectangular ones themselves. The yellow cylindrical ones were made by an outside firm.

voltage divider back side

I couldn’t get over the workmanship put into these components, so I kept one of them. But this one is now extra and is destined for the recycling center.

High Voltage Divider

8 April 2017

100KV high voltage divider

Here’s another piece of “legacy” technology. However, in this case the manufacturer, Spellman High Voltage Electronics Corp in New York, still offers this device as the HVD100. This is the smallest model, for up to 100K volts. That’s 100,000 volts. The input voltage can be monitored at a ratio of 1,000 to one, or 100V full scale, or at 10,000 to one, for 10V full scale. The total resistance of the column is 1,000 Meg ohms or 1 Gig ohm.

I bought this unit on eBay as basically a piece of junk. I was curious what it was, as the description wasn’t clear. It arrived slightly damaged. I disassembled it and altered it a bit to strengthen it and make it easier to take the top and bottom electrodes off. All the rounded parts are for the purpose of reducing arcing. Arcing will interfere with measurements, creating momentary lower-resistance paths across the device. However, the top and bottom electrodes make it really clumsy and difficult to transport. It is designed for laboratory use, and includes a sparse but descriptive label and BNC connectors to attach measuring equipment.

high voltage divider detail

As with many of the items I have kept around, this one has a certain aesthetic value, but I never use it. Though I find high voltages exciting, they are difficult to produce and dangerous to handle, and really beyond by current experimental capabilities.

Depth Sounder

3 April 2017

Here’s another piece of equipment destined for the dustbin (or in this case, electronics disposal center). I found this a few years ago at the Goodwill Outlet in Seattle. As far as I know, it is totally functional.
It does, however, lack the transducer needed to make it work on a boat.

legacy depth sounder

Location by Echo

Radar, Sonar and related distance-finding technologies all operate on the basis of echo-location. It’s a clever system, because you can measure both distance and direction from just one point. With visual methods you need two or more points to view from so you can triangulate.

In the case of this device, the transducer is fixed to the bottom of the boat, so it only points down. Thus, “depth and fish.”

Whereas cheaper versions are geared only to tell you how much water you have under your keel, this one is rigged to display multiple echos from different depths. Judging from the difficulty I had in finding the user’s manual for this instrument, I would guess it was built and sold before internet shopping became popular. Modern versions still operate on the same principle, but are computer-based.

Here’s the electronics:

depth sounder electronics

Relatively simple. It operates on the boat’s battery, 12 volts. There’s a connection for the transducer (I moved it from the back). There’s a motor to spin the lighted indicator, and some logic circuits. If you’re into electronics, you’ll also notice some RF (radio frequency) parts on the board. Per the manual, the transducer operates at 200KHz. That’s RF, and as sound, classifies as ultrasound. It’s ten times higher frequency than what we can hear with our ears. I don’t know about fish.

Toroid Transformer

26 March 2017

This is the first of a short series devoted to items of technology I have run across in my pursuit of my electronics hobby that were once “cool” but are now seldom used. Most of the things I will show here are destined to be thrown away or otherwise disposed of, as I have found no use for them, either.

The Toroid

The toroid is a big deal in some branches of New Age Physics and is a significant concept in regular physics as well.

Technically, “toroid” describes the shape of a torus or similar geometric object. It is, however, used as a noun. The shape is, colloquially, a “doughnut.”

Coils wound on toroid cores have been around for a long time, as they have certain advantages to cylindrical coils or square transformer forms. The magnetic field they generate tends to stay inside the core, so they emit less electromagnetic interference.

Toroidal parts are a little tricky to manufacture, but the need for them has become so great that they are now commonplace. However, 60Hz (or 50Hz) power transformers are a rarity in electronic equipment nowadays, having been replaced by high-frequency transformers. They are still used in electric power systems.

My Transformer

toroidal-power-transformer

This transformer came in a video distribution rack made by a company called Sigma, probably around 1995. The primary takes line voltage (120VAC) and the secondary outputs about 30VAC with a center tap. It was used to make a +/- 15V power supply. That power was fed to amplifier modules that created +/- 12V rails using on-card linear regulators. The amplifiers were high-power op amps connected in current mode. They only needed a voltage gain of 2. Each card had two. This was for old composite video. Composite video is out of style now, so all the equipment that was made for it (and there was a LOT!) is now just this side of junk.

The future of legacy technology

Does old technology have a future? SciFi writers have speculated about this. What if this planet gets downgraded and we can’t make modern technology any more? Would older “junk” technology help us recover? And what if we travel to a distant planet that turns out to be less advanced than ours? Would it help to have an older technology available that would be usable there? These are actually ancient questions, but not even LRH ever really goes there. It gets mentioned in accounts of ET history every now and then. If the true data about Antarctica ever gets released, it would be quite a revelation, and this question comes into play in those ancient events.

But I must say, this thing weighs about 5 pounds and is now replaced by technologies weighing less than 1 pound. You could never take it into space using our rockets. But should I keep it as a novel paperweight?

toroidal power transformer upright

It is somewhat interesting to look at.