Bit Of A Hack

Home Archives

Keep up to date with Bit Of A Hack...

AVO DA116 repair: Replacing the LCD [Permalink]

I like to repair old broken test equipment. I have a small collection (about twenty items) of multimeters, scopes, function generators and some other odd pieces. I got most of them from ebay, broken, and then fixed them to use them. More recently however I have just been fixing them for fun and don't use them much. I have mentioned this before on my blog, when I restored a multimeter from the 1940s (the oldest in my collection). In that case I was focussing more on the wooden case which is unusual for me. I'm usually just doing electrical repairs on them. You can see it here.

Anyway, this post is about my AVO DA116. I did this repair a while ago and almost forgot to post about it. I bought a broken AVO DA116 from ebay. For those who don't know; AVO made a few digital multimeters before the name AVO went away. So far I have three digital AVOs. I now have two of them fully working, the other uses nixie tubes and still needs fixing.

Here is a quick pic of the AVO after the fix.

The whole kit

So, what was wrong with this meter? When I first tested it, I switched it on, but couldn't see anything on the screen. It was as if there was simply no power to the meter at all. I spent about half an hour trying to debug what I thought was a power issue. I was looking through the manual at the schematics (yes this meter came from that era) to try and find where a power fault might occur. After checking all of the outputs of the power board, I concluded that all of the power circuitry was working fine. Then I noticed that the LCD looked rather dark. I almost couldn't believe that I hadn't noticed that the LCD had leaked. If you don't know how LCDs work, go google it now. It seemed that the liquid in this LCD had simply covered the entire screen. You could just about make out the difference between a segment that was on and one that was off if you caught the light correctly. This was the only fault with the meter, I checked all the ranges I could, they worked fine. The only problem was that it was almost impossible to read the LCD.

At this point I thought that it was game over. I'll never find a replacement for that particular LCD. Until this point I had been probing around at the power board at the back of the meter. This is easy to access with the back removed. I needed to get to the LCD to see what could be done. Unfortunately this AVO wasn't designed for reparability. To get to the PCB with the LCD on it you have to cut or desolder some wires.

Probe wires cut

other wires cut

The broken LCD on the PCB

Once I was in, I found that it was fairly easy to remove the dead LCD. It was sat in a kind of free-form socket with solder on the four corner pins. It took a little effort desoldering but most of the socket pins were untouched. I also found that the LCD was rather large and that if I could get a smaller one with all the same segments on it then I could make an adapter that would allow it to fit in the same socket. So I found some on farnell and ordered five of them. They'll be handy for other projects too and I expected to fail the first time.

The broken LCD removed

The broken LCD removed

The socket on the PCB

new screens

These LCDs were slightly shorter and much narrower than the dead one so they could fit on an adapter board. The next step was to make a map of which pins controlled which segments. Then I could use the diagram from the datasheet for the new LCD to figure out how to wire up an adapter board to go between the new LCD and the existing socket.

Internal wiring of old LCD

Adapter board wiring

So, I put the LCD on some pad board along with two rows of headers to match up with the socket. To test the theory that it would work I wired up the common line first and then wired up the minus sign segment to see if I could get that to light up.

LCD on pad board

Adapter before wiring

Header strips match socket

Working test segment

After seeing that this worked, I wired up the rest of the LCD. I did this with some really thin enamelled copper wire. It's not the easiest thing to work with when soldering, it took me more than an hour to wire it all up.

Adapter board wired up

Almost working perfectly

I had to make at least one mistake. A dry joint on one of the pins made this segment not light up. An easy fix.

New LCD fitted and working

The new screen is almost perfect. I think the decimal points are driven slightly differently and so the contrast is not as good on these segments with the new LCD. It's still easy to read though. With the addition of a small section of grey card I was able to hide the fact that this screen was narrower and would allow you to see the PCB behind it. Now that I had a readable LCD in place, I needed to reconnect all of the wires that I cut to get into the case. I wanted to leave this in a repairable state so I soldered connectors on instead of just splicing the wires in place. This may cause a slight difference in some high current measurements, but I can calibrate it if I need to.

