Voltmeters

I have a lot of voltmeters. And ammeters, and ohmmeters. Many of them are, of course, multimeters that can measure any of those things.

I still have my very first multimeter, from Henry's Radio on Edgeware Road in London, and I still buy new multimeters with new features. In fact, I bought one just a week or two ago with a plan to add an RS-232 serial output to it (more about that in a later posting!).

I have several meters that were made by AVO, a British firm once based in London but now located in Dover. The classic one is the AVO Model 8 shown above, but I also have a Heavy Duty AVO, a Model 12 (for vehicle electrical systems) and a few digital AVOs. Other than AVO, I have meters by HP, Sinclair and Keithley.

Why so many? I don't really think of myself as a collector of old voltmeters, although I do have what amounts to a moderately-sized collection. And I there are several types of meter that I don't have any examples of at all. My grandfather had a fine voltmeter in the style of a pocket watch, but I don't have that any more (nor any examples of that once-popular format). I'd like to find a really large physics classroom-style meter with glass case, wooden construction and brass terminals, but as yet, I don't have one.

There are times when it's handy to have a couple of meters in the same circuit set-up, to measure voltage on one and current on the other. This is often useful when charging batteries or testing power supplies. I have both hand-held, battery-operated meters and bench meters that run on a mains power source; that's useful when the meter needs to be 'on' all day.

But I think the real answer is that I just like test equipment and I like to have a few voltmeters handy. The red LEDs just make a nice look when I'm at the workbench.

Bipolar Stepper Motor Driver

I wanted to make a rig for messing about with stepper motors, so I cut some bits of MDF and mounted a motor that I'd salvaged from an old Epson ink-jet printer. The motor turns a 200mm MDF disc via the same toothed belt that originally moved the ink-jet print-head across the printer:

Initially, I drove it by an L298N H-bridge board that I'd made up previously for driving a pair of DC motors. I added a pair of 8.2Ω resistors and powered it all from a 12V, 1.5A power supply. The resistors were supposed to improve the rise-time of the current in the stepper motor coils, and hence allow for faster stepping:

It didn't work very well, and required a number of I/O pins on the Arduino to drive it. But I was able to use the MDF disc as a turntable to make stop-motion videos using a Canon D30 DSLR and two optocouplers connected to the Arduino. I used a modified Bresenham's line-drawing algorithm to combine the stepper drive with the camera trigger. Think of it as drawing a line diagonally across a rectangle, whose height is the number of steps per revolution and whose width is the number of frames to be shot:

But I knew I could do better with a dedicated bipolar stepper motor driver chip. I found the circuit diagram of a driver board used in the MIT Machines That Make project, and that used the Allegro A3982 chip (the Modular Bipolar Stepper Driver). That chip is only available as a surface-mount (SMT) part, so initially I thought about using a ready-made SMT/through-hole adaptor. But the tracks on the adaptor PCB were so fine that they clearly could not carry the 2A or so that the chip could handle. I made my own PCB, using Toner Transfer, with much thicker tracks:

Now that the PCB is working, and the Arduino software has been modified to drive it, I can think about the various things I wanted to do with the motor rig. One is to try to make accurate bends in wires with it — a sort of CNC wire-bender. Another thing is to improve the stop-motion rig and to shoot larger objects. I'd also like to think that the stepper motor driver is a small step towards a small CNC machine, but of course that all depends on a much more elaborate mechanical arrangement.

Surface-Mount Soldering Workshop

I helped to run a surface-mount soldering workshop at the Bristol Hackspace the other day. I took along my thinnest soldering iron tip, some tweezers, a loupe, the stereo microscope and fine solder. It all went very well, with six people making up tiny DC-DC converter boards.

By the end of the evening, all the DC-DC converters worked. They take in 1.5V or so from a single cell, and can be set up to output anything from 5V to 12V. The circuit is specified for up to 2A output, although an AA cell is unlikely to be able to source enough current to keep that up.

Doing this workshop has reminded me that I still want to do more with surface-mount parts and tiny microcontroller circuits. It's also shown me the possibilities of powering stuff from single cells, either 1.5V alkaline or even 3.7V lithium cells.

Pottering with Plotters

I've been messing about with plotters recently. I have two of them that accept HPGL (Hewlett-Packard Graphics Language) and another that has a proprietary language. At the moment, I'm using the Roland DXY-990 because it's a flat-bed type with eight pens that will stand up like an easel:

The software is all written in C and runs on a Linux host machine. I'm using the parallel printer port to connect the host to the plotter, which avoids some of the handshaking troubles of a serial RS-232 interface.

I was inspired by seeing some elliptical arches that were carved into wood panelling. That led me to investigate the parametric equations of the ellipse, which led to the "superellipse" shape and also to the use of the "three centred arch" to simplify the design in the days before CAD. All of these will make interesting plotter demo programs.

But just to show that all is not lost for serial interfaced plotters, here's a photo of the fine old Tektronix 833 Data Comms Tester rigged up to the Roland to investigate ways to connect an Arduino to an HPGL machine:

And the Arduino actually driving a plotter:

This Old Bench Amp

