MCFS 2.0.3
This is a quick update to my MCFS file system to version 2.0.3 than contains stability updates to the compact flash driver as well as changes to the 'ls' and 'dir' command to now show file sizes in decimal form instead of hexadecimal. Thank you Steve for the debugging and feedback!

Source code for MCFS 2.0.3

The source code structure is the same as for 2.0.2 and divided into four files. mcfs2.asm - main code mcfs2_rtc.asm - driver for the real-time clock mcfs2_storage.asm - driver for flash card storage mcfs2_ram.asm - variables in RAM format.asm - flash card format routine (use with caution) Make sure you read the documentation in the original article --> HERE

Compiling

The source files need to be combined in order to compile MCFS2. Either the assembler have the ability to read all files sequentially or they can simply be concatenated before compiling. Example 1 - all files at once # as1h mcfs2.asm mcfs2_rtc.asm mcfs2_storage.asm mcfs2_ram.asm # as1h format.asm mcfs2_storage.asm Example 2 - concatenation # cat mcfs2.asm mcfs2_rtc.asm mcfs2_storage.asm mcfs2_ram.asm > combined_mcfs2.asm # as1h combined_mcfs2.asm # cat format.asm mcfs2_storage.asm > combined_format.asm # as1h combined_format.asm Care must be taken to read the files in the right order. As a reference I have included my resulting S19-files. mcfs2.s19 format.s19
Transceiver build - part 6
After completing and testing the QSD/QSE module and the BPF module, I knew the basic concept of the transceiver was living up to my expectations (see part 4 and part 5 for more information) and now I had to take a step back to figure out how to bring this all together into a self contained radio. My main mode of operation is SSB and I think I share that with many others. Having SSB makes it possible to also receive AM and CW which probably covers most, if not all, of my needs. CW TX is trivial to add later since it's just a carrier. The QSD/QSE module works with I/Q signals on the AF/LF side and while I/Q signals can represent more ore less any traffic mode (AM, FM, SSB etc) it requires quite a lot of processing to be useful. In order to make this transceiver operate on SSB I need to phase shift the I and Q signals precisely 90 degrees from each other over the entire modulation range, say 300Hz-3000Hz. Nowadays this is normally done in software but I really want to try doing this the analog way using all-pass phase shift networks and see if I can make it good enough for general use.

Basic concept

Below is a block diagram of the basic layout of the transceiver that I have in mind (click to enlarge). This is most likely going to change as the project progresses but for now it sums up the general idea and concept. The two parts that are completed are the switchable BPF module and quadrature sampling detector/exciter module. In this write-up I will cover components to the right of the QSD/QSE, starting with the phase shift networks for processing the I/Q signals and convert them to and from AF signals. My idea is to create two all-pass filter networks, one for the I path and one for the Q path, and have them shift the phase +45 degrees and -45 degrees respectively. That way the total shift between I and Q will be 90 degrees. The naive approach would be to use only one 90 degree phase shift network on either the I path och the Q path, but doing it this way will limit the phase shift done in each network, making them perform better. I also want the filters to have the ability to change direction so that the same filters can be used for both RX and TX. There is a lot of fine tuning involved in these filters and doing it this way, besides reducing the number adjustment points by half, also ensures that the transmit performance will be about as good as the receive performance. It's a good sanity check.

Mechanical construction

For the AF/LF parts of the transceiver I decided not to use individually shielded boxes, as I did it for the RF modules since it adds considerable amount of metal work compared to the performance gain (this may come back and bite me in the end). I decided to stack two half eurocards (100x80mm) with standoffs. Bottom board for the digital parts and top board for the analogue parts. These are interconnected by a 20pin ribbon cable. By separating this into two boards I hope to reduce the self-induced digital noise. The phase shift board/module is mounted on top of the analogue board.

All-pass filter phase shift module