New LCD with card and cover

New connectors

Probe connectors

PCB probe connector

New connectors in place

I can't remember how much I paid for it now, but it was fairly cheap as it was sold 'untested'. Now it is fully working and it fits great with my collection. Here are some pictures of the meter after the repair was complete.

new screen close up

The whole kit


instruction manual schematic

schematic close up

By .

Leave or view comments

C88 GPIO Box [Permalink]

This is just a quick one.

I thought I'd share some pictures of the peripheral I have built for my C88 computer. It's just a generic sort of input and output device. It was a while ago now, must post things more often.

It has three modes of input. You can use the rotary encoder, the switches or the ADC. The current input value is displayed on a seven segment display. The output also has a seven seg. There is also a bunch of output LEDs, an output DAC and [space for] a speaker.

The speaker doesn't work yet because I haven't had time to make it work. I need to figure out how to use timers on the Arduino Zero Pro. This shouldn't be too hard, It's a cortex M0 which has at least one timer built in to it.

Code is on github, had to write some shift register libraries too...

Anyway, enough talk, here are pictures:

This is what's inside

What's inside the box

Testing the DAC with a sawtooth generator

A program to generate a sawtooth wave

A quick demo after it first worked


The complete box with labels on the controls

complete with labels

By .

Leave or view comments

Working with Arduino Zero or M0 pro on ubuntu (.org board) [Permalink]

I have recently bought an M0 board so that I can play around with the CMSIS library, mainly the RTOS stuff. The problem is that there is little documentation about how to use the board.

The .org site provides some details but not all.

If you just tried plugging it in and uploading code, you probably came across this error: "no valid jtag interface configured"

This is how I got started with my Arduino zero plus:

I installed the IDE version 1.7.6 from arduino .org. (the latest .cc version will probably suffice too but the board says .org on the back so I decided to stay consistent.) Then, following their rules, I created a Udev rule for the Zero.

To do this, you need to create a file called /etc/udev/rules.d/98-openocd.rules This can be done from a terminal using vi:

sudo vi /etc/udev/rules.d/98-openocd.rules

Once you have VI open, go in to insert mode (press 'i') and then copy and paste this code (just select it here and then middle click in the vi window.)

ACTION!="add|change", GOTO="openocd_rules_end"
SUBSYSTEM!="usb|tty|hidraw", GOTO="openocd_rules_end"
#CMSIS-DAP compatible adapters
ATTRS{product}=="*CMSIS-DAP*", MODE="664", GROUP="plugdev"

Now you can press escape then type :wq and press enter.
This will save the file.

This will allow members of the plugdev group to use the ardino.

Then you need to make sure that you are a member of the plugdev group.
You can check to see if you are already in the plugdev group by running the groups command and looking for plugdev in the list.
If plugdev is not listed then you can add yourself to the plugdev group by running this command:

whoami | sudo xargs usermod -a -G plugdev

I kindly did a "whoami | xargs" so you don't have to type your own username, just copy and paste the command right away.

Then just log out of your computer and log back in again, (to apply the new group settings) and then start the IDE and give it a go.

I reccomend using the programming port, not the native port. Also, if your board was already plugged in when you added the Udev rule, disconnect it and then reconnect it.


By .

Leave or view comments

C88 - The Homebrew CPU inspired by the SSEM [Permalink]

This is a post I needed to get around to doing for a while. This is about a CPU that I designed and then wrote in VHDL. It is meant to be a little like the Small Scale Experimental Machine (SSEM, more commonly known as the Manchester Baby).

I find I am still not very good at making videos but here is a quick intro:

All of the VHDL code is on github.
The simulator app is also hosted on github and has programming documentation.
You can generate a link to a program too so you can share it with other people.

