Because of the Spectrum Next, I got interested in Sinclair Spectrums after a long (15 year) break. I have acquired a few of the original models and enjoyed reaquainting myself with the Spectrum system and programming. Although I have a DivIDE and other such interfaces, there’s nothing like the nostalgia you get when you load an original program from tape.
Although I own several Spectrum tapes from the old days, there are files available online in TAP and TZX formats which can be played as if you had the original tapes. These are redily loaded into Spectrum emulators but not so easily into the real thing. However, a couple of very clever guys, Duncan Edwards and Andrew Beer came up with a device to do just that. The TAP or TZX files are copied onto a Micro SD Card and placed in the device which, via a menu, you can play the files into a real Spectrum machine. The device can be used with several other 8-bit micro computers but I will be concentrating on the TZXDuino for Sinclair Spectrum.
The circuit is fairly simple. An ATMEGA328 is connected via I2C to an SD1306 OLED Display and via SPI to a commonly available Micro SD Card module. Five tact switches are used for selecting the file to play and an audio output is driven directly from pin D9 of the microcontroller. The audio output seems adequate for most files but occasionally fails. I will be looking into adding a small amplifier of some sort to boost the audio a little.
The PCB was designed to be easily mounted in a box with 3.2mm holes in each corner. The display and micro-sd card module sit on the top. I have found it necessary to put a small piece of foam behind each to prevent them from bending towards the components mounted on the PCB.
I had the PCB fabricated by the ever excellent Hackvana.com who always give a great service and produce really good quality boards.
As per normal with building any project, start with the low profile components first, Resistor, Diode, Crystal etc. And gradually build up to the higher components. The only difficult part to solder is the USB Mini port, in this application it is there just to supply power. You can use the two header connections directly behind the SMD pads if you prefer. The diode is for polarity protection.
The SD-Card module I purchased had a straight header already soldered on so it required de-soldering and replacing with a strip facing down, under the board. The display came without a header strip installed so it was an easy case to add one.
Programming the ATMEGA328 is made easier if you have an Arduino Uno. I extracted my Uno’s ATMEGA328 and temporarily installed a new one. I then programmed it with the ICSP header on the Uno’s board. If you have an ATMEGA328 with a bootloader, you can use the USB input as normal. If neither of these options is available, you will need to make a small adaptor board for ICSP programming, use a breadboard or perhaps, use a minDUINO as a base.
Here are all the files necessary for fabricating the TZXDuino Compact v1.01:
- TZXDuino Compact v1.01 Schematic .PDF file
- TZXDuino Compact v1.01 KiCad files
- TTXDuino Compact v1.01 Gerber .ZIP file
- TZXDuino Compact v1.01 Sketch .INO file
- TZXDuino Compact v1.01 Images .ZIP file
- TZXDuino Compact v1.01 Parts List — file
The entire directory of resources is available at: TZXDuino Compact v1.01
Because I used a previous version of the KiCad files, the newer v1.01 directory requires the older ‘rescue’ files. If you intend to use the KiCad files, include all the items in the zip file.
Future development may result in an amplified version of this board.
Many thanks to Duncan Edwards and Andrew Beer for designing the original.
Electronic Film Clapper v1.3
This project came about because I needed a way of marking Video and Audio files for editing. I didn’t wish to use a full size clapper for the job so I designed my own device. I chose to try the idea out on an Arduino Uno, but realising that an ATMEGA328 was a little excessive for such a trivial task, I moved over to a Digispark clone purchased on eBay. This board utilises the ATTiny85 MCU.
The requirement is to have a visual and audio que that is apparent upon editing the separate streams together. I intend to film at 25fps (Frames Per Second) so I determined that a 25ms pulse of light from an LED and an audio pip would fit into a frame. The pulse period is easily changed in firmware, as is the audio tone of the ‘pip’, although I found 4300Hz is pretty optional for my use.
When the Electronic Film Clapper PCbs arrived from Hackvana.com I set about making one up. There were no issues. I remembered I’d inverted the USB plug so that the device would plug into the USB Power Bank the correct way up!
On the board, I have included several options:
- Use either a Digispark board (available on eBay and other auction sites) or a bare ATTiny85 chip.
- Use either a USB Plug type ‘A’ or feed in power via direct connections (Header compatible).
- Use either standard small tact switch or larger Omron style.
- Optionally link across R1/R3 for increased sound/visual que
The Omron switch is a little tight. The holes on the library part need to be enlarged but I have chosen to release this version none the less. A little bit of extra force sees the Omron style switch mounted. Any updates will address this issue.
Construction is straightforward. Start with the lower profile components, resistors, the polarity protection diode etc. and work up to the larger ones. I found the best way to mount the Digispark board was to use standard headers underneath and solder on the top before placing it at the appropriate place on the PCB. This creates a really secure connection. The Digispark can be programmed before or after soldering on. If a bare ATTiny is utilised, it only requires a standard 8 pin DIP socket.
Programming the Digispark is fairly simple. Download the relevant files from: DigiStump Wiki and follow the instructions for installation and connection. I used the standard install to program the bare ATTiny85 via ISP but it wouldn’t work, at least, it would flash but the buzzer emitted no sound. I later (after 3 days of searching!) found out that the usual ATTiny85 libraries I had used didn’t support the ‘Tone’ function which I had used in the sketch. I managed to find this library: Arduino-Tiny on this page all about a custom tone generator library.
I built a bare ATTiny85 version to test the new PCBs, for speed and so I wouldn’t use up another Digispark board. I could also utilise the pre-programmed chip from the v1.2 prototype.
Here are all the files necessary for fabricating the Electronic Film Clapper v1.3:
- Electronic Film Clapper v1.3 .SCH schematic file
- Electronic Film Clapper v1.3 .PCB board file
- Electronic Film Clapper v1.3 Gerber .ZIP file
- Electronic Film Clapper v1.3 Parts List — file
- Electronic Film Clapper v1.3 Schematic .PDF file
- Electronic Film Clapper v1.3 Sketch .INO file
The entire directory of resources is available at: Electronic Film Clapper v1.3
I tried using a 78L05 on v1.2 to regulate the incoming voltage, but it turned out to be too low powered and I bypassed it. In v1.3, it is completely removed. I did include the polarity protection diode in case of mistakes being made with the direct voltage input. If USB is used as a power source, there should be no issues. Remember though, the USB Type A plug sits on the reverse of the board for correct polarity.
Electronic Film Clapper by ProjectAVR – Steve Smith G0TDJ is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. All files and information is published in the spirit of Open Hardware/Open Software
ZAViouR – Z80/AVR Hybrid board