This is the core of what makes this a self contained SSB radio. The idea here is to have a module that inputs I/Q signals on one side and outputs single sideband audio on the other side, as well as the reverse to make it work for both RX and TX. It should also have the ability to select upper or lower sideband. Below is the module I came up with. By just looking at the number of trimmers on this board one can expect quite a bit of tweaking but it's mostly due to the fact that the all-pass filter requires very specific resistor values. The design is based around two four pole all-pass filters with an optimized frequency range of 200Hz to 4000Hz. That should cover normal SSB traffic with some margin. The filter will only suppress the sideband for frequencies that are inside of this range. This means that the filter must be used together with corresponding band-pass filtration. Below is the schematic for the phase module. The all-pass filters are made up of two quad TL074 op-amps (U3 and U4). The resistors, trimmers and capacitors here must be high precision and low tempco. The trimmers set the frequency for each pole. In the schematic I have included the calculated pole frequencies and corresponding trimmer values. I used my Keithley 196 multimeter with kelvin clipleads to measure and adjust the trimmers in circuit after soldering to be as close as possible to the calculated values. Before the filters is a dual TL072 op-amp amplifier, U2, acting as a buffer to ensure high input impedance and constant drive to the filter. To do all the switching between TX and RX as well as selecting USB or LSB, I used two 74HC4052 dual channel four way analog switches. One on the input to the filter, U1, and one on the output of the filter, U5. I was very happy when I realized I could use these switches. It made the design very clean. During receive the signal flow is: I_RX & Q_RX --> AF_DEMOD and during transmit the signal flow is: AF_MOD --> I_TX & Q_TX During receive the output of the filters are summed into a trimmer, one trimmer for LSB and one trimmer for USB. The same arrangement goes for the input to the filter during transmit. That way the signal balance can be individually adjusted for all the four situations, LSB RX, USB RX, LSB TX and USB TX using the trimmers RV1, RV2, RV11, RV12. For selecting LSB or USB the filters are swapped between the I path and the Q path. One bonus feature of the 74HC4052 is that there is an enable input. Pulling this input high disables all switches and puts the module into a high impedance state. That makes it possible to connect multiple modules like these in parallel and select between them in software by setting this logic pin. The mechanical design I use makes it possible to stack multiple boards using pin headers. I have not yet tried this but it's an interesting expansion possibility. Dedicated narrow CW module maybe? AM? FM? We'll see...

Update 2023-01-06

Can't believe I forgot to mention where the filter values are derived from. I spent quite some time reading and trying out various algorithms but in the end component quality and overall construction had a far greater impact on my end result than finding the absolute optimum algorithm. The J-TEK all pass filter designer software by GJ3RAX is a very good start. Great piece of software. In my opinion experimentation is needed to find the optimal values. The resistor values in the schematic will get you in the ball park. To get full performance out of the filter each pole must be adjusted individually. To do this, hook it up on the bench and jumper it to TX mode and any sideband. Then use a signal generator to input each frequency in turn and adjust each pole for 90 degree phase shift by measuring each pole input and output using a two channel scope. Either use the scopes built-in phase meter or set it to XY mode and adjust for best looking circle.

Main analog board

This board is still very much under development but I figured I would post parts of it since it contains the very important band pass filter required by the phase module described above. The phase module sits as a mezzanine board on top of the main analog board and connects using three sets of pin header. Since the phase module only works for a specific audio band, the audio going in and out of the module must be filtered. This filtering is done on the main board. Below is an excerpt from the analog board showing the RX/TX audio switching and audio band pass filter. I based the filter around the well known MAX7400 switched capacitor low pass filter to make the bandwidth adjustable from software. It's currently driven by a spare output of the Si5351 signal generator. The drive frequency is 100 times the crossover point. The MAX7400 is then combined with a 300Hz high-pass filter on the input and a 3600Hz low-pass filter on the output. The low-pass filter is important since the MAX7400 will leak the drive frequency to the output, but being 100 times above the crossover frequency it's easy to filter out. To be able to share the filter between both RX and TX, I added a HC4053 analog switch. Outside of the schematic the RX_AUDIO signal goes to an AGC controller and the final audio amplifier, and the TX_AUDIO comes from the microphone amplifier and dynamic processor. There are also logic level control signals in the schematic but I think they are quite self explanatory. They are all coming from a separate CPU/logic board that I will present later.

Performance

