-
New DC-DC Circuit for the 48k Speccy
06/30/2024 at 04:59 • 0 commentsJust before applying the DC-DC mods for the original circuit I received this 48K spectrum from a friend, in a mostly working state. It needed to have the membrane replaced as well as one of the 32K ram chips. Through the process of rework the DC-DC converter circuit began to fail. I believe as a result of being run at a high level for a long period of time, from an unregulated 9v supply that may have drifted slightly.
On initial inspection, I determined the 4116's must have failed as TR4 / TR5 kept blowing. I replaced them (t4 and t5) and removed the ram chips, to no avail as the transistors kept failing even with the ram chips removed. The next on the list to check was all the capacitors, I verified none were open or dead short with good ESR values ( all electrolytic were replaced first thing - and the board worked for a few hours at least). I suspected the coil was bad. At this point I started to deep dive into the circuit and read through two separate circuit descriptions trying to determine:
- why this circuit fails so much.
- why this was the most modified part of the circuit throughout the revisions.
- can this be improved uppon.
I asked my father, who was an EE from the 60's all the way to the 90's to take a look at the inverter / DC-DC circuits across the several revisions as he's vastly better at looking at analog circuits than I am. Together we determined that the DC-DC mods specifically address regulation and clamping issues in the previous versions of the circuit. While these improve supply output and manage transient voltages which feed sensitive ram chips it does not address what is conspicuously missing from ALL revisions of the 48k DC-DC circuit; 4116 bring up timing.
The 4116's and by in large the transistors inside the DC-DC circuit fail because the supply does not adhere to this note in the 4116 Datasheet:
Simply put - There is no timing mechanism beyond the R/C delay inside the circuit itself, which grants exclusively that VBB (-5v) is applied first, and removed last. Furthermore, when power is removed to turn off the system if the ground path is eliminated by disconnecting the cord completely or isolating the ground line in an improperly wired switch. There is no way to assure any sort of state on power down.
So - specifically when the 4116's fail, and they usually will, the DC-DC circuit is often damaged by an over current condition on the digital 12v rail.
So how did I improve upon the design:Back in the 80's the most commonly used dc power supply was an unregulated 9v center negative power supply. Specifically because of this utility its obvious to me that that is the reason that iconically thrifty Sir Clive and his engineers chose this to be the supply they were to use. Moreover - not wanting to spend any amount on a switch for every unit allowed them to cut the prices even further to save Sinclair millions, by simply having the public unplug the thing or turn the switch off at the wall socket. What was needed was a minimal, cheep and dirty power circuit to create the multiple rails required for the computer and not break the bank. I think they did the best they could with the limits they had, and specifically the computers worked well enough in the day for this oversight to not matter nearly as much as it does today.
Today, we have commonplace, high quality 12V regulated power supplies that run cool and efficient and don't really break the bank. I decided to remove the DC-DC circuit in my issue 3, and use an external regulated center negative 12v power supply to power the whole computer.
This has several advantages:
- The supply is more efficient - we no longer have to "boost convert" a 12v rail using a charge pump and inverter. This reduces losses to multiple conversions going from 9v - > +5V -> +12v & -5v
- The supply is cooler - the LM7805 linear positive voltage regulator gets...
-
HB63C09 Mezzanine Connection
01/21/2024 at 02:31 • 0 commentsThe mezzanine, your gateway to off board IO
Going over the memory map from the REV3 board, the astute will notice the entire IO range selects the AVR request grant logic. This poses an issue for off board requests from the mezzanine connection. To resolve this, the XSIN (transceiver inhibit) signal is utilized. XSIN is a active high signal (for now) that cuts off the bus transceiver output enable pin. This in effect leaves the bus available to the mezzanine connection:
When the loop starts inside the firmware the AVR (an ATMEGA32E micro controller) is just poling for IO requests. When it catches one, the MRDY state is already asserted on the CPU and the buses and the E and Q pulses stop in the state that they were in. This includes the data bus, r//w line and the address bus (along with all the other control signals as well). Immediately following this, it reads the XSIN line and determines if it is high. If so the IOGNT_ signal is immediately sent to the request/grant circuit and the read / write cycle can continue. This does have the disadvantage of added delay and a momentary clock stretch on every IO request, however it is very short, only a few cycles of the system clock. This was a needed trade of to keep the selection logic as simple as possible without expanding to a higher chip count.
In order to use the mezzanine expansion connector, the IO request logic must be replicated on the expansion. The IO request must also be assigned to an unused address in the IO range (for example, any address in A010-AFFF). The selection signal must be active high and linked to the XSIN line, which means that a standard address decoder must either have active high outputs or be inverted before using the signal. The XSIN pin is an input on the AVR, and it is pulled low by a 10k resistor. Only one output on the expansion should select this pin, because the logic on this line is push pull and multiple signals driving the pin high could cause a short circuit. During reset the AVR pulls this line high to zero the bank register. Currently I can not test the mezzanine until I resolve the potential short circuit. This is likely to change to simply having the reset pin for the register driven by RES (inverted RES_, which is generated by the reset circuit) but it was not high on the list of things to work out in this board revision, and so it was omitted. I am also considering changing the functionality of the pin XSIN to active low, by building out logic. Since the actual scope of the signal is for only one device it makes better sense to not make this a priority over other things which could potentially take more board space. The advantage to this is all of the signals going into XSIN could be open collector outputs and this would drastically increase the usefulness of the signal in a multi-slot expansion set up, if for instance somebody were to build a breakout with multiple slots.
If you'd like to learn more about the HB63C09M follow this link to the main project page.
-
7404/14 - Not all inverters are the same.
10/28/2023 at 04:21 • 0 commentsThe Problem:
While debugging the HB6309 PCB REV1 I wanted to build a very stable oscillator I could drive the CPU and the Arduino with, I knocked together my standby: 1/2 of a 74HC00 and a 1K resistor and crystal with fairly mediocre results:
This is actually a very popular oscillator with hobbyists, and if were totally honest it works 90% of the time with no issues for the kinds of projects that we tend to gravitate towards. Even Grant Searle himself, uses the design in at least one of his Z80 builds. The biggest problem with this design (as you will see), is the inverter, a buffered NAND Gate, while its logical output is the same - its switching characteristics and internal circuitry are VERY different.
Before we get started, a gentle reminder to readers not familiar with my content. I am a hobbyist, and not a EE. I do have a very strong background in Civil Engineering in the telecommunications field, so if some of my examples or explanations are wrong - feel free to correct me! (we are all here to learn)
The issue:The internals of the 74HC00, we see the buffered inputs, while insuring proper logical signal triggering, actually dampen the analog properties of the circuit. Additionally clamping diodes on the input (and output) of the inverter may play a roll as well, though certainly not nearly as much as introducing buffers to the circuit:
Just looking at the expanded circuit, you can see this is not even approaching a proper Pierce Oscillator. The root cause of the ringing are almost certain due to The first stage - to understand this better, lets look at a few different buffered inverters hooked up with a much better circuit recommended by Olin Lathrop on stack exchange
This circuit is considerably more suited to producing a very defined square wave. The first two buffers trigger the initial oscillation using a 1M Ohm resistor hooked in parallel. We see a sine wave (more or less, more on that in a second) on the input of 1A. A second inverter (1B) takes the trapezoidal output and cleans it up further. The second stage is a Schmidt Trigger, which introduces Hysteresis into the circuit, the first gate acts as sort of an amp to the second gate which drives the triangle wave produced by the first into a serviceable Square wave. Why not use just Schmidt triggers then?
Essentially, the first inverter is a linear amplifier - we know this because the 1M Ohm resistor from the input to the output acts as a bias to the input of the gate. This amplifier takes the relatively low sine wave output of the crystal, and turns it into a 5v PtP ish square wave. A Schmidt trigger is highly non linear (the whole point is to make the signals snap to the rails as happens in the second stage of the circuit), this is wonderful for generating a cleaner square wave than produced by 1B, but not so good as a linear amp.
I got curious so I built the circuit with a 74HC14:
This is the input of the first gate, see how the signal here is very non-linear, also note the fringing around the edges; on a digital scope this would be rolling like crazy as the time base changes, additionally the amplitude fluctuates as well -- this would be a wonderful circuit to analyze on a spectrum analyzer (unfortunately for me I only have access to that at work, and certainly not in a format I can probe a simple circuit I built at home)
The output IS technically a VERY defined square wave, but the time base is severely effected by the multiple triggers, interfering as the time base shifts:
Then I tried the 74HC04:
I kind of knew the results would be fairly similar to the simple 1/2 NAND solution:
Basically - this is the same though the multiple inverters pronounce the ringing on the High level base instead of the low level base. (this is also with a small value approx 33 Ohm dampening resistor on the output...
Read more -
ZX-81 Restoration news:
03/13/2023 at 17:00 • 0 commentsI moved development of the ZX-81 off the pages updates and to it's own Hack-a-Day project here : https://hackaday.io/project/189795-hbkd-81 if any body was following this space for updates on the restoration they are there :)
-
HBSound Block diagrams from my lab notebook
01/30/2023 at 04:13 • 0 commentsHere's some block diagrams for the HBSound project I pulled from my notebook:
I'll link the next ZX-81 blog here if you are wanting to skip to the next segment when that comes, right now waiting on a replacement modern ULA to be delivered from New Zealand. Hope to have more updates on that soon but for now enjoy my sloppy handwriting
-
Interesting Fail Mode, finding noise and isolating the issues.
01/18/2023 at 04:24 • 2 commentsSuccess! well sort of:
Initial false start. I was able to get a 'K' Prompt to load, but with astoundingly bad ghosting. I went to work checking for the common things. --- ingress from cracked traces or loose connections the usual analog-ish type stuff. In Broadband when we have ghosting in a analog signal, we look for an impedance mismatch base band is not much different.
I checked with the scope and found there was very irregular reflections which got slightly better if I probed the reference clock circuit. I figured this was more about the probes veritable capacitor of a few pF then the huge resistor in my x10 probe. Checking for other obvious signs of a crack I decided to just slide the ULA from its socket slightly and re-seat it. This had little to no effect and I ran into some more issues with resets and starting up properly.
Checked a few more things and found that the !OE line on the ram upgrade was not connected but bent out. A quick google search found the specific mod being done here and I sorted the issue by grounding the pin (in this design only one of the enable lines are needed).
I flipped the board over and checked the pads under the ULA and found a few of them were not soldered very solidly so i re flowed a few of the pads. When i pulled back my iron from the third pad I started to uncover the problem --- the pins were coming loose from the socket above!
I removed the big chips from the board and found that most of the larger chip sockets were completely corroded . I don't have very sophisticated de soldering equipment, a manual pump, temperature controlled soldering iron and a good amount of solder wick. The easiest way of going about careful chip removal in a board this old without an automatic de soldering pump is to cut up the sockets and pull them out 2 or 3 pins at a time. This sounds time consuming but its actually quite efficient and probably only took about 15 minutes to remove all 3 sockets. Since I had the mask ROM and the CPU out, I replaced both with newer parts -- CMOS Z80, and a 16K 120nS EPROM. The Mod for the EPROM was fairly trivial, I just bent out the pins that did not line up and manually routed them which amounts to only 3 of the pins.
I ended up cracking a trace replacing this socket for the Mask ROM. I ran a wire on the back side to the next point in the design (on of the bus arbitration resistors):
After I replaced the broken trace I plugged everything back in, plugged in the computer and immediately ... got no picture... Its a 40 year old machine with aging corroded parts I have to be realistic and so I half expected this. This lead me down a number of avenues, I wound up toning out all of the traces using the schematics, and replacing the RAM expansion after discovering it was causing some of the lower address lines to stay low.
SO... The saga continues.
I went back to basics, Started probing some of the lines coming from the ULA, determined I was getting a sync signal but it looked very noisy:
So the amplitude should not shift like that, and though you cant tell because this is a still it does, roll across the top as well. - - it should be fairly flat. The line data is there (you can't see it in this screenshot.) and I pulled the time base out so you can see it. This looks like an oscillation, the clock for the CPU, the line clock and the sync are all made inside the ULA.
A new approach (Lets remove the DC Offset):
We have a sync but its very bad, so bad in fact that the TV can not see it as it just looks like DC voltage levels -- the best way to trouble shoot the issue at this point is to try to get the TV to display "something". I pulled the back porch mod; and built the simplest composite mod (from byte delight ~ image is linked:after constructing the mod as designed - I added a 300uF or so electrolytic capacitor (to remove...
Read more -
ZX-81 Restoration Video Modification
01/11/2023 at 03:42 • 0 comments
So while still waiting for HBSound's Prototyping sponsor, PCBWay, to finish up and ship off the prototypes for that project. I did have some time to work on the ZX81 Restoration. I am still working through the best way to clean up the corrosion without further damaging the silk screen, but I did have time to start thinking out soldering the video modification. Since the board came ceaseless, and without a number of it's connectors and modulator can enclosure. This afforded me the opportunity to build out the existing board the way I want it. And since I am building a custom wedge case enclosure to hold this thing; that is the plan anyway. I decided the best course of action was to solder two header pins in place of the can mounts and build up Ziggurat communications video 555 Mod to add back the back porch that's missing from the video signal. I cut a piece of perf board to fit across the two pins and went to work on modifying Ziggurat's strip board layout to work on perf board. This also allowed for re-positioned power and video connections. As I am building a new enclosure I moved the connectors 90 degrees to the back of the case to clean up the wedge esthetic so it matches the rest of my micros. If anybody has the slightest clue as to why Sir Clive decided to mount them on the side, instead of around the back shoot me a line, this has always mystified me.
The new layout:As you can see I didn't picture wiring through the connectors on my layout. I am still trying to figure out the best way to lay out the connections. I will also most likely run a larger gauge wire down the side ground rail directly from the back side of the USB connector to one of the larger power traces on the PCB since back feeding the full current of the power supply from the can input is most likely not the best Idea. If there is any interest to the DIYLC files I can provide them at request, though the circuit and diagram are easy enough to follow from the pictures provided. In keeping with the "volume of one" design rule I set for myself on this project, I will not likely do a layout for a PCB since I don't think its likely others will want my specific customization. Perhaps if I get closer to the case build, if there is interest I would reconsider, for now we will see.
BOM:
I used the exact same BOM from the Ziggerat board which i will replicate here (the source document gives permission with accreditation to Ziggerat ind.):
Resistors
R1, R2 10 kΩ
R3 68 Ω
R4 56 Ω
All 0.25 W, 1% metal film.Capacitors
C1 22 μF radial electrolytic, 16 V (or higher rating).
C2 10 nF ceramic disc.
C3 820 pF ceramic disc.
C4 82 pF ceramic disc.
Semiconductors
D1, D2 1N4148
Q1, Q2 PN2222
U1 NE555My additions:
18x10 Perf Board
USB B type connector
2 conductor easy to mount Video connector of your choice
And while were at it the schematic:
(the source document gives permission with accreditation to Ziggerat Ind.)
The source document gives a very good description of the circuit function, so its not really needed to do a full work up here but if your are interested Oli's Old stuff does a fantastic job explaining the options, and Grant Serle has this resource on the ZX80, as well as this on the ZX81. Ziggerat industries Web Site is the original source for the modification (under misc).
Up next:
Up next is building and testing the circuit, as well as fitting it. I still have to do something about about the top board HASL; I may do some high resolution shots and ask around to see if it is problematic For now I cleaned up the stuff under the can ground plane as the video mod will be soldered in place on top of it and accessing later will be a different kind of hassle ;-).
If you have liked this please feel free to share, comment and check out my other projects here on hackaday.io. I usually have one major project going on and a few...
Read more -
ZX-81 Progress / NTSC ULA Output
12/24/2022 at 17:53 • 0 commentsContinuing from my last post, I had some time waiting on parts to finish the analog prototype testing for HBSound so I set up the new scope and ...
It lives:
I like to think about the video output as the consciousness of these old home computers. Generally speaking enough of the gears need to be spinning to make this output correct (memory, clock ocilator, CPU and reset). It's also important that it shows line data being sent as this further improves chances we have a working computer.
The scan looks good but does verify the 'back porch' signal is missing.
Here's an example of a properly formed scan for NTSC the example is with color burst so you can ignore that bit for the ZX-81 we're working on here:
(Graphics stolen from this excellent resource https://www.analog.com/en/technical-articles/basics-of-analog-video.html)
What we do have is a horizontal blanking pulse that sits at about 1v. This is indictive of some of the late release ULA's which do not actually generate a complete blanking pulse. This is probably fine for a crt displaying modulated RF. Today we need an appropriate back porch signal to make sure the black levels (among other things) display properly on a lcd. For this I will need to build up a small PCB with a 555 timer and some transistors to amplify the signal and ad back the back porch so it will properly display on a lcd.
I also took the time to clear out all of the needed points of solder and put a 'zero' ohm resistor in at R30 to activate NTSC mode in the ULA. The ZX-81 installation and assembly guide indicates it's value as a Zero ohm resistor, but I have read elsewhere it can simply be grounded. I opted to eliminate the additional video conditioning for NTSC and simply build a brand new video circuit in the same place the can modulator was installed. My hope is that the video quality will be better by keeping the trace length down. For now I've ordered a few things I need to continue and I'll be looking to finish up HBSound testing phase by the end of next week.
If you found this interesting or have a question please feel free to leave a comment I hope everyone has a fantastic holiday weekend!
-
Yet another ZX-81 Restoration
12/22/2022 at 16:59 • 0 commentsWell here's another year :)
I've made this as a space to manage my thoughts on this Zx81. To be honest there's probably better examples out there as to the correct way to do this. I would direct you to these places first. But if you're interested here you go.
I have this little side project going on:
A friend recently sent this ZX81 from the UK. its in decent enough shape to be from 1983 wouldn't you say? I have a lot of irons in the fire so This is kind of working on the side of other projects but I thought it would be nice to do a little restoration (modification) work on it.
First issues are it's PAL and this is a NTSC region. fortunately the ULA can be coaxed to output NTSC by clearing out a few solder points and adding some resistors and a diode.
Secondly it is missing all of its sub-miniature jacks. I want to make a little saddle PCB that sits in the place of those and provides a mini USB for power, and stereo 1/4 inch jack (for mic. and cas. lines no sense in separating these since the existing tape emulators don't. ) There's no Keyboard and case at this point, I am thinking about a open concept one like this:
Clone ZX-81 GitHub for whole clone ZX81 - https://github.com/mahjongg2/ZX81plus38
Also the ULA has issues creating a proper back porch modern TV's seem to need to work properly. There's a few options to dealing with this; I will be trying to build one of them up and see if i can make a usable signal.
Additionally it needs a little general maintenance and clean up. The CPU is TTL (could be replaced with CMOS). The main reason for wanting to do this is to lessen case heat (the ULA is a big source of it to begin with) and lessen current draw on the already aging outputs of the other components. I know of at least one other restoration attempt (done by the byte attic) that used this approach and I already have a handful of these CPU's to hand. There's some corrosion (mostly oxidation of the 1980's HASL), I need to address this. There's a period correct 16k memory expansion which looks immaculate; beyond simply looking at the solder points under magnification if this is working well I will very likely leave it be. The existing silk screen is flaking. Any rework on the top of the board is causing issues with this - I don't know that much can be done but for this reason I'm trying to concentrate all of the rework efforts to the back side. The two electrolytic caps are in good condition, and actually have signs of rework I don't know if I will replace them (unless they come back as very bad on ESR or I have some other issue related to them).
That's about it for now. I don't know if ill do a dedicated hack-a-day page for this one; a ton of the work is going to be manual vero-board soldering. Most of the mods I'm doing are going to be the kind of thing you really only need just one piece for. maybe if there's interest I'll do a custom flexible PCB for the port replication (to make it all thin enough to fit in a standard Zx-81 case. I don't know if that will be soon as I am still trying to get my sound card build done (so close!)