Sunday, 22 April 2018

BBC Micro Model B Repair and Restoration Project

I’ve always had a bit of a soft spot for the BBC Micro, having been introduced to the machine at school back in the late 80’s.  I decided to try and find myself an original Beeb, so off to eBay to look for a suitable candidate.

After some looking I found a suitable BBC Micro Model B, I duly purchased this for the princely sum of £50 plus shipping.  After a short wait, it duly arrived but I didn’t power the machine up as the power supplies have a nasty habit of letting out the magic smoke. In the mean time I had sourced a suitable RGB to Scart cable and a PSU repair replacement capacitor kit.  Both of these came from the excellent Retro Computer Shack.

My BBC Micro

Inside the BBC Micro, the previous owner had fitted a Watord Electronics Sideways ZIF Socket which allows you to change ROMs with the minimum effort.

Replacing the capacitors


Dangerous voltages reside inside the PSU, even when switched off and unplugged.   
Ensure that all the high voltage caps are safely discharged first!


The first job was to remove the power supply from its case. This can be a little tricky as you need to remove a couple of earth bolts, push out the disk drive power connector and disconnect the mains power switch.

Power supply removed from the Beeb

Once the PSU had been wrangled out of its case, I set about replacing the 10nF (0.01µF) and 100nF (0.1µF) X class mains filter capacitors and a small 220µF electrolytic capacitor which sometimes causes intermittent power supply startup issues.  The modern replacement mains filter capacitors are X2 class.  

The RIFA branded capacitors are prone to failures, when the do fail they realise plumes of noxious smoke. 

Power supply extracted from its case

Existing RIFA capacitors, ticking time bombs 

New X2 mains filter capacitors fitted

Here's a shot of  the old RIFA capacitors showing those stress lines and hairline cracks that would eventually result in a failure.

With the capacitors replaced I re-assembled the power supply. I fitted it back into the BBC Micro and powered on, it passed the smoke test phew.  Alas the BBC Micro would not start up, It just emitted a continuous tone and there was no display on the screen.

Repairing the poorly BBC Micro

The fault I was getting could be caused by a faulty video processor chip but as I didn’t have one to hand,  I tried re-seating the chip and I also re-seated some of the other chips but this made no difference. Next step try checking the voltages, which were all correct but when I was probing the various +5V, -5V and 0V connectors on the main PCB, it suddenly sprang into life.

Hmm I thought it could be a dry joint so I removed the main PCB and checked for dry joints but couldn’t see any.  There are several power supply connection points on the main PCB, which are FASTON PCB Tab type connectors. I re-flowed all of these connections on the back of the main PCB.  Having done this, I re-assembled the machine and tried again. Success the machine started up correctly, I got the classic twin tone beep and was presented with the start screen prompt.

Finally I gave the case a good clean using hot soapy water to remove the years of ground in grime.

Sunday, 25 March 2018

Building a awesome VIC20 controlled tank

Updated 05/04/18

I have recently been thinking about building a Commodore VIC20 controlled robot.  Some inspiration came from the classic 1980s Usborne How to Make Computer-Controlled Robots book [3] and the BBC Buggy[4].   

You will need:

How to build:

First I needed to laser cut the tank chassis.  I downloaded the DXF file and opened it in
Techsoft 2D Design (This is the CAD software we use with our laser cutter).  

Cutting out the parts from an 5mm perspex sheet on the laser cutter

Once the parts were cut out, I set about building the tank using the tank building resource instructions.  


Next I built the motor controller board using the supplied instructions.  The board was originally designed to use with a 18 pin PIC microcontroller, I used a programmed PICAXE 18M2 chip[1] to test that the inputs and outputs worked correctly. The board was functioning correctly so I set about building a suitable interface circuit.

I built a prototype circuit on a breadboard to test that I could interface the VIC 20 user port with the FAN8100N motor driver IC on the motor control board. I used a 74HCT244[2]. User port I/O numbers 0 to 3 are connected via the 74HCT244 to the forward and reverse inputs on the FAN8100N motor driver IC.

These tests worked so I went on to add a simple LED display to monitor the status of the user port and added some circuitry to interface the inputs from the existing motor controller board with the VIC 20 user port.  I then verified that the inputs worked correctly.  Now that the circuitry was working correctly I transferred the breadboard layout onto stripboard to make things more permanent.

I removed the existing PIC socket and soldered some Molex headers in place so I could connect the robot to my VIC20 via a 5 meter length of ribbon cable.  