I have not yet performed any proper measurements regarding sideband suppression but after many evenings on the bands I can tell that it works surprisingly good. Definitely better than my Icom IC-735 reference transceiver. Using earphones and swapping sideband on an ear-shattering signal completely wipes it out and pushes it down in the noise. Good enough for me.
Time Electronics 2003S resurrection
I've had this Time Electronics 2003S Voltage Calibrator on the shelf for a very long time. It never worked. The output was way off and with several mV of ripple and oscillations at around 400-700 Hz. From time to time I've been working on it but never really got anywhere. The reason is that the core part of this instrument is rudely enough potted in epoxy. After going through everything within reach I realized the the problem was inside that nasty slab of hardened goop. I will spare you the details of the massacre that followed but after hacking away at this using acetone, heat and chisel, I eventually gained a peak inside the module only to sadly discover the, somewhat expected, state of bulging and fishy smelling leaking electrolytic capacitors and corrosion. I had spent hours already and was not going to spend all the time needed to refurbish this nasty design that was clearly intended to prevent repairability in the first place. I threw the module in the bin. This however left me with a nice base to rebuild the instrument. Let's have a closer look. The front panel comes off easily and contains all major parts of the device except for the power supply that is mounted in the back of the box. The device can be battery powered but I removed the batteries and disabled the trickle charger circuit a long time ago to prevent damage from leaking batteries. Now it's just a basic 18V linear power supply regulated by the somewhat uncommon 7818 voltage regulator. Not very interesting. Let's focus on the front instead. The front panel is quite self explanatory. There are five ranges selected by the knob to the right and the desired output voltage is entered with five digits resolution using the switch on the left. The difference between each range is a factor of ten. Range 1: 0-9.9999 V Range 2: 0-999.99 mV Range 3: 0-99.999 mV Range 4: 0-9.9999 mV Range 5: 0-999.99 uV No surprises so far. The front panel contains all the things you would expect. However flipping the panel over reveals a pretty nice PCB with guard rings and populated with precision resistors and trimmers. The connector on the left is where the epoxy potted module would connect. The manual and schematics are available online. Or rather part of the schematics. Unfortunately the schematic for the potted module is not in those files. It is only mentioned that in case of problem with the module it could be sent in for replacement. Probably not going to happen for an over forty year old instrument. However the manual also states that the module contains the voltage reference and a chopper stabilized amplifier. This is very useful information. Above is the schematic from the available documentation (I erased the parts for the 2003N that is not applicable here). It matches the board inside the meter. The component marked "2003 circuit module" is the epoxy potted module. That is just a black box but doing the math backwards using the resistors on the board reveals that the module is simply an inverting op-amp. An inverting amplifier also means that voltage reference is negative. About -6.294V. This is the block diagram of the 2003S. It's a voltage reference and an amplifier with variable gain plus an additional attenuator for the low ranges. The active components marked REF and AMP are what's inside the module and the resistors and switches are on the PCB. This is really good. It means that all of the critical components for voltage selection are on the PCB and not in the module! Armed with this new knowledge I set out to design a proof of concept replacement module. On the top of the schematic is the voltage reference. High performing voltage references are a whole other topic. This is a naive design around an LM129 reference zener and an OP177 op-amp. Good enough for a start but time will tell if it will be enough to meet the original specifications of the instrument. The LM129 provides a 6.9V reference and the OP177 is wired up as an inverting amplifier. The resistors R2 and R4 are equal and matched, which sets the gain of the OP177 to unity and inverted (-1). This is actually too much since we need a lower gain of around -0.912 to achieve the desired reference voltage of -6.294V. To nudge the amplifier gain down a bit, R4 is paralleled with a set of fixed resistors and a trimmer. The specs of these resistors are not as good as R2 and R4 but their values are selected to affect the gain just enough to reach the desired level. Therefore their impact on the final performance is reduced. In the middle is the main amplifier responsible for the actual output of the instrument. This amplifier have its feedback and gain setting resistors on the main PCB and knobs and dials. Even though the original design used a chopper amplifier I opted to try using the OP177 here as well. I did however buffer the output a little extra using a BC547 transistor and an oversized series power resistor to handle eventual shorted output terminals. The output driver transistor is also fed directory from the main supply to keep load off the local 12V supply. At the bottom is the power supply. Not much to say here. A positive 7812 regulator provides local 12V and a DC/DC converter based on a 555 provides -10V. The 12V rail stability is most important here since it also powers the LM129 reference. Note that there are two different grounds. One for the supply and one for the reference. Both end up in the same ground point on the main PCB to provide a star ground. This is the complete replacement board. I salvaged the connector from the potted module (only a small part of a corner was lost in the process). One important thing to mention here is the choice of components. As you see there are no crazy high end resistors. I simply did not have suitable alternatives at hand and component shortage is no joke at the moment, so I did the best I could with what I had. I will need to improve that once I manage to source proper ones. I probably also should get rid of the IC sockets to lower the thermal EMF. One thing I did however was to match the temperature coefficient on the U2 gain setting resistors R2 and R4. These resistors set the base gain of the reference amplifier as described above and need to be equal. The theory here is that the values of R2 and R4 will vary with temperature and it is okay for R2 and R4 to vary a small amount as long as the amount of change is the same in both resistors. This is where their temperature coefficients comes in. The way I did this was to heat up a container of mineral oil to around 50C and then use a 6.5 digit multimeter (my Keithley 196) with four point kelvin leads to measure a batch of 25ppm/C resistors until I found two resistors that exhibited the same resistance change when dipped into the oil. Then I mounted these two resistors close together on the board.