Many years ago, I built a bench amplifier from a design published in the popular magazine Electronics Today International. It was in the February 1977 issue, and I built it fairly soon after the mag came out, so that gives you some idea how old the amplifier is now! I used it quite a bit when working on audio circuits, just so that I could listen to the signals and hear what was going on. It's just an amplifier in a box, but remember that in 1977, you couldn't get, say, a pair of amplified PC speakers from FreeCycle. In fact, it wasn't until late 1978 when I saw my first 8-bit computer (a Commodore PET) at school, and the IBM PC wasn't launched until 1981. Sound cards for IBM-compatible PCs came along much later.

Anyway, I've used this little bench amp on and off for over 30 years, most recently with circuits connected to an Arduino. I used it to listen to the output of a SID chip that I wired to an Arduino, for instance. But recently, I've begun to notice problems with it. For one, it's in a wooden box and picks up DECT and GSM phone interference rather badly. Another snag is its use of PP9 batteries, a now-obsolete 9V type (it needs two of them to run on 18V). The most recent circuit I wired it up to, an MCP4822 dual 12-bit DAC chip, revealed another limitation: it has very poor low-frequency response.

Time to make some measurements! There's no point acquiring all this fine HP test gear from eBay unless I'm going to wire it all up to a circuit now and then. So, we have the HP 3310A Function Generator to supply an input signal and the HP 427A Voltmeter to measure the AC voltage at the loudspeaker. The 427A runs on another obsolete battery, a 22.5V type. The previous owner has installed two 4mm sockets on the back of the instrument for an external power supply, so I hooked that up to a DC bench PSU that I made in the mid-1970s. The bench amp that I'm testing is running off my more recent (1990s) Farnell TOPS 4D power supply. There's an HP 3456A, a 3466A and a 3476B nearby, as well as a 1980B scope and a 1630G logic analyser. If I'm in any doubt about frequencies, there's an HP 5326A Timer-Counter with Nixie tubes, no less.

Looking at the circuit, I was suspicious of the 10nF coupling capacitor between the 741 op-amp input stage and the 100kOhm volume control. Seems way too small. So, I worked out the RC time constant, and that was 1ms, which led me to expect a fall-off in response below about 1kHz. Wait a minute -- below 1kHz? Surely not! Middle 'C' is 262Hz, and the 'A' above that is 440Hz; an amplifier should have a level frequency response well below that. Something's wrong with that 10nF capacitor! And that was confirmed by the testing: frequency response falls off dramatically below about 1kHz.

To fix the problem, I increased all the coupling capacitors in the amplifier. The main problem was with the 10nF (C3), which I increased to 4.7uF. The first capacitor that came to hand in the little drawer of recycled caps was a 2200uF, so that went in place of the LM380 output capacitor (previously 470uF). A 47uF axail electrolytic went in place of the original 4.7uF input coupling capacitor. With the HP 3310A as an input again, the output signal retained a constant ampltude down to about 25Hz. The small speaker had no chance of reproducing such a low frequency, but at least the signal was there.

To fix the other problems, I glued aluminium foil to the inside of the wooden case, and earthed it. I used a small spring to make contact with the foil on the inside of the lid of the box. As for the PP9 batteries, I simply wired up an 18V mains adaptor "brick" -- another item that would have been hard to find in 1977. There's room in the box for a stack of 12 AA cells if I really need to use the amplifier on batteries one day.

Things You Find In Scanners

I sometimes pick up odd scanners and printers on FreeCycle, especially broken ones to take apart for the motors, sensors, mirrors and so on. On Friday I got an HP F2180, which was only made in 2007 but had been dropped down the stairs! In taking apart, I found the paper feed motor's optical sensor had been jolted out of alignment in the fall, and the optical grating had become scratched next time the printer was switched on.

So I carried on taking apart intil I had a pile of parts: three DC motors, some opto-slot sensors, and the scanner head. The latter looked like a sealed unit, with no mirrors, cold-cathode lamps or anything re-useable. But closer inspection revealed a 220mm long RGB LED lighting unit, easily desolderable. So that's now ready to be hooked up to the Arduino!

RetroChallenge 2010

This year, just after returning from the Vintage Computer Festival at Bletchley Park, I found out about the RetroChallenge 2010. It's a month of retro-computing activities, taking place all over the world during July.

http://www.retrochallenge.org/RC2010/index.html

Since I'd just been exhibiting the Compukit UK101 for the weekend, I had a number of ideas in my head for things to do on the machine, which is now 30 years old. Some ideas are to do with preparations for future shows, such as making transit cases, dust covers and information sheets for the machines. Other ideas are much more directly about hardware and software for the UK101, such as recovery of all the old cassette tapes, installation of a new EPROM and writing a demo routine for the machine.

I've got off to a slow start, but I have begun digitising the old UK101 cassettes with Audacity (audio recording tool) and then processing them with a Perl script written by UK101 user Martin Ward:

http://www.cse.dmu.ac.uk/~mward/martin/software/index.html#CUTS