I added some micro switches to the front of the tank and a line following board to the chassis.

Completed stripboard layout


1 Input circuitry

Input signals from the motor controller PCB (at TTL logic 0 and 1) are applied to the inputs of the 74LS14 Schmitt trigger IC. This is an inverting Schmitt trigger, so that a logic 1 input will cause the associated output to go to logic 0.  The 1KΩ resistors pull the input down to 0V (logic 0) in the absence of input signals.   

A logic 0 out at the Schmitt trigger will cause the cathode of the appropriate LED in the quad opto-isolator IC to go low, so turning the LED on.  This turns on the associated photo-transistor in the opto-isolator and its emitter goes high (due to the p.d across the 1.2kΩ resistors). The logic levels at these emitters are connected directly to the user port PB4-7, which are configured as inputs.   The Schmitt input circuitry ensures precise triggering, whilst the use of opto-isolation obviates the possibility of damage to the microcomputer.

2 User port status LED 

User port signals PB0 -7 are feed through a 74LS540 Octal buffer and line driver IC.  The outputs of this IC are inverted so an logic 1 will turn the LED on in the 10 way light bar LED display.

3 Motor driver

User port signals PB0-3 are feed through a 74LS244 Octal buffers and line driver IC. The outputs of this IC are connected to the FAN8100N Motor driver IC on the existing motor controller PCB.

Mechanical assembly:

I started to assemble the chassis, once this was done I assembled the tracks.


Now the mechanical assembly is complete, I could start wiring things up.  Each motor has a + marking on it, so I made sure the red coloured wire was soldered to that terminal.


With all the wiring in place, I tested motors to make sure they worked correctly.  I need to write some BASIC code to make the tank do something, I'll get onto that later.

Testing the sensors

This simple program makes the robot move forward until it hits something, then reverse and swivel right or left before setting off again.  I found this in the Usborne Practical Things To Do with a Microcomputer book.

10 POKE 37138,15
20 LET Y=37136
30 POKE Y,5
50 IF Z<>0 THEN GOTO 70
60 GOTO 40
70 POKE Y,10
80 FOR I=1 TO 10
90 GOSUB 190
100 NEXT I
110 POKE Y,0
120 LET P=8
130 IF RND(1)>0.5 THEN LET P=1
140 POKE Y,P
150 FOR I=1 TO INT (RND(1)*20+10)
160 GOSUB 190
170 NEXT I
180 GOTO 30
190 FOR T=1 TO 100
200 NEXT T


  1.  A PICAXE chip is a standard Microchip PIC microcontroller that has been pre-programmed with the PICAXE bootstrap firmware code. The bootstrap code enables the PICAXE microcontroller to be re-programmed 'in position' directly from a PC.
  2. This is an 8-bit buffer/line driver with 3-state output. The device can be used as two 4-bit buffers or one 8-bit buffer.
  3. These books are now freely available as PDFs from here.
  4. The BBC Buggy is an small robot designed to work with the BBC Microcomputer.

Saturday, 10 March 2018

Deltronics CONTROL IT buffer box

I recently purchased a Deltronics CONTROL IT buffer box from the online tat bazaar eBay, with a view to connecting it to my Commodore VIC 20.  The Control IT buffer box is a general purpose interface that gives you easy and protected access to the computer’s user port.  It was designed to connect to the BBC Micro or other suitable computer.

The box has a 25 way D-type socket on the back and the connecting cable is terminated with a 25way D-type plug.  I had to make up a lead as the box wasn’t provided with one, luckily I managed to find a pinout for the 25way D-type socket on this website.

The buffer box contains its own mains power supply which is stabilised and protected internally against overloads and short circuits and the key switch on the front selects either 12 V or 6 V but I don’t have the key.  The full supply voltage of 6 V or 12 V is available between the red and black sockets at all times.  Because of the voltage drop across the buffer box internal circuitry the voltages available at the blue and grey sockets will be less than the supply voltages.  The voltages are blue to black 5.25 V(6 V range) 11.25 V(12V range) and grey to grey 4.5 V (6 V range) 10.5 V (12 V range).

The Control IT buffer box can be used with the following BBC Model B, BBC Plus, BBC Master 128, BBC Master Compact, RML 380Z, RML480Z, RML Nimbus and Sinclair Spectrum although it can be used with any computer that provides access to eight input and eight output lines at TTL levels.

I connected the output lines to the user port on my  VIC 20 and wrote a quick bit of BASIC software to turn the outputs on in sequence.

