Oh no, not another post about tape loading.
Yes, you are right. I am sick of these as well, but it's taken me best part of a week to test this out and another day to write it up, so I should at least post it.
In order to reduce the levels of anxiety and uncertainty in the universe, just slightly, here is the very short version.
Good news.
I designed a new tape input circuit and it works better than the last one.
The End.
Yes, as you might imagine, it wasn't quite as simple as that.
Background
The problem with most of the tape input circuits is the input filter. There are various elements required:
- A capacitor to block any DC offset on the input signal.
- A resistor or resistors to bias the signal to the 0V rail or a midpoint to suit the digital input.
- Optionally, a resistor to limit the input current.
- Optionally a resistor across the input to act as a load.
I had been trying various versions, based on the different implementations on the ZX80, ZX81, Jupiter Ace and others.
The tape input design is one that I have been around and around many times. I think I have a good solution for the Minstrel 4th, although I have only sold a couple of those, so I don't have much in the way of feedback to know if it is any good.
That used the variable resistor to set the threshold, and relies in part on being able to see the lines in the border on the screen and the regularly decrementing countdown display to know it is adjusted correctly.
That isn't really an option on the Minstrel 3 as the video output is not valid during loading - there are repeated vertical sync signals which most TVs will reject and put up the "no-signal" screen.
Looking back over the old posts, I did get to a point I was reasonably happy with, about 1/3 of the way through this post.
It was working great with ZX81 tapes, which was the main focus of that testing as it was easiest to see with the border lines and countdown display.
The main problem with that was finding a suitable input filter circuit that suited the ZX81 and the Jupiter Ace signals, but that is not really the priority here, so maybe I should look back at that again.
What prompted a revisit of this was looking at the TS1500, and wondering whether it's buffered input stage would be the solution.
I can't use it directly as it inverts the signal, and despite my best efforts, I have not managed to free up a spare inverting gate. I could possibly add a second transistor to invert the signal, or the path I was considering taking was replacing the transistor amplifier with the op amp part of an LM392, and then using the comparator part to clean up the signal and drive the 74HC input pin.
Plan A - OpAmp + Comparator
The plan I had was to go back to a design that had worked reasonably well during the testing of the Minstrel 4th mods, but using the TS1500 input stage, as none of the ones I had tried had been perfect, each suited some tapes but not others.
I went through lots of iterations of this, trying to decided the best option. I was using a combination of maths and CircuitLabs simulations.
I could not seem to get anything useful out of the TS1500 style input, it was all just spikes. But I have started this all again, so I may as well see if I can come up with something better this time.
I decided not to use the actual TS1500 input after all, and to go for something simpler. An RC high-pass filter and a pair of blocking diodes to block negative voltages and anything over 5V.
With the confidence of someone who is really not sure if this was going to work, I put off building this for several days. I kept going back to the design and changing values and adding and removing parts to try to see what the best option would be.
This is the version I finally went with, a slightly paired down version, after a bit of Muntzing (and spotting the big pile of 390KΩ resistors that TFW8b ordered by mistake).
I decided the best approach was to feign the necessary confidence and go straight to wiring this up.
I created one of my 3D sculptures with the LM392 opamp and comparator atop the 74HC257 it feeds.
I modified the input stage and tapped the signal to pass through the new circuit.
(Nothing to see here. Ignore the other bodge wires, those may, or may not, be related to other mods I have been making to the Minstrel 3.)
Looks rather splendid, doesn't it?
No, you're probably right, it really doesn't.
But will it work?
...
Sort of.
I had picked out a selection of tapes of various qualities, ancient and modern, good and bad. Fourteen of them.
Plus a C90 with various programs saved from my arduino player, and I also started by testing that directly, which should be the best case, a 5V square wave in and hopefully a 5V square wave out.
The Results
And there we are.
So those are the ones it wouldn't load?
Nope, those are the only ones it did load.
Catacombs is one I need to play more, you explore a hidden tomb network, which is revealed as you move through it. Then you meet a dragon and it kills you.
Pyramid is a Towers of Hanoi game (or the Trilogic game if you prefer).
I think I completed this once in about 1982, but not since.
16 moves in, only 495 to go - maybe one for another day.
Apart from those, no other tapes loaded.
That's not as good as the old version and a lot more parts.
That's a bit rubbish then, isn't it.
You're not wrong.
(and you thought I was just using screen grabs from that film you think you quite liked, but can't remember the name of. No, I am not going to give you a Clue. The pictures I could find were not very good quality, so I recreated them. Ha!, how wrong you can be - about as wrong, it turns out, as the apostrophe in the font I chose. The only one I found that had the right apostrophe, had the wrong letter r. I thought it was best to go for the one with the nice r's)
Plan B - TS1500 Style Input
OK, so that was a failure. Maybe the op-amp was the problem. What if I go back to the TS1500 style input, with a second transistor to invert the signal again.
I had modeled this a few different ways in Circuit Labs, and it didn't seem to work.
The 47pF capacitor seems too small and just gives brief spikes (the ZX81 has 10nF, 200 times larger, and the ZX80 and Ace have 47nF, 1000 times larger)
I know the schematic was a bit unclear, but these are the values on the board which I have, but then again, that didn't really work very well either.
Filled with none of the fake confidence of earlier, I recreated this on breadboard.
And, as predicted, it didn't work and produced the spikes as expected, too short to register.
I tried a few different values, but it was basically broken. The 47pF capacitor just seems too small, and forms a very high-pass filter at about 160KHz, it is only going to let thin spikes through, rather than the bulk of the 3KHz data.
I don't know what I have done wrong. The transistor is not the one specified, an MPS2369, I didn't have one of those, so I used a BC549C. The gain on that is a bit higher (400 as opposed to 40), so maybe it is that, but the green wire shows the signal at the base, there is basically nothing there but the spikes.
I presume it was designed by people who are better at analogue electronics than me, so they must have known what they were doing and maybe there is some extra magic inside the ULA, possibly edge triggered flip flops or something similar to the 555 version I previously tried?
Plan C - The ZX81 input
I did wonder if I could get away with the ZX81 style input circuit.
This is pretty much the reverse of the ZX80 one I use on the Minstrel 2 and Minstrel 3.
(and yes, I double checked with actual PCBs)
Just 3 parts, much easier to breadboard than the last two.
Guess what, that was also awful, but differently awful at least.
No transistor to get wrong here, just those three parts.
I did try adding a pullup.
And also a second resistor to bias the signal mid-rail.
But there was nothing usable I'm afraid.
Plan D - Back to the old Minstrel 3 / Minstrel 2 / ZX80 design
I think it is time to give up and go back to the old Minstrel 3 circuit.
This was based on the one used on the Minstrel 2, which was the ZX80 design. When I designed the Minstrel 3, I kept this the same as the Minstrel 2. I don't recall if I tried it and reverted it, or it just didn't occur to me that it would be different.
It was designed to feed a 74LS logic chip input, not the 74HC logic chips used on the Minstrel 3, and so the levels required from the source were higher.
But, it basically worked, and had been used on all of the Minstrel 2 and 3 kits to date.
I built that back up and verified that it did indeed work.
That if nothing else was a useful test after all the others had done so badly.
I got four tapes to load this time, good to see Tut-Tut load from tape.
And it seems appropriate that ZX80 Kong loaded via the ZX80 circuit.
Although designed for the 8K ROM ZX80, it runs fine on the Minstrel 3.
Finally 3D Defender actually loaded, I don't think that one has loaded often.
I haven't played that much, not really my sort of thing, but it looks nice.
Plan E - Is there anything I can do to make it better?
I was wondering if I should just leave it like that, or if there was anything I could do to make it better?
I had tried adding a pullup in the past, that was not helpful (but I did test it again anyway, just to confirm that)
I also tried switching out the 74HC257 with a 74LS257, so the input levels would better match the original. That helped a bit, but not much.
OK, let's think about this logically.
We have input protection with the 180Ω resistor, and DC blocking with the 47nF capacitor.
The 1KΩ resistor provides a DC reference to the 0V rail, and also form as high-pass filter with the 47nF capacitor.
f = 1 / (2 π R C) = 3.386KHz
This is around the frequency of the data bits from the ZX81 (which is closer to 3KHz).
I had tried adding a 10KΩ resistor pulled up to 5V, but that ended up biasing the signal at
Vbias = 5V * 1KΩ / (1KΩ + 10KΩ) = 0.45V
This is quite low, especially for the 74HC circuit.
Ah, why don't I change the 1KΩ and bias it properly?
I came up with 6.8KΩ, combined with the 10KΩ.
Vbias = 5V * 6.8KΩ / (6.8KΩ + 10KΩ) = 2.02V
2V seemed a good level, that would normally read as low, but it would only take about 1V of input to move it into the high region.
Let's give it a go.
Hmm...
That is perfect, except the different resistor values will affect the high-pass filter.
My analogue electronics is a little rusty, but if I remember correctly, to an AC circuit, the supply rails are effectively in parallel, so the two biasing resistors are effectively in parallel, so that gives an effective resistance in an AC circuit of
1/R = 1/6.8KΩ + 1/10kΩ
R = 4.048KΩ
That alters the high-pass filter, the value of which is now
F = 1 / (2 π R C) = 829Hz
That means more of the signal is getting through.
I wonder if I can find some resistor values that would do the dual job of being around 1KΩ in parallel, and biasing the signal to about 2V.
That would be two simultaneous equations..... ain't nobody got time for that.
So I just tried a few values instead. OK, it's been a long week. I just need this sorted.
It turned out that 1.8KΩ and 2.7KΩ worked out perfectly.
1.8KΩ || 2.7KΩ = 1080Ω
F = 1 / (2 π R C) = 3135Hz
Vbias = 5V * 1.8KΩ / (1.8KΩ + 2.7KΩ) = 2.00V
I changed the values on the breadboard and retested.
It was looking good.
It was looking very good, even on some of the dubious signals.
My final total after testing that lot was just over 50% success rate.
My test tape and signals direct from the arduino worked, plus these seven tapes.
Those all loaded, including a couple for the first time in all this testing.
Ah, I remember ZX81 artist, the one where the house has a beard.
And wow, that's a lot of instructions.
These ones didn't load, some never seemed to load, and others had in the past but I think are getting worn out after all my testing.
I don't think any of these are going to load on anything.
That seems to be about as good as I am going to get, and it's a pretty minimal circuit.
That should help with the PCB changes as I was struggling to work out where to fit the 8 pin LM392 or pair of transistors if I went with one of the other designs.
Bolstered by the success, I modified the board with the selected resistor values and retested.
All still good.
Check My Work
You could even test this yourself if you have a Minstrel 3 with a 74HC257 for the bottom right IC.
Remove the 1KΩ resistor below the 47nF capacitor (473) and replace it with 1.8KΩ and then fit a 2.7KΩ resistor between he right hand end of that resistor and 5V (e.g. the left of the 1KΩ below). That is probably easier on the back of the board.
Other than that, after going all around the houses, I seem to be back at basically the same circuit, other than the extra biasing, which seems to be beneficial to the signal processing.
(oh yes, the extra white breadboard is the 555 circuit, I did retest that last week. It didn't do much better than the last time)
Finished?
That is the last of some recent changes to the Minstrel 3. Most of this was so that I could remove one diode. I will explain later. An even longer blog post will follow (or it on Patreon now if you are curious)
There are some more obvious changes that you can see in the new PCB layout.
Those PCBs are currently in production, so if you order now, you will get one of the new ones in a week or two.
OK, that's the last of the captions, I had better stop before I get fired and replaced by Ralph the Wonder Llama.
But still, buy my stuff.
These new versions are available exclusively from me.
The easiest way these days is to contact me using the link at the top of the page. Tell me what you want to order and your address so I can get a quote for shipping and duties etc.
The new Minstrel 3 with keyboard are £150 kit, £190 built (£250 kit with Minstrel ZXpand II, £300 built).
Also in production now are the PCBs for a short run of Mini PET 40/80s with keyboard, with a few updates.
Order now, and you will get one of the new ones in a couple of weeks. £450 kit / £500 built.
The Mini PET 40/80 internal PET replacement boards are also available now, £350 kit / £375 built.
Patreon
If you enjoy posts like this, you can support me via Patreon, and get access to advance previews of blog posts, and exclusive posts.
You also get progress updates on new projects and other behind the scenes updates, as well as access to my Patreon only Discord server for even more regular updates, and to discuss your own projects.
































