Performance and verification

Calibrating and adjusting the 2003S requires a decent voltmeter (at least 6.5 digits and preferably 7.5 digits) and a null meter. A sensitive high resolution voltmeter can be used instead of a null meter. These are the basic steps taken from the manual. Null adjustment 1. Set digits to 00000 2. Select range 2 (0-999.99 mV) 3. Connect null meter or sensitive voltmeter to output 4. Adjust AMP null adjustment (RV1) for +/- 40 uV or less 5. Verify that range 1 and 3 are within +/- 100 uV respectively +/- 10 uV Getting ranges 1-3 within specs can be a compromise. In my case range 3 ended up negative and range 1 and 2 positive. Just make sure to keep around zero and within tolerances. Full scale adjustment 1. Set digits to 99999 2. Select range 2 (0-999.99 mV) 3. Connect voltmeter to output (at least 6.5 digits) 4. Adjust REF voltage (RV2) for 999.99 mV on meter 5. Select range 3 and adjust VR5 for 99.999 mV on meter 6. Select range 1 and adjust VR4 for 9.9999 V on meter 7. Select range 4 and adjust VR3 for 9.9999 mV on meter 8. Select range 5 and verify 999.99 uV on meter Range 2 does not have its own adjustment and it relies on the REF adjustment directly. Therefore range 2 must be adjusted first since it affects the other ranges. Now the 2003S is back to life. Or at least now I can start using it and determine the actual performance over time. It takes quite a while for the components to settle. For now I will just keep it running for a few months and monitor the performance. A rough estimate is that it currently settles within it's relatively relaxed "0.02% grade" as long as the ambient temperature is kept under control. The temperature coefficient need improvement but at least the design is relatively sound. Resistors with higher precision and better stability will improve stability significantly once I manage to source some. At least in its current state the 2003S is good enough to verify something like a 3.5 digit multimeter. This was a fun little project. My main take-away from this is that metorology is complex and your measurements are only as good as your trust in your reference. And an old instrument with known good and recorded calibration history may be more worth than that fancy expensive shiny new one right out of the factory.
Transceiver build - part 5
After completing the QSD/QSE module in part 4 I began working on the much needed filter module. Since I wanted my transceiver to cover more or less DC to 30MHz I needed quite a few band pass filters that could be switched in and out depending on the active operating frequency. I also wanted a modular design so that I could experiment with different filters without having to de-solder anything. To do this a decided to create a base module containing all the logic and switching circuitry and have all the filters as individual plugins. It would also be extra nice if all of this could fit inside the same RF-box dimensions as the QSD/QSE module. That way I could easily stack the modules in the final assembly. It also means at lot of filters in a small area. Hopefully I don't mess this up completely... After seeing how well the FST3253 performed in the QSD/QSE module I was curious to see how it would perform when using it as an RF switch for selecting the filters. The more common approach to this is to use relays or PIN diodes but there was no way I would be able to fit relays into such a tiny module and PIN diodes don't work very well at low frequencies (<1MHz), so the FST3253 suddenly became a very interesting option. This is the design I ended up with. In the middle are connectors for a total of eight filter plugins. I used four FST3253 switches. Two on each side of the filters. In theory I could probably make do with one on each side but doing it like this made the layout better and paralleling the switch banks in each FST3253 lowers the on-resistance. The control input to the module (SEL0-SEL2) is a 3-bit binary value (0-7) selecting one of the eight filters at a time. The external interface of the filter module follows the same design as the QSD/QSE module with two SMA connectors for the RF ports on one side and the power supply and control signals on the other. Opening the lid of the module reveals the filter plugins on top of the base board. A lot of things in a small space. Surface mounted components was more or less the only option. Removing the filter plugins shows the innards of the module. Here the layout mostly follows the layout of the schematic. I used strip board for alignment of the filter plugin sockets and plain copper board for the switches. Some extra isolation between the two sides. Don't know how much it actually helps but it can't hurt and keeps the cabling tidy. The control wires are super-glued to the center board to keep them in place. To get started I assembled a set of filter modules. They need some more work but performs well enough for testing. I probably should use double sided boards with more grounding to improve stop band performance. The filters right now are simple three pole designs using components I had available but there is room on the plugin boards for five poles and I definitely would like to improve these. The filters are not divided into HAM bands but in general segments without gaps. I like that design since it really makes it general coverage and still keeps the cross-over points out of the HAM bands. Eight filters covers the range up to 30MHz nicely but below 250kHz there may be need of some external filtering or at least a tuned antenna.