Sunday, 25 February 2018

VIC 20 Future proofing

I have recently been future proofing my VIC 20 and carrying out some modifications.   I have replaced all 8 electrolytic capacitors as these tend to dry up and fitted heatsinks to the Video Interface Chip (VIC) and Kernal ROM.  These chips are run hot and are prone to failure so it is sensible to install heatsinks to prolong their life.

I used my trusty Duratool Desoldering Station which makes the job an absolute doddle, compared to using a desoldering pump and solder wick.
I have also carried out a couple of modifications to improve the VIC Video, further details can be found here and a useful video on the matter can be found here.   I have done the following:

  1. I added a 220 µF capacitor across the +5V supply to the VIC chip. (I connected the cap between pin 40 of chip which is connected to one side the ferrite bead (FB11) and ground)
  2. I removed the ferrite bead (FB9) connected to Pin 2 and replaced it with a 270pF ceramic capacitor.

Hopefully this will improve the chances of my VIC 20 lasting for another 30 years.  I picked up the heaksinks from



Heatsink fitted to the VIC chip

VIC Video mods

Sunday, 17 December 2017

6502 Badge

I recently built a rather nice 6502 Anniversary Computer Badge which was designed to celebrate the 40th Birthday of the Apple II, Commodore PET, and Atari VCS.

Get your own here 6502 40th Anniversary Badge 


  • A 65C02 microprocessor, running at 2 MHz
  • 2K RAM (expandable to 16K or 32K), with battery backup
  • 16K EPROM (expandable to 32K), with floating-point BASIC and 6502 machine-level monitor
  • Two 8-bit output latches
  • 7-digit 7-segment LED display, plus annunciators
  • Software-driven 9600 baud TTL serial I/O port

I made following mods to the build:

  • I socketed all of the chips using nice turned pin IC sockets, except the 2K RAM which is soldered directly to the PCB.

6502 Badge bare PCB

6502 badge, nearly completed 

 6502 badge, with almost everything socketed.

Friday, 15 December 2017

Further 8-bit Adventures

I recently was experimenting with the user port on my VIC 20 while trying not to blow it up.   The VIC20 has various Input/output ports one of which is the user port (really, just the exposed edge of the printed circuit board) on the back of the computer. 

The user port is connected to one of the VIC20’s two 6522 Versatile Interface Adapter (VIA) chips.In my experiments I am using the eight lines which can be set as inputs or outputs.

The first hurdle was figuring out how to connect my projects to the user port, luckily suitable connectors are still available. I got mine from the brilliant The Future was 8 Bit web Shoppe.   

I made up a suitable cable using some ribbon cable and the other ends of the wires are plugged into a breadboard.

Here’s a picture of the connector after I soldered some ribbon cable to it.

I found the binary light display project in the Usborne Practical Things Do with a Microcomputer book and thought I would have a go. 

I simply connected a LED to each of the 8 I/O lines. The cathodes are connected via 220Ω resistor to the user port’s ground.  Some of the classic Usborne 1980s computer books are freely available to download as PDFs from here.

The software is fairly simple.  The chip controlling the user port is a 6522 Versatile Interface Adapter (VIA).  From BASIC, you can PEEK it to read an INPUT or POKE it to set an OUTPUT.

For example:
10 POKE 37138, 255
20 FOR I = 0 TO 255
30 POKE 37136, I
40 FOR J = 1 TO 150
70 GOTO 20

Line 10 sets the Data Direction Register (DDR) which controls whether that line will be an input or an output and line 30 turns the individual lines on and off.  Each LED lights up in a pattern of 0s and 1s for each binary number from 0 to 255.

Having made some LEDs flash I wondered if a seven segment display could be made to count from 0 to 9.  I took my Seven Segments of PI board which is designed to work with a Raspberry Pi and connected it to the user port.    

I found an example in a book called Practical Interfacing Projects with the Commodore Computers.

I had to modify the code slightly as the circuity is different from the example given.

10 POKE 37138,255: A=37136
20 POKE A,40:GOSUB500
30 POKE A,157:GOSUB500
40 POKE A,185:GOSUB500
50 POKE A,58:GOSUB500
60 POKE A,179:GOSUB500
70 POKE A,183:GOSUB500
80 POKE A,41:GOSUB500
90 POKE A,191:GOSUB500
100 POKE A,59:GOSUB500
110 POKE A,175:GOSUB500
120 GOTO20