I estimate that this project cost me about £120 in total (That's GBP, it's roughly $190 USD if it helps you).

A funny story I forgot to mention in the video;

I'm a member of York Hackspace, we were all going to the UK Maker faire in Newcastle (which was great fun as usual) to show off some projects (mainly Spacehack). Another member, Bob, persuaded me to take this computer along a few days before. It didn't have all of the features it has now, it was an earlier incarnation. Back then the papilio was just bolted to the lid. The unfortunate thing was that we were in an area of the building that had a very strange kind of flooring which seemed to be designed to build up a static charge in anyone that walks on it. All day we were sparking between ourselves and various other earthed items, experiencing the usual discomfort of such sudden [and unexpected] sparks. But half way through the day, Bob touched to top of the bolt that was holding the papilio to the lid. There was a spark. There was the death of a papilio. It must have been a fairly significant charge, it didn't just kill the papilio, it also killed the 8x8 LED matrix board. It's actually fairly impressive.

To this day Bob avoids touching the C88, when he can, for fear of his own (and I quote) "lightning bolt Sith powers".

Some pictures

As always, click any image to enlarge.








By .

Leave or view comments

MeArm IK [Permalink]

I recently got some MeArms to play with. I even got a special MeBrain preview board.

The MeArm is a wonderful little robot arm designed by Ben Gray.

I wanted to use the excellent MeArm IK library written by Nick from York Hackspace. I noticed a lack of documentation which slowed my progress a little and so decided to explain in detail how to calibrate your MeArm and get the IK library working.

For those who don't know; IK stands for Inverse Kinematics. The servo angles do not relate directly to any meaningful coordinate space and so it is awkward to control the MeArm by just thinking about servo angles. The IK library solves this problem by converting from a useful coordinate space (usually cartesian X, Y and Z) to the angles required for the servos.

So here I have written three steps to follow to get things set up. You can click on any of the images in this post to get the original size.

The MeArm

Step 1

Record which pins are used for which servos.

It seems like the obvious first step. (And it is.) I had somehow got the shoulder and the elbow servos mixed up and spent a while wondering what I had done wrong. Make sure you check which pin controls each servo, write it down, then check it and check it again.

Step 2

Measure the servo PWM values you need for each servo.

This step is much trickier and will take a little while.

The first thing we need to understand is how the angles are measured. Some are obvious, some are not.

Let's start with the base. It's a fairly simple one.

Base Angles

The base servo controls the rotation of the entire arm around the Z axis, the IK library considers zero degrees to be when the arm is facing forwards. To rotate to the right is to increase the angle and to rotate to the left is to decrease the angle. The image shows that the base servo should be able to reach 90 degrees either side of the zero point. 90 degrees is pi/2 radians.

You need to make sure that when you build your MeArm you get the servos into positions that allow an appropriate range of angles. This is usually simple. In this case, just rotate the servo as far left as it can go and then attach the arm to the base so that it is pointing left. The servo can do at least 180 degrees and so will be able to reach both sides.

Now lets look at the shoulder and the elbow. if you are standing above the arm and looking down at the top of it, you will see the shoulder servo on the right and the elbow servo on the left.

Let's look at the shoulder first, it's the simpler of the two.

Shoulder Angle

The shoulder is considered to be in the zero position when the main body of the arm (that big lever in the middle) is pointing directly forwards. This is about the limit of the arm's reach. The image shows the main body of the arm in a 45 degree position. this is a more natural resting position for the arm.

Finally we have the elbow. The elbow is a little odd. The best way to imaging the elbow is by imagining that the lever that is connected to the servo actually extends in the other direction, opposite to the actual lever. It is the angle of the imaginary extension that you want to measure. As a result, the angle of the actual lever is usually negative. See the image below, where the lever is at -45 degrees, for more clarity.

Elbow Angle

I almost forgot the gripper, it's dead simple though, 0 degrees is gripper closed, as the angle increases, the gripper opens. 90 degrees is a sensible gripper open limit.