Conclusion

This was a very welcome addition to my transceiver project. Integrating the filter selection with the VFO was trivial and suddenly made it a very fun and useful radio (more on this in an upcoming post). I made a few quick VNA measurements (miniVNA Tiny) and was surprised to see that this module performs similar to other pre-fabricated modules I have so I definitely will keep it like this and move on with the rest of the build.

Update 2023-01-06

I just could not give the two flying input and output capacitors a pass. It was a quick and dirty design and now I had a few minutes over to correct this. I replaced them with two short lengths of RG-316 and two small SMD capacitors. This improved the extended stop band performance quite a bit!
Compact Mac video adapter
For many years I have had an old Macintosh SE logic board that was scrapped out from an old Apple repair shop. Someone had broken the SIMM sockets at some point by snapping the retaining clips at the ends. A common problem unfortunately. I guess the repair shop didn't want to bother and just put it aside. When they eventually went out of business the board ended up in my hands. Besides the broken sockets it was in good condition and most importantly, no leaky battery damage. I have found no reliable way to repair SIMM sockets with snapped clips so I figured the best way would be to replace them. Some care must be taken while desoldering as usual but with patience and proper tools it's pretty straight forward. Apple used one pair of dual sockets meaning there are 60 pins to desolder for each. I did not have the exact same dual socket replacements but I did have single sockets. They are not as robust as their dual socket counterparts but since this Macintish SE board will be fully populated with its 4x1MB memory anyway I don't expect to replace the memory sticks very often, if ever. Now with the memory socket problem out of the way it was time for the next challenge.

How to test a compact Mac logic board with out the rest of the machine