The script is configurable to work at 300 baud, as the original UK101 does, or at 1200 baud with higher frequency tones, as my modified machine does. I've used it to recover a "boot" tape, which I wrote in about 1984 to incorporate device drivers for a 9600 baud digital cassette drive and a parallel printer interface (6522 chip). Those drivers are the first priority to add to the EPROM, once I have a 27256 wired up so that I have a few extra k-bytes of space.

And while I'm writing about the UK101, I need to find a source for replacement keyboard switches and keytops. The original UK101 ones were of a type that was available from RS Components, and from Devlin Electronics. But that was in the early 1980s, and I need to find someone who has them now! Here's a photo of the keyboard switches I'm talking about:

Vintage Computer Festival

Over the weekend of 19th/20th June, I took the three Compukit UK101 machines to Bletchley Park for the Vintage Computer Festival. It's the first such festival to be held in the UK, and what better place than Bletchley Park, the home of British code-breaking during World War II.

I had a table in the marquee outside H Block, where the main collection of The National Museum Of Computing is held. Tours ran all day through those exhibits, as well as around the huts and the mansion. I was between an exhibit featuring a 1940s uniselector digital clock and a gentleman who had implemented an IBM 360 Model 30 in an FPGA. Other tables in the marquee showed the Dragon 32, a Sinclair Spectrum ULA on breadboard and a Spectrum with an ethernet interface, sending messages to Twitter.

All in all, a brilliant weekend, with lots to see and many people who remembered the Compukit UK101 -- either as owners or as users of similar machines. I hope we can do it all again next year!

The First Ignite Bristol Event

Tonight, I attended the first Ignite Bristol evening in Clifton. This week is Global Ignite Week, which means that Ignite events have started up in many cities around the world, including in the UK London, Cardiff, Manchester and of course Bristol. It's a lecture format where speakers have just five minutes to "Enlighten us, but make it quick", as the Ignite motto goes. To accompany the talk, there are slides, but once again the pace is quickened by the slides auto-advancing every 15 seconds. One of the hazards of speaking at an Ignite event is to allow the talk to fall behind the visuals, a blunder from which there is rarely a recovery -- and this indeed did happen to one speaker tonight.

The topics covered were diverse, from the 2000AD comic books to rowing across the Atlantic (the full list is here: http://ignitebristol.net/post/411203750/ignite-bristol-1-speakers ). The first batch of talks covered the archaeology of the homeless people in Bristol, and the notion of starting a business without so much as a business plan. The talks were divided up into three batches, with two intervals for refreshments at the bar. The talks resumed with an impassioned plea for people to take responsibility, citing issues such as snow clearing and punctuality. We then heard from an architect who builds with beer crates and poker enthusiast who organises tournaments for charity -- and avoids falling foul of the gaming laws. We heard a very entertaining talk about the pitfalls of rowing across the Atlantic, which revealed the "poo in a bucket, then chuck it" method of waste management along with the sorry tale of the endless mechanical failures in the boat's rudder and seats.

The final batch of talks included the speaker who tried to tell us about "Influence", but got so terribly out of sync with his slides that the image of stars and planets left him with nothing to say but "Quantum mechanics!", much to everyone's amusement. It was clear that the other speakers, who were able to time their talks to perfectly match the slide-change rhythm, had practised and rehearsed while this unfortunate had not. Which brings us to the final talk, on the revival of the dance style known as Lindy Hop, in which the speaker abandoned the slide-show in the final minute and, with her partner, danced for us!

All in all, then, a highly entertaining and indeed enlightening evening. The first of many, I hope, from the Ignite Bristol crew. We certainly had no shortage of people in the audience, and enthusiasm was high. I, for one, will be considering a topic for a five-minute talk at a future event. In fact, I can think of a number of topics, but since this is not a technical forum like Dorkbot, and because of the short time available, I'll stick to something less technical than usual, and of more general interest.

Pseudo-Random Bit Sequences and Linear Feedback Shift Registers

The other day, someone at Dorkbot Bristol asked me about how to generate white noise. Well, there are a number of ways, some analog and some digital. For the moment, I'm going to concentrate on the digital, and in particular, methods that can be turned into programs (sketches) for the Arduino.

The Arduino is an eight-bit, open-source microcontroller board that has become hugely popular in the last few years. Just about every other project at Dorkbot uses one, although we've also had good results with the ARM-based MBED. The microcontroller chip in the Arduino is the Atmel AVR ATmega328 in a 28-pin DIL package (older versions used the ATmega8 and ATmega168 chips).

The Arduino programming environment is based on GCC, the standard GNU/Linux C and C++ compiler, set up as a cross-compiler that generates code for the AVR. So, I set about writing the code for a Linear Feedback Shift Register (LFSR) in C. I referred to a web page on Practical LFSRs for the details.

Once that was working, I wrote a line of code that made a single digital output pin on the Arduino switch on and off in sync with the least significant bit (LSB) of the LFSR. After each execution of the LFSR code, I added a 50 microsecond delay so that the maximum frequency generated was around 20kHz. I connected a small piezo transducer to the pin (I think I salvaged the piezo from a printer or some such device that had a bleeper). The random string of zeroes and ones from the LFSR made the piezo produce white noise, as desired.