So, how do we match angles to PWM values?

To do this, I connected a slider board to my MeBrain and used one of the sliders to allow me to control one servo at a time. I was able to select which servo to change using the serial console in the Arduino IDE. The current PWM value for the servo is simply printed to the console. To find the limits of my MeArm, I took each servo to a sensible minimum and maximum end point and wrote down the PWM value I got at each angle. It is important to record both the angle and the PWM value because the MeArm IK library needs to know how each angle matches to each PWM value.

The Arduino Sketch I used to do this is here:

#include <Servo.h>

int basePin = 5;
int shoulderPin = 6;
int elbowPin = 9;
int gripperPin = 10;

int inpin = 1;

Servo *servo;
int angle = 90;

Servo base, shoulder, elbow, gripper;

void setup() {

  servo = &base;

void loop() {
  angle = map(analogRead(inpin), 0, 1023, 0, 180);
  if (Serial.available() > 0){
    char c =;
      case 'b':
        servo = &base;
      case 'g':
        servo = &gripper;
      case 'e':
        servo = &elbow;
      case 's':
        servo = &shoulder;

In the serial console you can send the letters 'b', 'g', 'e' and 's' to select the base, gripper, elbow and shoulder servos respectively.

So, load this on to your MeBrain and find the numbers you need to calibrate your MeArm. Once you have found these numbers, you can put them into the constructor call for the MeArm instance in your Arduino sketch. For each servo, the library needs to know the minimum PWM, maximum PWM, minimum angle and maximum angle in that order. These min and max pairs aren't constraints, they are just calibration points really. The PWM values will correspond to the angles. The order they are specified in is: Base, Shoulder, Elbow, Gripper. See example below.

meArm arm(
      180,21, -pi/2, pi/2,    //Base     (-90 to  90 degrees)
      102,15, pi/4, 3*pi/4,   //Shoulder ( 45 to 135 degrees)
      148,106, 0, -pi/4,      //Elbow    (  0 to -45 degrees)
      16,50, pi/2, 0);        //Gripper  ( 90 to   0 degrees)

Step 3

Phew, step two was lots of effort, step three is simpler. Now we just need to put some code on the MeBrain.

The library comes with some great examples and I will shortly be adding a MeBrain example to it. Until then you can grab any one of the examples and adapt it to your needs being sure to call the constructor with your own calibrations values. If you don't then you will be using the default values which are unlikely to work properly with your MeArm. The calibration procedure needs to be done on each MeArm you use and may need repeating if you replace a servo or otherwise change it's alignment.

When you write your code for your MeArm, you will need to decide which coordinate space to use. The library supports both cartesian and cylindrical-polar coordinates. (If you get the right version.) For the cylindrical polar coordinates you need to specify 'theta' (the angle of the base), 'r' (the distance from the Z axis to the grabber tip) and 'z' (the usual cartesian z axis position or height).

The following two images show the two available coordinate spaces.

Cartesian Coordinates

Cylindrical Polar Coordinates

You simply choose between these four functions:

The 'Cylinder' versions are for cylindrical polar coordinates and the others are cartesian. The 'goDirectlyTo' functions will move as fast as possible to the target. The 'gotoPoint' functions move through a smooth path to their target at a more controlled speed.

Cartesian space is better for automated control and is what the library uses internally to remember it's current position. The polar space is easier for a human to use because it is more intuitive to control theta directly.

The zero point on each axis is at the centre of rotation of the base servo, at the point where the servo joins to the under side of the MeArm.

And enjoy

It took me a little while to figure this all out, I even had to ask Nick about how the angles are interpreted. Hopefully this will be a useful guide in getting others to have success with the IK library.

The MeArm is super fun to play with once you have it working. I recommend you go buy at least one here.

By .

Leave or view comments

< Older

This website uses cookies. If you don't like this, please stop using this site.