I have a few compact Macs including the Mac SE so I could potentially swap the boards around and test this out but I didn't want to disturb them and risk causing problems on working machines so I started playing with the idea of finding a way to use these boards without the matching CRT, analog board and power supply. This is something that I have wanted to try for a long time. The compact Mac SE design uses a single connector on the logic board for power supply and video output. This is the same type of Molex Micro-Fit connector commonly used today in modern PC power supplies but in the 2x7 pin configuration. I dug out the smallest spare ATX power supply I had and a new 2x7 Micro-Fit plug. I extracted the crimp terminals from the ATX 10x2 pin motherboard connector housing and re-arranged them into the 2x7 pin housing to match the Mac SE logic board connector. See the pinout in the schematic below. I removed all unneeded cables from the ATX power supply and hot-wired the power-on signal so that I could power on/off using the mains switch. The Macintosh SE logic board connector supply rails are +5V, -5V, +12V, -12V but the -5V is not used by the board itself and just routed through to the expansion slot. +12V and -12V are used for the serial port level drivers and audio amplifier. +12V is needed for the floppy drives. The connector also provides the video output divided into three different signals; vertical sync, horizontal sync and video pixel data. After double-checking and triple-checking and checking it all again a few times I powered up the board with meters on all supply rails and scope on the video/sync pins. All voltages looked good and I was happy to see a valid video signal being generated! Above is a picture of the power supply and wire harness along with the video adapter board I ended up building. The video output is at TTL level. The horizontal and vertical sync signals are active low and the video is inverted (low=white and high=black). The vertical frequency is a reasonable 60.15Hz but the horizontal frequency is a little unusual at 22.25kHz. I would place it somewhere between CGA and VGA. The horizontal signal is also unusually long and extends well into the visible area of the video lines. Not knowing exactly how to process this video I built a small adapter board containing an XOR gate for buffering as well as the possibility to invert all signals. The board also includes serial resistors for protection (don't want to accidentally fry any of the video output pins on the logic board!). For the final output I decided to use a standard 15 pin VGA connector with the R, G and B signals bridged to provide a B/W image. I figured it was the closest match and will make it easy to test on multi-sync monitors as well as one of the Swiss army knives of video, the Open Source Scan Converter. Here is a schematic over the completed video adapter based on the 74HCT86 XOR gate. I added some extra filtering on the supply as well as jumpers for selecting whether any of the signals should be inverted or not. The series resistors on the input is for protecting the outputs of the logic board and to reduce ringing on the signals. Same goes for the output side but here the series resistor of the video output is also needed to reduce the level a little bit closer to the VGA standard. Bridging the 75 Ohm R, G and B inputs of the VGA connector will present a 25 Ohm load and this in series with a 100 Ohm resistor will convert the 0-5V from the buffer down to 0-1V more suitable for a VGA input. In reality it should be 0-0.7V but it's close enough for B/W video (I don't expect the gate to reach full rail voltage either). The resistors on the TTL sync outputs will not affect the levels much but will provide some additional protection.

Results

Not expecting any miracles, I started by connecting the board directly to my Dell U2410 monitor. As expected the result was underwhelming but at least the monitor did sync on the signal. The resolution and scaling was incorrectly detected which caused the vertical lines. Next I tried using the Open Source Scan Converter which did a much better job of dealing with the non-standard signal. If you do not know what the OSSC is then check it out here. It's basically a device that scales an analog video signal into a reasonably valid HDMI or DVI signal. Just what we need here. Using the OSSC the results was much better! The auto-detect did not detect the signal properly and needed a little help but after a little tweaking the picture was perfect. These are the OSSC parameters I used: - Horizontal sample rate = 704.00 - Horizontal sync length = 14 - Horizontal back porch = 164 - Horizontal active pixels = 512 - Vertical sync length = 1 - Vertical back porch = 26 - Vertical active pixels = 342 Another photo of the screen with OSSC scan lines added. Almost like sitting in front of a real compact Mac. A modern monitor with 16:10 aspect ratio is not too bad for this purpose actually since it is not that far from the aspect ratio of the compact Mac.

2022-08-28: Update for the Macintosh Plus

When trying the same thing on a Macintosh Plus I could not get any monitor or the OSSC to sync on the output. On paper the specifications for the video on the Mac Plus is the same as for the Mac SE above so in theory it should have worked. This had me stumped for a while until I had a look at the vertical sync. The start of the Mac Plus vertical sync signal aligns with the Mac SE but it is ridiculously long. Over 20 lines! For comparison regular VGA, and the Mac SE, has a vertical sync signal that is around 4 lines long. I made another adapter specifically for the Mac Plus that incorporated an extra circuit to shorten the vertical sync signal. There was a free '86 gate available so I just used that as an inverter and then a simple RC filter. It worked really well and the OSSC can now lock onto the Mac Plus video signal without any issues.
[show older articles]