<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <title>LA2YUA</title>
    <link href="https://longview.be/feed.xml" rel="self" />
    <link href="https://longview.be" />
    <updated>2026-05-03T12:58:33+02:00</updated>
    <author>
        <name>LA2YUA</name>
    </author>
    <id>https://longview.be</id>

    <entry>
        <title>DIY segmented capture film scanner (Part 1)</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/diy-segmented-capture-film-scanner-part-1.html"/>
        <id>https://longview.be/diy-segmented-capture-film-scanner-part-1.html</id>
        <media:content url="https://longview.be/media/posts/102/20260315_2_11.jpg" medium="image" />

        <updated>2026-05-03T12:00:00+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/102/20260315_2_11.jpg" alt="" />
                    <p>In this article I'll cover the design and construction of a high performance segmented capture film scanner, made from an off the shelf 3D printer, 3D printed parts, a Raspberry Pi HQ/GS camera, Raspberry Pi 5, and a high performance industrial lens.</p>
<p>Spoiler warning: A future article will cover how I replaced both the camera, Pi 5, and lens with better though more expensive options.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/102/20260315_2_11.jpg" class="type:primaryImage" alt="" /></p>
                <p>In this article I'll cover the design and construction of a high performance segmented capture film scanner, made from an off the shelf 3D printer, 3D printed parts, a Raspberry Pi HQ/GS camera, Raspberry Pi 5, and a high performance industrial lens.</p>
<p>Spoiler warning: A future article will cover how I replaced both the camera, Pi 5, and lens with better though more expensive options.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1jkvbl1g9rc">Introduction</a></li>
<li><a href="#mcetoc_1jkvbl1g9rd">What it do?</a></li>
<li><a href="#mcetoc_1jkvbl1g9re">Concept of execution</a>
<ul>
<li><a href="#mcetoc_1jkvbl1g9rf">Camera &amp; lens</a>
<ul>
<li><a href="#mcetoc_1jkvbl1g9rg">Lens considerations</a></li>
<li><a href="#mcetoc_1jkvbl1g9rh">Camera</a></li>
<li><a href="#mcetoc_1jl2vrstu11r">Dynamic range &amp; Dmax</a></li>
<li><a href="#mcetoc_1jkvbl1g9ri">Alignment</a></li>
</ul>
</li>
<li><a href="#mcetoc_1jl00dutj2">Motion stage</a></li>
<li><a href="#mcetoc_1jl00kfdb6f">Film mount</a></li>
<li><a href="#mcetoc_1jl00kfdb6g">Backlight</a></li>
<li><a href="#mcetoc_1jl00kfdb6h">Capture and image processing software</a>
<ul>
<li><a href="#mcetoc_1jl7r3ie316v">Bayer sensors &amp; monochrome light sources</a></li>
<li><a href="#mcetoc_1jl48fle815t">Autofocus &amp; auto-exposure</a></li>
<li><a href="#mcetoc_1jl48fle815u">Colour negative film base correction</a></li>
<li><a href="#mcetoc_1jl202calrt">Image averaging</a></li>
<li><a href="#mcetoc_1jl202calru">Flat field correction</a></li>
<li><a href="#mcetoc_1jl00t8qq71">HDR capture</a></li>
<li><a href="#mcetoc_1jl2vrstu11s">Gamma-management</a></li>
<li><a href="#mcetoc_1jl206r75sh">Capture time</a></li>
</ul>
</li>
<li><a href="#mcetoc_1jl00kfdb6i">Image merging software</a>
<ul>
<li><a href="#mcetoc_1jl00kfdb6j">Merging</a></li>
<li><a href="#mcetoc_1jl46q86v13e">Sharpening</a></li>
<li><a href="#mcetoc_1jl00kfdb6k">IR dust removal</a></li>
<li><a href="#mcetoc_1jl00kfdb6l">Other functions</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#mcetoc_1jlukjblr3s">Export scripts</a>
<ul>
<li><a href="#mcetoc_1jlukjblr3t">Report generator</a></li>
</ul>
</li>
<li><a href="#mcetoc_1jn353ovb1o">Summary</a>
<ul>
<li><a href="#mcetoc_1jnmnpqun3i">Future work</a></li>
</ul>
</li>
<li><a href="#mcetoc_1jl202cals1">Timeline</a>
<ul>
<li><a href="#mcetoc_1jlc026292f">Initial idea</a></li>
<li><a href="#mcetoc_1jlc026292g">Sketching a concept</a></li>
<li><a href="#mcetoc_1jlc026292h">A reasonable concept</a></li>
<li><a href="#mcetoc_1jlc026292i">Camera prototype</a></li>
<li><a href="#mcetoc_1jlc026292j">Fine tuning monochrome</a></li>
<li><a href="#mcetoc_1jlc026292k">Film mounts and backlight, round 1</a></li>
<li><a href="#mcetoc_1jlfl2omq63">Flat field correction, round 1</a></li>
<li><a href="#mcetoc_1jlck3s9n60">Planning a better backlight</a></li>
<li><a href="#mcetoc_1jmhcbqsi92">A better backlight</a></li>
<li><a href="#mcetoc_1jmhcbqsi93">Milestone: first colour image!</a></li>
<li><a href="#mcetoc_1jmjocuah2">End of colour-honeymoon, even flatter fields</a></li>
<li><a href="#mcetoc_1jn353ovb1p">Charting a path to greatness</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="mcetoc_1jkvbl1g9rc">Introduction</h2>
<p>The scanner design presented is a first-pass solution to a problem most people don't have, which is a convenient, very high resolution, semi-automatic film scanner that isn't a DSLR scanner.</p>
<h2 id="mcetoc_1jkvbl1g9rd">What it do?</h2>
<p>The scanner solves a key problem faced by dozens of photographers all over the world: how to get my film pictures into the computer, without using my normal flatbed scanner, or my DSLR and a copy-stand.</p>
<p>The problem with flatbeds is they're <em>slow</em> and the optics usually aren't that great (even a V850 needs a lot of sharpening to give decent results). Further, the V850's sensitivity isn't actually that great and it will often struggle with dense colour negatives. Scanner software is another thing, Silverfast isn't <em>bad</em> but it's not super stable and has a lot of useless settings and slightly eccentric behaviour.</p>
<p>The problem with DSLR scanning is it's even more fiddly, very manual, at least the scanner can be left to work for an hour per half-roll. Additionally, the DSLR scanner will be resolution limited to the DSLR you have (if you have a GFX 50 or 100 then just use that), and I just don't want to do that because everyone else is doing it.</p>
<h2 id="mcetoc_1jkvbl1g9re">Concept of execution</h2>
<p>If we consider a flatbed scanner, those are basically obsolete tech and use a line scan sensor (usually two sets with an offset to fake more resolution; "real" performance is in the 2400 DPI range at best). Film stays in place and we slide the scanner over it, keeping the motion really smooth. One benefit is these can usually do IR-scan with automatic dust removal for colour film. Overall it's slow as shit and as mentioned even a current V850 is basically obsolete from the factory.</p>
<p>Nikon CoolScan's are better from what I'm told, while I don't doubt their performance these seem to at best use a strip-loader that needs babysitting. These scanners are all 20+ years old and quite expensive so not really an option.</p>
<p>If we then consider a DSLR-scanner setup we keep the film in place and point a camera at it (with the best macro lens you can find), and capture the whole film using a 2D sensor. For larger film sizes you'll probably be doing a segmented capture and merging manually. This is pretty good, the camera is pricey but most people use the DSLR for non-scanner things too. Disadvantage is you have to either move the film or camera, then align it and probably refocus per frame. IR scanning is technically possible but rarely done since most cameras have IR-cut filters.</p>
<p>The initial concept I had in mind was using a 9⁄125 µm fiber coupled light source as a mechanical flying-spot scanner, tracing it across the film plane and capturing the image using APD's on the other side. This was ruled out after a day or so due to the obvious issue of insane mechanical precision requirements and how incredibly slow it would be. This is kind of how a drum scanner works though.</p>
<p>This solution is a hybrid approach of the first two: instead of using a huge sensor to capture each frame, use a smaller and cheaper sensor to capture segments of the film. Then automatically move the camera around to get a whole frame, then merge those segments automatically into a huge image of a film frame.</p>
<p>This approach requires several pieces to work:</p>
<ul>
<li>Camera with decent dynamic range and suitable pixel count/size/price</li>
<li>Lens with <em>zero</em> distortion and incredible sharpness</li>
<li>Motion stage (X/Y/Z)</li>
<li>Film mounts that can keep the film <em>very</em> flat</li>
<li>Backlight, ideally RGB+IR</li>
<li>Image capture + motion control software</li>
<li>Image merging software</li>
</ul>
<p>We'll go through the considerations for each one below:</p>
<h3 id="mcetoc_1jkvbl1g9rf">Camera &amp; lens</h3>
<p>The lens is the most important piece, and I figured that if I got the best lens for the job then I could always find a sensor to match. You can generally get CMOS sensors with pixels in the 0.8-8 µm range with varying sizes from 1⁄4" up to a low-cost maximum of 1" (1" sensors are pricey but can often be found used).</p>
<p>To simplify the merging later we really want <em>absolutely no</em> distortion or vignetting. The lens should have a resolution in the object-plane (i.e. the film's size) of around 5-10 µm if possible, this works out to around 4800 dpi in scanner terms or around 30-50 megapixels per 35 mm frame.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102//TEST_1_10um_spacing.jpg" alt="" width="1978" height="1470">
<figcaption>IMX477 sensor (2x downscale) with Edmund Optics 56-678 SilverTL™ 0.6x lens, 0.01 mm line spacing</figcaption>
</figure>
<h4 id="mcetoc_1jkvbl1g9rg">Lens considerations</h4>
<p>I started with the lens: after some thinking about it I decided that telecentric machine vision lenses seemed like a good idea. These lenses are perspective-free (i.e. give an orthographic projection) and are typically optimised for sharpness, distortion, and to work at a specific fairly short distance. They're usually specified with a magnification which is the scale factor vs. object at the optimal distance vs. how big it will be on the sensor's plane. A common use case for this type of lens might be component identification in an electronics pick-and-place machine.</p>
<p>Obviously we want the best mix of big object size, large image circle (to fit a large sensor) and resolution. What we don't really care about is f-number beyond the diffraction limits it imposes, we control the backlight power and the integration time can be as long as we need within reason.</p>
<p>I initially tried a Daheng DH-MML1-HR65 "1⨉" telecentric lens, which isn't a terrible choice. This lens has a resolution of around 7 µm which isn't the best but also perfectly adequate really. I encountered two issues with this lens: 1) the image was slightly brighter in the corners which was pretty noticeable when viewing the image at lower magnifications, 2) the lens is really 0.5⨉ so I was getting twice the FoV that I expected.</p>
<p>The DH-MML1-HR65 is still good considering it's less than $50 used, but assume it's 0.5⨉ and expect to crop out around 20% of the image to avoid vignetting. Do note that I switched to the EO lens before implementing flat-field correction (see later chapters); with flat field correction the DH-MML1-HR65 may well be completely usable.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102//Merged_XY_20260324_3k.jpg" alt="" width="3072" height="2182">
<figcaption>Capture using DL-MMl1-HR65 lens with 200 px per side cropped, vignetting grid is visible (look along the upper left 1/2 numbers). Emulsion side up, hence the mirroring.</figcaption>
</figure>
<p>The real big boi is the Edmund Optics SilverTL™ 0.6⨉ (56-678) bi-telecentric lens. This is a fair bit more expensive and longer, but it's <em>good</em>. The 0.6⨉ magnification is actually true, there's no vignetting or distortion, and the sharpness is divine at around 3 µm spot size. I think this lens is close to the best possible lens for this project (for up to 1⁄2" sensors), I'm very happy with it! I generally run this lens at f⁄6, though slightly more performance could be squeezed out at f⁄10.</p>
<figure class="post__image"><figure class="post__image"><img  src="https://longview.be/media/posts/102/15654.jpg" alt="" width="566" height="400"></figure>
<figcaption>Edmund Optics SilverTL™ 56-678 0.6⨉ modulation transfer function shows MTF50 at ~70 lp⁄mm and &gt;30% at 100 lp⁄mm. The different colours represent performance at various positions vs. the image circle centre. Solid/striped lines indicate performance for horizontal/vertical directions (representing e.g. astigmatism).</figcaption>
</figure>
<figure class="post__image"><figure class="post__image"><img  src="https://longview.be/media/posts/102/Screenshot-2026-03-31-at-10.22.35.png" alt="" width="409" height="400"></figure>
<figcaption>Kodak T-Max 100 modulation transfer curve shows &gt;50% contrast at 100 lp⁄mm (Kodak F-4016)</figcaption>
</figure>
<p>As shown above the selected lens has a very good sharpness both for coarse details (low frequency MTF; often technically erroneously called "micro-contrast") and fine details. The lens will be able to reproduce the fine details of T-Max/Ektapan 100 well, though not perfectly.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102//TEST_1_20260328.jpg" alt="" width="3072" height="2221">
<figcaption>Same frame and camera as above captured with an Edmund Optics SilverTL™ 56-678 0.6⨉ lens with minimal cropping shows no vignette grid (some backlight unevenness may be observed)</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_1_20260330.jpg" alt="" width="3072" height="2829">
<figcaption>SDR sprocket hole scan of an old Shanghai GP-3 frame.</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_1_100.jpg" alt="" width="1192" height="1270">
<figcaption>Zoomed in portion of GP3 frame, note that sharpening was set excessively high in this frame (I'd just switched to the HQ cam and EO lens).</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260315_2_18_comparison.jpg" alt="" width="2616" height="1845">
<figcaption>Left: new scanner, right: V850 at 3200 dpi</figcaption>
</figure>
<p>Lens alternatives might include other SilverTL™ products or another series from Edmund Optics. I think a bi-telecentric lens is preferable to avoid vignetting artifacting.  One fun alternative might be to use a low-magnification lens and just image the entire frame at once using a higher resolution sensor. The alternatives I found seemed to cap out at around 5 megapixels so a pretty significant resolution drop.</p>
<h4 id="mcetoc_1jkvbl1g9rh">Camera</h4>
<p>I initially intended to pick up a GigE Vision industrial camera thing, these are available from various Chinese manufacturers and usually pack some kind of Sony CMOS sensor. These do have a benefit in that you have a good selection of sensors to use, but they're a little annoying to talk to (usually some precompiled driver you have to use).</p>
<p>The optimal sensor for the EO lens is something with around 3 µm pixels up to around 1/2" format.</p>
<p>As a quick start I had a Raspberry Pi Global Shutter camera sitting around, this has an IMX296 sensor with 3.45 µm square pixels, 1440⨉1080 format, and 10 bit output. I did the initial testing with this camera and it's not a bad choice at all. What I didn't realise at first was that this sensor is colour only, and I really didn't want the bayer pattern blurring out my monochrome images.</p>
<p>Once I realised the colour issue I switched to the Raspberry Pi HQ Camera, which uses a rolling shutter IMX477 sensor with 1.55 µm pixels in a 4056⨉3040 format, and it does 12 bit output. This is oversampling the lens, and so pre-processing is to de-bayer then downscale to 2028⨉1520 (4⨉ drop in pixel count), this way each final pixel is represented by 2 green pixels and 1 each of red/blue, and should match the lens very well.</p>
<p>Sony's info on the sensor performance is a bit limited but <em>Strolls with my Dog</em> has done some work calculating performance characteristics here: <a href="https://www.strollswithmydog.com/pi-hq-cam-sensor-performance/">Pi HQ Cam Sensor Performance</a>. As such we know the sensor is capable of around 11 stops of dynamic range, and if we want to we could disable the defect pixels management (though I've left it on). This is comparable to many cameras used for DSLR scanning, to extend the dynamic range I use a deterministic HDR capture (described later).</p>
<p>The IMX296/GS camera had one big benefit: very high sensitivity, I needed around 5x the exposure time per shot with equal lighting for the IMX477. Given the ratio of pixel area is around 5⨉ this isn't a big shock I guess. "Fortunately" the readout and processing time is much longer on the IMX477 too, so the increased exposure time isn't felt as such. Since there are two extra bits per pixel I could turn down the frame averaging to end up at around the same total time per frame.</p>
<p>Obviously I disable as much of the in-camera and in-library processing as possible, including minimising analogue gain.</p>
<h4 id="mcetoc_1jl2vrstu11r">Dynamic range &amp; Dmax</h4>
<p>The IMX477 sensor natively has a dynamic range of 11 stops. The relationship to Dmax isn't particularly complex<sup>[0]</sup>, it's simply log<sub>10</sub>2<sup>n</sup> where n is the number of bits or stops. An 11 stop sensor therefore has a Dmax of 3.3, by setting our exposure to the base fog instead of the backlight we can maybe add 0.15 or so to that. This is sufficient for a standard B&amp;W negative, but we don't have huge margins.</p>
<p>In the image capture/processing section below I explain how two captures can be used to extend the dynamic range somewhat. By using a HDR gain of 64 our dynamic range is in theory extended by 6 stops, to a new Dmax&gt;5. This corresponds to &gt;17 stops of dynamic range for reference, we'll call this a theoretical Dmax since I don't have the equipment to prove it's real.</p>
<p>In practice the dynamic range is scene dependent: imagine a pair of lines of density 5.0 with full transparency in between. Depending on the width and spacing of the lines there will obviously be a glow effect around the lines. This is what the lens MTF chart above is showing, for finely spaced lines we simply can't see the true density in between them due to glow from the transparent areas: we have low contrast for finely spaced line pairs (= high spatial frequency). This is not something generally talked about with film scanners but is a limiting factor in basically all optical systems, and is analogous to bandwidth in an electrical system.</p>
<p>I'm pretty sure the "clarity" slider in most image editing programs works to increase low-medium frequency contrast; it would probably improve my scans, though I'm hesitant to do processing in a scanner that might degrade image quality in edge cases.</p>
<p>The ability to punch through a dense-ass negative is quite useful in general, even if fine detail contrast is still limited by the lens.</p>
<p><sup>[0]</sup>: This is the case for "raw" linear light sensor data; an 8 bit gamma-encoded image is not limited to 8 stops of dynamic range.</p>
<h4 id="mcetoc_1jkvbl1g9ri">Alignment</h4>
<p>It's pretty important that the camera sensor plane is perfectly parallel to the film plane, otherwise you'll get blurry corners and any vignetting is magnified. I use a kinematic lens mount (kind of annoying to mount but very easy to adjust), this lets me adjust the lens and camera plane in the X/Y axis.</p>
<p>As for how to optimally align it, the use of a telecentric lens actually makes this easier than you'd expect. Just place a precision pin on top of the film plane and look down at it.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102//IMG_0975.jpeg" alt="" width="247" height="329">
<figcaption>Precision pin placed on top of film plane</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102//Screenshot-2026-03-27-at-15.27.26.png" alt="" width="475" height="405">
<figcaption>Telecentric image of precision pin shows reflections off the pin side-walls off-center to the pin.</figcaption>
</figure>
<p>Since the pin is reflective on the sides it makes a ghost image around it, and adjusting the kinematic mount to center this reflection around the pin body ensures the optical axis is parallell to the pin outer walls. Since the pin is precision, the pin should be normal to the film plane and we've achieved alignment.</p>
<p>This is significantly more precise and faster than tricks like trying to compare corner sharpness etc.</p>
<p>A secondary alignment that's more obvious how to do is aligning the sensor's X/Y axis with the motion stage, just twist the camera until horizontal moves don't also cause vertical moves.</p>
<h3 id="mcetoc_1jl00dutj2">Motion stage</h3>
<p>The motion stage needs to translate the camera vs. the film in the X/Y plane, and move it up and down (Z axis). There's only one obvious choice here: a 3D printer. If you have a higher budget a desktop CNC-router would also be a good choice, though backlash in lead screws might be more of an issue.</p>
<p>I considered buying the cheapest printer available new but those look awful. I found a Creality Ender 3 V3 SE lightly used locally so picked that up. A used 3D printer is by a very wide margin the cheapest way to get a motion stage. 3D printers are generally pretty damn precise and have very little of e.g. backlash due to being belt driven. Since I already have a slightly nicer Ender 3 model I felt comfortable using this as a starting point.</p>
<p>To control the printer I obviously ditched the built in control software and flashed it with Klipper, and went with a moonraker + fluidd control UI. Connecting to this from my Python script went very painlessly and it's <em>just worked</em> since I got it working. Waiting for motions to finish was also quite simple, just issue an M400 command after a motion.</p>
<p>Klipper makes it very easy to manage the changes I make to the printer, e.g. my machine dimensions and probe offsets are different than stock, but this just means working out the new parameters and updating the configuration file. One funny is that the 3D printer control software Klipper for some reason isn't very happy with my machine if I remove the extruder details , so I just pretend we still have those parts. This is similar to how most chess playing engines don't like it if you give it a board without a king on it.</p>
<p>Now a 3D printer doesn't really need to be very precise in a lot of ways that we care about, but it's over all perfectly acceptable and with the steppers configured for optimal resolution it's surprisingly good. The X-axis seems to tilt up/down a bit vs. position but this only amounts to approx. 50 pixels alignment error over a 35 mm frame which is handled in software.</p>
<p>Configuring a suitable acceleration is very important to avoid shaking the machine during image capture, and is fortunately trivial to do.</p>
<p>As mentioned above keeping the film plane aligned to the sensor is very important, but it's also important to keep the film-sensor distance constant. What may not be obvious is that bed flatness is relatively unimportant (which is good, the E3 V3 SE lacks the adjustment screws). Using Klipper's bed mesh mapping feature and the honestly quite good optical-pin based CRTouch probe we can have Klipper compute a Z-correction mesh that is transparently applied. If the bed is a tilted plane then the pin-alignment described above will make the sensor parallel to it, and the bed mesh will adjust the Z-offset automatically as we move around, in theory this perfectly cancels out any bed levelling issues.</p>
<p>I do notice some backlash in the Z-axis movement, on the order of 50 µm or so. This is mostly solved by fine tuning the autofocus in the middle of each frame before starting a capture, which also ensures that any remaining bed mesh error is minimised in the scan-area.</p>
<h3 id="mcetoc_1jl00kfdb6f">Film mount</h3>
<p><span style="font-size: inherit;">I initially intended to use a glass sandwich with ANR+clear glass to squeeze the film between. This was a good way of making newton rings, future work will be to improve this situation. Double ANR-glass might be one way to solve this, though sharpness could be an issue.</span></p>
<p><span style="font-size: inherit;">For initial testing I used some photo paper with a hole cut into it as a film guide and mask, photo paper is a bit thicker than typical films so if the film was naturally flat this was fine. Curved films that touched the top glass consistently caused newton rings. </span></p>
<p>I still had the V850 film holes so I used these for most scans, these don't hold curved film very flat but with per-frame autofocus it works out ok.</p>
<p>If you wanted to you could probably use the extruder motor drive to run a film-puller to scan a whole uncut roll. This is a whole project in itself, but could be super neat and a 35 mm-only scanner could be made much smaller if this were done.</p>
<p>A fun side-project could be a 8/16 mm film scanner; this would be easier since with a reasonable lens and sensor combo you wouldn't need any stitching. I don't currently work with motion picture stuff unfortunately.</p>
<h3 id="mcetoc_1jl00kfdb6g">Backlight</h3>
<p>A set of 3 pcs 8⨉32 (10 mm pitch) WS2812B ("Neopixel") flexible light panels are used as the backlight. A future upgrade will be to add IR capabilities, which I expect to do by making some super thin IR LED strips to go in between the Neopixels. </p>
<p>The use of a spatially controlled backlight has a huge thermal benefit and makes tweaking uniformity easier. Lighting the entire film-area up evenly to a level where ambient light won't affect the scanning would require on the order of 100 W of LED's, while &lt;10 W is used to light up a given 35 mm frame.</p>
<p>For one-shot colour the R/G/B PWM-balance is adjusted to compensate for orange-masked negatives. (An alternate approach is to do field sequential capture with variable exposure time)</p>
<p>Future work will probably involve making a custom backlight assembly with more precise PWM control and IR emitters. If the backlight is wired to the camera hardware trigger lines then PWM control could be synced to the camera exposure.</p>
<h3 id="mcetoc_1jl00kfdb6h">Capture and image processing software</h3>
<p>I wrote a basic capture program in Python using a variety of libraries. The bulk of the camera work is done by Picamera2/libcamera, which while slightly lacking in documentation is a very nice project once I got my head around it.</p>
<p>For actual image crunching it's the obvious choice: numpy and OpenCV. I use a variety of OpenCV functions to do filtering in the capture system. Unless otherwise noted the entire processing chain is 32-bit floating point up until where TIFF's or similar are generated.</p>
<p>The control software is a basic terminal curses application that configures the scan size/start point, exposure control, and autofocus. When set up it scans the image and outputs 32-bit float images (actually compressed numpy arrays) as well as some JPEG's and histogram plots, these can be viewed in a basic HTML site as the scan happens. After a completed scan a JSON file is written out containing the frame parameters like number of segments, overlap in pixels, filenames, frame/roll ID to name the output file, and parameters that go into the EXIF data later.</p>
<p>For colour scanning the colour captures are merged during scanning; with monochrome scanning the output is still RGB with equal R/G/B values. IR data is stored separately.</p>
<p>The control software calculates segment positions using the sensor/lens configuration, and ensures a 50 px per side overlap is present in each frame for later merging.</p>
<p>It also has a concept of a "roll ID" and frame number that are used to name the output files, usually I just go with a format of "YYYYMMDD_n" using the date of development and n just incrementing for each roll that day.</p>
<p>The frame index is at present used to automatically step over to the next frame when using my 3x6-strip 35 mm stencils, though in future it will need to be configuration controlled to support medium format (or 4x5/8x10 if I ever go down that road).</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-01-at-10.22.29.jpeg" alt="" width="2132" height="1462">
<figcaption>Raw captures placed in a grid, showing the overlap around each corner.</figcaption>
</figure>
<p>I also make a real-time image view with overlays to help alignment and monitoring, this is shown on a 5" DSI LCD on top of the printer, or it can be viewed in a webpage remotely. To make the real-time viewer I use the CLI image viewer 'feh' which is great for this, I just launch it as <em><span class="s1">DISPLAY=:0 feh /dev/shm/cam.bmp -F -Z</span></em><span class="s1"> and it will automatically update the view every time a new file is written by my program.</span></p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/cam-1.png" alt="" width="800" height="481">
<figcaption>Screenshot of real-time display for scanner, giving a very "Ukrainian FPV drone footage" vibe</figcaption>
</figure>
<p>The overlays include a histogram with min/max indicator, gamma/HDR info, Z coordinate, a view of the number of segments to be captured and location (bottom right, currently showing a capture in progress), and the autofocus indicator (Green/Blue/Red bars upper right). The green box is the ROI/colour match/AE-zone and is placed over the film base, the blue box is the AF area, and the red box shows where the overlap will be between segments. The yellow arrow in the upper right changes every time a frame is generated to make it easy to tell if it's live or not.</p>
<h4 id="mcetoc_1jl7r3ie316v">Bayer sensors &amp; monochrome light sources</h4>
<p>One issue you'll run into using an RGB sensor with monochrome light is that the saturation level of the sensor will seem to be dramatically reduced. This happens because a normal RGB-greyscale conversion uses weighting of the RGB-values that assumes you have a pretty grey scene.</p>
<p>When using monochrome backlighting I only use the intensity value from the corresponding channel and the rest are discarded after debayering. This seems to work ok.</p>
<h4 id="mcetoc_1jl48fle815t">Autofocus &amp; auto-exposure</h4>
<p>The autofocus system used is fairly simple, and is provided as an operator aid and normally done automatically in the center-patch of each frame before scanning a frame.</p>
<p>To evaluate sharpness I do a <a href="https://docs.opencv.org/3.4/d5/db5/tutorial_laplace_operator.html">laplacian transform</a> over the image (a sort of edge-filtering operation), and compute the variance of the laplacian transformed image. This becomes a unitless number that is used as the AF score (grainier film stocks obviously end up with a higher variance). The autofocus algorithm performs a trinary search about the selected distance, this means it checks the AF score at Z positions +/0/- the selected range and goes to the best position of these, repeating about the new optimal value for each iteration. The range to search is divided by 2 per round and typically I search ±0.15 mm down to around 25 µm step size in the automatic frame-center mode. The manual activation searches a larger range.</p>
<p>Auto-exposure is a pretty simple integrator regulator that can be activated on demand. It takes a couple of averaged images, reverses the gamma correction to work in linear units, works out the percentage-error and scales the exposure time by the error. This converges quite quickly, so there's an early out if the 8-bit equivalent error is less than 0.5 levels. The green patch in the display shows the ROI which is averaged for auto-exposure, it's small enough to fit between sprocket holes easily. A simple template matcher runs in parallel and updates the position based on a sprocket-hole template to ensure it's always positioned sensibly.</p>
<p>In monochrome mode autofocus and auto-exposure is done using the green light source, since this is the wavelength where the lens has best performance. </p>
<h4 id="mcetoc_1jl48fle815u">Colour negative film base correction</h4>
<p>To simplify my mostly manual colour negative inversion process I use the adjustable RGB backlight to adjust the film base colour to neutral.</p>
<p>This works by positioning the green ROI marker over the film base, the blue backlight is set to around 80% of maximum and the exposure time is set as usual based on this. The average value for blue is then used as a target for green and red, adjusting the backlight intensity for these channels to match.</p>
<p>By doing this the inverted image at the end of the chain will have the film base at a neutral grey level, and in theory all that's needed is contrast adjustment to have a "precise" colour response.</p>
<p>In general this adjustment is only done once per roll if at all. A set of presets can be loaded as starting points and refined if desired.</p>
<h4 id="mcetoc_1jl202calrt">Image averaging</h4>
<p>To reduce readout noise I accumulate somewhere between 4-16 images depending on how I feel. This is done using a simple flat weight so e.g. if I wanted to merge 16 images then I'll multiply each image by 1⁄16 and add them together. Readout noise is as expected reduced by √N for N captures, while the film being captured is unaltered since it never changes.</p>
<h4 id="mcetoc_1jl202calru">Flat field correction</h4>
<p>The IMX477 seems to be a very stable sensor with low drift and readout noise. I apply the standard darkframe/flat field correction principle to correct for a slight non-uniformity, leading to the lower right corner being slightly darker than the rest.</p>
<p>For the two-exposure HDR mode separate corrections are used since exposure time and analogue gain are quite different. A third flat-field is applied to the merged image to further refine the image quality.</p>
<h4 id="mcetoc_1jl00t8qq71">HDR capture</h4>
<p>While various HDR techniques exist, I don't care for the standard ones since I need the HDR to be applied equally to all the composite images. I also don't care for tone mapping algorithms in an automatic pipeline, they tend to produce obvious aberrations.</p>
<p>I use a simple deterministic HDR technique where each sub-frame is captured using different analogue gains up to the maximum, adding exposure time if required.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_4.jpg" alt="" width="3072" height="2829">
<figcaption>"Flat" 𝛾=0.5 64x HDR capture of a Shanghai GP3 shows extended highlight latitude (post-inversion; observe left side edge of backlight and marking lines). Note also some blooming effects around the marking lines, likely caused by the imaging lens contrast not being infinite.</figcaption>
</figure>
<p>I then mix these with a scaling factor (OpenCV AddWeighted): with a factor of e.g. 64 the weight is simply 1/64 since the sensor provides linear-light values.</p>
<p>When averages are called for I average high/low captures then merge these. If e.g. an HDR gain of 64 was requested then the analogue gain will be capped at 8 (16 is sensor max), and the exposure time would be multiplied by 8 to make up the difference.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_1.jpg" alt="" width="3072" height="2267">
<figcaption>"Flat" 𝛾=0.5 64x HDR capture of a Fomapan 100 negative with fairly high density. While less appealing as a finished image the image is well suited to digital post processing.</figcaption>
</figure>
<p>As I discovered in the docs, there is no guarantee for how many images need to be read out before a change in exposure time or analogue gain is effected, but I found stopping then starting the picamera2 instance made it apply the settings on the next frame. This was <em>way</em> faster than waiting for a correctly set frame to pop out of the pipeline.</p>
<h4 id="mcetoc_1jl2vrstu11s">Gamma-management</h4>
<p>I elected to use a continuous<sup>[0]</sup> gamma (𝛾) of 2.4 for my system to sort of match Rec.2020, this became a necessity in the HDR modes to give presentable images that didn't need a ton of post processing.</p>
<p>For real-time use the preview-image is converted to 16-bit and a LUT is used, during stitching a floating-point gamma is used.</p>
<p><sup>[0]</sup>: Continuous meaning my gamma correction stays a true gamma down to 0, as opposed to switching to a linear scaling near 0. My offset-correction keeps the black level under control despite this.</p>
<h4 id="mcetoc_1jl206r75sh">Capture time</h4>
<p>With the configuration discussed here, each sub-frame covers around 10⨉7 mm with some overlap. Using 64⨉ HDR merging and averaging around 2-8 frames the capture time per sub-frame is around 2-5 seconds. Motion time is typically 1-2 seconds between frames.</p>
<p>Some optimisation has been done to avoid slowdowns such as using multiple threads to handle e.g. display updates, talking to the camera in general, and saving output files. This means the capture cycle is effectively time limited by 1) printer motion, acceleration has to be low to avoid shaking <em>or</em> you have you wait a bunch after motion, and 2) actually capturing the images where 2a) multiple exposure averaging takes a bit of time and 2b) switching exposure time and analogue gain takes a bit of time.</p>
<h3 id="mcetoc_1jl00kfdb6i">Image merging software</h3>
<p>The image merging software is written in Python as usual for my image processing. It's designed to run on a much more powerful computer than even the Pi 5.</p>
<p>I chose this split since I expected the amount of number crunching and RAM needed to be fairly large with medium format scans, and waiting for merging to happen between scans would slow down the capture process. A script running on a server polls the output folder of the Pi and automatically grabs and stitches each scan.</p>
<h4 id="mcetoc_1jl00kfdb6j">Merging</h4>
<p>To merge the mosaic images I initially tried the obvious solution of just asking OpenCV and Affinity Photo to put the frames together for me. This approach works sometimes but failed tremendously in general. </p>
<p>I think the issue with standard image merging algorithms is they're very clever and optimised to handle a bewildering array of lens and camera distortions and to reject noise/fine detail.</p>
<p>I had the basic idea down before starting, getting it working wasn't too difficult and mostly boiled down to figuring out how to make OpenCV do what I want and learning the basics of image processing again.</p>
<p>The idea is this: we know that all our images have an amount of pixels overlapping on each side, and we know their approximate orientation. I decided to only handle orienting two images at a time along one axis. In the right hand image, we select a rectangle on the left side which is our template (cropped to less than our expected pixel-offset error in the X/Y axis), then we grab a fairly large chunk of the rightmost edge of the left hand image and call this our reference.</p>
<p>Then I use a standard OpenCV template matcher, using the Square-difference comparison method, this returns the pixel offset in the left image subset where our right-image template is the closest match. It does this by picking a point, "placing" the template over the image at that point, then it adds the square of the difference in pixel value for each pixel in the template vs. the reference image. This is the "score" for putting that template at that position, this is repeated for each offset the template can fit into. It's kind of like putting two transparent images on top of each other and trying to line them up as best you can.</p>
<p>This matching technique would be sensitive to intensity variations, optical distortions, noise etc., but since I built a system with the best lens the idea is that the images will always contain film grain patterns in the overlap. Film grain is basically random, and by selecting the biggest template that will fit it's all but impossible to get a false positive.</p>
<p>During development the false-matches I've had were caused by misalignment of the camera, incorrect overlap settings etc. that combined to make it impossible for the simple alignment to work. I also noticed that humans are pretty bad at quickly spotting a poor merge job, I had to zoom in on details to spot some errors.</p>
<p>With the template position found it's a simple matter of calculating the X/Y offsets to apply when putting the two images next to each other. I crossfade a few pixel region between the frames in the overlap, which can sometimes be seen at 100% zoom as a slightly blurrier band. The blur-band doesn't seem to be visible at normal magnifications. For the Y-axis offset I simply crop both images, allowing images to contain dead areas would complicate processing and isn't necessary when the scanner is well aligned.</p>
<p>The merging works its' way along the X-axis making strips, then later loads and rotates the X-strips to merge along the Y-axis.</p>
<p>The Y-crop is a good indicator of how well aligned the camera is vs. the printer, the Y-axis error should be adjusted to +0-10 pixels per sub-frame. If the Y-crop is negative the Y-axis overlap region tends to be cropped out, causing issues with the later Y-axis merging.</p>
<p>For my own reference: rotating the camera clock-wise decreases the Y-error. For those wondering: the focus-adjust ring on the HQ/GS camera is M1.6x8 mm, I replaced mine with a DIN912 style hex-head screw since the flat head was damn near impossible to precisely turn.</p>
<p>The processing is fairly amenable to multi-threading, each X-strip is processed in parallel, and rotations/gamma/sharpening are applied before merging for the same reason. Typical wall-clock time for a 35 mm frame is 30 seconds for a 50 MP sprocket-hole scan.</p>
<h4 id="mcetoc_1jl46q86v13e">Sharpening</h4>
<p>I do a basic unsharp-mask over the image to improve sharpness. The parameters that seem to work best are a strength of 1.3 and a pixel-dimension of 2. I obviously want the sharpening to never be excessive, but I also prefer not to <em>have</em> to apply sharpening in post processing.</p>
<p>I did briefly experiment with using a <a href="https://docs.opencv.org/4.x/de/d3c/tutorial_out_of_focus_deblur_filter.html">Wiener filter</a> but found this to be unnecessary in this system, it leads to very visible artifacting if not perfectly tuned and my PSF is very close to 1 px anyway. A Wiener filter is basically guessing at what the "point spread function" (PSF) is, then using this as a filter to reverse the system blur. It can give very impressive results for unsharp or motion blurred images but it doesn't seem suited to general purpose photographic use due to the hideous artifacting. Github user <em>michal2229</em> has a nice repo you can run to try it out yourself: <a data-pjax="#repo-content-pjax-container" data-turbo-frame="repo-content-turbo-frame" class="d-block overflow-x-hidden color-fg-default" href="https://github.com/michal2229/dft-wiener-deconvolution-with-psf">dft-wiener-deconvolution-with-psf</a>, though note that you have to change <em>cv2.CV_AA</em> to <em>cv2.LINE_AA</em> to make it not crash with circular PSF's.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-01-at-11.35.50.jpeg" alt="" width="585" height="438">
<figcaption>Wiener filter using a 2 pixel blurred PSF gives very ugly results. Turning the strength down enough to look ok also makes it basically not actually do anything.</figcaption>
</figure>
<h4 id="mcetoc_1jl00kfdb6k">IR dust removal</h4>
<p>Making a <em>good</em> IR dust removal system will require a lot of testing, at the time of publication my backlight lacks IR emitters so I haven't been able to start on this.. The minimum viable product as I see it is creating a dust-map to highlight image areas with dust for manual painting. This in itself is probably a worthwhile feature.</p>
<p>I expect the sequence of operations will be to threshold the IR image, then perform some morphological operations to create a slightly larger mask around each object found to paint out. These object-masks can then be applied to guide an image infill algorithm of some sort.</p>
<h4 id="mcetoc_1jl00kfdb6l">Other functions</h4>
<p>My merge script also does a number of other functions including sharpening and generating EXIF-metadata to embed in the pictures. For posterity this scanner is called the "LA2YUA E3V3SE Scanner" in the EXIF data, named based on the printer used as a base.</p>
<p>I decided to limit the output image to be less than 10'000x10'000 pixels since images exceeding 100 megapixels are pretty problematic to work with.</p>
<p>The standard output format is a 16-bit greyscale or colour TIFF file. Exporting DNG files is entirely possible (and experimented with) but I've found DNG files to be annoying to handle in a scanner workflow. Note that to output 16-bit TIFF's in Python, use the <em>tifffile</em> library instead of OpenCV, it supports way more esoteric TIFF features.</p>
<p>Future work is improving colour management and applying ICC profiles generated by e.g. imaging an IT8 chart for colour modes.</p>
<h2 id="mcetoc_1jlukjblr3s">Export scripts</h2>
<p>My workflow is a bit primitive in some ways, I use Affinity Photo for editing, touching the original TIFF's generated by the scanner. I typically add adjustment layers for every adjustment including dust removal, so the original image data is retained.</p>
<p>After editing each file, I save it and use macOS tags to quickly identify which images I consider worth keeping (red tag is Control+1, very quick to do).</p>
<p>I then run a simple shell script to convert the TIFF's to JPEG and AVIF outputs, keeping the tags for easy sorting. JPEG's are copied into an export folder, the AVIF's are only used for my iCloud photo library. AVIF's are pretty good if slow and a bit buggy when loading 50+ MP images, but macOS Preview.app doesn't support writing them so JPEG's are preferred.</p>
<h3 id="mcetoc_1jlukjblr3t">Report generator</h3>
<p>Since each roll is typically 10+ GB of image data after conversion, I don't want to keep the original files in online storage forever.</p>
<p>For posterity my storage tiers are: local SSD replicated to server SSD in real-time, older files deleted to keep space free, an online HDD copy manually rsynced, and a set of LTO-5 tapes (approximately 1 tape per year's worth of pictures). I'm considering moving to LTO-7 as prices come down.</p>
<p>To quickly let me reference what images are on a given roll, and to keep a record of e.g. what camera/lens/film/processing was done to a given roll, I make a one-page "contact sheet" report. This is a PDF that I retain in online storage to let me quickly look up any roll I've scanned.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-11-at-17.45.02.png" alt="" width="1974" height="1308">
<figcaption>Sample "Contact Sheet" report</figcaption>
</figure>
<p>I originally did this using some templates in Affinity Publisher, but since that can't be scripted it was a bit tedious. As part of this project (while waiting for some long 3D prints) I wrote a simple Python program to load a simple text file containing roll information I input manually, and the JSON files for each frame.</p>
<p>The text file contains all the information shown in the table at the top, except the roll reference (inferred from the as-scanned roll ID), film type (can be overridden if desired). There's a free-text area which is put into the large area in the table, this will usually contain information such as what kind of event the photos are of, notes regarding development where I tried something new, or comments on issues in the scanned images.</p>
<p>The Python script downscales images to an appropriate resolution (~600 DPI is reasonable for a digitally viewed PDF) and a coloured border is added to each image based on the macOS tag (red border = not tagged, probably rejected). Finally a LaTeX file is written out containing the information, </p>
<p>This is a work in progress, I'd like to make the actual image grid a bit nicer looking and put the frame number as an overlay over the images, but LaTeX isn't the easiest thing to fine tune.</p>
<h2 id="mcetoc_1jn353ovb1o">Summary</h2>
<p>The presented system is a nice starting point, though some issues are present that makes this a less than optimal system. At the time of publication this system has been partially dismantled to start work on the follow-up, which will be the subject of a future article.</p>
<p>The main issue with using CSI-cameras on a Pi is the very limited selection of sensors, and their poor speed as a result of this. There's no particular upgrade path available either, it's more of a take-it-or-leave-it situation. Due to the low speed of the HQ camera I ended up with a parallel-colour image, which has moderate colour separation without a colour correction matrix. The use of a faster monochrome camera and field-sequential colour should give better uncalibrated performance.</p>
<p>The choice of a bi-telecentric lens seems to stand the test of time: the exceptional distortion performance and resolving power is real, stitching images captured with this type of lens is trivial compared to more standard lenses. As noted at the end of the timeline below some lens issues were found with stray light, but this can be worked around. The most major issue is where the film strip is shorter than the mask opening, leaving a large clear area. The workaround is basically to put some tape over that area.</p>
<p>The film mount is not an optimal solution, initial tests with the ANR-glass stack suggests newton rings are very much a problem if the film is curled. This is future work.</p>
<p>The choice of a 3D printer with belt driven axis and stepper motors seems sensible, it is a highly affordable motion control system that seems to offer acceptable performance. The choice of my specific Ender 3 V3 SE wasn't optimal, the motion range is slightly limiting and makes comfortably scanning full 35 mm rolls impractical. Further, the system speed is limited by the "bed-slinger" approach since the bed now contains a fairly large assembly with a lot of inertia and poor stiffness. A gantry-type CNC router base, or some type of Core-XY printer would be a better choice since the camera-lens assembly will always be easier to move than a giant light-box.</p>
<p>The Pi 5 is a capable little computer, but it's at its' limits here and is easily outclassed by a SFF computer from 2018 that cost around the same. For reference the Mk. II system uses a HP ProDesk 600 G3, which can take a 10 Gbit⁄s network card.</p>
<h3 id="mcetoc_1jnmnpqun3i">Future work</h3>
<p>As mentioned above I'm publishing this article after starting work on a Mk. II system.</p>
<p>Key points expected for Mk. II include:</p>
<ul>
<li>Use a GigE-Vision camera for speed and to give better control over the image capture
<ul>
<li>10GigE-Vision as a future upgrade path</li>
<li>Use a normal computer to support higher-speed I/O</li>
</ul>
</li>
<li>Replace the SilverTL lens with a CobaltTL lens that can support a 1" sensor, giving a ~4⨉ increase in FoV while retaining the same spatial resolution—a major speed improvement</li>
<li>Camera will likely be an IDS uEye variant, since their software stack seems to be pretty good and a wide array of used cameras are available
<ul>
<li>I did some experiments with MDVision cameras but found the software to be somewhat unstable and the camera didn't really behave as expected according to the docs. I think this could be worked around but an IDS camera was available to borrow.</li>
</ul>
</li>
<li>Backlight will likely be a custom panel optimised for this use case:
<ul>
<li>RGB+IR LED's as tightly packed as practical</li>
<li>Each pixel only needs on/off control, not per-pixel PWM like a Neopixel</li>
<li>Array update speed doesn't need to be all that fast</li>
<li>Each colour channel needs a high speed PWM that can be synchronised to the camera flash trigger output line</li>
<li>I expect the Pi Pico PIO-functionality will be well suited to implementing this control scheme</li>
<li>If the backlight is only on exactly when the camera is exposing, the power consumption should be significantly lower than the current system by only enabling the LED's when their output is useful</li>
</ul>
</li>
<li>Nicer film holders will be a mechanical engineering challenge</li>
</ul>
<h2 id="mcetoc_1jl202cals1">Timeline</h2>
<h3 id="mcetoc_1jlc026292f"><strong>Initial idea</strong></h3>
<p>Late February 2026 I was scanning some slightly cooked pushed Vision3 250D and noticed that the blue channel was close to saturated in my V850 scans. I was also generally unhappy with the sharpness of my scans, especially when dealing with Kodak's classic curvy 35 mm base.</p>
<h3 id="mcetoc_1jlc026292g"><strong>Sketching a concept</strong></h3>
<p>In early March 2026 I started thinking of a silly idea, looking at using a 9⁄125 µm fiber-end as a flying spot scanner. This idea was sketched out and I did determine that I could get the required laser sources to make a RGB+IR signal to drive the emitter. Obviously this was ruled out once I started thinking of the mechanical requirements to move such a tiny spot over the negative, and the required detector performance would be pretty challenging too. I never bothered calculating the scan time (hours?).</p>
<h3 id="mcetoc_1jlc026292h"><strong>A reasonable concept</strong></h3>
<p>Later in March 2026 I started thinking along the lines of a segmented capture scanner, and started looking at motion stage components. After looking at really cheap 3D printers on AliExpress and checking reviews I decided those are basically useless. Looking locally (via Finn.no) I found that a lot of people were and are still selling barely used 3D printers for a solid discount, and the E3 V3 SE was available barely used in box for less than half the new price. A real <em>"for sale: baby shoes, never used"</em> moment. I picked this specifically since it's a fairly pro looking closed design instead of looking like a collection of loose parts in formation.</p>
<p>At this point I was looking at Chinese made GigE Vision cameras, and had selected a reasonable monochrome camera, with the idea being that I'd use a PYTHON1300 based camera I had bought previously for a prototype. These cameras would be more optimal since I could get monochrome sensor variants, but once I remembered I had a RPi GS camera sitting around I decided to use this, figuring that this was a decent monochrome camera.</p>
<p>For lenses I remembered thinking telecentric lenses looked cool previously, and looking into what was available in AliExpress I fairly quickly found the Edmund Optics lens I rave about above, showing it to some optics designers I know they seemed impressed by the stated performance figures. For concept-proving I ordered up the DH-MML1-HR65 since it's a lot cheaper.</p>
<p>I also spent some time thinking about backlights and film mounts, after discussing the concept with some older colleagues who had clear memories of mounting slides I figured that the ANR glass + top cover glass might be viable.</p>
<h3 id="mcetoc_1jlc026292i"><strong>Camera prototype</strong></h3>
<p>In the middle of March 2026 I had the 3D printer, the 1⨉ lens, and the GS camera in house. I did some initial testing and was quickly impressed by the achieved sharpness. I had issues with sensor/film plane alignment that were solved by the kinematic mount later, and I had to work out how to actually verify my alignment (pin-method described above is the best).</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/test-python-2.jpeg" alt="" width="552" height="738">
<figcaption>One of the first images captured with the system (2026-03-19, Eastman 5222 "Double-X")</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/test-python-4-2.jpg" alt="" width="2204" height="1456">
<figcaption>Comparison image of V850 scan of very dense Vision3 250D.</figcaption>
</figure>
<p>3D printer interfacing was pretty unproblematic, the moonraker example code was lightly modified to take G Code input in a thread-safe queue and it's stayed that way.</p>
<p>I also realised I had to buy a Raspberry Pi 5 since my old CM4's all had 8 GB of storage which just isn't enough for this kind of development work.</p>
<p>I went through a number of iterations of the lens+camera mount, 3D printers aren't really designed to take precision optics but I think I ended up with a pretty sensible mount that doesn't seem to move around too much.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/IMG_0962.jpeg" alt="" width="483" height="644">
<figcaption>First prototype using kinematic mount, DH-MML1-HR65 lens, flying Pi 5 with bonus flying fan and improvised X &amp; Z axis home sensors.</figcaption>
</figure>
<p>Merging artifacts were an issue during this time that were caused by both misalignment of the sensor plane, and the cheap lens vignetting. Cropping the image helped with the cheap lens but the real fix was switching to the expensive EO lens. I think the bi-telecentric design is part of why it doesn't have field flatness issues with these sensors, since both should be vignette-free.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Merged_X2.jpg" alt="" width="9818" height="1014">
<figcaption>One of the first merged image strips</figcaption>
</figure>
<p>The merging software was started on 2026-03-22, the day after a 4 hour photo walk and 8 hour post-walk beer session (results: 1.5 rolls Double-X, 0.8 roll Tri-X, 0.5 roll Fuji 400, indeterminate beer amount, 1 midnight burger). It only took a few hours to get usable results, though tweaking of parameters went on for a few days after.</p>
<p>When I switched to using raw data from the camera (one thing the Pi 5 does better than Pi 4's, it always outputs left aligned 16 bit, the only rational way to supply 9-16 bit image data) I discovered the bayer pattern of the GS camera. Having previously ordered the HQ camera just in case I switched to this. I'd already prepped the code so switching to a new camera with different pixel geometry was relatively straight forward, an hour or two of tweaking.</p>
<p>With this kind of telecentric lens sensor dust tends to be pretty visible, especially if stopped down a bit. If blowing dust off isn't enough, I pull the C-mount off the camera board and stick some standard office tape on the sensor and pull it off slowly. This picks up most marks including fingerprints. I picked up that trick from an old telecom R&amp;D engineer where they used to clean fiber optic connector ends that way before the purpose made products were available.</p>
<p>IR filter removal was harder than the documentation suggests, I can inform the reader that hitting the filter glass with a 300°C hot air gun will crack it in around 1 second. Heating the C-mount piece up to maybe 50-60°C made it possible to cleanly remove the glue as well, and a hand-vac was used to pick up all the fairly sharp glass shards.</p>
<h3 id="mcetoc_1jlc026292j"><strong>Fine tuning monochrome</strong></h3>
<p>The last week of March 2026 was spent fine tuning the capture process and supporting aspects. I added the HDR-mode and implemented gamma correction, which required some iteration to give results that looked ok and were possible to work with later. This mode was successful enough that I now use it as the default, since the only downside is a straight export looks pretty flat without applying a tone curve.</p>
<p>Initially I used a gamma of 2 since floating point power functions are too slow for real-time preview, and square root and a power of 2 are relatively performant. After a while I switched to using a 16-bit LUT for real-time preview (less precise, around as fast as a floating point square root) and a pure power gamma of 2.4 for capture.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/cam-1-2.png" alt="" width="800" height="481">
<figcaption>Early display output, just after HDR &amp; gamma were added.</figcaption>
</figure>
<p>JSON outputs were added to provide "frame info" to the merger used in determining what files are there, how they're aligned, exposure parameters, type of scan etc.. A lot of the parameters are just formatted and put into the EXIF tags of the output image for posterity.</p>
<p>Since the CSI &amp; DSI cables showed up I could mount the Pi and 5" display where the spool holder is meant to go on the printer. 50 cm long CSI cables seem to work fine, and the X-axis can traverse the entire width at minimum Z without snagging.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260403_2_35.jpg" alt="" width="3072" height="2067">
<figcaption>Pre-backlight configuration, scanned with this very scanner.</figcaption>
</figure>
<p>A nice heat sink for the Pi 5 with a big fan showed up, an instant 30°C temperature drop. Mounting the Pi 5 behind the screen severely degraded Wi-fi performance so I decided to run a fiber from my main switch and put a media converter into the final design.</p>
<h3 id="mcetoc_1jlc026292k"><strong>Film mounts and backlight, round 1</strong></h3>
<p>The first week of April 2026 was spent getting a prototype film holder and backlight operational. In the same bag as the RPi HQ camera there were also two pieces of glass inside an extremely well padded box (shoutout to my AliExpress glass-store shipping department bros', you rule).</p>
<p>I set up a private Gitea-server, since I develop the capture software straight on the Pi 5 it was nice to have somewhere else to push to.</p>
<p>Since I had realised that I'd need to build a custom backlight controller to properly support colour scanning, I decided to initially use a set of monochrome LED strips. Green was the obvious choice for a monochrome scan, having twice the photodiodes per output pixel than the others.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/IMG_0994.jpeg" alt="" width="476" height="547">
<figcaption>First prototype assembly of diffusor-plate, using the clear cover-glass as a base to avoid damaging the ANR glass during testing.</figcaption>
</figure>
<p>A fairly immediate issue I noticed in the first test scans was the awful quality. After some testing I realised using green-only lighting with a pipeline tuned for white light meant my green channel was way overexposed since the RGB-Greyscale-RGB pipeline was giving me RGB averages values in greyscale. This meant when only the green was responding it would saturate quickly but the greyscale value would be at most 70-80% of max. I tested this by just underexposing the scan a lot and it looked fine again, it's a simple fix: just use the channel corresponding to the backlight colour and ignore the rest.</p>
<p>The backlight prototype had a lot of vignetting due to simply not being big enough, but I was able to get a couple of scans of the last roll I'd shot. Stacking more diffusor plates and increasing the LED-diffusor distance to 100 mm helped a fair bit. As part of this process I also added support for frame-indexing to X/Y positions corresponding to negative frames, and worked out that for 6-long strips my Y-axis margin was technically -10 mm, though in practice I had 5 mm to spare.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-02-at-20.56.33.jpeg" alt="" width="2198" height="1714">
<figcaption>Green/Mono scan without cover-glass of the same Foma Ortho 400 frame vs. Epson V850 at 3200 dpi.</figcaption>
</figure>
<p>Above is a comparison of a lightly processed scan vs. a "final" V850 scan at 3200 dpi, I think the difference makes it fairly clear why I wanted a better scanner.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_12_20260403-2.jpg" alt="" width="3072" height="2789">
<figcaption>Uneven backlighting causing a gradient across the image</figcaption>
</figure>
<p>After scanning a couple of fresh rolls by moving an old LED-panel around to get the illumination reasonably flat, I implemented a template based automatic sprocket hole finder to make auto-exposing faster. I was doing it for basically every frame so this was worthwhile.  Over 3 rolls with straight glass I encountered a few cases of newton rings during this round, and I suspect my film/sensor planes weren't fully aligned.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/cam2.png" alt="" width="800" height="481">
<figcaption>Sprocket hole finder positioning the AE/ROI point between cinema sprocket holes, the average pixel value is shown above the area.</figcaption>
</figure>
<h3 id="mcetoc_1jlfl2omq63">Flat field correction, round 1</h3>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260403_2_3.jpg" alt="" width="3072" height="2064">
<figcaption>Newton rings and merging artifacts visible after increasing contrast significantly.</figcaption>
</figure>
<p>The above image suggests that the lower right corner of each sub-frame is darker than the rest. I ruled out reflections by temporarily mounting a polariser on the lens, figuring that e.g. a bounce off the sensor/lens, back to the glass then in again would probably be affected.</p>
<p>After a bit of testing I determined that this effect gets worse with increasing f-number so leaving the lens wide open helps. I spent an embarrassing amount of time trying to invent <a href="https://en.wikipedia.org/wiki/Flat-field_correction">flat field correction</a> from first principles before I just implemented the Wikipedia formula, which worked. I decided to capture a separate flat field for the long-exposure HDR merge capture, since this uses a different analogue gain.</p>
<p>Below is the result of doing a flat field correction with separate HDR, but using a shorter integration time for the high-gain capture to avoid needing an attenuator.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-05-at-22.19.39.jpeg" alt="" width="2156" height="1392">
<figcaption>Extreme highlight recovery on this overexposed Adox HR-50 frame still shows some flat field error, these highlights are almost exclusively coming from the long-exposure part of the HDR process. This is a major improvement vs. the shot shown above, but look below.</figcaption>
</figure>
<p>Same shot using an attenuator (film-leader) for the high-gain HDR flat field:</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-05-at-23.35.33.jpeg" alt="" width="2126" height="1308">
<figcaption>Using correct exposure settings for the HDR-merge improves the ability to do extreme highlight recovery noticeably, though perfection has not been achieved yet.</figcaption>
</figure>
<p>The capture-highlight side of the correction works quite well:</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-05-at-23.41.35.jpeg" alt="" width="2126" height="1308">
<figcaption>Boosted shadows shows little to no flat field error.</figcaption>
</figure>
<p>I also ordered a tube-style shade for the EO lens, just in case stray light was causing these effects. I don't believe this is the case but using a hood can't exactly hurt either. Future work is to e.g. attenuate the backlight using the backlight controller to make it faster to update the flat field.</p>
<p>While waiting for the backlight components below I made a start on the report generator code, which initially was an HTML output that I figured I'd print through WebKit. CSS is a very capable way of describing a page layout, and you can do incredible things with it. Later I rewrote the output to be LaTeX format since this is a simpler way of making a PDF with somewhat predictable behaviour.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/Screenshot-2026-04-11-at-17.45.02-2.png" alt="" width="1974" height="1308">
<figcaption>Roll-report generated through LaTeX, information derived from the scanner JSON's and a roll-info file that's manually edited.</figcaption>
</figure>
<p>Later I also optimised the display output to improve performance by e.g. only doing gamma-correction on data going to the display instead of at full resolution. Turns out the M2 Mac I use is pretty fast at floating point gamma.</p>
<h3 id="mcetoc_1jlck3s9n60">Planning a better backlight</h3>
<p>Making a good backlight that would fit inside the printer area was challenging. After the initial diffusor + LED-strip concept proved too uneven I reassessed.</p>
<p>I decided to order the following, hoping it would let me solve the problem:</p>
<ul>
<li>PE thin diffusor film (30 cm by 3 meters of it, type no. LGT125J)
<ul>
<li>To hopefully provide more diffusion than the acrylic plates I started with</li>
</ul>
</li>
<li>A couple of A4 size fresnel-lens panels
<ul>
<li>Hoping to improve efficiency, letting me stack more diffusors</li>
</ul>
</li>
<li>A set of 50 W RGB-LED and 10 W 850 nm LED modules
<ul>
<li>Hard to drive, probably a mistake</li>
</ul>
</li>
<li>A set of 8x32 WS2812B flexible LED panels (these are also around 8 x 32 cm)
<ul>
<li>While adding IR would be challenging, by using a pixel-grid array I could reduce power consumption by a lot by only lighting up the area under the current frame.</li>
<li>IR could be added by making a set of thin panels that fill the gaps between the RGB LED's</li>
<li>Using these in on/off mode should avoid PWM-flicker issues; I figured I could adjust the density of on/off pixels to improve backlight uniformity</li>
<li>Also gave me a use case for one of several mil-spec isolated 28 to 5 V at 15-20 A modules I had sitting around waiting for a use case.</li>
<li>A Pi Pico module would work as the USB-bridge to let me drive the backlight from my capture program.</li>
</ul>
</li>
</ul>
<p>A challenge with this setup was achieving good uniformity along the X-axis, since I could only go 8 mm out from the bed before hitting the X/Z posts. Along the Y axis margins were plenty. A fairly simple fix is to just move the film strips closer to the centre. I had initially spaced the 35 mm strips out a fair bit, but since I could only fit 3 anyway there was no reason to spread them out as much as I was doing.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/IMG_1016.jpeg" alt="" width="322" height="429">
<figcaption>Glass frame made from several 3D printed pieces.</figcaption>
</figure>
<p>I did some modelling of the printer Y-carriage and made the frame setup shown above. This uses a set of base-plates that bolt on to the carriage and extend past the scanner area, a set of L-brackets that hold the glass are mounted on these plates. A set of 4 mm steel rods are used to make the L-pieces self-supporting.</p>
<p>The L-pieces have a set of M3 holes in them to make it practical to install diffusor and fresnel panels, the nominal build height is 130 mm up to the film.</p>
<p>An old box-lid was cut down to form the backlight base-plate. On the underside a DE-9 connector block and a thickened riveted section is installed to allow mounting of the DC/DC converter and Pi Pico for control. The RGB-panels have connection points on the bottom, so a set of holes will be drilled to access these from the bottom.</p>
<h3 id="mcetoc_1jmhcbqsi92">A better backlight</h3>
<p>Upon receipt of the backlight panels I installed them, a process that took a couple of hours to get all the wiring in place. Did I mention these panels need a <em>lot</em> of current?</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/IMG_1024.jpeg" alt="" width="2304" height="3072">
<figcaption>Better backlight, installed for the first time</figcaption>
</figure>
<p>On annoyance with the panels is that they go in a zig-zag configuration, and to make the wiring easier I installed one backwards. A lot of messing around to make that code work…</p>
<p>Actually getting the panels to work was really easy though, I used Circuitpython on the Pi Pico and enabled the data USB endpoint to receive and transmit display commands without the REPL stuff interfering. My capture program sends an ASCII string, where the value is a simple bitmap of bitfields corresponding to R/G/B on/off. The Pico works out the details of what order the actual pixels go in.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/IMG_1027.jpeg" alt="" width="3072" height="3230">
<figcaption>Preview-mode "white" light is automatically illuminated based on the camera position, but the diffusor is only loosely taped in place.</figcaption>
</figure>
<p>To generate the backlight image, I get the X/Y position of the camera whenever something changes. I make an image with 1 mm pitch (320x240; pixels are 10 mm spaced), and draw an ellipse centred on the camera position, sized to be ~4⨉ larger than the image field of view (larger lit up area = more light, due to the diffusor). The image is then blurred, thresholded, decimated to the actual LED grid pitch, and sent to the Pico. Once the entire backlight image has been uploaded the Pico sends back an acknowledge to allow blocking calls.</p>
<p>The Pico has a 30 second timeout to ensure the backlight won't stay on forever, the capture program refreshes the last configured backlight image slightly faster than this ensuring it won't go off during capture.</p>
<p>To support colour preview I extended a number of functions such as AE to calculate a set of R/G/B exposure times, capture was extended to capture R/G/B if configured, and the preview mode was extended to support approximate colour balance in white light mode (since previewing R/G/B sequential would be too slow and annoying).</p>
<p>I also discovered that despite working in R/G/B order in most of my software I had a couple of bugs: using the red channel when illuminating blue led to some very long exposure times. The display output was also done in RGB but the bitmap output is natively BGR so some conversion had to happen there.</p>
<h3 id="mcetoc_1jmhcbqsi93">Milestone: first colour image!</h3>
<p>Presented for your viewing pleasure is the first colour image I scanned, it was selected randomly from the last roll of colour I shot before starting this project. It's scanned with white light, with no cover-glass, in the storage foil, with no concept of colour management. It still outperforms the V850! Highlight retention is significantly better, which was a major issue with this roll.</p>
<p>Since the WS2812B "NeoPixel"'s "white" output is quite blue the white light mode isn't too far off from the mix you'd want to counter an orange based negative.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/firstscan_color.jpg" alt="" width="3072" height="2801">
<figcaption>First white-light colour image to be scanned with this system!</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260303_1_8.jpg" alt="" width="4500" height="3019">
<figcaption>The original V850 scan of the same image wasn't processed identically, but shows pinkish highlights which were very difficult to correct. These are primarily caused by the V850's relatively poor Dmax performance in colour mode.</figcaption>
</figure>
<p>Another comparison from the same roll, this time using field-sequential mode with auto-adjusted colour balance:</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260303_1_9_e3v3se.jpg" alt="" width="3072" height="2877">
<figcaption>New scan of this frame with coarse editing in field sequential mode. The white-point for this image was set off the bar code in the rebate as a test. No cover-glass was used here either.</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/20260303_1_9.jpg" alt="" width="4495" height="2991">
<figcaption>Original V850 scan with processing applied.</figcaption>
</figure>
<p>Obviously these Vision3 250D frames are pretty flat and "raw" so finding how to best work with them will require some experimenting.</p>
<h3 id="mcetoc_1jmjocuah2">End of colour-honeymoon, even flatter fields</h3>
<p>Up until this point I had targeted sequential colour capture, but after testing it out I found that since my exposure times were in the hundreds of ms anyway my PWM-flicker concerns were irrelevant. As such I reworked my system to PWM-control the backlight to white-balance off the rebate area, and to grab direct captures. After a bit of tweaking the achieved white-balance is quite good, giving reasonable colours right out of the scanner.</p>
<p>I also wired the backlight power supply in to the heater PWM output, I had to reconfigure the Klipper configuration since heater outputs have hard-coded self-check features (a good idea, but in the way here). Fortunately you can configure "generic" outputs and sensor inputs that are still easy to control.</p>
<p>This does add a slight colour error due to crosstalk between the different colour channels, but since I expected to use an IT8 target for calibration anyway this would be compensated later.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_7_colourbands-2.jpg" alt="" width="2048" height="1373">
<figcaption>Peculiar colour artefact across the left side of this frame, possibly related to scanning in the foil</figcaption>
</figure>
<p>I ran into some weird colour patchiness that was hard to track down, it was entirely deterministic for a given setup and seemed somewhat related to whether the sprocket holes were in frame. Scanning through the foils seemed to make this issue more apparent but going to normal glass didn't entirely remove it. Curiously the issue seemed to follow the frame, so one possibility is some automatic adjustment in the camera I haven't managed to disable.</p>
<p>I ended up removing the lens hood since it seemed to make no difference whatsoever. I also reworked the flat field correction to actively use the backlight control system, and I was able to stop down to f⁄10 again for slightly improved sharpness.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/sensor_gain_table_linear.jpg" alt="" width="2028" height="1520">
<figcaption>Flat field correction at f⁄10, showing defocused artefact in the lower right corner</figcaption>
</figure>
<p>I verified that the flat field performance seemed to be unaffected by the glass plates, so the easy way to do a flat field is to pull them and look straight at the diffusor.</p>
<p>While thinking about these issues I added a couple of other nice-to-haves that will be useful to make batch scanning possible:</p>
<ul>
<li>Using the sprocket-hole detector to automatically align the Y-axis when at the starting area for a new frame — a useful feature to have if negatives aren't perfectly aligned (X-alignment is less critical and harder to do)</li>
<li>A simple exposure-ok check based on the sprocket detector having found a match + the AE area having an acceptable exposure.</li>
<li>Slightly modified the merging software to run on my old home server instead of my poor M2 Mini
<ul>
<li>It ran perfectly well but the RAM usage in particular made itself felt when multitasking</li>
</ul>
</li>
<li>Since my home server is kind of meh, made the merging software multithreaded and made sure as much processing as practical was done in threaded form (e.g. doing gamma conversion on each sub-frame instead of at the end, converting to greyscale as soon as possible etc.).
<ul>
<li>Net result: around 30 seconds per 35 mm frame, on a 12 year old Xeon</li>
</ul>
</li>
<li>Since these files are around 300 MB per 35 mm frame before any processing, I started a side project to upgrade my home network to 10 Gbit⁄s. This was long overdue, obviously I did have some 10 Gbit⁄s gear already but SFP+-only 10GbE switches are now quite affordable. 10 Gbit/s uplink to 2.5GBASE-T switches are also quite affordable.</li>
</ul>
<p>Later, I started looking more into the magical tuning JSON file that's loaded on every startup. I swapped to the stock _scientific.json file and started chewing on wires, leaving nothing but the lux-estimator (since it complains without it), DPC-disable, and the basic auto-exposure definition since it apparently can't set analogue gain without it. Notable removed or disabled features included: dead pixel correction, automatic lens-shading, colour correction matrix, automatic white-balance, green-equalisation, any kind of noise reduction, and sharpening. I repeated my flat-field correction after each change.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/stock_tuning_TEST_1.jpg" alt="" width="3072" height="2818">
<figcaption>Stock IMX477 in "RAW" mode isn't exactly raw</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/wires_chewed_on_TEST_7.jpg" alt="" width="3072" height="2813">
<figcaption>With a barebones tuning file the results are much nicer.</figcaption>
</figure>
<p>I did notice that some residual flat field error now showed up, so I implemented a third flat field correction that is applied to the merged HDR-image instead of just to the individual components. This flat field image ended up slightly countering the previous two wrt. lens shading though at fairly low magnitude, suggesting some residual error was present (if the other two were perfect the flat field shouldn't have any texture). A direct comparison is shown below.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_7_no_finalff.jpg" alt="" width="2048" height="770">
<figcaption>Contrast enhanced copy of the previously shown frame shows residual flat field error</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_7_with_finalff.jpg" alt="" width="2048" height="723">
<figcaption>Same frame captured with final flat field added shows less of this, though perhaps not entirely perfect still</figcaption>
</figure>
<p>If you're wondering: the colour balance being different was caused by the second flat field causing an RGB balance shift which would only show up in final captures and not preview modes. To avoid this I normalise the RGB-gain individually (which <em>may</em> negatively affect the correction…)</p>
<p>A residual error that might be a lens limitation is where large parts of the image are heavily saturated, such as this edge where the backlight is visible due to an oversized mask:</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_12_blclamp.jpg" alt="" width="2048" height="1090">
<figcaption>Scan where rightmost capture includes a significant amount of direct backlight which seems to cause bloom.</figcaption>
</figure>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_12_blocked.jpg" alt="" width="2048" height="1126">
<figcaption>A Finisar 8 Gbit⁄s FibreChannel SFP module serves as an effective stopper, and seems to eliminate the bloom. Any kind of SFP or SFP+ module with a adequate ratings could be used in this application, though DAC cables are not recommended.</figcaption>
</figure>
<p>These frames are slightly shifted towards orange after inversion which seems to make sense as a purely optical crosstalk since this is the colour of the backlight. I tried disabling the black-level clamping but this made no difference.</p>
<figure class="post__image"><img src="https://longview.be/media/posts/102/TEST_12_p1300.jpg" alt="" width="2048" height="1197">
<figcaption>The same lens, frame, and alignment captured with a Python1300 based industrial camera shows the same artefact, suggesting this is a real lens limitation</figcaption>
</figure>
<p>As shown above blocking the light seems to fix the issue and it's repeatable between different sensors, but this does point to a limitation of this type of system. It also seems to imply that including sprocket holes in the scan may be detrimental, though I haven't really seen any clear indications that this actually causes issues.</p>
<p>As it stands, using a more precisely made mask and ensuring that the mask blocks most of the light seems to be sufficient. In cases where backlight-exposure will happen, any kind of light-proof mask can just be placed on top of the top glass as shown above to resolve it.</p>
<h3 id="mcetoc_1jn353ovb1p">Charting a path to greatness</h3>
<p>After these last tests, I started evaluating what options were available. As mentioned I upgraded my home network to 10 Gbit⁄s and as part of the acquisition process I ended up with one more computer than I needed. Starting from here, I started re-evaluating the whole system and—saving you a lot of words—ended up switching to my Python1300 global shutter camera using GigE-Vision. This camera isn't as good in most aspects but there a <em>lot</em> of GigE cameras available with optimal sensors.</p>
<p>This marks the end of this article, as I feel the Mk. II system using higher end components deserves a separate article.</p>
<p>My future upgrade path involves a CobaltTL™ lens with higher optical performance (though less available on the second-hand market), 10 Gbit⁄s GigE-Vision cameras, and probably the same 3D printer chassis.</p>
<p>The 3D printer wasn't the optimal choice for performance, though it was extremely affordable. A Core-XY machine or gantry-style CNC router would make a more sensible base, moving the entire light-box and film assembly isn't the best solution for speed.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Why didn&#x27;t digital cameras show up until they did?</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/why-didnt-digital-cameras-show-up-until-they-did.html"/>
        <id>https://longview.be/why-didnt-digital-cameras-show-up-until-they-did.html</id>
        <media:content url="https://longview.be/media/posts/100/20250706_20.jpg" medium="image" />

        <updated>2025-07-09T22:18:03+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/100/20250706_20.jpg" alt="" />
                    <p>A different style of writing than most previous posts, I try to decipher why digital cameras didn't show up before they did, what forces made them appear, and just for fun: a look at what electronic cameras could have looked like in 1980.</p>
<p>This article is essentially a "well actually" to the completely unfounded idea that "Kodak had a digital camera in 1975 and chose not to make it because they wanted to sell film". This is of course untrue, like most other anecdotes are when you look into them. Ruin the joke with this one weird trick (knowledge).</p>
<p>Do note that I consider <em>electronic</em> cameras to be a better definition for this purpose, specifically we know that digital stills cameras didn't show up until the early 90's but electronic cameras were around in the 1930's as analog video cameras.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/100/20250706_20.jpg" class="type:primaryImage" alt="" /></p>
                <p>A different style of writing than most previous posts, I try to decipher why digital cameras didn't show up before they did, what forces made them appear, and just for fun: a look at what electronic cameras could have looked like in 1980.</p>
<p>This article is essentially a "well actually" to the completely unfounded idea that "Kodak had a digital camera in 1975 and chose not to make it because they wanted to sell film". This is of course untrue, like most other anecdotes are when you look into them. Ruin the joke with this one weird trick (knowledge).</p>
<p>Do note that I consider <em>electronic</em> cameras to be a better definition for this purpose, specifically we know that digital stills cameras didn't show up until the early 90's but electronic cameras were around in the 1930's as analog video cameras.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1ivnvlb1v27i">Executive executive summary</a></li>
<li><a href="#mcetoc_1ivm0fn7k275">Executive summary</a></li>
<li><a href="#mcetoc_1ivm0fn7k276">Background</a>
<ul>
<li><a href="#mcetoc_1ivo9vcg52gu">Electronic imaging &amp; Vidicons</a></li>
<li><a href="#mcetoc_1ivo9vcg52gv">CCD's</a></li>
</ul>
</li>
<li><a href="#mcetoc_1ivm0fn7k277">Why not an electronic camera?</a>
<ul>
<li><a href="#mcetoc_1ivqr6meh4">Resolution</a></li>
<li><a href="#mcetoc_1ivqr6meh5">Dynamic range</a></li>
<li><a href="#mcetoc_1ivo9vcg52h0">What do?</a></li>
</ul>
</li>
<li><a href="#mcetoc_1ivm0fn7k278">The storage-problem</a>
<ul>
<li><a href="#mcetoc_1ivo8o584295">Digital tape</a></li>
<li><a href="#mcetoc_1ivo8o584296">Digital compression?</a></li>
<li><a href="#mcetoc_1ivo8o584297">What do?</a></li>
</ul>
</li>
<li><a href="#mcetoc_1ivm0fn7k279">WTF do you do with an electronic image?</a>
<ul>
<li><a href="#mcetoc_1ivoe0iem2h4">What do?</a></li>
</ul>
</li>
<li><a href="#mcetoc_1ivm0fn7k27a">So why did the digital camera show up when it did?</a></li>
<li><a href="#mcetoc_1ivm0fn7k27b">Film fights back</a></li>
<li><a href="#mcetoc_1ivm0fn7k27c">How could you make digital cameras in 1980?</a></li>
<li><a href="#mcetoc_1ivm0fn7k27d">Conclusion</a></li>
</ul>
</div>
<h2 id="mcetoc_1ivnvlb1v27i">Executive executive summary</h2>
<p>Internet. Computer.</p>
<h2 id="mcetoc_1ivm0fn7k275">Executive summary</h2>
<p>They existed before this but they really started becoming popular in 1995-2000. This happened because <em>the</em> <em>Internet</em> suddenly created a consumer use case for poor quality low resolution images that didn't previously exist. Further, consumer grade colour printers started to show up making home printing of images onto copy paper a thing.</p>
<p>Over the next decade or so the same technological advancements led to rapid improvements to image sensors and by 2002 or so they were <em>good enough</em> for most purposes assuming you had $10,000 to drop on a camera.</p>
<h2 id="mcetoc_1ivm0fn7k276">Background</h2>
<p>So film cameras were a thing since photography existed, assuming you count glass plates as film. By 1900 or so film in a recognisable form was moderately well developed and starting to become a consumer item.</p>
<p>Performance was limited compared to modern film, but just making the negative bigger made up for this for professional use where cost was less important. We saw a general trend in the 60's from medium format roll-film to 35 mm cassette format film for most consumers as film quality improved, lowering cost and expanding the market.</p>
<p>During the 1980's autofocus point &amp; shoots were made practical by miniature xenon flash-bulbs and newly invented T-grain based high speed colour films.</p>
<p>Disposable cameras started showing up around that time as well, and were still relevant until the early 2000's.</p>
<p>APS showed up in 1996 and was fairly popular among consumers around 2000-2002, but was very much a product that showed up 20 years later than it should have.</p>
<h3 id="mcetoc_1ivo9vcg52gu">Electronic imaging &amp; Vidicons</h3>
<p>Electronic cameras didn't really become a thing until the 1950's or 1960's when television rose to prominence. These cameras initially used a variety of variously terrible camera tubes, but ended up settling on the Vidicon and various other variants by the late 60's.</p>
<p>These Vidicons were in theory capable of decent resolution, but were in part hampered by the ever present 1930's reaffirmed in the 50's decision that "480 lines ought to be good enough for everyone". I doubt the creators of television expected their "Standard Definition" format would last well into the 2010's or they might have allocated a bit more bandwidth. Since the only real use case for imaging tubes was TV, there wasn't much need for higher resolution models.</p>
<p>For a long time zoom lenses were only available for TV cameras, not for cost reasons but simply because they were the only market with standards low enough to put up with the abysmal quality of pre-computer optimised zoom lenses. For photographers zoom lenses didn't reach acceptable quality until the late 1980's.</p>
<p>Vidicons seem to have been somewhat susceptible to microphony, where horizontal bands appear in the image when exposed to high vibration or sound pressures. This is quite noticeable in the UK portion of the Live Aid recordings, for example.</p>
<h3 id="mcetoc_1ivo9vcg52gv">CCD's</h3>
<p>During the 1980's Vidicons were gradually replaced with CCD sensors, a now classic technology that didn't really die until the late 2000's. Typically a 3CCD sensor was used, where a beam splitter divided the image by colour onto red green and blue sensitive CCD's. This let broadcast grade cameras output up to 4:4:4 video in principle, which is useful for chroma keying. The CCD was a staple of prosumer "portable" video cameras by the late 1980's, sometimes 3CCD and sometimes with RGB colour dye filters.</p>
<p>Bayer patterns were also used in the 80's (invented 1976); I expect that performing de-bayering in mostly analog circuity presented a bit of a challenge as it usually requires some kind of memory to perform the 2-D colour matrix operations. This was likely done using clever tricks in the CCD readout circuitry.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/100/IMG_5529.jpeg" alt="" width="2198" height="1474"><figcaption>Late 1980's Sony video camera CCD shows a bayer pattern, the dye filters have an image burned into them from exposure to sunlight and the blue dye is barely visible. Each pixels seems to be split into two pieces vertically, presumably this is done since the sensor natively produces an interlaced picture.</figcaption></figure>
<p>Fun fact: CCD's are a sort of hybrid of analog and digital with discrete pixels but distinctly analog signal chain; a CCD can be configured to output an analog video signal more or less directly for this reason. You can also store an image in there for some (short) time as it works like an analog shift register, all CCD's had electronic global shutters.</p>
<h2 id="mcetoc_1ivm0fn7k277">Why not an electronic camera?</h2>
<p>The idea of replacing photographic film with a video camera still is basically canonical (meaning: it's an obvious thing to do). This seems like a great idea until you start looking into what the performance figures are for even low quality film vs. what a broadcast grade video camera could do. I'll refer to pixels here even though pixels don't technically exist in analog TV; <em>lines</em> are a thing though so the vertical resolution of TV is knowable. Unless you include the temporal aspect of moving objects with natively interlaced sensors.</p>
<h3 id="mcetoc_1ivqr6meh4">Resolution</h3>
<figure class="post__image" ><img src="https://longview.be/media/posts/100/R1-00164-019A.JPG" alt="" width="3626" height="2432">
<figcaption >Disposable camera image captured in 2025</figcaption>
</figure>
<p>A bad quality 35 mm film frame from a modern disposable camera has a usable resolution somewhere around 3-10 megapixels, and a good film and camera combo can probably be expected to give you 20 megapixels (I usually scan colour film at ~10-15 mp/3200 dpi).</p>
<p>Your broadcast TV camera generates something like 768⨉494/752⨉582 pixels, or somewhere around 0.3 megapixels. CCD's technically had more pixels (e.g. 811⨉508 &amp; 795⨉596) but they were masked from external light and mostly acted as black level reference pixels.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/100/Screenshot-2025-07-09-at-19.52.03.png" alt="" width="976" height="738"><figcaption>Timing diagram for the CCD in a Sony XC-75CE industrial camera shows that the CCD contains dummy-pixels that are clocked to cover the front/back porch of each video line.</figcaption></figure>
<p>At full print quality (300 dpi) this corresponds to something like 5x4 cm, making enlargements bigger than this would yield a noticeably soft image.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/100/Picture_6.jpg" alt="" width="1085" height="645">
<figcaption >Gull-cam livestream shows approximate performance of most TV-grade video cameras up to the early 2000's</figcaption>
</figure>
<p>Do also note a peculiarity of video vs. a still image camera: digitally sampling a TV CCD to make a still image would result in a somewhat sharper image than an equivalent video-processed signal from the same sensor. This happens since while the CCD can output discrete pixels in time with a pixel clock, analog video is a continuous time process where the video has to be low pass filtered to around 4-5 MHz to fit into a broadcast TV channel's bandwidth. This has the effect of smoothing out the otherwise sharp pixels from a CCD, blurring the image horizontally. Turning it into composite  color—compatible colour—often leads to further losses of sharpness unless fairly sophisticated comb filters are used to separate the luma and chroma components. Video signals are usually sharpened to improve subjective sharpness (a basic "treble" filter), leading to bright/dark edge effects clearly visible in the gullcam around the coax lines.</p>
<p>Vidicon type imaging tubes can be made in several different ways, and sharpness depends on the "target" design (the front face), RCA made Vidicons with the imaging area made from discrete silicon photo-diodes acting more or less as pixels (used by the Lunar Rover's ground controlled TV camera) with resolution figures matching later broadcast grade standard Vidicons.</p>
<p>This is a funny sort of hybrid approach since the fundamental operating principle is at a surface level even more similar to much later CCD or CMOS sensors than a normal Vidicon: an array of silicon photodiodes convert photons to electrons and store it in a "bucket" capacitor; periodically the bucket is drained (by the electron beam, in the Vidicon case) and the amount of charge corresponds to the image. Of course the normal lead-oxide Vidicon (Plumbicon) also does more or less the same, storing charge on the surface of the lead oxide target.</p>
<p>For an example of this see RCA AN-4623. Readout of discrete sharp pixels would require very precise control of the electron beam however.</p>
<p>A much newer Hamamatsu Vidicon catalog lists silicon target tubes separately and the specifications for resolution are around half that of the unspecified type used otherwise—presumably lead-oxide—though they do have reduced ghosting and higher sensitivity.</p>
<p>I suspect silicon target Vidicons were mostly used for scientific and industrial applications. One of their key benefits was good near-IR sensitivity out to beyond 1000 nm; this would for example be useful for many military applications such as imaging Nd:YAG laser beams. Alternate photocathode materials were used to support X-ray, UV, and SWIR wavelengths: old Vidicons remain the only somewhat economical way of viewing 1-3 µm wavelengths today.</p>
<p>Smaller Vidicons have a spatial resolution figures fairly similar to modern film stocks, but the size is significantly smaller in standard models. This shouldn't come as a big surprise since the pixel pitch of a 1⁄3" TV CCD is only slightly larger than a modern CMOS sensor pixel.</p>
<p>Incidentally, the size of sub APS-C sensors is often listed as fractional inches and this is a carryover from the Vidicon days, the listed size is the outer diameter of the tube assembly, with the active area being a fair bit smaller. </p>
<h3 id="mcetoc_1ivqr6meh5">Dynamic range</h3>
<p>Another issue: the dynamic range or "latitude" of a film negative is quite high, often exceeding 10-12 stops (ratio of exposure of 1000-4000⨉) and good slide films sit happily around 8 stops. A stop is a doubling of light, and is basically analogous to bits in a linear light system (no gamma).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/100/Screenshot-2025-07-09-at-20.14.12.jpg" alt="" width="1924" height="1488"><figcaption>DVD-quality screenshot from <em>Blackadder</em> shows typical 80's broadcast-grade Vidicon tubes clipping highlights in the lit flames and an effect known as "decay lag" leaving a ghost image behind moving bright objects—this effect was mostly eliminated in higher end silicon-target Vidicons.</figcaption></figure>
<p>A Hamamatsu 8134 is a relatively late period Vidicon, operated in high dynamic range mode it has a dark current of around 5 nA and a peak listed signal current of 350 nA, indicating a dynamic range of around 70⨉ or 36 dB. I'm not sure if gamma correction should be applied to this number, if so it would be higher, but 30 dB SNR was as far as I know considered to be good enough for broadcast television over the air. RCA catalogs for the previously mentioned silicon target Vidicon indicates 100:1 dynamic range is possible, but they also say the noise is so nice to look at that it really deserves even higher numbers.</p>
<p>The XC-75CE is a late 80's 1⁄2" 9 µm pixel pitch monochrome technical camera that listed a maximum SNR of around 56 dB, but what we actually have to look at is the ratio of maximum optical signal to minimum optical signal. Taking the specifications at their word with gamma on the minimum intensity is 3 lx for an IR-cut monochrome image, and peak sensitivity is 400 lx giving a ratio of 133⨉ or around 42 dB.</p>
<p>Kodak 5279 "VISION" film in 1996 was listed with a guaranteed dynamic range of roughly 10 stops of exposure which equates to a ratio of around 1000⨉ (60 dB), though the "usable" range of the VISION film will be a fair bit higher since a CCD sensor will clip highlights (sometimes leading to charge leaking outside of the storage capacitor, resulting in white vertical stripes in the image) whereas a negative film will progressively compress the highlights (soft clipping). Further, the D-max of the film isn't really specified so the true maximum is not directly readable from the datasheet.</p>
<p>Modern day Tri-X black and white film seems to have a D-max of around 3.0, and extrapolating a low-contrast development to D-max of 2.0 suggests the dynamic range could be as high as 90 dB (15 stops) though the images would probably be hard to work with.</p>
<p>The sensitivity of a video camera is unfair to directly compare to stills cameras, but suffice to say that sensitivity⨉resolution was typically far better for black and white film than any practical electronic camera made before the 2000's.</p>
<p>We've covered some major downsides to old electronic video cameras compared to film, it's also fair to mention that the cost of these sophisticated broadcast grade cameras likely exceeded the yearly income of most middle class families throughout most of the 70's. Meanwhile film had cheap cameras available for a long time (Brownies and Instamatics barely had anything inside them) and benefited from massive economies of scale, well within reach of most middle class families from the 1930's onward. A given camera could also within reason be upgraded by buying new better film and in some cases better lenses.</p>
<h3 id="mcetoc_1ivo9vcg52h0">What do?</h3>
<p>So for sensor you have two choices really. It's the 60's or 70's: you will use a Vidicon tube, maybe an RCA silicon intensified target tube. You'd need to make specialty tubes with ~4-8⨉ the resolution of standard video tubes and you'd need three of them to get colour. It seems likely that existing tubes could be used in a slow-scan mode to give finer resolution.</p>
<p>Dynamic range would be limited compared to film, but as we saw with e.g. the Voyager probes this would certainly be possible to do. You <em>could</em> use a photo-multiplier tube and spot-scanner but that would be even more complex, but could achieve great sensitivity.</p>
<p>It's the 80's: if you can see the future you'd develop a giant CCD. It could probably outperform the Vidicon for sharpness, you'd probably want three of them with a beam splitter for colour. These would also need to be huge compared to TV types to pack enough pixels, so yield would be low, cost would be significant, and power consumption would be fairly high during operation.</p>
<p>According to Wikipedia's sources the Japanese 1035i MUSE HDTV used high resolution Vidicons cameras up to at least 1993 due to their still higher performance. Existing and well-understood Vidicon technology could probably be more easily coaxed to output a reasonable HD signal than comparably immature CCD's where the maximum resolution is finite. The famous 1993 New York HDTV demo footage that reappeared a few years ago is believed to have been shot on a Sony HDC-100 or later HDC-300, both were 3-Saticon tube (SeAsTe, S-A-T) cameras first introduced in the mid 1980's. These were likely replaced by the Sony HDC-500 shortly thereafter; this is apparently the first CCD HDTV camera though details seem scarce. While significantly better than SDTV the 1993 footage is considerably softer than 2000's HDTV systems and the limited dynamic range is very visible here as well.</p>
<p>In 1995 the Minolta RD-175 used what I think is a fairly unique solution to the resolution problem. Presumably lacking access to their own CCD fabrication line they used a complex optical system to split the image onto 3 video-grade CCD's as usual. However, they used one of the CCD's to record red/blue at low resolution, then they used two green sensors diagonally offset to give a double resolution green image. Extensive and time consuming at the time off-board digital processing was then required to interpolate up a 1.8 mp output image (they made the image from 3⨉0.3 mp, so some "cheating" was involved as usual).</p>
<p>Using a video CCD with an alternate colour filter arrangement was likely a significant cost savings vs. commissioning a fully custom CCD layout. I wonder if they might not have had an easier go at it if they had split the image into 3-4 equal images and put in some standard bayer pattern CCD's instead.</p>
<p>Meanwhile in 1995 Kodak had released their first 6 mp sensor in a camera costing only $35,600, at a 9 µm pixel pitch this seemed to be a bit of a resolution wall for Kodak that they didn't really exceed until 2009's Leica M9 at 6.8 µm pitch—6.5-6.8 µm pitch is about the size used for 1⁄3" standard definition CCD's since the 80's by the way. I expect that massive improvements were made to cost, dynamic range, and sensitivity in this time period however.</p>
<p>The size of pixels isn't so much a sign of quality as it is a fact of physics that if you want a pixel to sharply resolve something then it has to be at least a couple of wavelengths long, which seems to put a practical limit at around 4 µm in most cases. Smaller pixels than this presumably require very complex designs and probably post processing to compensate for the diffraction limited resolution they must have and I suspect this is part of why they don't start shrinking to this size until the 2010's.</p>
<h2 id="mcetoc_1ivm0fn7k278">The storage-problem</h2>
<p>So let's for argument's sake say that we bump up the resolution of these electronic cameras enough to make a decent sized print. This is after all merely an engineering problem if you ignore yield: just make the sensor bigger/electron beam focus finer and add more silicon target diodes in the case of a Vidicon.</p>
<p>Where to store it? Well, tape obviously. Tape showed up in the 60's for video, and by the mid 70's there was a boon of professional and home video tape recorders; clearly there was a huge demand. It's fairly obvious that you could use a tape that can store hours of 50-60 fps interlaced video to store a couple of higher resolution still images instead.</p>
<p>Keep in mind a general rule I've observed: storing or transmitting any kind of uncompressed digital signal onto/via a fundamentally analog medium usually requires a massive increase in bandwidth. See for example analog composite video vs. the equivalent SDI bitstream. A full TV signal with stereo sound requires around 6-8 MHz of RF bandwidth, an SDI bitstream runs at over 100 Mbit/s to do fundamentally the same thing. Analog voice needs 3 kHz of bandwidth for phone quality audio, digitally it needs <em>minimum </em>64 kbit/s.</p>
<p>Digital is harder to store for this reason, storing everything as ones and zeroes with sharp transitions turns out to be a very inefficient use of bandwidth in an analog medium. Packing digital tighter requires very powerful signal processing (see e.g. OFDM/QAM) and/or computationally expensive lossy compression schemes in the case of audio and video.</p>
<p>For most of this time period it would make most sense to store an electronic image as an analog video signal, this requires <em>far</em> fewer transistors to implement than anything digital. Kodak's famous 1975 digital camera stored the 100x100 pixel image digitally at a measly 6 bits per pixel and it took 23 seconds to write it out to tape, during this time the image had to live in hideously expensive RAM chips. It is said this project was so secret only a handful knew about it, I'd say it's equally likely the invention had so little utility at the time that only a handful saw the potential.</p>
<p>If this Kodak digital camera were storing the image in analog form it would have taken less than 1⁄60th of a second to store it with resolution to spare on any readily available video tape recorder, but this wouldn't make for a good story since it would just be a terrible video camcorder instead of <em>a digital camera</em>. Indeed, the only real difference between a CCD digital stills camera and a CCD video camera is the digital storage medium.</p>
<h3 id="mcetoc_1ivo8o584295">Digital tape</h3>
<p>Generally available digital tape storage for audio showed a while after the CD in the form of DAT (basically a modified miniature VHS tape recorder for CD-quality audio, released in 1987), but it took until 1995 with DV before a consumer digital video format was invented. DV tape is impressive, but by 1995 it was also clear that flash storage would be the big new thing and dealing with tape is horrible. In 1995 we're also approaching critical mass of early digital cameras, so I doubt DV was ever seriously considered as a way of storing high resolution stills in real-time.</p>
<h3 id="mcetoc_1ivo8o584296">Digital compression?</h3>
<p>Do keep in mind also that JPEG wasn't standardised until 1992 though products made use of it as early as 1990; JPEG was made practical as a consequence of computers becoming fast enough to make use of the fairly impressive compression it can achieve.</p>
<p>Before this you'd need much more digital storage for similar quality images; in the early 90's there was a brief market for JPEG accelerator cards for computers since general purpose pre-SIMD processors didn't find it particularly easy to do quickly.</p>
<p>One prominent example of this is C-Cube Microsystems CL550 and CL560 launched ca. 1990 (the head engineers were JPEG committee members). Per their chip datasheets the enhanced CL560 can JPEG compress full RGB colour images at up to 15 megapixels per second using a 35 MHz heavily pipelined processing core. This was sufficient to perform real-time JPEG compression of standard definition video (JPEG for motion) and was used in some of Avid's early non-linear video editing products. Other cards were intended to make Photoshop and similar programs save files faster.</p>
<h3 id="mcetoc_1ivo8o584297">What do?</h3>
<p>What are your options? So in the 60's you'd call Ampex who would laugh at the idea of making even a man-portable recorder capable of storing your still image signal. By the early 70's you could probably make it work as long as you were content to wheel it around. You could perhaps use a satellite uplink to live-broadcast your images to a mainframe somewhere, the satellite uplink truck would be more convenient since you could live in it after selling your mansion to afford the camera.</p>
<p>By the 80's you definitely could make a somewhat portable recorder capable of putting an analog still image onto tape, assuming you uprated something like a Betacam recorder and had a CCD that could keep the image in the charge domain long enough to avoid needing a bunch of RAM. In fact they did make this sort of thing, floppy discs were a thing for computers for a long time but these early cameras were TV-quality CCD's storing a single analog video frame at a time instead of digital data on a floppy. It was called a "still video floppy." These had nowhere near good enough quality for any real purpose at that time and don't seem to have achieved much.</p>
<p>By ca. 1990 you could fit enough RAM into a device to store a digital copy of the image, and you could in principle use JPEG to compress it. Storing an analog high def still image would be quite feasible as well, though no one seems to have tried it outside of the early 90's push for HD TV that didn't go anywhere.</p>
<p>In practice we saw the first digital floppy-storing TV or sub-TV quality digital stills cameras, as well as e.g. the Kodak DCS 100 which used a hard drive to store a digital image at over 1 (real, not interpolated) megapixels. That camera and some later models were mainly used by entities like NASA for Space Shuttle missions, where sharing a high resolution image with the ground was a huge improvement over video links; 1980's shuttle missions had approximately as good of a video link as the moon landings did.</p>
<p>This was followed by a wide array of increasingly powerful CCD based hybrids and later dedicated digital cameras. I thought Kodak killed digital to save film, why did they lead the charge into digital cameras?</p>
<p>If you're wondering: the CCD division's last great successailure was the Leica M9 sensor which famously started falling apart after a few years leading to a major recall. The division was later sold to onSemi who closed it in 2019, though they still make competent industrial CMOS sensors.</p>
<p>Also for fun: the easiest way to record an electronic image in any of these time periods would be to use a flying spot scanner to expose a piece of film that you then develop later. This was a real practical way to record certain scientific images as late as the early 90's. It would only take a small leap to go from this to just putting this film in the focal plane of a camera and you're back to square one.</p>
<h2 id="mcetoc_1ivm0fn7k279">WTF do you do with an electronic image?</h2>
<p>So the elephant in the room is that yeah sure you could make an electronic stills camera even in 1970 if you had to. Now what? You're not e-mailing it to anyone are you.</p>
<p>The only practical way to view an image was over a standard TV screen (bad quality), CRT projector (could be better than a TV), an eidophor (if you work for NASA), a print (great quality) or as a slide (great quality). Digital picture frames were still 40 years out and it would be at least 50 years before they had acceptable image quality.</p>
<p>Instant review of an image would invariable involve a CRT until the 80's, LCD's weren't really good enough until the 90's at the earliest and in my opinion it took until the 2010's for portable LCD's to really look acceptable. Plasma displays existed but were basically monochrome.</p>
<p>Printing an electronic image onto paper or reversal film would certainly be possible, but at that point you do need to ask why you didn't just get a point &amp; shoot with some film in it.</p>
<p>I've argued in favour of analog recording previously, but to do any sort of editing you couldn't already do in the darkroom printing process you would essentially need to make the image digital and put it into a computer. The problem is that RAM was so expensive until the 90's that storing even full quality TV stills was a huge undertaking.</p>
<h3 id="mcetoc_1ivoe0iem2h4">What do?</h3>
<p>So in the 60's and 70's you're not doing anything other than projecting or printing an image; there simply isn't consumer technology suitable for anything else. Of course it would be possible to make a computer capable of editing a megapixel image digitally in 1970, it's just that you'd need a city block's worth of space to keep it in.</p>
<p>In principle you could probably make special TV's to display the image but printing would effectively still be a film-process with RA-4 colour paper or telecineing it onto a slide. Digital image editing is impossible by most standards.</p>
<p>By the 1980's you could perhaps start to imagine our current future, but telecommunications and computers weren't good enough to store transmit or display even very low resolution pictures at a consumer accessible price.</p>
<p>By the 90's you had computers that could fit on a desk that could in fact start to be useful with colour displays, as well as colour printers capable of printing images. Coincidentally you also had digital cameras at the same time.</p>
<h2 id="mcetoc_1ivm0fn7k27a">So why did the digital camera show up when it did?</h2>
<p>As mentioned initially I believe the internet and general availability of computers with moderately high resolution screens and fast processors was a massive driving force.</p>
<p>By 1992-93 or so many people (workers, at large companies) had access to high colour depth moderately high resolution displays on their computers (assuming they had a Mac IIfx with $10,000+ worth of accessories). There was enough ram to actually buffer up an entire screen's worth of image, and the processors had become fast enough to do useful image editing. By 1995 the situation was much more democratised, with Windows 95 capable computers (and PowerMacs) generally also being capable of showing megapixel images and low resolution video. You'd definitely want a lot of RAM in there but it was possible if you were patient.</p>
<p>Further, advances in the 80's in computerised printing had led to general availability of colour printers capable of acceptable results; it was then possible to make your own prints of low quality and moderate cost.</p>
<p>These same advancements in semiconductor manufacturing made it simultaneously possible to make computers powerful enough to work with &gt;1 mp images, made it possible to process and buffer these images in a camera and store them, and presumably also made it more feasible to make higher resolution CCD's with acceptable yield.</p>
<p>By 1995 the internet was a thing everyone was excited for, and this seems to coincide with mass marketing of more consumer priced variants of the tech that mostly existed as early as 1986 with analog still video cameras. These cameras were initially basically all made with TV-grade CCD's, some kind of slightly inappropriate storage device, some even had JPEG compression to let you fit more than one image per floppy.</p>
<p>The reason seems obvious in highsight: it's exciting new tech, review your images instantly, and most importantly: e-mail them to friends! The limited telecommunications bandwidth of the time necessarily made it impractical to share good quality images but the low low image quality of a TV CCD is fine to downscale, compress, and send over dial-up. At around the same time journalism started their first steps onto the information superhighway, and these postage stamp sized images were about the right size for the early internet news sites.</p>
<p>I believe this huge interest in these low image quality cameras then drove CCD manufacturers to start serious work on high resolution CCD's instead of only catering to video cameras and NRO surveillance satellites. By 1996-1998 or so multi-megapixel cameras were available for professionals who presumably only used them to shoot sports for quick turnaround but film's fate was sealed as progress accelerated rapidly from there.</p>
<p>The storage problem wasn't really solved until the late 90's to my mind with flash storage for small to medium amounts of images, and e.g. microdrives for larger amounts for professional use.</p>
<p>These days when looking at image archives there is a hugely noticeable drop in image quality in the 1998-2004 period when most snapshots and childhood pictures were rapidly transitioned off film and onto consumer digital cameras. This reduction in technical quality would have been obvious even then, but it does indicate that while film held a very real quality edge until probably 2002 at the earliest (See EOS 1Ds, which roughly matches 35 mm Ektachrome in many quality aspects) and probably more like 2010 for lower cost cameras, your average consumer was very interested in getting away from film and the (at least perceived) high cost per frame.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/100/_MG_0756.JPG" alt="" width="3504" height="2336">
<figcaption >8 mp. image show with a 2005 era EOS 1D Mark IIn has similar dynamic range to Ektachrome, similar quality sensors were available at prices acceptable to consumers by 2007</figcaption>
</figure>
<p>I'd wager the amount of images taken rose rapidly in this period, and further I'd guess the number of usable pictures taken probably also rose since your average joe plumber could take 10 shots instead of one or two of the same scene and just keep the one good frame.</p>
<h2 id="mcetoc_1ivm0fn7k27b">Film fights back</h2>
<p>In the early mid 90's Kodak spent a fortune developing and marketing APS cameras, which were honestly pretty cool for consumers. The new cassette was much more user friendly than the 35 mm ones, the subminiature format wasn't <em>that</em> much smaller and made perfect sense for consumer grade cameras.</p>
<p>If they had introduced APS in 1986 instead of 1996 it could have owned the market. APS and stiff competition in the early 2000's for CCD's and CMOS image sensors is probably what killed off Kodak in my opinion.</p>
<p>However, during the 80's and 90's the biggest advancements I can think of are T-Grain films with much higher sensitivity and finer grain, and compact mini labs that can very rapidly turn negatives into prints at low cost. This change also led to a shift in consumer film usage away from primarily reversal (slide) film for projection and to more flexible negative film.</p>
<p>These days we also enjoy instant review of images on screens; this was a major benefit to even early digital cameras. This market was served by Polaroid and similar technologies, though the technical performance was much worse than standard film.</p>
<h2 id="mcetoc_1ivm0fn7k27c">How could you make digital cameras in 1980?</h2>
<p>The easiest way to accomplish this would be to retroactively change the calendar, making 1995 actually be 1980 now.</p>
<p>In 1980 most of the high level technology needed to make a digital camera make sense had been invented and could have been put together if an infinite amount of resources and money could be poured at the problem.</p>
<p>To make a digital camera itself you need:</p>
<ul>
<li>Image-sensor: the CCD was invented, in theory you could make one with sufficient resolution if your life depended on it.
<ul>
<li>Assume 1.2 megapixel is possible, a 4⨉ bump in pixel count vs. a TV sensor</li>
</ul>
</li>
<li>Video-ADC to make the digital copy of the video from the CCD: technically quite possible, but very expensive and power hungry if it also had to be fast</li>
<li>RAM to store the digital image: sure, but needs a lot of space and power if you want all of the image stored at once</li>
<li>Man-portable storage media: you'd probably start with a VHS or similar video tape recorder. Alternately a hard drive could be made to work.
<ul>
<li>Hard drives capable of storing more than one image were typically mounted in 19" racks at the time</li>
</ul>
</li>
<li>Ideally you'd want image compression: not sure what the state of the art was in 1980, but the ASIC to do some compression would probably be fairly compact next to all the RAM to store the image.
<ul>
<li>In the mid 80's semi-digital video compression systems like the Japanese MUSE system and EBU's later MAC systems were doing relatively sophisticated digital processing on live video to try to enhance the image quality of the 30's and 50's designs of analog TV</li>
<li>These systems were basically failures, though MUSE gets credit for being basically HD TV 20 years before widespread consumer availability in the rest of the world while no one has ever heard of EBU MAC</li>
</ul>
</li>
<li>Viewfinder to review the image: not strictly required but a high-ish resolution CRT would be quite possible to manufacture, see e.g. the Sony Watchman. An SLR-design wouldn't require an electronic viewfinder.
<ul>
<li>Designs for TV use would use an electron beam large enough to avoid visible spacing between the lines; a CRT is basically a special case of an electron microscope and so the capability to create very high resolution monochrome screens existed for a long time.</li>
<li>High resolution colour monitors would present more of a challenge since shadow mask TV's were all awful and would require a very very fine mask, eliminating most of the light output.</li>
<li>A colour sequential system using a DLP-type colour wheel in the optical path seems like it could be the easiest way to achieve a small high resolution compact color CRT.</li>
</ul>
</li>
</ul>
<p>This all seems like you could have made it, it would probably be much easier in 1985 vs. 1980 but still doable. It would involve a backpack full of electronics to make it happen, and it would undoubtedly have very poor sensitivity and dynamic range vs. any negative film of the era. Do keep in mind that in 1980 the IBM PC and analog walkie talkies with barely enough processing power to do automatic channel switching (pre-digital mobile phones like NMT-450) were considered to be state of the art.</p>
<p>Here's the fun part, what do you do with the image?</p>
<ul>
<li>Long term storage: definitely tape here, not a huge problem except it's tape so it sucks. It won't keep as well as black and white negatives but it might last longer than 70's and 80's colour negatives, which were notoriously prone to fading.</li>
<li>Making prints: inkjet printers were quite possible to acquire in 1980, flying spot-scanning an image onto RA-4 colour paper is also possible.</li>
<li>Projecting it: CRT projector could do it, or better yet use the flying spot-scanner for making prints to print onto a Kodachrome slide and project it normally</li>
<li>Displaying it digitally: high resolution displays were definitely possible to make, but the amount of expensive RAM chips you need in this pipeline is getting pretty insane. Possibly made easier by using a slow scan monitor with long-decay phosphor (see e.g. old vector CAD displays).
<ul>
<li>Storing a full colour quality 24-bit per pixel standard definition TV image (which is 0.3 mp) requires around 1 MB of RAM, or just under twice what an IBM PC could make use of directly.</li>
<li>Our proposed system would likely need around 4⨉ more than this just for video-RAM to truly compete.</li>
</ul>
</li>
<li>Editing it: You'd need at minimum a fridge-sized mini-mainframe to usably digitally edit the image, but it would be technically possible.
<ul>
<li>Assuming we want to keep a single copy of the 1 mp image in RAM we need around 4 MB of RAM</li>
<li>An IBM System/38 the size of a large chest freezer had around 1.5 MB of RAM in 1978</li>
<li>An IBM AS/400 from 1988 had a dramatic increase, apparently 64 MB wasn't unheard of.</li>
</ul>
</li>
<li>Sharing it with friends: get a stamp and mail them prints like people did ca. 1890-2005.
<ul>
<li>If you want it electronically then you need to get a beefed up ISDN rolled out to the masses 15-25 years ahead of the actual schedule.</li>
<li>You also have to convince the <em>phone</em> company to not treat data transfer as if it's a<em> </em>phone call to really boost adoptation.</li>
<li>In theory you could just print it and put it into a fax machine, but colour fax was never a mass market thing. Also you don't have a fax machine at home unless you're a stock broker.</li>
</ul>
</li>
</ul>
<p>It bears repeating that many or all of these limitations were solved or nearly solved by 1990 or so. CCD manufacturing was technically capable of megapixel sensors (Kodak DCS 100) and presumably much cheaper to manufacture. CRT displays for computers were full colour capable and megapixels full colour displays and associated graphics cards were quite feasible though very expensive and mainly used for professional publishing. Putting 16 MB of RAM in a computer in 1990 was quite possible, and in theory up to 128 MB was possible but <em>outrageously</em> expensive. Computer storage had major leaps in the same time period, both tape, solid state, and hard drives. A miniature floppy drive in 1990 could easily store a single uncompressed TV-quality image and JPEG compression was right around the corner. Printers were much more capable and compact. Though fax machines still hadn't grown colour.</p>
<p>As it so happens it looks a lot like 1990 or so was a critical mass for the technology to start emerging, the image sensor was only one part of the puzzle. The crazy speed of 80's and early 90's computer technology made the things that could technically be built ignoring cost in 1980 accessible to companies in 1990, many consumers by 1995, and commodities by 2005.</p>
<h2 id="mcetoc_1ivm0fn7k27d">Conclusion</h2>
<p>I hope this illustrates why digital stills cameras happened when they did. Even if it could have happened a few years earlier (and attempts were made at it as early as 1986), the convergence of especially consumer-accessible digital computing power and telecommunications advancements in the form of the internet seems to have created a real consumer use case for nascent digital cameras in spite of all their limitations.</p>
<p>Prior to the internet there really were very few useful things a consumer could do with a TV-still quality digital or analog camera that wouldn't make for an incredibly expensive and inconvenient camera with <em>dramatically</em> worse image quality than even the disposable cameras of the era. All with the further downside that the image would realistically have to live on a TV or computer screen afterwards.</p>
<p>In around the same era we also saw further enhancements to film photography probably partly owed to improved computing power in the R&amp;D departments. To mention two technical enhancements I'd suggest T-grain films of the 80's which were initially black and white (e.g. Kodak T-Max) but were rapidly applied to create much finer grained high speed colour films than were previously possible. This made it possible to make the small-aperture autofocus zooming point &amp; shoots of the 80's and 90's, as well as disposable cameras for even lower TCO for occasional shooters and children.</p>
<p>Another technical/process improvement was the proliferation of the mini-lab which made film developing much easier to perform in a limited space, leading to one-hour development shops popping up all over the place.</p>
<p>These factors kept film relevant for probably a decade longer, though I still suspect most families at the time only handed in their film roll for development somewhat begrudgingly once a quarter at most and were definitely ready for digital by the dawn of the new millenium.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Using the WM8804 S/PDIF Transceiver in Full-Duplex Mode</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/using-the-wm8804-spdif-transceiver.html"/>
        <id>https://longview.be/using-the-wm8804-spdif-transceiver.html</id>
        <media:content url="https://longview.be/media/posts/95/20200926T213729__IGP4979_2k-2.jpg" medium="image" />
            <category term="Audio"/>

        <updated>2024-08-18T10:51:00+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/95/20200926T213729__IGP4979_2k-2.jpg" alt="" />
                    <p>The WM8804 is a now obsolete but still available S/PDIF transceiver that is kind of mid but can be made to work ok for some use cases.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/95/20200926T213729__IGP4979_2k-2.jpg" class="type:primaryImage" alt="" /></p>
                <p>The WM8804 is a now obsolete but still available S/PDIF transceiver that is kind of mid but can be made to work ok for some use cases.</p>

<p>My biggest issue with this device is the poorly written datasheet, which makes understanding how the device is meant to work harder than needed. Information is spread all over the place, and some register names are plain wrong (CLKOUTDIS = 1 means enabling the clock output).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/95/Screenshot-2024-08-18-at-12.57.43.png" alt="" width="1518" height="960"><figcaption>WM8804 Block Diagram</figcaption></figure>
<p>It's a shame that the device can't generate the S/PDIF status bits, since otherwise it could have been a nice way to multiplex a low speed UART onto a single pair.</p>
<p>A single WM8804 is capable of being an S/PDIF receiver or transmitter. If you want to use it as a full duplex transceiver, there are severe restrictions.</p>
<p>This device uses a fully digital PLL system to lock onto the incoming signal, where it seems to adjust the fractional-N components digitally to generate the required receiver frequency. What this means is that the receiver PLL adjusts the same registers that are available on the external interface.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/95/Screenshot-2024-08-18-at-12.58.32.png" alt="" width="1584" height="1056"><figcaption>WM8804 Clocking Scheme</figcaption></figure>
<p>The receiver is not able to lock without a bitstream. This is fine, the problem is that starting the receiver and PLL without a bitstream makes it randomly output 24 or 48 MHz instead of 12.288 MHz. Once locked it will be fine, and it can coast just fine without a signal after that (assuming no noise, which the datasheet warns about).</p>
<p class="msg msg--info">To start the receiver without a signal, consider adding a digital loopback from the transmitter pin to the receiver (there's no internal one, despite the obvious issues).</p>
<p>The datasheet makes a big deal about using a common 12 MHz crystal. This is fine, but for a full duplex use case it only has a single fractional PLL. This means that if you try to connect two of them together, they will be trying to lock each other and will quickly wander off. It's not possible from what I can tell to make one device not use the PLL for receive. I'm not sure why the 12 MHz crystal is a big deal since there's no price difference, unless they intended it to be paired with something else that did need exactly 12 MHz.</p>
<p>There's a lot of pitfalls in starting up the IC, incorrect sequencing seems to lock up some of the digital circuitry requiring a hardware reset.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/95/Screenshot-2024-08-18-at-13.11.19.png" alt="" width="1096" height="160"><figcaption>Makes sense.</figcaption></figure>
<p>Making one side be the link "master" we can use a configuration that works assuming you control both ends:</p>
<p>The master side configuration will then be:</p>
<ul>
<li>S/PDIF in I2S Slave mode (AIF_MS = 0)
<ul>
<li>You need a DSP/Codec that can generate the I2S BCLK and LRCLK for the rate you want.</li>
</ul>
</li>
<li>Crystal: 12.288 MHz (256⨉48 kHz) (can be externally clocked as well)
<ul>
<li>If you use 12 MHz, you will get ~47 kHz</li>
</ul>
</li>
<li>Connect CLKOUT to MCLK direct from crystal, CLKOUT sourced from OSCCLK
<ul>
<li>PRESCALE=0, CLKOUTDIS=1 [sic], CLKOUTSRC=1, FREQMODE=2, FRACEN=1</li>
<li>I.e.: no PLL used for the transmit side, only for receive</li>
<li>You'll probably want to configure the RX PLL based on datasheet information in any case, but it only needs to be approximately right since it'll lock in anyway.</li>
</ul>
</li>
<li>Keep the transmitter enabled, do not enable the receiver until the far end has a RX lock</li>
</ul>
<p>This makes the OSCCLK output and MCLK used by the transmitter 12.288 MHz, the internal PLL is then not routed outside the WM8804.</p>
<p>The slave side configuration will be:</p>
<ul>
<li>S/PDIF in I2S Master mode</li>
<li>OSCCLK 12.288 MHz, but can be 12 MHz since we will use the PLL
<ul>
<li>I don't think you need to configure the PLL very accurately, the defaults may be close enough but I did set it up in my software before enabling it.</li>
</ul>
</li>
<li>Use MCLK to clock your ADC/DAC/DSP</li>
<li>Clock transmitter off recovered PLL clock</li>
<li>Keep restarting the S/PDIF receiver until a lock is achieved.</li>
</ul>
<p>This configuration works but can't start on its own. The way this clocking works is that the master side starts up and generates a valid S/PDIF transmit signal. Once the slave end has locked onto this signal (and we know this through out of band signalling) and is transmitting a signal, we can lock onto that in the master.</p>
<p>This configuration then uses the master clock as a reference, the master transmitter is then coherent to that oscillator. The receiver will be incoherent initially, when locked this receiver's PLL will be running coherent to the master transmitter, and the output from the slave will be coherent to the master receiver. This means there is no real need for a receiver PLL in the master.</p>
<p>The master side needs to have a clock source or crystal that can generate the desired rates without using the internal PLL, which is why a 12.288 MHz crystal is recommended. This also works if you have a 12 MHz crystal, but the sample rate will then be ~47 instead of 48 kHz.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>FCS AMP Headset — Technical Details</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/fcs-amp-headset-technical-details.html"/>
        <id>https://longview.be/fcs-amp-headset-technical-details.html</id>
        <media:content url="https://longview.be/media/posts/98/_IMG5353.jpg" medium="image" />
            <category term="Audio"/>

        <updated>2024-05-30T21:34:00+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/98/_IMG5353.jpg" alt="" />
                    <p>The FCS AMP headset is a tactical communications headset made by Chinese manufacturer FCS. It appears to be heavily inspired by the Gentex AMP series of military headsets.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/98/_IMG5353.jpg" class="type:primaryImage" alt="" /></p>
                <p>The FCS AMP headset is a tactical communications headset made by Chinese manufacturer FCS. It appears to be heavily inspired by the Gentex AMP series of military headsets.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hv5e69o716">Headset Overview</a>
<ul>
<li><a href="#mcetoc_1hvakfuki92">System</a></li>
<li><a href="#mcetoc_1hvakfuki93">Signal Processing</a></li>
<li><a href="#mcetoc_1hvakfuki94">EMI</a></li>
<li><a href="#mcetoc_1hvakfuki95">Passive Noise Reduction</a></li>
<li><a href="#mcetoc_1hvakfuki96">Power</a></li>
<li><a href="#mcetoc_1hvakfuki97">Comfort</a></li>
<li><a href="#mcetoc_1hvakfuki98">Speaker/TT Quality</a></li>
<li><a href="#mcetoc_1hvakfuki99">Microphone Quality</a></li>
<li><a href="#mcetoc_1hv5ee9qs2m">In the box</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hv5ee9qs2n">Teardown</a></li>
<li><a href="#mcetoc_1hv5fh5pb6r">Pinout</a></li>
<li><a href="#mcetoc_1hv5f0tsc42">Issues/Improvements</a>
<ul>
<li><a href="#mcetoc_1hv5f0tsc43">Battery Power System</a></li>
<li><a href="#mcetoc_1hv5fh5pb6s">External Power</a></li>
<li><a href="#mcetoc_1hv5gk7b8a3">Potential Improvements</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hv5gk7b8a4">Future Work</a></li>
</ul>
</div>
<h2 id="mcetoc_1hv5e69o716">Headset Overview</h2>
<p>The headset is very much inspired by the Gentex AMP series as mentioned in the intro. Unlike many products of the type, FCS actually has an <a href="http://www.fcs-tactical.com/productinfo/998830.html">English language website</a> that does provide a fair bit of information on what you're buying.</p>
<p>The headsets big feature over e.g. a Peltor SportTac or a used ComTac is that this one can do stereo audio for radio comms. It also includes separate speaker elements for talk-through and radio-comms. This ensures that you can still use comms without powering the headset talk-through mode, even if no batteries are installed.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/98/7606320.jpg" alt="" width="526" height="407"></figure>
<p>The product page boasts about a variety of features, I'll try to cover if these are realistic below.</p>
<h3 id="mcetoc_1hvakfuki92">System</h3>
<p>FCS also offers a fairly complete package, including a PRC-152 clone, a variety of PTT boxes (where I have a V-60, mainly due to a supplier mixup — I had ordered a MPU5 PTT), and a set of downlead cables. They also offer a standalone bluetooth module that can be wired into e.g. a V-60 PTT.</p>
<h3 id="mcetoc_1hvakfuki93">Signal Processing</h3>
<p>Foreshadowing, I believe the DSP claim is quite accurate.</p>
<p>The "Multi-scene mode switching" is limited to an indoor/outdoor mode, and they don't explain what this does. From what I can tell the indoor mode is more sensitive to loud noises, i.e. cuts the audio for lower impulse levels.</p>
<h3 id="mcetoc_1hvakfuki94">EMI</h3>
<p>The EMI resistance seems to be relatively good — keying a hand held 5 W FM radio near the headset I can hear <em>some</em> DC shift, but nothing that would be noticeable. Keying a 5 W DMR radio did cause some low level noise pickup, low enough that this would not be objectionable.</p>
<h3 id="mcetoc_1hvakfuki95">Passive Noise Reduction</h3>
<p>Noise reduction performance seems acceptable, similar to wearing a <a href="https://longview.be/peltor-sporttac-upgrades-for-two-way-radios.html">Peltor SportTac</a>.</p>
<h3 id="mcetoc_1hvakfuki96">Power</h3>
<p>The headset runs off two AAA batteries, and by default will only work reliably with Alkaline batteries, see Issues section.</p>
<p>High battery life is subjective, I did a rough measurement of current draw, and it seems to be less than 10 mA from the series connected AAA batteries, peaking to ~30 mA. Energizer L92 (Lithium) AAA's have a capacity of around 1200 mAh; at room temperature and currents less than ~50 mA an alkaline battery will have the same capacity.</p>
<p>We can estimate a battery runtime of 40-120 hours depending on volume levels. Use at lower temperatures will degrade runtime with alkaline cells.</p>
<h3 id="mcetoc_1hvakfuki97">Comfort</h3>
<p>Comfort-wise, the headset is equivalent to the SportTac, the design over all is very similar. It also has some voice recordings that play to tell you the current mode and when powering on/off, this can be easily switched between English and Chinese.</p>
<p>Frankly it's hard to tell which headset I'm using unless they're powered on.</p>
<h3 id="mcetoc_1hvakfuki98">Speaker/TT Quality</h3>
<p>Talk-through sound quality is pretty good, as long as you leave the volume fairly low. The lowest setting is very quiet, the second lowest is the closest to equal levels you can get. I would have liked to see a few more volume control steps, since each increment increases gain by a lot.</p>
<p>Noise levels in the speaker amplifiers are good, and decent microphones seem to have been used. The internal speakers seem to be fairly good when powered by my V60 DSP mod (future article).</p>
<h3 id="mcetoc_1hvakfuki99">Microphone Quality</h3>
<p>The boom microphone is nicely built, but it's a generic electret capsule with set dressing. The audio quality IMO was poor, with high distortion, poor treble, and little to no background noise canceling. It seemed to be extremely sensitive, probably more sensitive than the specified level.</p>
<p>Background noise was significantly more audible than with a noise canceling dynamic microphone (compared with a Peltor MT31 or equivalent dynamic mic).</p>
<p>There is an option to buy a replacement dynamic microphone, I note that at ~$40 this is an expensive add-on to an already relatively expensive package.</p>
<p>The dynamic microphone measures 150 Ω at DC, and looks fine mechanically. Sound-wise it's <em>very</em> different to the Peltor reference and not in a good way. It is also not waterproof, but probably usable in rain for some time without major issue.</p>
<p>It is quite sensitive and has extremely poor frequency response, requiring at least a 10 dB boost at 2 kHz. I believe it also has poor directivity, and I had severe issues with oscillation even at moderate talk-through gains. In conclusion, cheap microphones are terrible.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/98/IMG_7940.jpeg" alt="" width="2048" height="1864">
<figcaption >AMP knockoff dynamic microphone disassembled</figcaption>
</figure>
<p>For my actual use of this system, I kitbashed a Gentex made dynamic microphone onto the boom/plug of the AMP knockoff mic. This required some minor surgery to get the old Gentex assembly apart, and a bit of epoxy to get everything in place again.</p>
<h3 id="mcetoc_1hv5ee9qs2m">In the box</h3>
<p>My kit included the headset with standard overhead strap, a set of helmet mounts, a bag full of spare velcro pads for helmet cable mounting, some O-rings and silicone cable ties, and a U-174 (mono, the 4-pin ¼" jack) downlead.</p>
<p>I would have liked to see a stereo-capable downlead included in the kit, this is an optional extra that is not included with either the V-60 or the AMP headset.</p>
<p>I also purchased the optional gel earmuffs. I saw some online posts saying these were now standard, but my set came with foam muffs. Installation was quite easy, but make sure to pay attention to the orientation. The gel pads have a little vent hole that should go on the bottom.</p>
<h2 id="mcetoc_1hv5ee9qs2n">Teardown</h2>
<p>The headset is very easily torn down, just pull off the earmuffs and remove the foam.</p>
<p>As seen below, the board revision is 6.1 from April 2023. This is a curiously high number, suggesting they've been improving/revising the design for some time. The production batch for the PCB seems to be week 48 2023, suggesting that the 6.1 revision was relatively successful.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/98/IMG_7862.jpeg" alt="" width="592" height="740"></figure>
<p>Above is a picture of the left side PCB. This contains all the smarts. We can see two internal speakers, where one is used for talk-through and the other is directly connected to the external Mini-XLR plug (floating). Those are glued to the PCB, with the magnet poking through and soldered on the back, a neat way of mounting it.</p>
<p>The speaker DC impedance measures out as 32 Ω.</p>
<p>The flex-connector plugs onto the Mini-XLR plug, and the large JST connector runs over to the right side PCB. The right side PCB is not interesting, being purely a wiring routing board. The headset can be used with both the Mini-XLR and the boom microphone connected to either the left or right side.</p>
<p>Ambient microphones and boom microphone connect on the back of the board with connectors, and the battery power is supplied through pogo-pins on the back.</p>
<p>FCS chose to order custom lasered parts, making identification harder than it would otherwise be. I'm not sure what the DSP is, but the TSSOP chip in the middle is probably an STM32F030 or a similar Gigadevices part. If I had to guess, the DSP could be an ADAU1767, but I haven't checked the pinout.</p>
<p>Not sure what the switching power supply is doing there, doesn't seem like it would be necessary. It is definitely used though.</p>
<p>In the power-on state, the current consumption goes down for increasing battery voltage. I wonder if the MCU is powered directly off the battery and powers on the switching supply and DSP circuitry on demand, this could explain the issues with higher than 3.3 V supplies (see below).</p>
<p>The external connections use ferrite and capacitive filtering, the microphone lines also seem to use 4-terminal feed-through capacitors.</p>
<p>They also elected to use a hard potting compound over all the passive components. This is not a bad idea for a headset intended for outdoor use (and being inside the ear-cups, they will be in a high humidity environment!). It also has the benefit (for them) of making reverse engineering harder.</p>
<p>Build quality is in line with expectations given the price, no issues.</p>
<h2 id="mcetoc_1hv5fh5pb6r">Pinout</h2>
<p>This pinout was determined by measurements. The headset uses a 6-pin Mini-XLR that can be plugged into either the left or right earcup.  The FFC pinout is made relative to the marking on the PCB (at the top, counting towards the bottom).</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 23.1098%;"><strong>Mini-XLR Pin</strong></td>
<td style="width: 13.4094%;"><strong>FFC</strong></td>
<td style="width: 25.6841%;"><strong>Function</strong></td>
<td style="width: 37.7966%;"><strong>Comment</strong></td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>1</strong></td>
<td style="width: 13.4094%;">5</td>
<td style="width: 25.6841%;">No-connect</td>
<td style="width: 37.7966%;">Goes to a loose pad on the board</td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>2</strong></td>
<td style="width: 13.4094%;">4</td>
<td style="width: 25.6841%;">Speaker Left</td>
<td style="width: 37.7966%;">32 Ω</td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>3</strong></td>
<td style="width: 13.4094%;">3</td>
<td style="width: 25.6841%;">Speaker Common</td>
<td style="width: 37.7966%;">Floating vs. HS circuitry</td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>4</strong></td>
<td style="width: 13.4094%;">2</td>
<td style="width: 25.6841%;">Speaker Right</td>
<td style="width: 37.7966%;">32 Ω</td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>5</strong></td>
<td style="width: 13.4094%;">1</td>
<td style="width: 25.6841%;">Mic–</td>
<td style="width: 37.7966%;"> </td>
</tr>
<tr>
<td style="width: 23.1098%;"><strong>6</strong></td>
<td style="width: 13.4094%;">6</td>
<td style="width: 25.6841%;">Mic+</td>
<td style="width: 37.7966%;">Standard is electret microphone</td>
</tr>
</tbody>
</table>
<p>The use of separate isolated ground returns for speakers and microphone is good practice especially for duplex-capable system.</p>
<h2 id="mcetoc_1hv5f0tsc42">Issues/Improvements</h2>
<p>Here are my complaints:</p>
<h3 id="mcetoc_1hv5f0tsc43">Battery Power System</h3>
<p>I would have liked to see an option to use rechargeable batteries instead. </p>
<p>The biggest power issue is that the AAA's are series connected directly to the 3.3 V supply line for at least the MCU. This is fine for alkalines, which at most float at 1.6 V.</p>
<p>However, when installing brand new Lithium AAA primary cells, the open circuit voltage is up to 1.8 V. The voltage drops quickly for 1.5-1.6 V, but when the 3.6 V Lithium voltage is applied, the MCU fails to start.</p>
<p>I modified the right-side board, cutting the battery trace and installing a TLV700 series 3.3 V regulator. This is a fairly low Iq (~30 µA) linear regulator that <em>seems</em> to operate fine in dropout, and it's strange that this issue made it to production.</p>
<p>The headset circuitry only operates down to around 2.2 V (effective range 2.2-3.4 V), and will not power on at 2.1 V. This will leave a fairly large amount of Alkaline battery charge left when it cuts out.</p>
<p>The issue is lessened for Lithium primary cells which conk out around 1.4-1.5 V per cell, but without modifications you'd have to pre-drain a few % of charge from these batteries prior to use.</p>
<h3 id="mcetoc_1hv5fh5pb6s">External Power</h3>
<p>I would have liked to see an option for powering the headset externally from the V60. There may be an easy way to do this, but it looks to me like the only unused Mini-XLR pin is number 1, which is not connected to anything on the PCB.</p>
<p>The use for this feature would be that the external radio could power the headset in talk-through mode, saving the internal batteries for standalone use.</p>
<h3 id="mcetoc_1hv5gk7b8a3">Potential Improvements</h3>
<p>I <em>may</em> redesign my own electronics for this headset. The main improvements that could be made IMO would be:</p>
<ul>
<li>Rechargeable battery with power from the radio, or at least an external power input
<ul>
<li>Requires a wide-range power input, preferably 4.5-15 V range to cover all reasonable hookups. This is very much doable.</li>
<li>AAA size li-ion batteries (10440 size) are rated for 350 mAh or around 1.3 Wh for a total of 2.6 Wh.</li>
<li>A set of lithium AAA primary cells have a capacity of around 3.6 Wh (1.5 V per cell at 1200 mAh), so the runtime would be less but with radio-charging it would be fine.</li>
<li>Putting a Li-Po pack in the right earcup could significantly improve the battery capacity.</li>
</ul>
</li>
<li>Should come with a dynamic microphone, the stock electret one is not good.
<ul>
<li>Quality of the FCS dynamic mic: not recommended, try to find a Gentex or Peltor one.</li>
</ul>
</li>
<li>Acoustic noise canceling equivalent to the <a href="https://longview.be/racal-ra5000-raptor-headset.html">RA-5000</a> would be super slick.
<ul>
<li>Easily available options seem to be slim since e.g. the Qualcomm chips that support ANC require license keys to activate these features in the firmware</li>
<li>Using a DSP to implement the feature myself would probably require adding additional internal microphones.</li>
</ul>
</li>
<li>With a rechargeable battery in there, Bluetooth support could be added which would also be cool</li>
</ul>
<h2 id="mcetoc_1hv5gk7b8a4">Future Work</h2>
<p>I will likely update this article in future, when I have completed by redesign of the V-60 PTT. This redesign will basically be a compact more integrated version of the <a href="https://longview.be/devlog-prc-152-knockoff.html">RF-5980 mod</a> capabilities (indeed, the RF-5980 project functioned as a proof of concept for the V-60 project).</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Devlog 2 — The Falcon II KDU</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/devlog-2-the-falcon-ii-kdu.html"/>
        <id>https://longview.be/devlog-2-the-falcon-ii-kdu.html</id>
        <media:content url="https://longview.be/media/posts/97/_IMG5263.jpg" medium="image" />

        <updated>2024-05-26T22:46:21+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/97/_IMG5263.jpg" alt="" />
                    <p>Following the <a href="https://longview.be/devlog-prc-152-knockoff.html">previous entry</a>, the PCB's for the early summer 2024 assemblies have arrived. First out is the <a href="https://longview.be/harris-falcon-ii-kdu-kit.html">Falcon II KDU</a> PCB's, which replace the original PCB while reusing some of the key components.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/97/_IMG5263.jpg" class="type:primaryImage" alt="" /></p>
                <p>Following the <a href="https://longview.be/devlog-prc-152-knockoff.html">previous entry</a>, the PCB's for the early summer 2024 assemblies have arrived. First out is the <a href="https://longview.be/harris-falcon-ii-kdu-kit.html">Falcon II KDU</a> PCB's, which replace the original PCB while reusing some of the key components.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hurag6fkc">Design Goals</a></li>
<li><a href="#mcetoc_1hurcai1caj">PCB's</a></li>
<li><a href="#mcetoc_1hurcai1cak">Software</a>
<ul>
<li><a href="#mcetoc_1hurcai1cal">LCD</a></li>
<li><a href="#mcetoc_1hurcai1cam">Comms</a></li>
<li><a href="#mcetoc_1hurcai1can">Interface</a></li>
<li><a href="#mcetoc_1hurcai1cao">Test Integration</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hurd2be3cl">Notable Issues</a></li>
<li><a href="#mcetoc_1huso89u0i0">Conclusions</a></li>
</ul>
</div>
<h2 id="mcetoc_1hurag6fkc">Design Goals</h2>
<p>The purpose of this design was to make a form-fit-function replacement of the KDU internals. As mentioned previously the KDU used early 2000's design and with absolutely no software interface documentation it was not feasible to reverse engineer the existing design.</p>
<p>Additionally since I am also making the PRC-152 front panel, and the 152 KDU replacement, I want to standardise software interfaces with more flexibility than e.g. the original 152 KDU offered.</p>
<p>I'm also trying to make all devices in the system remotely programmable over serial – as such I made the original "KDU Detect" line in the 7-pin connector connect instead to the STM32 BOOT0 pin. This pin can be set high before powering on the device to enter serial bootloader mode. This change may actually make this incompatible with the original PRC-150 radio, but it's not like I have one of those.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/IMG_7841.jpeg" alt="" width="486" height="588"></figure>
<p>Above the new bootsplash image is rendered. This image is shown for a second or two on power-on, and whenever serial communications stop for more than approximately 1 second.</p>
<h2 id="mcetoc_1hurcai1caj">PCB's</h2>
<p>The circuit boards are relatively simple, but with some relatively complex geometry.</p>
<p>A 4-layer board was used as usual, and I chose to use ENIG and epoxy filled/capped vias to use via-in-pad. This saves some space, but is not a critical requirement.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/FCII_KDU_F.png" alt="" width="378" height="370"></figure>
<p>Above a front 3D render is shown, where I basically have nothing. The LCD is not modelled, but slots are present to use the original mounts. The pin header connectors simply reflowed off the old board and soldered onto the new one.</p>
<p>Q1/Q2 are phototransistors, which are not currently used but by drilling some holes in the case these could be used as light sensors. </p>
<p>A JST PH connector was used for the two LCD heaters, the original connector was slightly more compact but the new design had plenty of room and this was cheaper.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/FCII_KDU_R.png" alt="" width="376" height="368"></figure>
<p>On the back we have some stuff. The main processor is an old standby, the STM32F103RE. This is a processor with a reasonably large 64 kB RAM and 512 kB of flash, in a 64 pin package. It's a good choice where a relatively large amount of I/O is needed. An F-RAM IC is used as usual to store configuration parameters such as the LCD contrast.</p>
<p>The LCD interfacing added some complexity since the data lines run at 5 V, while the control lines can be 3.3 V. A 74LVC245 level shifting bus transceiver was used. I found that the 2 kHz LCD clock can be overclocked but it doesn't seem to affect anything, at excessive rates the LCD visual quality is affected somewhat.</p>
<p>For interfacing, a slew rate limited RS-422 transceiver is used, and a TI TPS560430XF DC/DC controller was used to support a wide ~7-28 V input voltage range.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/Screenshot-2024-05-26-at-23.32.09.png" alt="" width="912" height="430"></figure>
<p>To bias the LCD an opamp and an ICL7660 was needed to generate up to -5 V. I used one of the MCU's DAC outputs to drive this, giving ample resolution.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/Screenshot-2024-05-26-at-23.32.20.png" alt="" width="1510" height="706"></figure>
<p>I opted to modify the button board by replacing the original green (0805) LED's with more modern and æsthetic orange LED's. This increased efficiency was a mixed bag, since I couldn't easily replace the LCD backlight.</p>
<p>This backlight is very dim, requiring a very high ~100 mA operating current to reach approximately 1⁄8<sup>th</sup> of the intensity of the orange LED's. Naturally, all the LED's are PWMed so I was able to adjust the intensity to be reasonably well matched.</p>
<p>The pinouts for the other connectors are shown below, but note that I had to make special mirrored footprints to make these line up with the original pinout markings. Ignore the part numbers, I hot-aired the plugs off the old board and used those to save mone—to ensure perfect compatibility with the LCD and front panel.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/Screenshot-2024-05-26-at-23.32.33.png" alt="" width="442" height="338"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/Screenshot-2024-05-26-at-23.32.45.png" alt="" width="500" height="490"></figure>
<h2 id="mcetoc_1hurcai1cak">Software</h2>
<p>The MCU software is written in the STM32 IDE, where I opted to use FreeRTOS as a dispatcher, similar to the RF-5980 design.</p>
<h3 id="mcetoc_1hurcai1cal">LCD</h3>
<p>The LCD interfacing was surprisingly simple, and getting an image on the screen only took an hour or two. The parallel 8080 interface is not particularly difficult to generate using GPIO, and I saved myself some grief by ensuring that the 8 data bytes were placed in sequence on a single GPIO bank. This way I can easily use the BSRR registers to flash out my data byte.</p>
<p>I also implemented BUSY signal readback, but this is not generally needed in my experience. I was only able to exceed the LCD controller's speed once I switched to <em>-Ofast</em> optimisation. A few strategic 1 µs delay calls ensure appropriate  delays even in this case, and reaching ~100 Hz update rates was not difficult.</p>
<p>Most of the hard-ish work of getting a graphics library working was already done for the TRI PRC-152 front panel shown in the previous log entry. As such all I had to do was clean up the code a bit and modify it to use a 122⨉32 display instead of the (even weirder) 128⨉34 display of the front panel (and the less weird 128⨉64 display of the TRI KDU).</p>
<p>This difference amounts to one less 5⨉7 character of text on screen, which shouldn't be too difficult to deal with later when I will want to use the same code to talk to both devices.</p>
<h3 id="mcetoc_1hurcai1cam">Comms</h3>
<p>The serial communications use DMA as expected, running at the maximum 230'400 baud (with 250 kbaud⁄s limited transceivers). A simple framing format used for the speaker is repeated — a message starts with a ':' and ends with a carriage return, a newline can be used but is ignored by the parsers. I also use a pipe character ('|') to separate the header from the payload, making manual decoding of the data easier.</p>
<p>All data is encoded as a hexadecimal string, meaning a 2x overhead is incurred, with the benefit being highly reliable framing, and the communications are printable making debugging easier.</p>
<p>A separate FreeRTOS task polls the DMA transfer and processes data, along with scanning the keypad and generating messages periodically and when keys are pressed.</p>
<p>Some header information indicates source/destination and message type, length, and a CRC-32.</p>
<p>This header is common for all messages in the system, and ensures that a message router can receive, verify, and pass along an unknown message. E.g. the RF-5980 speaker controller does not have the headers and code to parse and inspect the contents of KDU messages. Instead, it only needs to know the routing information (what UARTs the packets will go to/from, and their source/target id's).</p>
<h3 id="mcetoc_1hurcai1can">Interface</h3>
<p>The KDU accepts a structure defining the display state. The default display has a 2-line 5⨉7 center text field and top/bottom 4⨉6 text fields. Small bar graphs on the top/bottom are controlled numerically and can be turned on/off, and larger bar graphs on the center lines intended for volume/RF level display are also parametrised.</p>
<p>It's also possible to switch to all-text in large or small text, making a character-mode display suitable for making e.g. menus.</p>
<p>The keypad is scanned and debounced continuously. When a key down event is detected, an output field containing an ASCII representation of the button is output once per press. This makes it easy to implement getc() type serial processing of button presses.</p>
<p>Additionally a bitfield is output representing all currently pressed keys, and various runtime parameters like backlight state, LCD bias levels, serial number, reset-cause, on-time, and a sequential message counter.</p>
<p>The output data is generated twice per second, and whenever a key-down occurs. This ensures that the device will respond quickly to keypresses without overwhelming the speaker-radio serial bus with excessive data. The timer based transmission is useful to ensure that the KDU is always signalling its presence to the upstream controller.</p>
<p>Testing suggests that any 4 keys can be detected properly, when a 5<sup>th</sup> button is pressed depending on combination some ghost keys are detected. This is sufficient to implement e.g. a shift-key type overlay.</p>
<h3 id="mcetoc_1hurcai1cao">Test Integration</h3>
<p>As part of the larger system, the RF-5980 speaker connects to the KDU and acts as a message router. Messages are then passed between the KDU and the Pi Pico based interface test board, and then passed along to a PC control software for monitoring.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/Screenshot-2024-05-26-at-23.23.48.png" alt="" width="660" height="300"></figure>
<p>Above a screenshot of the console mode monitoring application is shown. This program is really just an interface test, and has been very useful in developing and debugging the system. In the current state, the program talks over USB-serial with the Pi Pico.</p>
<p>When running on Linux it can also be connected directly to the RF-5980 speaker — the restriction is mainly caused by the macOS USB-serial drivers not supporting baud rates above 460'800 while Linux ones do.</p>
<p>Lacking an actual radio as part of the system, the KDU currently controls some parameters of the RF-5980 speaker system. This is done by parsing the RF-5980 telemetry in the Pico board and generating display data for the KDU (e.g. handset type selected, on-time, audio routing, volume levels etc.).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/97/IMG_7842.jpeg" alt="" width="572" height="598"></figure>
<p>Above the KDU is presenting parts of the RF-5980's state. Top row shows HS state (muted), volume (~–3 dB), on-time of the RF-5980 speaker (60 seconds), and S/PDIF lock state. The center rows show the names of HS1 and HS2 profiles, and the dashed lines switch to VU-meters when PTT'd. The bottom row shows the loudspeaker is unmuted at around –5 dB volume.</p>
<p>The KDU response is parsed in the Pico and controls parameters such as handset type.</p>
<h2 id="mcetoc_1hurd2be3cl">Notable Issues</h2>
<p>The major issues found during initial assembly and testing included:</p>
<ul>
<li>Swapped Anode/Cathode on the LCD backlight – modified the LCD
<ul>
<li>The newer LCD modules used by most of the KDU's I have include solder-bridge pads to make this easier</li>
</ul>
</li>
<li>Swapped +/– on the RS-422 transmit lined — fixed by mod-wires</li>
<li>Excessively dim LCD backlight – fixed by reducing series resistance from 24 to 8 Ω
<ul>
<li>This is using a large part of the 600 mA 5 V bus current budget. I should also swap the 2N7002 for something with low on-resistance since this is probably significant now.</li>
<li>Partial disassembly of the LCD module suggests that LED replacement is not trivial</li>
</ul>
</li>
<li>Surprisingly high LCD bias currents – originally I had 10 kΩ in series but I ended up using 120 Ω instead.</li>
<li>RF-5980 S/N 1 had a defective RS-422 receiver
<ul>
<li>A 0805USB common-mode choke had an open pair.</li>
<li>This still allowed data transmissions with a high bit error rate, preventing successful decoding.</li>
<li>Fixed by swapping the choke. These devices are pretty fragile and harder to hand solder reliably than most other SMD devices.</li>
</ul>
</li>
<li>Software bug introduced in the Pico interface board had me chasing spurious button-presses for ages
<ul>
<li>Turns out the Pico would sometimes forward KDU keypress packets twice.</li>
<li>Fixed by using the sequence counter field to handle this case. I also fixed the logic bug in the Pico code, of course.</li>
</ul>
</li>
</ul>
<h2 id="mcetoc_1huso89u0i0">Conclusions</h2>
<p>Over all this project has been successful.</p>
<p>The issues identified during assembly and testing were not unreasonable. The mechanical aspect worked out perfectly, electrical interfacing was a success and the mods were not excessive.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/97/IMG_7844.jpeg" alt="" width="415" height="553">
<figcaption >Two of them! The bottom unit still had a fogged plastic coating over the screen in this picture.</figcaption>
</figure>
<p>Software-wise no major issues were found really. An attempt to use FreeRTOS queues to pass messages along seemed to have some issues with latency, though I suspect they were overloaded due to a bug elsewhere that caused excessive traffic.</p>
<p>The addition of relatively high speed message passing for the KDU does not seem to have significantly affected the workload of the speaker processor.</p>
<p>At the time of publication I have assembled 3 units, with the only adjustment needed being the contrast voltage. Sadly, the first unit I tested seems to have a better LCD panel than the remaining units, which show somewhat reduced contrast.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Devlog 1 — PRC-152 Knockoff</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/devlog-prc-152-knockoff.html"/>
        <id>https://longview.be/devlog-prc-152-knockoff.html</id>
        <media:content url="https://longview.be/media/posts/96/20220226T133337__IMG6415_2k.jpg" medium="image" />

        <updated>2024-05-16T16:59:31+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/96/20220226T133337__IMG6415_2k.jpg" alt="" />
                    <p>The original Tri PRC-152 I purchased in 2023 was not a very good radio, with the biggest issue being a very limited radio with very poor audio.</p>
<p>This is a summary of the current work up to summer 2024, with future entries to be added as I go. Realistically this won't be a finished design before mid 2025.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/96/20220226T133337__IMG6415_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>The original Tri PRC-152 I purchased in 2023 was not a very good radio, with the biggest issue being a very limited radio with very poor audio.</p>
<p>This is a summary of the current work up to summer 2024, with future entries to be added as I go. Realistically this won't be a finished design before mid 2025.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hu11b00u12p">Replacing the Front Panel (Finished)</a></li>
<li><a href="#mcetoc_1hu11b00u12q">Battery Interface (Finished)</a></li>
<li><a href="#mcetoc_1hu11b00u12r">Initial Processor Board Concept (Abandoned)</a></li>
<li><a href="#mcetoc_1hu11b00u12s">The Requirements Set</a></li>
<li><a href="#mcetoc_1hu11sa5815o">The New Concept</a>
<ul>
<li><a href="#mcetoc_1hu11sa5815p">RF Board (Future Work)</a></li>
<li><a href="#mcetoc_1hu11sa5815q">DMR/FM Radio Board (Planned)</a></li>
<li><a href="#mcetoc_1hu11sa5815r">ISM Board (Planned)</a></li>
<li><a href="#mcetoc_1hu11sa5815s">Processor (Future Work)</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hu11b00u12t">External Speaker, RF-5980 (Finished)</a></li>
<li><a href="#mcetoc_1hu11b00u12u">KDU (Assembled)</a></li>
<li><a href="#mcetoc_1hu2v4jgvf">TRI KDU (On order)</a></li>
<li><a href="#mcetoc_1hu11b00u12v">V60 PTT/AMP Headset (On order)</a></li>
<li><a href="#mcetoc_1hu31l0o416">AK2401 Test Board (Planned)</a></li>
</ul>
</div>
<h2 id="mcetoc_1hu11b00u12p">Replacing the Front Panel (Finished)</h2>
<p>The first board I made was the front panel replacement, a mostly standalone assembly. I elected to add a local micro-controller to the front panel to handle button readout and LCD control. Additionally, I moved the speaker power amplifier and microphone pre-amplifiers to this board, and I expanded the number of microphones from 1 to 2.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_5491.jpeg" alt="" width="380" height="477"></figure>
<p>The new PCB actually worked out just fine, though it took me almost a year to bother getting the LCD code working. I decided to also use orange LED's for the keypad backlight, and I added a red/green LED and light sensors to the chassis.</p>
<p>The biggest issue faced here was that the 2 W capable speaker power amplifier combined with FFC 5 V supply resulted in severe voltage drops when driving the speaker hard. I ended up modifying the design with around 1 mF of bypass capacitance (glued into the casting) to keep the 5 V rail stable, and I added capacitance multipliers to the 5 V supplies for the two microphone preamplifiers.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7547.jpeg" alt="" width="371" height="504"></figure>
<p>Once I started the only processor issue was that I had misidentified Data/Command and the enable line, which caused some head scratching. Fortunately this was easily swapped around in software.</p>
<p>I also revised the phototransistor sensors range, these are used to dim all the LED's using PWM.</p>
<h2 id="mcetoc_1hu11b00u12q">Battery Interface (Finished)</h2>
<p>The battery interface was made twice, the first one being kind of a rushed design made to fit into a system design that then moved on.</p>
<p>It had a linear slow charger IC, active ORing between internal and external power, and a 5 V power supply intended as the always-on regulator.</p>
<p>I later re-spun the board, making some changes:</p>
<ol>
<li>Ditched the 5 V regulator</li>
<li>Kept the active OR circuitry</li>
<li>Added a boost regulator powered only off the external supply input, allowing the battery to charge off lower input voltages</li>
<li>Kept the slow linear charger</li>
</ol>
<p>Ideally I would integrate USB-C PD capable charging circuitry, but there simply wasn't room for this.</p>
<p>The design is relatively simple and allows powering off an external ~12-13 V supply with seamless battery switching. When powered externally, the battery will charge. If the radio is off, the battery will be able to charge even with lower voltages.</p>
<h2 id="mcetoc_1hu11b00u12r">Initial Processor Board Concept (Abandoned)</h2>
<p>The processor board was initially meant to use a Digi SoM device, but this turned out to be very hard to get as an individual. I then later changed tactics and made a design based on a Raspberry Pi CM4.</p>
<p>The Digi SoM EVM was ordered, and I used this with two RTL-SDR dongles to make a prototype AM/FM receiver, using the redesigned front panel as a speaker, and the Tri KDU as a serial display. This was fairly successful on a technical level, the performance of the AM/FM receiver was top notch, so the code will hopefully be reused.</p>
<p>This design would have integrated 4⨉RTL-SDR receivers, a LoRa modem, a short wave AM/SSB receiver, and a GNSS receiver. Additionally, it would have included wired Ethernet on the side connector.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_Controller_B_2023_12_14-2.png" alt="" width="299" height="514"></figure> <figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_Controller_T_2023_12_14.png" alt="" width="276" height="513"></figure>
<p>I did completely route the design and I was fairly close to ordering it, but upon reflection I decided that the software work to support this as a practical radio would be enormous.</p>
<p>I was also painting myself into a corner wrt. the transmitter side – the idea was to use a CATV hybrid as a power amplifier without any output filtering. Then a number of different simultaneous carriers could be transmitted at the same time. I realised that actually making this RF board would be very challenging.</p>
<p>The parts purchased for this concept are planned to be reused for an entirely different concept.</p>
<h2 id="mcetoc_1hu11b00u12s">The Requirements Set</h2>
<p>I spent the early part of 2024 rethinking the concept. I concluded that making a one-off design of this complexity would be pretty wasteful. As such it was decided that the design had to be somewhat flexible to let me repackage the radio boards as e.g. base station radios.</p>
<p>I had some vague requirements for this project, so I'll try to summarise them here:</p>
<ul>
<li>Has to make the PRC-152 radio useful, and utilise the capabilities the large chassis and battery offers
<ul>
<li>Has to be possible to hook up to an external RF-5980 speaker and Falcon II KDU with an interface board for the base station variant</li>
</ul>
</li>
<li>Great audio with internal and external devices
<ul>
<li>Including RX AGC and noise reduction for AM/FM</li>
</ul>
</li>
<li>AM receive/FM transceive, 118-174 and 400-470 MHz min frequency coverage
<ul>
<li>Target: DMR transceive for VHF/UHF</li>
</ul>
</li>
<li>Minimum 2 W RF output power</li>
<li>Minimum of 3 receiver channels for any mode to support scanning</li>
<li>Capable of full duplex VHF/UHF operation</li>
<li>GNSS receiver for APRS/Meshtastic beaconing and time synchronisation</li>
<li>APRS transceiver</li>
<li>6-pin handset interface supporting powered headsets and a V60 PTT (digital)
<ul>
<li>Initially I planned to use 5 V power like the Tri, but changed this to 12 V nominal later</li>
</ul>
</li>
<li>For base station: support for 2-4 external analog radios</li>
</ul>
<p>Some nice to have requirements also appeared:</p>
<ul>
<li>Short-wave receiver with minimum AM/SSB, when paired with appropriate antenna</li>
<li>Wi-Fi remote control when at base (web interface to program channels)</li>
<li>Meshtastic 868 MHz support</li>
<li>Bluetooth audio support</li>
<li>Interface between Radio and Control board should be compatible with a TLK1501 SERDES IC</li>
</ul>
<h2 id="mcetoc_1hu11sa5815o">The New Concept</h2>
<p>My new concept started at the radio board end. I elected to put as much as possible into the radio side then the control board would have to fill the rest in.</p>
<p>For the base station configuration there will be at least 2-3 additional circuit boards to support e.g. the SERDES routing and things such as external analog radio interfaces. These functions will hook up to the future processor board, which has not been fully designed yet.</p>
<h3 id="mcetoc_1hu11sa5815p">RF Board (Future Work)</h3>
<p>To support FM receiver for e.g. APRS, I plan to use 4 pcs. RDA1846S SDR receivers (the core of a Baofeng UV-5R). An option to use the RDA1846 transmitter directly (no PA) is also planned, to allow for ~1-10 mW very low power transmission, and possibly full duplex operation over short distances.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_RF_Board-2.png" alt="" width="402" height="709"></figure>
<p>The current working model of the board is shown above, with the ISM and transmitter board (not visible) modelled in.</p>
<p>To support AM receive, the plan is to use AK2401 SDR receivers. These devices include a zero-IF complex downconverter and high performance ADC, and I plan to connect them to a DSP/processor using I2S to process the I/Q signal for AM/FM/other demodulation.</p>
<p>The processor is planned to be a STM32H7 dual core (M7/M4) device, with the big core doing the DSP work and the M4 doing the housekeeping.</p>
<h3 id="mcetoc_1hu11sa5815q">DMR/FM Radio Board (Planned)</h3>
<p>I've elected to use niceRF modules for the transceivers, and two options are suitable here. The DMR818S can be used for DMR for VHF/UHF. For initial testing I plan to use SA868S modules instead, which are FM only but otherwise similar, and cheaper.</p>
<p>As a future upgrade I may try to make my own SDR transmitter in place of using the modules, hopefully as a swappable module. I'll try to add some signals to the interface that may be useful there, such as a clock signal for a synthesizer.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_FM_RF.png" alt="" width="634" height="818"></figure>
<p>These modules along with the antenna interface will be made as a separate pluggable mezzanine board. This will be mounted to the RF board with a cooling interface to the center casting of the radio.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7623.jpeg" alt="" width="571" height="429"></figure>
<p>This board is planned manufactured summer/autumn 2024. Above a 3D printed model of the PCB is test fitted after machining the central casting of the radio to accept it.</p>
<p>I've found that 3D printing models of circuit boards is a very good way to match more complex geometries.</p>
<h3 id="mcetoc_1hu11sa5815r">ISM Board (Planned)</h3>
<p>To support Meshtastic, GPS, and Shortwave reception, a second mezzanine on the other side of the RF board will contain the required hardware for these functions.</p>
<p>The Heltec HT-CT62 LoRa module will be used for Meshtastic, a Si4735 receiver for short wave, and a uBlox MAX-M10S will be the GNSS receiver. Additionally, I had room for a RTC battery on this board.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_ISM_V2.png" alt="" width="642" height="633"></figure>
<p>A second antenna interface will be used here, and a new antenna mount was retrofitted to the radio back shell. This was 3D printed out of stainless steel, which was a delight to put threads into. These were made by JLC, and the quality was quite good.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7370-2.jpeg" alt="" width="571" height="429"></figure>
<p>I plan to make this board in summer 2024.</p>
<h3 id="mcetoc_1hu11sa5815s">Processor (Future Work)</h3>
<p>For the processor board, the plan is to use a Raspberry Pi Zero W (version 1). This is the slowest but also literally the cheapest Linux capable processor module available. Given that the bulk of the signal processing will be done in the H7 MPU, and I plan to use a SigmaDSP (likely ADAU1442) for audio processing, the main job of the Zero will be housekeeping. Mainly, the plan is to hook up SPI for DSP control, and a USB hub with CH340 serial converters to talk to other devices.</p>
<p>The Zero W has the benefit of being very low power and relatively compact. I will make an interposer board to make mounting more convenient.</p>
<p>Additionally, I am trying to make it feasible to put a SERDES IC between the RF and control board. This would allow remote mounting of the actual radios, with a fiber optic link between it and the control board. The main restriction there is some potential clocking issues and the added delay for the I2S audio links, but I consider these to be solvable problems.</p>
<h2 id="mcetoc_1hu11b00u12t">External Speaker, RF-5980 (Finished)</h2>
<p>Since I now knew I wanted to make more than a single radio out of this design, the extra radios would need their own speakers and displays.</p>
<p>I was able to find a couple of Harris RF-5980 powered speakers with dual handset ports for relatively little money on eBay. These were determined to be a good base for the non-portable radio variants. At the time of writing I have two in perfect condition, and am looking for a third since I made 3 electronics sets.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7736.jpeg" alt="" width="646" height="485"></figure>
<p>The speaker itself has a radio interface, a power interface, dual handset ports, a speaker, and volume and on/off controls for both speaker and handsets.</p>
<p>I made new electronics for these speakers, adding a processor, a DSP (ADAU1701) to process audio, digital audio in/out, and a serial port for control. Additionally, I added a V-60 interface to one of the handset ports, and repurposed the original power plug hole to be a KDU interface with serial port and power.</p>
<p>The build went pretty well, the major issues I had were:</p>
<ul>
<li>Incorrectly measured mounting holes – drilled two new holes and plugged the old ones</li>
<li>The <a href="https://longview.be/using-the-wm8804-spdif-transceiver.html">WM8804 S/PDIF transceiver</a> is hard to use in full duplex, see linked article.</li>
<li>Some strapping to make the ADAU1701 send and receive data based on the WM8804 I2S clocks (need to hook up both input &amp; output LRCLK/BCLK pins)</li>
<li>Turns out the ADAU1701 1.8 V supply needs to be fairly beefy, so an LM1117 had to be modded in to drive it</li>
<li>Also turns out that isolated DC/DC's are pretty noisy, so I had to add 78/7912's to the DC/DC converter output to quiet down the supplies</li>
</ul>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7715.PNG" alt="" width="685" height="316"></figure>
<p>It has been commented that a speaker has two wires, but this design only needs twenty. As seen above, the speaker's on-axis response is not all that bad.</p>
<p>The V60 interface is software selectable, and just uses a set of analog switches to select between the analog mic/speaker signals and the digital lines. The S/PDIF audio to/from the V60 is simply passed through the speaker, while the serial port is routed to the MCU in the speaker which can pass messages as needed.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7708.jpeg" alt="" width="575" height="432"></figure>
<p>Similarly, the KDU interface has the serial interface routed through the speaker MCU. I chose to use a 6 pin MiniXLR for the KDU. This is a low cost shielded connector that fit the existing holes with a simple 3D printed bushing.</p>
<p>The radio interface uses a 20 pin Hirose LF13 plug, which was the best option for something that fits in the existing holes and isn't crazy expensive. All the interfaces are differential RS-422 or similar, and I had some shielded twisted pair industrial cable sitting around that was used to make interface cabling.</p>
<ol>
<li>Isolated 24 V supply</li>
<li>High speed serial port (~1 Mbit⁄s)</li>
<li>S/PDIF TX/RX, speaker</li>
<li>S/PDIF TX/RX, V60</li>
<li>Reset &amp; Bootmode</li>
</ol>
<p>The radio side is simply a 25 pin D-Sub, for simplicity's and costs's sake.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/Screenshot-2024-05-17-at-11.51.16.png" alt="" width="665" height="249"></figure>
<p>A Pi Pico based board was made to act as an interface tester for the speaker, I probably won't use the Pico again except for special circumstances. Above an interface tester program is shown, which shows the state of the speaker control and selected audio profile. This program can talk directly to the speaker using a RS-422 adapter, or (like above) can talk at reduced rate through the Pico USB serial interface.</p>
<p>The interface board was over all a success though, I added V60 style mini-XLR connectors that lets me connect an analog radio. Currently this is in operation with an <a href="https://longview.be/ericsson-orion-various-notes.html">Ericsson Orion</a> for transmit/receive and an Icom IC-A6 airband transceiver (no transmit, through <a href="https://longview.be/wide-band-radio-over-fiber-system.html">fiber optic</a>).</p>
<p>The RF-5980 is considered finished aside from assembly of the additional units. Software-wise the core functionality is finished, but support for e.g. KDU/V60 serial data routing and polishing of the serial interface is still needed.</p>
<p>I also made 3D printed TPU dust covers for the connectors, this saved quite a lot of money!</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/IMG_7753.jpeg" alt="" width="447" height="596"></figure>
<h2 id="mcetoc_1hu11b00u12u">KDU (Assembled)</h2>
<p>I previously wrote about the <a href="https://longview.be/harris-falcon-ii-kdu-kit.html">Falcon II KDU</a> that is available quite inexpensively on eBay at the time of writing.</p>
<p class="msg msg--info">See my separate devlog on this: <a href="https://longview.be/devlog-2-the-falcon-ii-kdu.html">Devlog 2 — The Falcon II KDU</a></p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/FCII_KDU_F-2.png" alt="" width="401" height="393"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/96/FCII_KDU_R-2.png" alt="" width="401" height="393"></figure>
<p>This device is quite cute, and I decided that this would be a good HMI device to use with the base station radio concept. Having worked out the pinout, adding the electrical interface to the RF-5980 speaker was relatively simple.</p>
<p>While I did consider trying to reverse-engineer the software in the KDU, I didn't have the appropriate programmer to read the original flash code. I was also scared by the enormous size of the flash, fearing that it may contain an entire operating system and a million layers of abstraction.</p>
<p>Further, redoing the electronics means I can make my own interface, hopefully making the TRI KDU, the FCII KDU, and the internal PRC-152 keypad module very similar in capabilities and software interfaces.</p>
<p>Since this design is very neat, I ended up buying five of these in total. I figure I can use these for other things later.</p>
<h2 id="mcetoc_1hu2v4jgvf">TRI KDU (On order)</h2>
<p>The TRI KDU was discussed in the <a href="https://longview.be/tri-anprc-152-20222023-model.html">PRC-152 article</a>. I managed to pry it open, and made a new electronics set here as well.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_KDU.png" alt="" width="2000" height="1236"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/PRC152_KDU_R.png" alt="" width="2000" height="1236"></figure>
<p>There wasn't much wrong with the original design, but since the processor used by the Tri device wasn't pin compatible with my STM32 devices I ended up with a respin. Further, I wanted light sensors, PWM dimming, and a more flexible software interface to support additional display modes.</p>
<p>Additionally, I added a DC/DC converter on the input to support 8-24 V power.</p>
<p>More details to be added in a future entry since these parts are on order.</p>
<h2 id="mcetoc_1hu11b00u12v">V60 PTT/AMP Headset (On order)</h2>
<p>The V60 PTT and FCS AMP headset combo was also designed into the system. The V60 PTT is a 4-way PTT with 3 radio interfaces.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/96/V60_DSP.png" alt="" width="429" height="422"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/96/V60_DSP_IF-2.png" alt="" width="447" height="404"></figure>
<p>I redesigned the PTT circuitry entirely, with a similar feature set to the RF-5980 speaker. The main radio interface is now a serial port and S/PDIF audio going both ways. The original V60 design was completed before making the RF-5980 circuitry, and I used the RF-5980 design as a prototype for the more compact V60 system.</p>
<p>A number of minor issues were found in the RF-5980, and I have addressed these in the V60 design so hopefully I won't have as many issues this time.</p>
<p>The V60 PTT then has the main digital I/O, the headset interface circuitry, and adds two generic radio interfaces.</p>
<p>These generic interfaces will contain speaker audio inputs, microphone (simulated) outputs, PTT out, and retransmit (RT) in. RT is basically a squelch-output that is supported on some radios including the PRC-152. This can be used to make a simple radio relay with two radios, interconnecting the RT/PTT's both ways. This interface is also part of the RF-5980 interface test board.</p>
<p>With four PTT buttons, PTT I/II is nominally the PRC-152 A/B channel, with the III and IV being the two generic radios. There is also an uncommitted button.</p>
<p>More details will be added to a separate log entry, once I have working boards.</p>
<h2 id="mcetoc_1hu31l0o416">AK2401 Test Board (Planned)</h2>
<p>Since the RF board is intended to use AK2401 SDR receivers for e.g. AM receive, I need to prototype this to ensure it will work as intended. Of particular concern is the I2S hookup for the AK2401 digital I/Q data. I have previously found the STM32F1 and F3's I2S peripheral to be largely ornamental, so I'm hoping that the H7 has something that actually works. Previous testing of the SAI peripheral indicates that this does actually do what it's supposed to, but the SAI's will be used for other functions.</p>
<p>The plan here is to make a board with an AK2401 and an ADF4351 synthesizer. Two of these will probably be hooked up to a STM32H745 Nucleo board as a proof of concept. This will also let me start working on the software demodulators.</p>
<p>I'll probably build this as a separate project and make the test assembly into a standalone AM/FM receiver with e.g. a Falcon II KDU interface and internal speaker. While this will be obsoleted by the PRC-152 when finished, it will be useful in the mean time, and can probably find a home somewhere.</p>
<p class="msg msg--info">(2024/08): The AK2401's are on hold, pending evaluation of using EFR32 Sub-GHz receivers instead — these are lower cost, seem to offer 16-bit I/Q data, and include a 40 MHz Cortex-M4F core that should be sufficient for demodulation. Will return to this in a future article.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Wideband Antennas — S11 Measurements</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/wideband-antennas-s11-measurements.html"/>
        <id>https://longview.be/wideband-antennas-s11-measurements.html</id>
        <media:content url="https://longview.be/media/posts/94/20220507T125506__IMG4389_2k.jpg" medium="image" />

        <updated>2024-03-31T15:57:46+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/94/20220507T125506__IMG4389_2k.jpg" alt="" />
                    <p>This is my collection of SWR measurements of various antennas I've bought, partially just to keep them somewhere I can find them.</p>
<p>This article will likely be updated as I acquire new antennas to test.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/94/20220507T125506__IMG4389_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>This is my collection of SWR measurements of various antennas I've bought, partially just to keep them somewhere I can find them.</p>
<p>This article will likely be updated as I acquire new antennas to test.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hqabk1acc6">5G/IoT Antennas</a>
<ul>
<li><a href="#mcetoc_1hqabk1acc7">Summary</a></li>
<li><a href="#mcetoc_1hqabk1acc8">Taoglas TG.46.8113 Apex IV</a></li>
<li><a href="#mcetoc_1hqabk1acc9">Pulse W5084K</a></li>
<li><a href="#mcetoc_1hqacem3eob">2J Antennas 2JW1483 "Dagger"</a></li>
<li><a href="#mcetoc_1hqabk1acca">TE/Laird DBA6171C3-BSMAM</a></li>
<li><a href="#mcetoc_1hqabk1accb">TE/Laird TRA806/17103P</a></li>
<li><a href="#mcetoc_1htci3v2lk">Gizont 5G Gooseneck</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hqabk1accc">VHF/UHF Antennas</a>
<ul>
<li><a href="#mcetoc_1hqacem3eoc">Summary</a></li>
<li><a href="#mcetoc_1hqacem3eod">TCA VHF &amp; UHF Goosenecks</a></li>
<li><a href="#mcetoc_1hqacem3eoe">Triumph PRC-152 Whip</a></li>
<li><a href="#mcetoc_1hqacem3eof">Unknown, ANT.BROADBAND 90-512 MHz</a></li>
<li><a href="#mcetoc_1hqacem3eog">20 cm long gooseneck</a></li>
<li><a href="#mcetoc_1hqacem3eoh">LB-ANT-8W (Harris clone)</a>
<ul>
<li><a href="#mcetoc_1husjacish4">"LB-ANT"</a></li>
</ul>
</li>
<li><a href="#mcetoc_1htgrlpm5k">Harris 12011-2710-03</a></li>
<li><a href="#mcetoc_1i22a006q10">Comrod VHF30512MP/TNC</a></li>
<li><a href="#mcetoc_1i29rvgh4m">Comrod VHF30512HH/L</a></li>
<li><a href="#mcetoc_1ipf37lker">Radiall MD10-004 Flexible Whip</a></li>
</ul>
</li>
<li><a href="#mcetoc_1htm2k7cji">Appendix A: What's inside a wide-band military-style antenna?</a></li>
</ul>
</div>
<p>This set of measurements was performed on a nanoVNA V2 using a minimal ground plane to simulate a hand held device. I decided to touch the ground plane to extend it for some antennas, since they performed significantly better this way.</p>
<p>My goal is to determine optimal antennas to use for a combination of fixed install and portable use, to cover the range of 433, 868, GPS L1, and 2.4 GHz.</p>
<p>Additionally, I am interested in VHF/UHF antennas to cover ideally 100-500 MHz, preferably continuously.</p>
<h2 id="mcetoc_1hqabk1acc6">5G/IoT Antennas</h2>
<h3 id="mcetoc_1hqabk1acc7">Summary</h3>
<p>The Taoglas Apex IV is the only choice if you need 433 MHz, and it's competent otherwise.</p>
<p>The Pulse W5084K is probably the best over all portable antenna in this category, with better than 2:1 SWR across the board.</p>
<p>The 2J "Dagger" is also a good option given the performance to size ratio.</p>
<p>For fixed install the Laird TRA806/17103P is a really good option when given a bit of ground plane.</p>
<h3 id="mcetoc_1hqabk1acc8">Taoglas TG.46.8113 Apex IV</h3>
<p>This antenna is specified for 410-450 MHz as well as the usual ~700-6000 MHz range.</p>
<p>It performs with around 2:1 SWR in the 70 cm band when provided with a little ground plane, decent 868/915 MHz, and very nice GPS and Wi-Fi performance. It's pretty big.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Taoglas_ApexIV.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqabk1acc9">Pulse W5084K</h3>
<p>This is a similar antenna to the Taoglas above, but it lacks the 70 cm band. It's shaped like a lollipop!</p>
<p><img src="https://mm.digikey.com/Volume0/opasdata/d220001/medias/images/2555/MFG_W5084K.jpg" alt="W5084K" width="295" height="295"></p>
<p>The antenna looks messier, but has decent 868, GPS, and excellent Wi-Fi.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Pulse_Lollipop.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqacem3eob">2J Antennas 2JW1483 "Dagger"</h3>
<p>The only whip antenna in its class for the initial tests, this antenna looks really nice and feels pretty solid. It offers borderline 868 performance, decent GPS, and excellent Wi-Fi.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/2JAntennas.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqabk1acca">TE/Laird DBA6171C3-BSMAM</h3>
<p>A smaller antenna than the two above, this antenna is not very good below 1 GHz. Usable for GPS and Wi-Fi, not particularly good at 868.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/TE_Tilt_Whip.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqabk1accb">TE/Laird TRA806/17103P</h3>
<p>This is a fixed install version of the NMO antenna, it's part of the "Phantom" series of dome-antennas commonly seem on public service vehicles. It's pretty heavy for the small size, and performs really well!</p>
<p>The test was performed with a hand on the ground plane, this dramatically improves 868 performance. My SWR plot looks quite similar to the datasheet one.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Screenshot-2024-03-31-at-15.33.48.png" alt="" width="216" height="309"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/TRA806_1710P.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1htci3v2lk">Gizont 5G Gooseneck</h3>
<p>This is a large gooseneck antenna marketed as covering 600 MHz and up. It has a very poor performance in the lower end, and smooths out later.</p>
<p>Not a great choice over all.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Gizont_5GW_30cm.png" alt="" width="2100" height="1600"></figure>
<h2 id="mcetoc_1hqabk1accc">VHF/UHF Antennas</h2>
<p>For VHF/UHF antennas we do have to consider that the minimal ground plane will affect the performance. Further, narrow-band antennas are prone to shifting their resonant frequency by quite a lot depending on installation.</p>
<p>I later repeated some tests with a ~40x20 cm aluminium ground plane, these are marked as such below. For the Comrod antennas below I use an IC-705 with a Windcamp cage and a custom alu. plate as a mount.</p>
<h3 id="mcetoc_1hqacem3eoc">Summary</h3>
<p>The TCA VHF/UHF goosenecks are good choices, the VHF one does seem like it could be used at low power as a dual-band antenna.</p>
<p>If you can get a Comrod, Radiall, or genuine Harris then these antennas do offer good SWR but lossy matching over a very wide range. Generally a bigger antenna will perform better in this domain.</p>
<h3 id="mcetoc_1hqacem3eod">TCA VHF &amp; UHF Goosenecks</h3>
<p>These gooseneck antennas can be found on AliExpress, they have a relatively thick whip section (~⌀20 mm). They perform relatively well given their size, the VHF one can almost be used as a dual band antenna.</p>
<p>Not sure why this antenna performed so poorly on the second attempt.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/TCA_VHF.png" alt="" width="2042" height="1620"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/TCA_VHF-2.png" alt="" width="2100" height="1600"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/TCA_UHF.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqacem3eoe">Triumph PRC-152 Whip</h3>
<p>This 33 cm long whip is the standard antenna for the <a href="https://longview.be/tri-anprc-152-20222023-model.html">TRI AN/PRC-152</a> as supplied in 2023.</p>
<p>It's not amazing, but it looks like an attempt at covering the intended range (136-174, 220, 420-440) was made.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Tri_33cm_Whip.png" alt="" width="2042" height="1620"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Triumph_Whip.png" alt="" width="2100" height="1600"></figure>
<h3 id="mcetoc_1hqacem3eof">Unknown, ANT.BROADBAND 90-512 MHz</h3>
<p>This TNC antenna is marketed as being for the PRC-148. It's better than the Triump one above, having a more wide-band but poor match across most of the specified range.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Ant_Broadband_90_512M.png" alt="" width="2042" height="1620"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Ant_BB.png" alt="" width="2100" height="1600"></figure>
<h3 id="mcetoc_1hqacem3eog">20 cm long gooseneck</h3>
<p>This gooseneck antenna has a 20 cm long fiber-glass whip section and is marketed for 144/430 MHz operation. No real change when a ground plane is added.</p>
<p>It's got relatively sharp match in the 150 MHz range, and a very broad-band match from around 300-470 MHz. Not the worst thing I've seen but poor on VHF.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/20cm_Gooseneck.png" alt="" width="2042" height="1620"></figure>
<h3 id="mcetoc_1hqacem3eoh">LB-ANT-8W (Harris clone)</h3>
<p>This is a clone of a Harris manpack antenna, the typical blade one. I did a couple of tests with this one. I believe this one is made by Triumph.</p>
<p>The markings are "LB-ANT-8W", P/N RF-3152-AT152, which is a real P/N but is not a 30-512 MHz antenna. I think the 8W suffix indicates this is an 8 W rated antenna. The antenna as mentioned is really meant for a manpack, but removing the gooseneck makes it slightly more practical as a portable antenna.</p>
<p>It has good matching across a wide range, but the second plot shows what it looks like without the blade attached at all, I'd wager the matching unit gets pretty warm.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Screenshot-2024-05-08-at-18.50.54.png" alt="" width="347" height="416"></figure>
<p>Above a picture of the matching unit for the specific clone antenna I tested shows what I believe is a 1:9 UnUn transformer and a couple of dummy resistors. The antenna reads as a slightly reactive 100 Ω down to around 5 MHz, see Appendix A for the reason. It is surprisingly usable as an SWL antenna.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-BB.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-BB-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-35cmfoldWhip.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-35cmfoldWhip-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-20cmfoldWhip.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-20cmfoldWhip-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-Whip.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-Whip-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-GooseWhip.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-GooseWhip-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-GooseOnly.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-GooseOnly-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-Nowhip.png" data-size="2100x1600"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-Nowhip-thumbnail.png" alt="" width="720" height="549"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-fullwhip.png" data-size="2168x1614"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-fullwhip-thumbnail.png" alt="" width="720" height="536"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/LB-ANT-8W-halfwhip.png" data-size="2168x1614"><img src="https://longview.be/media/posts/94/gallery/LB-ANT-8W-halfwhip-thumbnail.png" alt="" width="720" height="536"></a></figure>
</div></div>
<h4 id="mcetoc_1husjacish4">"LB-ANT"</h4>
<p>I purchased what I thought was another LB-ANT-8W in May 2024. Several differences were noted:</p>
<ol>
<li>For clarity: the item listing did show what I received, though some photos in the listing appeared to be of other variants of the antenna including the one received previously.</li>
<li>Marked as a 136-480 MHz antenna instead of 30-512 MHz</li>
<li>Matching unit seems to be a cast plastic piece instead of the lathe turned plastic of the previous unit</li>
<li>No Harris™ logo</li>
<li>If there is anything inside it's not the wide-band match design, since it has very poor SWR with no whip attached
<ol>
<li>Performance at 400+ MHz seemed pretty poor</li>
</ol>
</li>
<li>The screws used on the previous unit were ¼" with a thread pitch close to 1 mm (probably ¼"-24)
<ol>
<li>The new unit seems to use M6x1 screws instead, which I think is more common for the Chinese made units for obvious reasons</li>
<li>These are one-way compatible, the previous base with ¼" holes will accept M6 hardware but not vice versa</li>
</ol>
</li>
<li>Tape-whip was somewhat shorter, but seems to be built with decent quality parts</li>
</ol>
<p>All in all it seems the variant of the antenna has been cost optimised, while I probably received an earlier run in 2023.</p>
<p>The choice of changing the matching network may in part be due to users burning out the antennas.</p>
<p>I'm somewhat disappointed, but the new hardware was repurposed a little. I used the new whip with the old matching unit, being slightly smaller it fits a portable radio a little better. The new assembly is a decent fit for VHF use.</p>
<p>I suggest users looking for the proper wide-band design check to make sure that the listing shows a picture of the matching network inside the antenna and is marked with the appropriate frequency range.</p>
<p>I later purchased another set also marked LB-ANT that said 30-512 MHz, and this seemed to be approximately the same as the first one I purchased, including using ¼" thread forms.</p>
<h3 id="mcetoc_1htgrlpm5k">Harris 12011-2710-03</h3>
<p>This is a believed genuine Harris stock PRC-152 antenna, with a ~10" (13" total length) non-removable blade section. It is labeled as a 10 W 30-512 MHz antenna.</p>
<p>It seems to basically perform better with a smaller ground plane or when the blade is in body proximity.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Harris-12011-2710-03-Handheld.png" alt="" width="2190" height="1546"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Harris-12011-2710-03-GP.png" alt="" width="2190" height="1546"></figure>
<h3 id="mcetoc_1i22a006q10">Comrod VHF30512MP/TNC</h3>
<p>This is a legitimate military whip antenna intended for manpack radios (not really for hand helds). Comrod (🇳🇴!) is a pretty large manufacturer of various military antenna systems, in the same vein as e.g. Harris, AeroAntenna (more of an aviation manufacturer), and Radiall.</p>
<p>It covers the 30-512 MHz range and is not specified for gain, but has a maximum specified SWR of 3.5.</p>
<p>The antenna as measured drops below 3.5 SWR around 20 MHz. Further, it maintains SWR up to around 600 MHz, and in theory it might be usable for GPS L1 and 2.4 GHz Wi-fi since the SWR comes down in this range.</p>
<p>It is rated for an unusually high 25 W for this type of antenna – the base is quite thick, ⌀33 mm or so at the widest point.</p>
<p>The whip seems solidly attached (possibly held with some set screws to the matching unit) and is 1.2 meters long including the gooseneck.</p>
<p>SWR performance was tested using an IC-705 Windcamp cage with a custom 3D printed aluminium mounting base, giving it a slightly larger ground plane than the previous tests. This is likely on the small end but a fairly reasonable manpack simulacrum, and this is where I currently plan to leave this antenna.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/94/IMG_8039.jpeg" alt="" width="460" height="345">
<figcaption >IC-705 Windcamp cage + TNC mount (showing Harris clone antenna)</figcaption>
</figure>
<p>The antenna basically meets the SWR performance specification, though it has relatively large SWR ripple.</p>
<p>The datasheet notes that a low loss matching network is used. This is likely why we can see 3-4 distinct resonance dips across the band rather than the smoother response of a lossily matched antenna like the Harris ones shown above.</p>
<p>The HF performance doesn't really flatten the way a resistor-matched antenna does as shown in Appendix A, also suggesting a different network is used.</p>
<p>When folded the SWR plot is very sensitive to the exact orientation, and the datasheet subtly implies the antenna is only meant for use in the unfolded position, given a velcro strap apparently isn't even offered as an option. The tape section is also pretty hard to actually break for bending.</p>
<p>Body proximity near the base seems to slightly improve the SWR of the antenna, and this case would be typical for a body-worn use case.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-22.59.26.png" data-size="1766x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-22.59.26-thumbnail.png" alt="" width="720" height="624"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.00.04.png" data-size="1766x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.00.04-thumbnail.png" alt="" width="720" height="624"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.02.08.png" data-size="1766x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.02.08-thumbnail.png" alt="" width="720" height="624"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.12.59.png" data-size="1766x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-05-at-23.12.59-thumbnail.png" alt="" width="720" height="624"></a></figure>
</div></div>
<h3 id="mcetoc_1i29rvgh4m">Comrod VHF30512HH/L</h3>
<p>This is the handheld variant of the above manpack antenna. The rated power is lower at 16 W, and the total length is around 80 cm instead of 120 cm. Gain is specified as –12-0 dBi, obviously dependent on installation type.</p>
<p>It's supplied with a velcro strap for folding, and is generally much lighter (and easier to fold). Mechanically it's a good fit for a PRC-152 type radio.</p>
<p>It seems to have a slightly different matching network vs. the manpack antenna with lower ripple. </p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.57.05.png" data-size="1916x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.57.05-thumbnail.png" alt="" width="720" height="575"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.57.34.png" data-size="1916x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.57.34-thumbnail.png" alt="" width="720" height="575"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.58.03.png" data-size="1916x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.58.03-thumbnail.png" alt="" width="720" height="575"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.58.47.png" data-size="1916x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.58.47-thumbnail.png" alt="" width="720" height="575"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.59.20.png" data-size="1916x1530"><img src="https://longview.be/media/posts/94/gallery/Screenshot-2024-07-08-at-17.59.20-thumbnail.png" alt="" width="720" height="575"></a></figure>
</div></div>
<h3 id="mcetoc_1ipf37lker">Radiall MD10-004 Flexible Whip</h3>
<p>This is an overmolded whip antenna that is available through <a href="https://www.mouser.com/ProductDetail/Radiall/MD10-004">Mouser</a> (some other models are also in stock). It is manufactured by French manufacturer Radiall, though the country of origin is in fact Mexico.</p>
<p>The MD10-004 doesn't have a public datasheet but looks basically identical to the TRI PRC-152 stock whip (and the Gizont wideband mentioned below), it's a ~13" overmolded whip specified for 30-512 MHz coverage with an 8 W power rating.</p>
<p>Build quality is quite good, with a solid feeling. The antenna is embossed with a Radiall logo and a text reading "Antenna, Wideband, 30-512 MHz).</p>
<p>Testing was performed using the IC-705 ground plane, and it shows a &gt;3 SWR across the board with &gt;2.5 at most frequencies. The response varies a bit with body proximity, the change is primarily improved SWR at various frequencies.</p>
<p>We can see from the smoothness of the plot that it's probably a <em>very</em> lossy match, the ~2:1 SWR areas look very much like a 100 Ω resistive load. The HF response is very deep hitting 3:1 below 10 MHz.</p>
<p>The antenna very much meets the requirement of "low SWR wide band", I expect it'll perform about as well as the genuine Harris 13" whip. The main difference being that this whip is more floppy, while the flat blade can be collapsed but is stiffer over all.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/MD10-004_VHF.png" alt="" width="1586" height="1538"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/MD10-004_UHF.png" alt="" width="1586" height="1538"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/MD10-004_HF.png" alt="" width="1586" height="1538"></figure>
<h2 id="mcetoc_1htm2k7cji">Appendix A: What's inside a wide-band military-style antenna?</h2>
<p>I had also purchased a Gizont wideband (30-512 MHz) whip antenna but unfortunately I broke this prior to getting proper measurements.</p>
<p>I was however able to disassemble it and figure out the circuitry, which is relatively simple:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/94/Antenna.drawio.svg" alt="" width="420" height="319"></figure>
<p>The circuit has an input low pass filter, which is probably not critical but not a bad idea. A set of 50 Ω load resistors make up the lossy element, and a 1:2 transformer (hooked up like an auto-transformer) makes a 1:9 un-un so a 450 Ω or so nominal output impedance.</p>
<p>For a shorted antenna the minimum impedance will basically be ~50 Ω to ground, and for an infinite impedance antenna the maximum load impedance then becomes ~100 Ω.</p>
<p>I think this a very similar circuit to what is used in the Harris knockoff and probably the genuine article as well. The bottom 50 Ω was made of two 100 Ω resistors, and relatively high power (2 or 5 W each).</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Harris Falcon II KDU Kit</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/harris-falcon-ii-kdu-kit.html"/>
        <id>https://longview.be/harris-falcon-ii-kdu-kit.html</id>
        <media:content url="https://longview.be/media/posts/93/20220516T170920__IMG6166_2k.jpg" medium="image" />

        <updated>2024-03-30T13:17:00+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/93/20220516T170920__IMG6166_2k.jpg" alt="" />
                    <p>This article covers the Harris Falcon II KDU, P/N 10511-1300-03 and the associated cable and KDU-adapter P/N 12065-7100-02.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/93/20220516T170920__IMG6166_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>This article covers the Harris Falcon II KDU, P/N 10511-1300-03 and the associated cable and KDU-adapter P/N 12065-7100-02.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hpk1j3bt2">Where was this used?</a></li>
<li><a href="#mcetoc_1hpk1km3h13">Pinouts</a>
<ul>
<li><a href="#mcetoc_1hpk1km3h14">KDU</a></li>
<li><a href="#mcetoc_1hpljscpj82">Cable</a></li>
<li><a href="#mcetoc_1hpk1km3h15">PRC-152 adapter pinout</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hpk1km3h16">Interfacing</a>
<ul>
<li><a href="#mcetoc_1hpljscpj83">Serial Data Output</a></li>
<li><a href="#mcetoc_1hpm01an5b8">Control interface</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hpk2bda51v">Internals</a>
<ul>
<li><a href="#mcetoc_1hq7fcsf655">KDU</a>
<ul>
<li><a href="#mcetoc_1htm627bj1">LCD</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hq7fcsf656">PRC-152 Adapter</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hq89lh2h81">KDU Mount</a></li>
<li><a href="#mcetoc_1hq7kd9rn5i">Future Work</a></li>
</ul>
</div>
<h2 id="mcetoc_1hpk1j3bt2">Where was this used?</h2>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-22.01.27.png" alt="" width="1654" height="830"></figure>
<p>Above shows a view of the Harris AN/PRC-150 HF radio, with the associated KDU installed as the operator panel.</p>
<p>You may recognise the "CCI" marking shown above the Harris logo, short for "Controlled Cryptographic Item". This is an NSA classification, and ensures that the actual PRC-150 radio will be destroyed rather than resold to civilians. Fortunately, the KDU itself is not CCI and so can be freely exported.</p>
<p>The kit I sourced includes a long cable and a KDU adapter – and the KDU seems to be identical to the PRC-150 one. The adapter looks like it might be intended to fit a PRC-152 or similar handheld radio.</p>
<p>The adapter is identified by PRC68.com in their <a href="https://prc68.com/I/HarrisRF5800VHH.shtml">Harris RF-5800V</a> article. Here they've also identified the 9+9 pad connector as the one used on the RF-5800V-HH. The RF-5800V-HH is a Falcon II predecessor to the Falcon III PRC-152 that e.g. only covers up to 108 MHz.</p>
<p>Frankly I think this adapter looks pretty ridiculous on the side of a PRC-152 but ok. <span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">It contains a bit of electronics which may be to e.g. boost the voltage from the PRC-152 (~11 V) to the 26.5 V the Falcon II KDU wants. I think it also converts TTL levels from the PRC-152 to the RS-422 levels the KDU uses.</span></p>
<p>As such it's most likely the kit I received was sold for use with PRC-152 radios, it seems to be most sensible when used with the VRC-110 vehicle mounting kit, where Harris marketing shows a configuration including this kit. Note also the weird plugs near the antenna, I think this is an inline adapter that keeps the antenna plugged into the radio, but routes the RF through the amplifier pack.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-22.23.47-2.png" alt="" width="443" height="462"></figure>
<p>This KDU is also specified for use with the PRC-117 (RF-7800M-MP) which is also part of the Falcon III series:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-22.07.00.png" alt="" width="346" height="272"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-22.06.47.png" alt="" width="309" height="170"></figure>
<h2 id="mcetoc_1hpk1km3h13">Pinouts</h2>
<h3 id="mcetoc_1hpk1km3h14">KDU</h3>
<p>The KDU uses a 7 pin ODU <em>MINI-SNAP® F</em> panel connector on the left side. I believe a K20F1C-P07LCC0-400S 7 socket, shell size 0, orientation 1 plug is what fits on the KDU, but I haven't bought one to test.</p>
<p>The listed P/N to plug onto the <em>radio</em> end is a S10F1C-P07MCC0-4000, presumably the radio has a socket connector since that P/N is a pin connector that will not fit the KDU.</p>
<p>I found it more cost effective to just buy a second KDU+cable kit just to get a cable to reuse.</p>
<p>The rear pin seems to be a slightly custom modification, it's the same connector but with sockets and inside a plug shell without any connector retention features. I believe the panel mount G10F1C-P07<strong>M</strong>CC0-0000 or the cable mount K10F1C-P07<strong>M</strong>CC0-5000 will fit. Both of these seem to be unobtainium at the time of writing, but you could harvest the panel mount connector from the PRC-152 adapter since that will fit.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-21.52.47-2.png" alt="" width="283" height="282"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-21.52.29-2.png" alt="" width="276" height="277"></figure>
<p>Above shows the pinout for looking into the face of socket and pin connectors.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-22-at-21.54.45-2.png" alt="" width="1200" height="384"></figure>
<p>Above an excerpt from Appendix A of the PRC-150 Operation Manual (10515-0103-4100) shows the KDU pinout. Not sure why RS-485 is listed given it seems to be a RS-422 interface.</p>
<h3 id="mcetoc_1hpljscpj82">Cable</h3>
<p>The cable P/N 10511-0704-040 (40 feet?) rev T is a thin and weird but nice feeling socket-socket cable.</p>
<p>It has shielding and an internal drain wire, and 6 coloured wires.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 33.2855%;">Wire Colour</td>
<td style="width: 33.2855%;">Socket No.</td>
<td style="width: 33.2866%;">Function (ref Table A-7)</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #000000;">█ </span>Black</td>
<td style="width: 33.2855%;">1</td>
<td style="width: 33.2866%;">KDU TX+</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #ffffff;"><span style="color: #ecf0f1;">█</span> </span>White</td>
<td style="width: 33.2855%;">2</td>
<td style="width: 33.2866%;">KDU TX-</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #e03e2d;">█ </span>Red</td>
<td style="width: 33.2855%;">3</td>
<td style="width: 33.2866%;">Grounded in KDU</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #95a5a6;">█ </span>Shield/Drain Wire</td>
<td style="width: 33.2855%;">Case &amp; 4</td>
<td style="width: 33.2866%;">Ground, power return</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #784a00;">█ </span>Brown</td>
<td style="width: 33.2855%;">5</td>
<td style="width: 33.2866%;">KDU RX+</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #3598db;">█ </span>Blue</td>
<td style="width: 33.2855%;">6</td>
<td style="width: 33.2866%;">KDU RX-</td>
</tr>
<tr>
<td style="width: 33.2855%;"><span style="color: #e67e23;">█ </span>Orange</td>
<td style="width: 33.2855%;">7</td>
<td style="width: 33.2866%;">+26.5 V supply</td>
</tr>
</tbody>
</table>
<p>To verify you've got things mostly right, check Red to Ground, I read around 47 Ω. RX+/RX- should have around 220 Ω across it.</p>
<h3 id="mcetoc_1hpk1km3h15">PRC-152 adapter pinout</h3>
<p>The PRC-152 aux connector is not publicly documented as far as I know, but we can infer some of the pins from analysis of the adapter used here.</p>
<p>As mentioned above, the 9+9 pad connector is identified by PRC68: <a href="https://prc68.com/I/HarrisRF5800VHH.shtml">Harris RF-5800V</a> so we know what goes there.</p>
<p>The pad numbering is labelled on the adapter PCB, and looking at the radio it looks like this:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 24.9643%;">19</td>
<td style="width: 24.9643%;">30</td>
<td style="width: 24.9643%;">31</td>
<td style="width: 24.9643%;">32</td>
</tr>
<tr>
<td style="width: 24.9643%;">25</td>
<td style="width: 24.9643%;">26</td>
<td style="width: 24.9643%;">27</td>
<td style="width: 24.9643%;">28/GND</td>
</tr>
<tr>
<td style="width: 24.9643%;">21</td>
<td style="width: 24.9643%;">22</td>
<td style="width: 24.9643%;">23</td>
<td style="width: 24.9643%;">24</td>
</tr>
<tr>
<td style="width: 24.9643%;">17</td>
<td style="width: 24.9643%;">18</td>
<td style="width: 24.9643%;">19</td>
<td style="width: 24.9643%;">20</td>
</tr>
<tr>
<td style="width: 24.9643%;">-</td>
<td style="width: 24.9643%;">-</td>
<td style="width: 24.9643%;">-</td>
<td style="width: 24.9643%;">-</td>
</tr>
<tr>
<td style="width: 24.9643%;">13/DC out?</td>
<td style="width: 24.9643%;">14</td>
<td style="width: 24.9643%;">15</td>
<td style="width: 24.9643%;">16</td>
</tr>
<tr>
<td style="width: 24.9643%;">9</td>
<td style="width: 24.9643%;">10</td>
<td style="width: 24.9643%;">11</td>
<td style="width: 24.9643%;">12</td>
</tr>
<tr>
<td style="width: 24.9643%;">5</td>
<td style="width: 24.9643%;">6</td>
<td style="width: 24.9643%;">7</td>
<td style="width: 24.9643%;">8/GND</td>
</tr>
<tr>
<td style="width: 24.9643%;">1</td>
<td style="width: 24.9643%;">2</td>
<td style="width: 24.9643%;">3</td>
<td style="width: 24.9643%;">4</td>
</tr>
</tbody>
</table>
<p>I didn't bother trying to probe out every connection, but this board and the adapter to the old-style expansion port with a known pinout does provide a partial Rosetta stone that could be used to work out most of the pin functions.</p>
<p>This numbering scheme is consistent with the 2x9 pad connector listed in PRC68.</p>
<h2 id="mcetoc_1hpk1km3h16">Interfacing</h2>
<p>The KDU will power up at around 12 V minimum. On startup it doesn't seem to do much other than show a Harris logo. The serial port seems to operate at 19200-8N1.</p>
<p>When keys are pressed, a sequence of bytes is output where two bytes seem to indicate which key was pressed.</p>
<p>This is actually somewhat similar to the <a href="https://longview.be/tri-anprc-152-20222023-model.html">TRI PRC-152 KDU</a> interface, though that KDU uses ASCII outputs for the keys, and it continuously transmits the state instead of being reactive.</p>
<h3 id="mcetoc_1hpljscpj83">Serial Data Output</h3>
<p>The KDU outputs a short packet whenever a key is pressed – pressing multiple keys seems to d0 nothing.</p>
<p>The output seems to always start with:</p>
<pre class="language-clike"><code>0x88 08 24 01 25 xx xx xx</code></pre>
<p>The last three bytes seem to change in sequence with some internal key number, for example the '0' key outputs 0D 46 E7, and the 1 key sends a 0E 47 E8. This seems redundant, so presumably some checksum is part of this payload.</p>
<p>The sequence for '0' without the last two bytes:</p>
<pre class="language-clike"><code>0x88 08 24 01 25 0D</code></pre>
<p>Has a sum of bytes (modulo 256) of E7, the last byte is therefore likely the sum of the packet bytes, excluding the last two bytes.</p>
<p>The purpose of the second to last byte is not known, it seems to always be 0xA1 less than the last byte, or 0x39 larger than the key byte.</p>
<p>The table below lists the 6th byte of the emitted string and the corresponding physical key:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 5.56348%;">0</td>
<td style="width: 11.2696%;">0x0D</td>
<td style="width: 5.56348%;">1</td>
<td style="width: 10.9843%;">0x0E</td>
<td style="width: 5.70613%;">2</td>
<td style="width: 10.8417%;">0x0F</td>
<td style="width: 5.70613%;">3</td>
<td style="width: 10.9843%;">0x10</td>
<td style="width: 5.70613%;">&lt;</td>
<td style="width: 10.9843%;">0x11</td>
<td style="width: 5.70613%;">&gt;</td>
<td style="width: 10.9843%;">0x12</td>
</tr>
<tr>
<td style="width: 5.56348%;">V+</td>
<td style="width: 11.2696%;">0x07</td>
<td style="width: 5.56348%;">4</td>
<td style="width: 10.9843%;">0x08</td>
<td style="width: 5.70613%;">5</td>
<td style="width: 10.8417%;">0x09</td>
<td style="width: 5.70613%;">6</td>
<td style="width: 10.9843%;">0x0A</td>
<td style="width: 5.70613%;">CLR</td>
<td style="width: 10.9843%;">0x0B</td>
<td style="width: 5.70613%;">P+</td>
<td style="width: 10.9843%;">0x0C</td>
</tr>
<tr>
<td style="width: 5.56348%;">V-</td>
<td style="width: 11.2696%;">0x01</td>
<td style="width: 5.56348%;">7</td>
<td style="width: 10.9843%;">0x02</td>
<td style="width: 5.70613%;">8</td>
<td style="width: 10.8417%;">0x03</td>
<td style="width: 5.70613%;">9</td>
<td style="width: 10.9843%;">0x04</td>
<td style="width: 5.70613%;">ENT</td>
<td style="width: 10.9843%;">0x05</td>
<td style="width: 5.70613%;">P-</td>
<td style="width: 10.9843%;">0x06</td>
</tr>
</tbody>
</table>
<h3 id="mcetoc_1hpm01an5b8">Control interface</h3>
<p>I decided to just linear fuzz the interface to see what happened, this could potentially take years to cover all combinations so it's not a great way to accomplish anything really.</p>
<p>Sending:  b'8e62000000000000'<br>Received: b'88 08 24 01 26 00 3b db' (NACK)</p>
<p>Corrupted data in upper left section of the logo some time after this. The sequence did not return anything on the next attempt.</p>
<p>Continuing through xx77000000000000 entire screen starts going weird. Repeating from 0x85 60 did not make the same thing happen – it seems to crash after some time fuzzing. Likely the length byte being set too long causes an overflow.</p>
<p>Sending:  b'8808240125000156'<br>Received: b'<strong>88 08 24 01 26 00 3b db</strong> – maybe a NACK? This response seems to happen a lot when fuzzing this region.</p>
<p>Hot-plugging:</p>
<p>Received: b'88 08 24 01 26 00 3b db fc' one time - looks like last byte is in errorReceived: b'<strong>88 09 24 01 24 00 00 17 da</strong>' every hot-plug event.</p>
<p>NACK from: b'e3083e9acb930021' to b' e3 08 3e 9a cb 93 00 21'<br><br>Received: b'3030. <strong>88 08 24 01 26 01 3c dc</strong> 8808240126013cdc' then crashed. Delta A0</p>
<p>Byte 2 seems to be total packet length.</p>
<p>After this effort, I decided that this was pointless, and decided to instead attempt to dump the flash memory of the device. Failing this, I will simply make my own controller PCB. Stay tuned for future articles on this topic.</p>
<h2 id="mcetoc_1hpk2bda51v">Internals</h2>
<h3 id="mcetoc_1hq7fcsf655">KDU</h3>
<p>The KDU itself it pretty easy to take apart, and uses a flex-PCB for connector interfacing, a main PCB with interfaces, processor, and display. All you have to remove to get at the internals is the four corner screws, using a 7⁄64" allen key.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7422.jpeg" data-size="3024x3544"><img src="https://longview.be/media/posts/93/gallery/IMG_7422-thumbnail.jpeg" alt="" width="720" height="844"></a>
<figcaption>KDU after removing front panel</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7423.jpeg" data-size="3024x3224"><img src="https://longview.be/media/posts/93/gallery/IMG_7423-thumbnail.jpeg" alt="" width="720" height="768"></a>
<figcaption>Rear of keypad assembly</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7424.jpeg" data-size="3024x2930"><img src="https://longview.be/media/posts/93/gallery/IMG_7424-thumbnail.jpeg" alt="" width="720" height="698"></a>
<figcaption>Housing with flex-PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7425.jpeg" data-size="2569x2259"><img src="https://longview.be/media/posts/93/gallery/IMG_7425-thumbnail.jpeg" alt="" width="720" height="633"></a>
<figcaption>Rear of controller</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7426.jpeg" data-size="3024x2540"><img src="https://longview.be/media/posts/93/gallery/IMG_7426-thumbnail.jpeg" alt="" width="720" height="605"></a>
<figcaption>Processor</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7427.jpeg" data-size="3024x1948"><img src="https://longview.be/media/posts/93/gallery/IMG_7427-thumbnail.jpeg" alt="" width="720" height="464"></a>
<figcaption>Backlight connection</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7430.jpeg" data-size="3024x3206"><img src="https://longview.be/media/posts/93/gallery/IMG_7430-thumbnail.jpeg" alt="" width="720" height="763"></a>
<figcaption>DC/DC converter</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7431.jpeg" data-size="3024x3496"><img src="https://longview.be/media/posts/93/gallery/IMG_7431-thumbnail.jpeg" alt="" width="720" height="832"></a>
<figcaption>Back of DC/DC converter</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7432.jpeg" data-size="3024x3217"><img src="https://longview.be/media/posts/93/gallery/IMG_7432-thumbnail.jpeg" alt="" width="720" height="766"></a>
<figcaption>Rear of controller</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7433.jpeg" data-size="3024x2790"><img src="https://longview.be/media/posts/93/gallery/IMG_7433-thumbnail.jpeg" alt="" width="720" height="664"></a>
<figcaption>Keypad connector</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7434.jpeg" data-size="3024x2784"><img src="https://longview.be/media/posts/93/gallery/IMG_7434-thumbnail.jpeg" alt="" width="720" height="663"></a>
<figcaption>SRAM</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7435.jpeg" data-size="3024x2083"><img src="https://longview.be/media/posts/93/gallery/IMG_7435-thumbnail.jpeg" alt="" width="720" height="496"></a>
<figcaption>Back of LCD module</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7436.jpeg" data-size="3024x2506"><img src="https://longview.be/media/posts/93/gallery/IMG_7436-thumbnail.jpeg" alt="" width="720" height="597"></a>
<figcaption>Under LCD: Flash memory</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7437.jpeg" data-size="2880x1813"><img src="https://longview.be/media/posts/93/gallery/IMG_7437-thumbnail.jpeg" alt="" width="720" height="453"></a>
<figcaption>IC's next to flash memory</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7438.jpeg" data-size="3024x2433"><img src="https://longview.be/media/posts/93/gallery/IMG_7438-thumbnail.jpeg" alt="" width="720" height="579"></a>
<figcaption>LCD connector</figcaption>
</figure>
</div></div>
<p>The keypad is a separate PCB inside a cast enclosure with a 0.1" header acting as a board to board connector, when taking the front panel off the keypad connector is to the lower left and should be levered loose first to avoid bending it.</p>
<p>The external connectors are paralleled via a flex-rigid assembly and connects to a 2-row 0.05" pin header.</p>
<p>A shielded can contains a DC/DC converter controlled by a LT1676. A MAX680 charge pump is probably used for LCD biasing, and there's two LDO's.</p>
<p>A MAX3488 slew-rate limited RS-422 transceiver is no surprise, but this is a nice part since it has limited slew rate for improved EMI performance.</p>
<p>A Freescale MC68311 processor (MC68CK331CAG16) with external flash and SRAM is used to drive the display and read the keypad – given the era (~2001?) this is not a surprising choice. There is a small header on the corner of the PCB that may be a JTAG port.</p>
<p>The SRAM is a CY62146 4 Mbit type, and the M29W160EB 16 Mbit flash is under the LCD. Other highlights include a DS1276 "DigiPOT" type DAC, which probably controls the LCD contrast and maybe the backlight, and a 93C86 2 kb SPI EEPROM for parameter storage.</p>
<h4 id="mcetoc_1htm627bj1">LCD</h4>
<p>The LCD is connected via a low profile 20 pin header (0.05" pitch). There is a 4 pin connector coming off the LCD. I spent a lot of time trying to work out what this was for, before finally dismantling the LCD module a bit more.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/IMG_7788.jpeg" alt="" width="598" height="380"></figure>
<p>The two red lines measure approximately 470 Ω, and the two white ones measure around 290 Ω. Given their location immediately behind the LCD, this would seem to be an LCD-heater. Probably intended to keep the LCD working well across the whole temperature range.</p>
<p>The part number seems to be <em>1223H1+DG</em>, which leads to a couple of places. The 1223 part suggests this may be a 122x32 display, and given the age of the design it's likely to be built as two 122x16 strips with a separate controller. There is a 3.3 V logic to 5 V buffer on the LCD, meaning 3.3 V logic can be used to drive the control lines, but the data bus is 5 V. A bidirectional level shifter is used to convert between the levels in both directions.</p>
<p>The OEM seems to be Phico, and the closest datasheet I could find is the <a href="https://pacificdisplay.com/gdm/GDM-12232-10.pdf">Pacific Devices 12232-10</a>. This indicates that a SED1520 controller is used.</p>
<p class="msg msg--info">Having acquired additional KDU's, another variant of the LCD was found as well. The different modules are form-fit-function compatible, but seem to my eyes to have slightly worse contrast than the older Phico unit. On the other hand, the backlight is slightly brighter and more uniform. </p>
<p>A probe around the LCD module and board suggests that the pinout listed in that datasheet is applicable here too. Do note that the pin markings on the controller board are mirrored vs. the LCD markings, I used the LCD markings as my reference.</p>
<p>The LCD cover glass has some type of plastic coating on it that is solvable in isopropanol, on some of the units this was annoyingly opaque and reduced the apparent contrast of the LCD in indoor environments.</p>
<p class="msg msg--warning">The plastic coating will be severely fogged if exposed to isopropyl alcohol (and probably acetone). Naphtha based brake-cleaner did not seem to affect it. </p>
<p>I removed it and found that the visual quality of the slightly worse performing newer LCD's was improved. This coating may be intended to reduce specular glare? </p>
<figure class="post__image" ><img src="https://longview.be/media/posts/93/IMG_7845.jpeg" alt="" width="434" height="452">
<figcaption >Plastic coating severely fogged after exposure to IPA, partially removed.</figcaption>
</figure>
<figure class="post__image" ><img src="https://longview.be/media/posts/93/IMG_7846.jpeg" alt="" width="619" height="442">
<figcaption >Coating removed (left) and original coating (right) showing a specular reflection from a microscope ring light. Both units had the same LCD type and optimised contrast adjustment.</figcaption>
</figure>
<h3 id="mcetoc_1hq7fcsf656">PRC-152 Adapter</h3>
<p>The PRC-152 adapter is a pretty complex flex &amp; PCB assembly.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7504.jpeg" data-size="2723x2958"><img src="https://longview.be/media/posts/93/gallery/IMG_7504-thumbnail.jpeg" alt="" width="720" height="782"></a>
<figcaption>PRC-152 connector pins</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7505.jpeg" data-size="2868x1758"><img src="https://longview.be/media/posts/93/gallery/IMG_7505-thumbnail.jpeg" alt="" width="720" height="441"></a>
<figcaption>Old style 9+9 pad connector</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7506.jpeg" data-size="2867x2038"><img src="https://longview.be/media/posts/93/gallery/IMG_7506-thumbnail.jpeg" alt="" width="720" height="512"></a>
<figcaption>Mounting screw</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7507.jpeg" data-size="3024x1819"><img src="https://longview.be/media/posts/93/gallery/IMG_7507-thumbnail.jpeg" alt="" width="720" height="433"></a>
<figcaption>P/N and serial number</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7509.jpeg" data-size="2557x2413"><img src="https://longview.be/media/posts/93/gallery/IMG_7509-thumbnail.jpeg" alt="" width="720" height="679"></a>
<figcaption>ODU 7 pin connector</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7510.jpeg" data-size="2711x2887"><img src="https://longview.be/media/posts/93/gallery/IMG_7510-thumbnail.jpeg" alt="" width="720" height="767"></a>
<figcaption>Cover removed, greasy gasket</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7511.jpeg" data-size="3024x2246"><img src="https://longview.be/media/posts/93/gallery/IMG_7511-thumbnail.jpeg" alt="" width="720" height="535"></a>
<figcaption>Flex PCB over controller</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7514.jpeg" data-size="3024x4032"><img src="https://longview.be/media/posts/93/gallery/IMG_7514-thumbnail.jpeg" alt="" width="720" height="960"></a>
<figcaption>Old style connector removed by unscrewing two screws and center nut</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7515.jpeg" data-size="2716x1979"><img src="https://longview.be/media/posts/93/gallery/IMG_7515-thumbnail.jpeg" alt="" width="720" height="525"></a>
<figcaption>Flex-PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7516.jpeg" data-size="2576x1614"><img src="https://longview.be/media/posts/93/gallery/IMG_7516-thumbnail.jpeg" alt="" width="720" height="451"></a>
<figcaption>Flex-PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7517.jpeg" data-size="2727x1500"><img src="https://longview.be/media/posts/93/gallery/IMG_7517-thumbnail.jpeg" alt="" width="720" height="396"></a>
<figcaption>Flex-PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7519.jpeg" data-size="2185x2122"><img src="https://longview.be/media/posts/93/gallery/IMG_7519-thumbnail.jpeg" alt="" width="720" height="699"></a>
<figcaption>Rear of ODU connector</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7520.jpeg" data-size="3024x2679"><img src="https://longview.be/media/posts/93/gallery/IMG_7520-thumbnail.jpeg" alt="" width="720" height="638"></a>
<figcaption>PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7521.jpeg" data-size="3024x2529"><img src="https://longview.be/media/posts/93/gallery/IMG_7521-thumbnail.jpeg" alt="" width="720" height="602"></a>
<figcaption>PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7522.jpeg" data-size="2696x3265"><img src="https://longview.be/media/posts/93/gallery/IMG_7522-thumbnail.jpeg" alt="" width="720" height="872"></a>
<figcaption>Housing without PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7523.jpeg" data-size="2835x1838"><img src="https://longview.be/media/posts/93/gallery/IMG_7523-thumbnail.jpeg" alt="" width="720" height="467"></a>
<figcaption>Pogo pin assembly</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7524.jpeg" data-size="2624x1492"><img src="https://longview.be/media/posts/93/gallery/IMG_7524-thumbnail.jpeg" alt="" width="720" height="409"></a>
<figcaption>Pogo pin assembly</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7525.jpeg" data-size="2353x1721"><img src="https://longview.be/media/posts/93/gallery/IMG_7525-thumbnail.jpeg" alt="" width="720" height="527"></a>
<figcaption>PCB</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7526.jpeg" data-size="2786x1470"><img src="https://longview.be/media/posts/93/gallery/IMG_7526-thumbnail.jpeg" alt="" width="720" height="380"></a>
<figcaption>PCB</figcaption>
</figure>
</div></div>
<p>It contains a ISL4223 dual TTL-RS232 converter, and a ISL83071E full-duplex RS-422 transceiver. One set of the 4223 is presumably converting RS-232 from the PRC-152 to the RS-422 that the KDU wants. The function of the other set of RS-232 transceivers is not known at this time.</p>
<p>It also has a LT3012B linear regulator presumably making the logic supply for the serial converters, and some type of mystery-IC marked 59IAJ or 591AJ that looks like it's wired as a boost converter with a 4 µH inductor. The latter presumably makes the 26.5 V that the KDU wants from the radios ~12 V battery supply.</p>
<p>The ODU connector used in this adapter can be harvested for use on the rear port of the KDU. </p>
<p>The PCB markings around the 2⨉16 pad PRC-152 connector does give a somewhat authoritative reference for the pad numbering, seemingly starting at the bottom left of the radio port at pin 1, counting to the right and returning to the left for pin 5.</p>
<p>There are several transistors and diodes around the place, a lot of these are probably for protection, but it seems the main function of the device is to convert RS-232 signals from the PRC-152 to RS-422 signals for the KDU, and to boost the battery voltage to 26.5 V.</p>
<h2 id="mcetoc_1hq89lh2h81">KDU Mount</h2>
<p>A simple mount has been modelled for your convenience, it can be 3D printed as required, I used PETG.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7527.jpeg" data-size="3024x3379"><img src="https://longview.be/media/posts/93/gallery/IMG_7527-thumbnail.jpeg" alt="" width="720" height="804"></a>
<figcaption>Connector with flex still attached</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7528.jpeg" data-size="3024x2294"><img src="https://longview.be/media/posts/93/gallery/IMG_7528-thumbnail.jpeg" alt="" width="720" height="546"></a>
<figcaption>Lemo 6+screen AWG 26 cable very painfully soldered onto the PCB pins. Yellow replaces Brown in this case.</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7531.jpeg" data-size="3024x2484"><img src="https://longview.be/media/posts/93/gallery/IMG_7531-thumbnail.jpeg" alt="" width="720" height="591"></a>
<figcaption>Mount with pins and connector block installed</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/93/gallery/IMG_7529.jpeg" data-size="3024x2711"><img src="https://longview.be/media/posts/93/gallery/IMG_7529-thumbnail.jpeg" alt="" width="720" height="645"></a>
<figcaption>Connector block installed with M12 cable gland</figcaption>
</figure>
</div></div>
<p>It's not a complex design, and is printed in several parts and screwed together, this allows for ease of design iteration but could perhaps be optimised for parts count. I also made an attempt at making drawings.</p>
<p>Download here: <a href="https://longview.be/FCII_Mount_v1.zip">FCII_Mount_v1.zip</a></p>
<p>It also requires some screws, all DIN912 spec:</p>
<ol>
<li>2 pcs M2⨉10 for mounting the Connector_Adapter to the Connector_M12 block</li>
<li>6 pcs M4⨉16 for mounting the M12 block to the Block, and for screwing on the stands</li>
<li>6 pcs M3⨉16 for screwing on the support posts and pins</li>
<li>1 pcs M12⨉1.5 mm cable gland or similar to hold the cable</li>
</ol>
<p>You will likely also need taps for M3, M4, and M12x1.5 to clean up the holes. The M2 holes are fine to just screw right in. I found going slow and using lubricant is a good idea for PETG, most taps get pretty warm tapping it and eventually it can start to melt the plastics instead of cutting them.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-30-at-18.40.00.png" alt="" width="588" height="467"></figure>
<p>Above the light blue Block (main body) is shown, with a darker blue Pin part. The Pin (2 pcs) mates with the hole-sliders on the KDU. The Pins are retained using M3 screws, and are deliberately slightly long.</p>
<p>I place 1 mm thick foam along the sides to provide a cushion (spring), and the tightness of the pin screws can be used to fine tune the fit.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/93/Screenshot-2024-03-30-at-18.39.37.png" alt="" width="554" height="440"></figure>
<p>Above the interface for reusing the PRC-152 connector is shown, it has two parts, an "Adapter" that the ODU connector is screwed into (grey) and a M12 block that screws into the main Block.</p>
<p>There is no rotation indexing for the ODU connector, so the rotation is set by the front nut for the connector — I installed it hand tight, then rotated it into alignment using the connector block when mated, then went back and tightened the nut a bit more. It's a bit fiddly. Be careful installing the cable gland to prevent rotating the wire.</p>
<p>Additionally, some at present untested feet may hold the KDU at a reasonable angle for desk mounting, with flats for taping or M4 screw holes for screw mounting. Some 50 mm long M3 posts are used to provide sideways stability (also untested).</p>
<h2 id="mcetoc_1hq7kd9rn5i">Future Work</h2>
<p><span style="text-decoration: line-through;">As mentioned above, I plan to dump the ROM of the KDU to see if I can work out the command interface. This would make it quite practical to repurpose these displays for hobbyist projects or to control other existing radios.</span> I decided to replace the internal electronics, see <a href="https://longview.be/devlog-2-the-falcon-ii-kdu.html">Devlog 2</a>.</p>
<p>I am working on my own <em>heavily</em> modified TRI AN/PRC-152 and had planned on making the PRC-152 adapter compatible as is, but I have decided to re-make the adapter since this will let me freely use my own pinout.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Macintosh IIfx Astec Power Supply</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/macintosh-iifx-astec-power-supply.html"/>
        <id>https://longview.be/macintosh-iifx-astec-power-supply.html</id>
        <media:content url="https://longview.be/media/posts/91/20230930_135838.jpg" medium="image" />
            <category term="Old Mac"/>

        <updated>2023-10-25T19:35:52+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/91/20230930_135838.jpg" alt="" />
                    <p>This is an overview of my efforts to re-cap and fix a connector issue with the Macintosh IIfx Astec manufactured power supply.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/91/20230930_135838.jpg" class="type:primaryImage" alt="" /></p>
                <p>This is an overview of my efforts to re-cap and fix a connector issue with the Macintosh IIfx Astec manufactured power supply.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hdjr9ci12g">Introduction</a></li>
<li><a href="#mcetoc_1hdjsf16cdb">The TFX Replacement, Thoughts</a></li>
<li><a href="#mcetoc_1hdjsf16cdc">Astec Issues</a>
<ul>
<li><a href="#mcetoc_1hdjsf16cdd">Electrolytic Capacitor Replacement</a></li>
<li><a href="#mcetoc_1hdjtn2obid">Wiring Harness Issues</a></li>
<li><a href="#mcetoc_1hdjtn2obie">Power Supply Connector Replacement</a></li>
<li><a href="#mcetoc_1hdju557qj3">Pinouts &amp; Testing</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hfgu4d8fo">Photos</a></li>
</ul>
</div>
<h2 id="mcetoc_1hdjr9ci12g">Introduction</h2>
<p>The Macintosh IIfx is a high performance 68030 based Mac II system with several NuBus option card connectors. This combination makes it a pretty hungry boi.</p>
<p>From what I've seen online most/many IIfx's come with a Sony power supply.</p>
<p>My IIfx came with an Astec AA13780 (or perhaps AAI3780, hard to say). Apple part number 699-0389. It looks to be a 1988 vintage, made in Hong Kong.</p>
<p>It came with a very loud fan, I replaced it with an 80 mm Noctua fan. There is an internal 12 V header that powers the fan. In theory this is supposed to be speed controlled, it kind of works.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//IMG_6156.jpeg" alt="" width="1024" height="505"></figure>
<p>The ratings are shown above, note the high 18 A rating on the +5 V rail. Some <a href="https://www.tek-tips.com/viewthread.cfm?qid=912147">old forum posts</a> suggest these ratings are average power, with an even higher peak current rating.</p>
<p>After some months in operation the computer started shutting off randomly some time between 15 and 60 minutes. Around this time I had temporarily lost interest, so I put the machine away for a few years.</p>
<h2 id="mcetoc_1hdjsf16cdb">The TFX Replacement, Thoughts</h2>
<p>Digging it out now, I had intended to perform a TXF power supply replacement, as documented here: <a href="https://www.instructables.com/Macintosh-IIfx-Modern-Power-Supply-Replacement/">Macintosh II(fx) Modern Power Supply Replacement</a>.</p>
<p>I acquired the Inter-Tech power supply specified, but upon taking a closer look at my existing power supply issues I became concerned about the safety of this modification.</p>
<p>The TFX supply used is only rated for 15 A on the 5 V rail, and it is likely that overloading of the –12 V rail will occur as well. Note that many computer power supplies do not monitor the –12 V rail and will die randomly if this is overloaded.</p>
<p>I was also concerned with the very thin wire cross sections used by the TFX power supply compared to the original which used AWG 18 (approximately 1 mm²).</p>
<p>Additionally I have comments on the choice of crimp pins, the cheapest standard pins are likely to cause issues in the long run (the linked article doesn't specify exactly pins to purchase).</p>
<p>I appreciate the work the original author of the TFX modification did, and the 3D prints provided worked well. However, I would not recommend this modification be performed unless absolutely necessary.</p>
<p>I recommend the following checks be performed when performing that modification:</p>
<ul>
<li>Ensure the power supply can supply minimum 15 A continuously, or measure actual load current.</li>
<li>Ensure AWG 18 or 20 hookup wire is used for 5 V and ground returns (may involve replacing the pre-attached wires).</li>
<li>Use Trifurcon contacts for the new connector (see later section of this article).</li>
<li>If the existing PSU connector has signs of overheating, replace the motherboard header before proceeding.</li>
<li>Measure –12 V current draw in system, if the draw exceeds 0.3 A then you'll need to generate the –12 V using a DC/DC converter powered from e.g. the +12 V rail.</li>
<li>Consider fusing the +12 V supply; if a short were to occur in the machine (e.g. in the hard drive) there is a real risk of vaporising the motherboard traces since they will only be rated for the original supply's current limits.</li>
</ul>
<p>I instead elected to repair the existing power supply, despite having the required parts to perform the TFX swap.</p>
<h2 id="mcetoc_1hdjsf16cdc">Astec Issues</h2>
<p>To get my Astec supply up and running I did two things, first was a replacement of all electrolytic capacitors. Second, I replaced the DC output harness along with the connector to the motherboard.</p>
<p>The power supply is generally quite well built and my unit was in good shape overall.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//IMG_6160.jpeg" alt="" width="602" height="452"></figure>
<h3 id="mcetoc_1hdjsf16cdd">Electrolytic Capacitor Replacement</h3>
<p>Since I couldn't find a capacitor list for this model, I made one myself and ordered the required capacitors off Digi-Key, I chose to use all 105 °C long-life capacitors from Chemicon or Rubycon.</p>
<p>After removal I checked the capacitance and impedance of all the capacitors, and found no obviously bad units. C23, C28 and C306 did seem to be fairly mediocre with high ESR and reduced capacitance. These two were coincidentally the only 85 °C rated capacitors in the power supply.</p>
<p>The replacement parts I ordered and their reference designators are shown below.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 33.9515%;"><strong>New Part Number</strong></td>
<td style="width: 9.41512%;"><strong>Pcs.</strong></td>
<td style="width: 15.9869%;"><strong>Reference Designator</strong></td>
<td style="width: 20.247%;"><strong>Rating</strong></td>
<td style="width: 20.3994%;"><strong>Comment</strong></td>
</tr>
<tr>
<td style="width: 33.9515%;">EKYB160ELL222MJ30S</td>
<td style="width: 9.41512%;">2</td>
<td style="width: 15.9869%;">C5, C22</td>
<td style="width: 20.247%;">16 V, 2200 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
<tr>
<td style="width: 33.9515%;">LGR2D821MELB40</td>
<td style="width: 9.41512%;">2</td>
<td style="width: 15.9869%;">C9, C10</td>
<td style="width: 20.247%;">200 V, 820 µF</td>
<td style="width: 20.3994%;">Difficult to replace</td>
</tr>
<tr>
<td style="width: 33.9515%;">50YXM22MEFRT15X11</td>
<td style="width: 9.41512%;">1</td>
<td style="width: 15.9869%;">C23, C28</td>
<td style="width: 20.247%;">25 V, 22 µF</td>
<td style="width: 20.3994%;">C23 near +12 V output</td>
</tr>
<tr>
<td style="width: 33.9515%;">EKYB101ELL270MHB5D</td>
<td style="width: 9.41512%;">1</td>
<td style="width: 15.9869%;">C17</td>
<td style="width: 20.247%;">100 V, 22 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
<tr>
<td style="width: 33.9515%;">EKYB350ELL271MH15D</td>
<td style="width: 9.41512%;">2</td>
<td style="width: 15.9869%;">C310/C311</td>
<td style="width: 20.247%;">25 V, 220 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
<tr>
<td style="width: 33.9515%;">ELE-500ELL3R3ME11D</td>
<td style="width: 9.41512%;">1</td>
<td style="width: 15.9869%;">C306</td>
<td style="width: 20.247%;">50 V, 2.2 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
<tr>
<td style="width: 33.9515%;">EKYB350ELL332MLN3S</td>
<td style="width: 9.41512%;">2</td>
<td style="width: 15.9869%;">C20, C22</td>
<td style="width: 20.247%;">35 V, 2200 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
<tr>
<td style="width: 33.9515%;">EKYB350ELL222MK35S</td>
<td style="width: 9.41512%;">1</td>
<td style="width: 15.9869%;">C26</td>
<td style="width: 20.247%;">16 V, 2200 µF</td>
<td style="width: 20.3994%;"> </td>
</tr>
</tbody>
</table>
<p>I found C9 and C10 to be difficult to replace and I don't recommend replacing them unless necessary. The other capacitors were relatively easy to remove with a simple <a href="https://jonard.com/desolder-pumps-desolder-pump">Jonard solder pump</a> (highly recommended). As mentioned above all the Chemicon 105 °C capacitors measured fine in my unit. C23, C28, and C306 were 85 °C rated, and readings were suspect, having a higher than expected ESR.</p>
<p>I also did a once-over with flux and solder to check all the joints in the supply, I found no signs of bad joints, though a handful of leads seemed to have had sub-standard solderability when originally manufactured.</p>
<p>Also note that these models contain Rifa capacitors which are prone to smelly failure. Capacitor C13 should be replaced with a <a href="https://68kmla.org/bb/index.php?threads/mac-ii-699-0389-psu-astec-aa13780-cap-question.34749/">22 nF 250 V X2 class film capacitor</a>, it can be temporarily removed without functional issues.</p>
<h3 id="mcetoc_1hdjtn2obid">Wiring Harness Issues</h3>
<p>Upon removing the supply (intent on doing the TFX conversion) I found some concerning burn-marks on several of the ground return pins:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//IMG_6153-2.jpeg" alt="" width="588" height="390"></figure>
<p>Seeing this I realised it was sus, and this could well be the cause of the random shutdowns. The burns are not visible when the supply is installed in the machine, since they are on the bottom of the connector.</p>
<p>I decided to attempt to replace the cabling along with the electrolytics.</p>
<p>A root-cause analysis was performed on the original cable and motherboard pin header, and both were removed.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//IMG_6173.jpeg" alt="" width="586" height="614"></figure>
<p>The above picture shows the pin header on the motherboard after removal (relatively easily removed with a good Jonard solder pump). It does not look obviously defective aside from one pin which has a bluish (thin film interference type) contamination on it. There is little difference between the burnt and un-burnt pins otherwise. The motherboard header must be replaced along with the cable harness if this occurs to avoid future problems though.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//IMG_6189.jpeg" alt="" width="661" height="487"></figure>
<p>Above I pulled out one of the more burnt terminals, and found no significant issues there either, rather worryingly each individual component looks mostly fine!</p>
<p>Note the special terminal design with a double spring presumably intent on making two points of contact. The standard KK .156" series terminals only use a single large spring here, and I believe this rather flawed modification is intended for higher current applications.</p>
<p>The per-contact current can approach 4 A which is likely very near or at the limit for standard terminals. If a single pin goes bad then the remaining pins will see an increased current and burn out as well.</p>
<p>This double contact design doesn't appear to be sold anymore, likely for good reason. In the picture above you can make out that the burn marks are distinctly lop-sided, suggesting that the right side springs burnt. The contact housing holes are far too wide for this contact to work as you can easily insert it off-center and in that case only one of the two springs will make a good connection.</p>
<p>If you have a Mac II with this style of power supply, make sure to center the connector when mating to avoid these issues. The plastic shells can be used to aid alignment, they seem to be well centered.</p>
<h3 id="mcetoc_1hdjtn2obie">Power Supply Connector Replacement</h3>
<p>I did some looking around and found that the standard cheapest contacts for this connector series are likely <em>very</em> marginal for the amount of current a fully loaded IIfx will pull.</p>
<p>There is an upgraded series of contacts that fit the same shell called "Trifurcon," and the phosphor bronze material option is rated at 7 A nominal (5 A with cheaper brass terminals). This is accomplished by using two side-springs which give increased surface area, a much better design than the old fork-spring.</p>
<p>I also went with gold plated contacts, I don't think this matters for high current applications, but I don't think it has any major downsides.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/91//Screenshot-2023-10-25-at-19.14.29.png" alt="" width="277" height="204"></figure>
<p>I additionally bought a new plug housing, a pin header for the motherboard, new coloured wires and a keying plug. The part numbers are listed below for my replacement.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 31.3837%;"><strong>Purpose</strong></td>
<td style="width: 14.6933%;"><strong>MFG</strong></td>
<td style="width: 16.9936%;"><strong>MPN</strong></td>
<td style="width: 36.9293%;"><strong>Comment</strong></td>
</tr>
<tr>
<td style="width: 31.3837%;">IIfx Header</td>
<td style="width: 14.6933%;">Molex</td>
<td style="width: 16.9936%;">26482152</td>
<td style="width: 36.9293%;">Right angle 0.156" 15-way, gold plated</td>
</tr>
<tr>
<td style="width: 31.3837%;">PSU Cable Shell</td>
<td style="width: 14.6933%;">Molex</td>
<td style="width: 16.9936%;">9503151</td>
<td style="width: 36.9293%;"> </td>
</tr>
<tr>
<td style="width: 31.3837%;">PSU Cable Keying-pin</td>
<td style="width: 14.6933%;">Molex</td>
<td style="width: 16.9936%;">15040219</td>
<td style="width: 36.9293%;"> </td>
</tr>
<tr>
<td style="width: 31.3837%;">PSU Cable Pins AWG 18-20</td>
<td style="width: 14.6933%;">Molex</td>
<td style="width: 16.9936%;">8580111</td>
<td style="width: 36.9293%;">Trifurcon, bulk package, gold, phosphor bronze, $$$</td>
</tr>
<tr>
<td style="width: 31.3837%;">Hookup wires AWG 18</td>
<td style="width: 14.6933%;">Tensility Corp</td>
<td style="width: 16.9936%;">30-01733 et al.</td>
<td style="width: 36.9293%;">Part number for black, series contains all required colours</td>
</tr>
</tbody>
</table>
<p>I would also strongly recommend anyone making a new cable for e.g. a TFX or ATX conversion use the pins specified above, and to replace the motherboard pin header if any signs of overheating are observed. If the cables coming from your replacement power supply are smaller than AWG 20 then you're playing with fire.</p>
<p>And make sure to buy bulk (loose) pins, not ones on a belt. The belt mounted pins are are <strong><span style="text-decoration: underline;"><em>very</em></span></strong> annoying to deal with.</p>
<h3 id="mcetoc_1hdju557qj3">Pinouts &amp; Testing</h3>
<p>The colour codes and pinout is:</p>
<p>Pin 1, Orange, +12 V, Pins 2-6, Red, +5 V, Pins 7-12, Black, Ground return (isolated), Pin 13 is plugged, Pin 14, Yellow, –12 V, Pin 15, White, On/Off.</p>
<p>To power it on standalone, apply more than around 3-4 V to the white pin relative to ground.</p>
<p>The minimum loading is apparently 3 A on the +5 V rail, and 20 mA on the ±12 V rails. A 1.5 Ω resistor rated minimum 25 W and two 560 Ω 0.5 W resistors should be sufficient for testing the power supply operation.</p>
<h2 id="mcetoc_1hfgu4d8fo">Photos</h2>
<p>Below are some photos of the power supply connection points and motherboard pins useful for creating a new harness.</p>
<p>For the new harness I installed crimp-on ferrules on the AWG 18 wiring and soldered in place. The harness is pretty short so try to resist the temptation to make it too long.</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/91/gallery/IMG_6195.jpeg" data-size="1024x817"><img src="https://longview.be/media/posts/91/gallery/IMG_6195-thumbnail.jpeg" alt="" width="720" height="574"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/91/gallery/IMG_6176.jpeg" data-size="1024x1070"><img src="https://longview.be/media/posts/91/gallery/IMG_6176-thumbnail.jpeg" alt="" width="720" height="752"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/91/gallery/IMG_6175.jpeg" data-size="1024x1048"><img src="https://longview.be/media/posts/91/gallery/IMG_6175-thumbnail.jpeg" alt="" width="720" height="737"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/91/gallery/IMG_6178.jpeg" data-size="1024x1044"><img src="https://longview.be/media/posts/91/gallery/IMG_6178-thumbnail.jpeg" alt="" width="720" height="734"></a></figure>
</div></div>
            ]]>
        </content>
    </entry>
    <entry>
        <title>WallStreet &amp; SawTooth</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/wallstreet-and-sawtooth.html"/>
        <id>https://longview.be/wallstreet-and-sawtooth.html</id>
        <media:content url="https://longview.be/media/posts/90/20230930_143325.jpg" medium="image" />
            <category term="Old Mac"/>

        <updated>2023-10-13T23:28:06+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/90/20230930_143325.jpg" alt="" />
                    <p>Some notes on old Macs, started in late 2023. Published in 2025 with some notes. After writing this I acquired an iMac G4 (ca. 2003, 17") that has become my main retro Mac. I also found a cheap working PowerMac G5 that is a future work in progress.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/90/20230930_143325.jpg" class="type:primaryImage" alt="" /></p>
                <p>Some notes on old Macs, started in late 2023. Published in 2025 with some notes. After writing this I acquired an iMac G4 (ca. 2003, 17") that has become my main retro Mac. I also found a cheap working PowerMac G5 that is a future work in progress.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1hclf23u1q2">webone Proxy</a></li>
<li><a href="#mcetoc_1hclf23u1q3">AFP Server</a></li>
<li><a href="#mcetoc_1hclg09per4">PiSCSI (formerly RaSCSI)</a></li>
<li><a href="#mcetoc_1hclf23u1q4">G3 WallStreet</a>
<ul>
<li><a href="#mcetoc_1hcmiinbpvj">CD-ROM</a></li>
<li><a href="#mcetoc_1hcpqtu7n3b">CD-ROM Repair</a></li>
<li><a href="#mcetoc_1hcmiinbpvk">Drive Replacement (with voes)</a></li>
<li><a href="#mcetoc_1hcmiinbpvl">Bootstrap</a></li>
<li><a href="#mcetoc_1hfh0otgkbj">Wi-Fi™</a></li>
<li><a href="#mcetoc_1hcmiinbpvm">Batteries</a></li>
</ul>
</li>
<li><a href="#mcetoc_1hclf23u1q5">SawTooth (G4 AGP)</a>
<ul>
<li><a href="#mcetoc_1hfh0otgkbk">SCSI Stuff</a></li>
<li><a href="#mcetoc_1hfh0otgkbl">FireWire Sound &amp; Speakers</a></li>
<li><a href="#mcetoc_1hfh0otgkbm">New Monitor &amp; GPU</a></li>
<li><a href="#mcetoc_1hfh0otgkbn">Dial-Up?</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="mcetoc_1hclf23u1q2">webone Proxy</h2>
<p><a href="https://github.com/atauenis/webone">webone</a> is a very nice and relatively simple proxy setup for 90's computers. It's quite flexible and comes with a good default set of configurations.</p>
<p>It primarily does SSL proxying and image conversion, but it can also do e.g. Web Archive redirection, finer detail modifications like CSS rewrites for compatibility, video re-encoding et al.</p>
<p>For my G3 and 68030 machines I found that it's a good idea to add some settings to the default:</p>
<pre class="language-ini"><code>/etc/webone.conf.d/my.conf
view logs: tail -f /var/log/webone.log
[Server]
; equivalent to windows-1252 for western europe/US compatibility
; for Opera 5 the ISO code must be used for correct rendering
OutputEncoding=iso-8859-1

; match all common image types
; and convert to GIF format
; resize all images to limit pixel count to approximately 1 MP (1024x1024 pixels)
[Edit]
OnContentType=image/jpeg
OnContentType=image/png
OnContentType=image/webp
OnContentType=image/gif
OnContentType=image/bmp
OnCode=200
IgnoreUrl=webdav
AddConvert=convert
AddConvertDest=gif
AddConvertArg1=-resize 1048576@&gt;
AddResponseHeader=Content-Type: image/gif</code></pre>
<p>The encoding is relevant if your native language is not English and you want characters like æøå to render correctly.</p>
<p>Converting all images to GIF is maybe more controversial, but I've found GIFs to render quickly on old hardware (PNG is too slow, JPEG is too ugly, and BMP is too big).</p>
<p>Capping the number of pixels per image is very useful on the modern web, since a single large image can completely drain all the resources of even a relatively well stocked 90's Mac.</p>
<p>The size limit could be set to different values based on the host identifier (by making more rules), though I haven't implemented this yet.</p>
<p>FWIW I like iCab 2.9.9 for 68k, and Opera 5 seemed really stable for me on OS 9 (Opera 6 just crashed all the time).</p>
<h2 id="mcetoc_1hclf23u1q3">AFP Server</h2>
<p>Old Mac's don't speak SMB unless you run OS X (and unless it's modern you'll need an SMBv1 server).</p>
<p>I've found netatalk on the PiSCSI project to be a good and highly convenient solution for basic file interchange.</p>
<p>However, the <em>best</em> AFP server aside from a Mac OS server is Windows 2000 Server. It does a phenomenal job acting as a dual-role SMBv1 and AFP file server, Microsofts implementation of the protocol seems to be damn near perfect from my experience.</p>
<p>Netatalk tends to choke on large complex folders in my experience, so e.g. copying over the System folder tends to fail with an error message. This is no problem on Windows 2000. Windows 2000 also does store the resource fork along with the actual files (which netatalk may or may not do depending on circumstances). They're still relatively fragile though, even a modern macOS install can easily damage these old files.</p>
<p>Caveat with Windows 2000 is the need to use NTFS file system, and in many cases you'll hit the 128 GB limit for partition sizes which isn't really a problem for netatalk. The drive size limit is mostly an issue if you end up using IDE drives (or SATA drives in IDE compatibility mode).</p>
<p>Also note: AFP can either use TCP/IP or a lower level (more proprietary) protocol, Mac OS 9.2 definitely uses TCP/IP when available and I think even 7.6 with the latest OpenTransport uses it as well.</p>
<h2 id="mcetoc_1hclg09per4">PiSCSI (formerly RaSCSI)</h2>
<p>The <a href="https://github.com/PiSCSI/piscsi">PiSCSI</a> is a super cool hat for the Raspberry Pi that makes a networked SCSI emulator!</p>
<p>It's perfect for an out-of-box SCSI drive emulator; the slow boot time makes it less ideal for sticking inside a computer as the boot drive.</p>
<p>I use it primarily with the IIfx, but it also helped the WallStreet get going. With this setup you can basically bypass the usual bootstrap problem entirely by just emulating CD's or fully installed drive images.</p>
<p>It can also do neat things like take random files from the internet and make HFS formatted drive images to load, which is probably very useful if you happen to find the network driver as a loose file and it won't fit on a floppy.</p>
<p>It even does <a href="https://github.com/PiSCSI/piscsi/wiki/PowerView---SuperView">video output</a>! (And it can emulate a SCSI network card for more challenged Macs)</p>
<p>While primarily running as a Mac project for a long time, the developers do seem to be targeting additional computers such as HP's, DEC's, and Sun's.</p>
<h2 id="mcetoc_1hclf23u1q4">G3 WallStreet</h2>
<p>My G3 WallStreet 233 (14") is fairly standard, it came pre-upgraded with a 128 MB stick of RAM installed. There's no modem port on this model which is a shame.</p>
<p>Included was also a battery (see below) and a CD-ROM (see below). The computer has a left and right hot-swap bay, the left side can take a battery, while the right can take various drive options or a second battery.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6118.jpeg" alt="" width="465" height="620"></figure>
<p>Known right-bay drives include:</p>
<ul>
<li>CD-ROM</li>
<li>DVD-ROM (rumoured, not seen personally)</li>
<li>3.5" floppy</li>
<li>Zip Disk</li>
</ul>
<p>The rear ports include 10 Mbit/s ethernet, serial, AppleTalk, a VGA port (mirroring only), a HDI-30 SCSI connector, and audio in/out. The internal speakers are surprisingly good, but no bass to speak of as expected.</p>
<h3 id="mcetoc_1hcmiinbpvj">CD-ROM</h3>
<p>I had no luck whatsoever using a burnt CD-R to install an OS, and the original drive worked but seemed to be flaky since it just crashed all the time (original 3 GB drive). I borrowed another CD-drive from a colleague and this didn't work either.</p>
<p>The symptom was no spin-up of the CD, and Finder popping up a dialogue box asking me to format the disk as a ProDOS (0 k) partition or ejecting.</p>
<h3 id="mcetoc_1hcpqtu7n3b">CD-ROM Repair</h3>
<p>I decided to try opening the CD-ROM to see <em>what do</em>.</p>
<p>The drive is easily opened with a PH000 screw driver – start with the two screws on the back then pull the top cover off.</p>
<p>There are two electrolytic capacitors at 100 µF and 47 µF 6.3 V. These did measure ok for capacitance and somewhat high for ESR (8 Ω or so). They both appeared quite dry, but there was <em>some</em> kind of gunk underneath them. To remove, grab with pliers and rotate, this is seriously the best way to do it.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6120.jpeg" alt="" width="3024" height="1239"></figure>
<p>I replaced both with 220 µF 10 V 7343 size tantalum capacitors (~220 mΩ ESR). Note that tantalum capacitors mark the positive terminal while electrolytics mark the negative terminal.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6121.jpeg" alt="" width="3024" height="1859"></figure>
<p>The fix didn't make the CD's read, and it doesn't seem to have fixed my lockup on large transfers issue either.</p>
<p>I hooked some wires up to the tray-sensor and saw that the optical system fired up a red laser briefly and seemingly determined no disk was present.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6122.jpeg" alt="" width="3024" height="3306"></figure>
<p>Pictured above is the underside of the reader mechanism. It can be accessed by opening the tray and removing the 5 screws underneath – most of them go into plastic so may require high torque to remove.</p>
<p>The laser power adjustment (an adjustable series resistor really) is shown in the picture above. Turning the adjustment counterclockwise increases power. I adjusted this a tiny bit and managed to make it do stuff.</p>
<p>I managed to find a marginal adjustment state where it sounded like a floppy drive, which was the servo system resetting and zeroing the reader assembly, this indicates just slightly too low power.</p>
<p>In this case I also found that doing things like inserting a CD then popping the drive in would work but just swapping disks would not.</p>
<p>After a few attempts I did manage to make it work reliably, though it's hard to say how long it will last before requiring additional adjustment given that the laser diode has definitely aged a fair bit.</p>
<p>My total adjustment was probably 15-20°.</p>
<p>I found that using a couple of different CD-R's was good, since I found some of my burnt disks (especially ones burnt at full speed) would have more read issues than others and so required more power.</p>
<h3 id="mcetoc_1hcmiinbpvk">Drive Replacement (with voes)</h3>
<p>I used the standard 44 pin to SD-card adapter that everyone else uses – this worked just fine with a 64 GB SD card until it didn't. I would have an issue where the system would freeze (technically it just slowed down something awful) whenever I did a long sequential disk write access, such as copying large files in. Typically I would get to 10-20 MB and then it would slow down to basically frozen.</p>
<p>I initially found the issue while copying from network shares, but the problem was also there just copying from disk to disk, and it appeared somewhat suddenly after a few hours of installing software. Leaving it overnight I woke up to see a message about possible data corruption due to disk errors. It seems disk errors make OS 9 really prone to random hangs and crashes.</p>
<p>I attempted to replace the SD-card in the emulator. This didn't really accomplish much, as the same problem reoccured (also, re-imaging the new SD-card broke the file system slightly). During one test I had popped out the CD-ROM initially, and I noticed it seemed to stall right after I put that in.</p>
<p>Restarting and testing without the CD-ROM in place seemed to go much smoother – this suggests either a CD-ROM issue, or a compatibility issue between the SD-adapter and CD-ROM. I also found this issue occurred when booted off the OS 9.2.2 install CD (off the internal CD-ROM after repairing it). It does not occur when booted off a SCSI CD-ROM.</p>
<p>Reportedly mSATA adapters are flaky in this model, but seems my SD-adapter is also flaky in a similar way.</p>
<p>I did a quick test with a Kingpsec M.2 <em>SATA</em> SSD (basically mSATA in M.2 form factor) and a 2.5" adapter PCB. No joy, same issue with the CD-ROM.</p>
<h3 id="mcetoc_1hcmiinbpvl">Bootstrap</h3>
<p>To bootstrap a new main drive I used the PiSCSI with a borrowed HDI-30 to standard SCSI adapter cable to emulate a SCSI CD-ROM with the OS 9.2.2 universal image. This Just Worked™.</p>
<p>Do note that this CD image doesn't include appropriate accelerated graphics drivers for this machine's ATI GPU so you'll need to install those separately to get good performance. Without these drivers the performance is worse than a IIfx.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6107.jpeg" alt="" width="381" height="435"></figure>
<p><em>Above: had to undo some screws on the SCSI emulator to get at the right connector – I later made a gender-changer to use the external plug.</em></p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6106.jpeg" alt="" width="381" height="508"></figure>
<p><em>Above: booted from SCSI-CD image</em></p>
<h3 id="mcetoc_1hfh0otgkbj">Wi-Fi™</h3>
<p>I acquired a Cisco Aironet 350 (AIR-PCM350) PCMCIA card, slotting it in it was recognised by OS 9.2 as some type of network adapter. I installed the Cisco software package and after a reboot (great thing about classic Mac's is they reboot so fast!), I had a working Wi-Fi card!</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6390.jpeg" alt="" width="571" height="687"></figure>
<p>This card is probably the newest thing that can go in a classic Mac, it supports 40-bit WEP or something so you don't have to worry about security, there is none. The only hope is that WEP is so old that no one is looking for it.</p>
<h3 id="mcetoc_1hcmiinbpvm">Batteries</h3>
<p>In what seems like it should be illegal, the 25 year old Li-Ion battery pack charged up quite slowly, but retained a charge and estimated over 2 hours on battery with light loading.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_6108.jpeg" alt="" width="403" height="537"></figure>
<p><em>Above: the unusual battery level indicator is set up to show left and right battery bay status.</em></p>
<p>However, the P-RAM batteries do seem to be shot, replacements are on the way. VL2330 cells are used, these are typically found with solder tabs these days and aren't super expensive. This mostly affects the clock when powered off, and only if both external power and both bay batteries are pulled.</p>
<p>Wi-Fi: Cisco Aironet 350 (AIR-PCM350) PCMCIA WiFi adapter</p>
<p>TODO: Get a Zip drive and some disks (so expensive!).</p>
<h2 id="mcetoc_1hclf23u1q5">SawTooth (G4 AGP)</h2>
<p>The G4 AGP is very nice, but I have been told it's not a real Mac.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_3447.jpeg" alt="" width="395" height="608"></figure>
<p>This beauty was acquired in December 2022, and I spent some time initially over Christmas working on it. It then proceeded to sit around for 11 months before I started this endeavour.</p>
<p>It seems to have been a Smoker's Choice™ machine and arrived with working original drives full of pirated software and personal files (the software was retained, the personal data was expunged).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_3426.jpeg" alt="" width="257" height="300"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_3424-2.jpeg" alt="" width="224" height="299"></figure>
<p>The machine itself was quite astonishingly dirty inside considering how neat the outside looked. Cleaning necessitated a full disassembly (aside from the logic board and CPU). Remember to also pull off the left side cover if you're cleaning, the fan intake is behind there. It didn't smell much until I got the dirt wet…</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_3428.jpeg" alt="" width="406" height="415"></figure>
<p>Bootstrap had no major issues: the stock DVD-ROM worked and read burned CD's. </p>
<p>mSATA and SD-card adapters all worked, but I ended up using a SATA to IDE adapter board with an old SanDisk X120 SSD. This allows for full UDMA at 66 MB/s, an incredibly high performance hard drive.</p>
<p>Current OS is Mac OS X 10.2, which has <em>style</em>. It can also run OS 9/8.6.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/90/IMG_3429.jpeg" alt="" width="400" height="533"></figure>
<p>An upgrade was to install a DVD-RW drive, which was found locally. The new drive fit the existing front panel covers perfectly! Haven't tried burning a disc yet though.</p>
<p>I also installed an AirPort card. Future work: set up a dedicated legacy AP – AirPort would be cool but WRT's 54's G's L's are available.</p>
<p class="msg msg--info">Addendum: I later put this drive into an iMac G4 and eventually had to upgrade to 10.4, which is not as stylish.</p>
<h3 id="mcetoc_1hfh0otgkbk">SCSI Stuff</h3>
<p>SCSI: Bought a Adaptec AHA-2930CU Mac edition, registered ok in 10.2</p>
<p>UltraSCSI &amp; DAT-72: Bought an Adaptec AHA-2940U2B Ultra 2 card.</p>
<h3 id="mcetoc_1hfh0otgkbl">FireWire Sound &amp; Speakers</h3>
<p>I initially looked at buying some DigiDesign Pro Tools hardware (like the HD series of PCI-X cards), but the ridiculous size of the setup made me pause. I instead went slightly more low-end, and picked up an M-Audio 410 FireWire card for $40. I have two FW400 ports and I intend to use them!</p>
<p>Also found a set of Harman Kardon SoundSticks 2.1 speakers for around $40. These are mostly period correct, though design-wise they do go better with a G4 Cube.</p>
<p>The M-Audio 410 Firewire is a 2004 vintage 4 in/10 out (2/8 analog, 2/2 digital) professional sound card, costing around £350 at the time of release. The card was apparently fairly popular given how easy they are to find.</p>
<p>Credit to M-Audio for still listing drivers for this card on their website, including all the different versions for each major OS &amp; OS X release. Drivers are available for surprisingly recent OS X versions, and as early as OS 8.6.</p>
<p>The actual experience is not all that impressive; I found the internal sound card to be a much more practical alternative for general purpose audio playback. The SoundSticks are my main PC speakers now.</p>
<h3 id="mcetoc_1hfh0otgkbm">New Monitor &amp; GPU</h3>
<p>I initially ran the system using the 15" multiQ TN panels I used with the IIfx over VGA. I later decided to set this computer up with a 1280x1024 panel, a Dell UltraSharp 1804FP with DVI.</p>
<p>Note that the Sawtooth (AGP) G4 is the last G4 that had standard DVI output, later versions switched to ADC which is DVI + power and other related things. This means this one (likely) can't take the later GPU's which had ADC ports, since some pins on the AGP connector were allotted to e.g. 28 V power output to the monitor.</p>
<p>However since this G4 doesn't do that it's basically able to take any other AGP card with a Mac ROM, meaning I don't have to pull resistors or tape over AGP connections to make those cards work.</p>
<p>The stock Rage 128 Pro with 16 MB of VRAM was adequate for driving the 1280x1024 display, but it didn't have much to spare either.</p>
<p>I elected to order a Nvidia GF6200TC card, this is one of the newest compatible AGP cards. It is apparently mandatory to use the "PV-T44A-WANG" variant of the card, and a PC, additional PCI graphics carad, and a boot floppy with nvflash is needed to perform a re-flash with the Mac ROM. I might find the motivation to actually do this flashing some day.</p>
<p>The reason a new GPU was desirable was because I snagged a new monitor for $100, which like the speakers is a bit anachronistic but not entirely unreasonable. I ended up with an Apple Cinema Display, 20" Aluminium frame variant in great condition. This 1680x1050 beast was released in 2004 and sold until 2008, and my model is the later revision which has the upgraded LCD panel.</p>
<p>This is one of the highest end monitors possible on this Mac, the only higher end option would be to use a 1920x1200 monitor. The best GPU available for this generation only supports single link DVI so 1200p is the limit.</p>
<p>Being such a recent model it was the first Cinema Display aside from the very first model to <em>not</em> feature an ADC connector, instead using a standard DVI-D interface. It also has a built in FireWire 400 and USB 2.0 hubs (though I don't have USB 2 in the Mac, why would I need USB when I have FireWire!).</p>
<p class="msg msg--info">2025 status: monitor goes better with the PowerMac G5. I've somehow managed to avoid buying any ADC-based equipment.</p>
<h3 id="mcetoc_1hfh0otgkbn">Dial-Up?</h3>
<p>While the G4 has 100 Mbit ethernet and 11 Mbps Wi-Fi, nothing beats the authenticity of dial up (though bonded ISDN would be incredible). I picked up the standard VoIP thingie for $30 locally.</p>
<p class="msg msg--info">2025 status: sitting in a drawer</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Do Those Fiber Optic HDMI Cables Work?</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/do-those-fiber-optic-hdmi-cables-work.html"/>
        <id>https://longview.be/do-those-fiber-optic-hdmi-cables-work.html</id>
        <media:content url="https://longview.be/media/posts/89/_IMG4532.jpg" medium="image" />

        <updated>2023-09-08T22:16:17+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/89/_IMG4532.jpg" alt="" />
                    <p>Quick post, yes they work, and one fell apart so I took a picture.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/89/_IMG4532.jpg" class="type:primaryImage" alt="" /></p>
                <p>Quick post, yes they work, and one fell apart so I took a picture.</p>

<p>Fiber Optic HDMI cables are readily available on sites like AliExpress and eBay these days and have been for a few years now.</p>
<p>I recently bought a few extras and one turned out to be poorly assembled and it fell apart, giving us a look at the inside:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/89/IMG_5839.jpeg" alt="" width="2076" height="1465"></figure>
<p>This is the transmit (source) side, there's some circuitry on the bottom, and we can see some kind of blob presumably containing a VCSEL or laser transmitter. It looks like a QFN packaged IC may have been removed from the design, or it's possibly wire-bonded in there and not visible in the picture.</p>
<p>HDMI to fiber conversion either requires multiple fibers (one per data line, there are 4 including clock), or a serialiser/deserialiser chip to put all 4 into one signal, it looks like a single fiber is used but not entirely sure.</p>
<p>We can also see decent strain relief with a metal clamp holding in a moulded cable retainer.</p>
<p>These cables do have some electrical signalling making them not entirely galvanically isolated, this is a simplification of the problem by presumably passing the DDC (I2C like) negotiation bus on the electrical wires and running the video signal over fiber. These signals are pretty low speed so are likely able to work over quite long distances provided sufficient wire gauges and perhaps a signal buffer are used.</p>
<p>Compatibility seems good, though I have found one of my on-camera HDMI monitors won't properly power up the transmitter. Presumably these cables use all of the 5 V power available to an HDMI cable, while the battery powered monitor may limit the power supply more than a typical PC.</p>
<p>DisplayPort cables also seem to work, though I suspect they may have issues with the more esoteric parts of the specification like two-way communication. Also, they are slightly wider than a normal cable, so adjacent connectors may interfere (though I have been able to force them to work).</p>
<p>I super-glued the chassis together and the cable kept on working.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>The 3021N OCXO Card (Part 10)</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/the-3021n-ocxo-card.html"/>
        <id>https://longview.be/the-3021n-ocxo-card.html</id>
        <media:content url="https://longview.be/media/posts/80/20220614T172813__IMG8794_2k.jpg" medium="image" />
            <category term="Timing"/>
            <category term="3021N"/>

        <updated>2023-08-19T12:31:00+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/80/20220614T172813__IMG8794_2k.jpg" alt="" />
                    <p>The OCXO card is a somewhat standalone reference oscillator made for the 3021N receiver. This card was finished in late 2022.</p>
<p>Note that this part of the series is published out of order, at the time of first issue this PCA has not been integrated into the radio, but a copy of the PCA has been integrated into a 19" rack unit.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/80/20220614T172813__IMG8794_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>The OCXO card is a somewhat standalone reference oscillator made for the 3021N receiver. This card was finished in late 2022.</p>
<p>Note that this part of the series is published out of order, at the time of first issue this PCA has not been integrated into the radio, but a copy of the PCA has been integrated into a 19" rack unit.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1gibdkrnb513">Design Description</a>
<ul>
<li><a href="#mcetoc_1gibeun4159r">FLL/PLL</a>
<ul>
<li><a href="#mcetoc_1gjel3vj26o">Test Experiences</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#mcetoc_1gibeun4159s">Interface</a></li>
<li><a href="#mcetoc_1gibeun4159t">Software</a>
<ul>
<li><a href="#mcetoc_1gjel3vj26p">Weird Bugs: F-RAM Addressing</a></li>
<li><a href="#mcetoc_1gjetgch07m">Weird Bugs: STM32F103 I²C</a></li>
<li><a href="#mcetoc_1gjeu9mfe8u">Weird Behaviour: STM32 PWM Input Capture</a></li>
</ul>
</li>
<li><a href="#mcetoc_1i23vqntupp">Long Term Results</a>
<ul>
<li><a href="#mcetoc_1i23vqntupq">19" Rack Unit</a>
<ul>
<li><a href="#mcetoc_1i23vqntupr">August 2023 Spot Check</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<h2 id="mcetoc_1gibdkrnb513">Design Description</h2>
<p>The OCXO card does not replace any existing assembly in the radio, and it's more or less an optional add-on (though removing it requires some frame wiring changes to re-route the external reference).</p>
<p>It is basically a primary timebase in the system, in charge of keeping the tuned frequency of the radio highly stable even if the external 10 MHz is removed.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/80/3021N_PCA_Blocks-3021N_OCXO.drawio.svg" alt="" width="914" height="461"></figure>
<p>The card is intended for continuous operation, and generates a 10 MHz square wave output at all times unless a major BIT failure occurs. It is connected to the Synth external 10 MHz input, and disciplines the VCTCXO that is actually used for the radio.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/80/3021n_ocxo_option.JPEG" alt="" width="1504" height="1038"></figure>
<p>An external 220 V AC power supply is tapped off before the main power switch to allow continuous operation. A 10 W 15 V power supply is used to power the system, this will be relatively heavily loaded during warmup but idle state dissipation is quite low.</p>
<p>The OCXO runs off 12 V, but I added a 7812 regulator to keep the 12 V stable with low ripple. A DC/DC converter makes a 5 V supply, and another DC/DC makes a –12 V supply for the DAC.</p>
<p>The OCXO is the same C-MAC type as described <a href="https://longview.be/a-smart-c-mac-stp-2373lf-ocxo.html">previously</a>, the same DAC is used, and the same BIT test system was integrated.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/80/IMG_3142.jpeg" alt="" width="2912" height="2166"></figure>
<p>A 3D printed PolyCarbonate (PC) lid was also added over the OCXO to reduce the effects of convection or forced air cooling. This lid has a foam gasket to the PCB and has around 1-2 mm air gap around the entire OCXO. This was manufactured by PCBWay (my first 3D print order there), and the PC material was selected for it's acceptable price and high max operating temperature.</p>
<p>A STM32F103RET6 was used as the controller, which controls the 16 bit DAC with dithering to tune the OCXO. F-RAM storage is used for permanent storage of tuning voltage and unit parameters.</p>
<p>I failed to notice that the USB peripheral requires an 8 MHz input clock, I did make an adapter PCB to correct this with a PLL circuit but this has not been integrated at the time of publication.</p>
<h3 id="mcetoc_1gibeun4159r">FLL/PLL</h3>
<p>The biggest difference between the previous smart OCXO and this implementation is the addition of frequency locked and phase locked loop (FLL &amp; PLL) modes. The OCXO connects to the rear panel 10 MHz input, and this signal is divided down by 1024 and the frequency of this can be measured by the MCU, which is clocked from the OCXO.</p>
<p>This allows for highly precise but slow frequency measurement, and a frequency locked loop can be implemented to control the frequency very slowly. The only issue here is that the minimum frequency error is finite, and given by the integration time. The OCXO may therefore end up locked with some tiny frequency error that is never fully removed.</p>
<p>To support phase locking of the 10 MHz input, a basic XOR gate compares the two 10 MHz input signals after some division, and the output of this XOR gate is low pass filtered and sampled by the ADC. This allows for a direct phase measurement, keeping the phase stable makes it impossible to have any net long term frequency error since the phase error is the integral of the frequency change.</p>
<p>The XOR detector will lock at around 90° phase offset, but this isn't really a problem in this application.</p>
<p>XOR phase measurement also requires the OCXO frequency to be very close to the correct frequency for the phase measurement to yield good measurements. This is ensured in this case (where locking speed is irrelevant) by using the FLL as the first stage locker.</p>
<p class="msg msg--info">When an XOR gate is used to control a VCO, the bandwidth of the low pass filter between the XOR gate or mixer output and the VCO must be higher than the absolute frequency difference between the inputs.</p>
<p>In order to achieve high stability locking, a state machine measures loop error signals (RMS phase error, and RMS phase-derivative) and decreases the PLL bandwidth in stages. If a frequency or large phase error is accumulated for some reason, the state machine will decrement and increase the bandwidth until it is able to reacquire the signal.</p>
<p>Further, if the highest bandwidth mode is reached and the phase error is large, the PLL integrator is reset based on the frequency measurements periodically. This requires knowledge of the OCXO tuning gain, and when tuned correctly it is able to relatively quickly acquire any input frequency.</p>
<p>If the frequency measurement error exceeds the tuning range of the OCXO (around 20 Hz), the input is considered invalid and holdover mode is set instead.</p>
<p>When the lowest loop bandwidth state is reached, the system is considered stable, and after around 10 minutes it will begin storing tuning data to F-RAM. This mode has such a low integral gain that it's basically only able to correct for local OCXO drift, so any real change in the reference frequency will trigger a bandwidth increase. The idea is that the PLL integrator level will represent a good long term average of the correct tuning.</p>
<h4 id="mcetoc_1gjel3vj26o">Test Experiences</h4>
<p>This mode of regulation is fairly selective, and e.g. a TCXO equipped LEA-M8F clock is the "bad" reference clock I used for testing. This tends to wander back and forth over a period of 10-20 seconds. The phase error is not so tremendous that it can't be used with confidence, but e.g. a <a href="https://longview.be/meinberg-pzf180pex.html">PZF180PEX with OCXO</a> has much better short term stability.</p>
<p class="msg msg--info">My LEA-M8F is TCXO equipped, but it can also be set up to control external OCXO's and similar, which would likely improve it significantly.</p>
<p>The difference between these is easily observed when locking this OCXO to one of them; the PZF180PEX will be very quickly acquired and will tend to stay in the locked state basically forever as long as the RF signal is present. Meanwhile the LEA-M8F does more weird stuff and wanders back and forth, which accumulates loop errors that occasionally triggers a bandwidth increase. Note that the PZF180PEX does wander when losing RF lock, but it does so quite slowly and mostly monotonically.</p>
<p>On my TODO list is making a phase-logging system to produce actual data, but at present I don't have an automatic logging system to give me quantitative data.</p>
<h2 id="mcetoc_1gibeun4159s">Interface</h2>
<p>The other main change is the addition of a USB plug, which is used to implement a virtual COM port, and this is used for communications. At least it would be, if I had used a MCU core clock compatible with USB. A future modification will be to add a PLL clock generator to convert the 10 MHz MCU clock to 8 MHz, allowing for USB operation.</p>
<p>A FFC connector with a LCD interface was also added, this is meant to be used when using the OCXO card standalone as a frequency standard or jitter cleaner. It matches some previously made HD44780 LCD interface controller cards I have made for 2x40 character LCD displays.</p>
<p>On the back plane side the card outputs regulated 15 and 5 V supplies, 3 LED outputs (straight LVCMOS), and I2C.</p>
<h2 id="mcetoc_1gibeun4159t">Software</h2>
<p>The software was ported from the <a href="https://longview.be/a-smart-c-mac-stp-2373lf-ocxo.html">Smart OCXO</a>'s and the already described FLL/PLL mode of operation was implemented.  An LCD display output was added for use in standalone applications, and due to the USB issues this and the debugger are the only interfaces currently implemented.</p>
<p>Some LED outputs were also added to indicate status. Further, the tuning word for the OCXO is not automatically updated in the F-RAM unless the PLL/1PPS is in a stable and locked state.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/80/3021n_ocxo_option_2.JPEG" alt="" width="1507" height="1027"></figure>
<h3 id="mcetoc_1gjel3vj26p">Weird Bugs: F-RAM Addressing</h3>
<p>A fun self-inflicted bug I found was caused by using the FM24CL16 F-RAM IC with the STM32 HAL HAL_I2C_Mem_Read/HAL_I2C_Mem_Write functions.</p>
<p>I store this double buffered, but the data structure used is larger than 128 bytes. Since I was using 8-bit mode this doesn't work, but since one entry would normally be fine it went unnoticed. I originally wrote the code to use smaller entries that would fit fine in the 8 bit address space.</p>
<p>(Might have been nice if the STM32 HAL checked if the address offset + access size would fit though.)</p>
<p>Also turns out that the FM24CL16 uses the lower 3 address bits for paging 8-bit addresses, which is not directly supported by the STM32 HAL.</p>
<p>So what I did was switch to store one entry per page, by offsetting the device address.</p>
<p>This bug was also present on the <a href="https://longview.be/a-smart-c-mac-stp-2373lf-ocxo.html">Smart OCXO</a>.</p>
<h3 id="mcetoc_1gjetgch07m">Weird Bugs: STM32F103 I²C</h3>
<p>The I²C controller on specifically the STM32F103 series has some issues that seem to be specific to it, the F0, F3, and F4 devices seem to be far better.</p>
<p>Basically it will tend to randomly fail, sometimes locking up with a HAL_BUSY flag that never goes away. This issue is documented in an errata, and the workaround is really horrible.</p>
<p>I also had a really strange issue where a memory block read would inject a random extra 0 byte on readback. This offset some data structures, which obviously weren't correct anymore.</p>
<p>I've found at least part of the fix is to add 10 pF capacitors across the SDA/SCL lines to VCC (or to ground).</p>
<p>Frankly I would suggest avoiding the F1 devices for I2C applications, it's just not worth the trouble. I spent a lot of time adding additional checks and checksums to the I2C routines that shouldn't have been necessary.</p>
<h3 id="mcetoc_1gjeu9mfe8u">Weird Behaviour: STM32 PWM Input Capture</h3>
<p>I use the STM32 PWM input capture interrupt mode to measure the external frequency after division. The counter operates at CPU core rates and measures the period and on-time of the external square wave.</p>
<p>Currently the system works on interrupts, and 1'000'000 samples are taken per measurement (takes around 100 seconds). The period measurement seems to consistently be 2 cycles less than the actual time.</p>
<p>While not documented anywhere I could find it seems that detecting the rising edge and latching the counter value takes 2 core cycles that are then lost.</p>
<p>Adding 2 cycles to each measurements seems to yield correct results.</p>
<h2 id="mcetoc_1i23vqntupp">Long Term Results</h2>
<h3 id="mcetoc_1i23vqntupq">19" Rack Unit</h3>
<p>An example of this PCA was installed in a 19" enclosure along with a small 10 MHz distribution amplifier and fiber-optic interface, and powered on continuously starting in late January 2023. During this time the rack was moved back and forth somewhat, and no particular care was taken to avoid vibration or other disturbances.</p>
<p>Prior to the test, the unit had been connected to an external reference for approximately 1 week, and as part of redecorating the fiber carrying the 10 MHz reference was removed leaving it on holdover for the duration. Power was maintained throughout the test, with an OCXO enclosure temperature settling at 58 °C ±1°.</p>
<h4 id="mcetoc_1i23vqntupr">August 2023 Spot Check</h4>
<p>A spot check was carried out in August 2023 of the frequency relative to my LEA-M8F and <a href="https://longview.be/meinberg-pzf180pex.html">PZF180PEX</a> receivers.</p>
<p>Frequency errors were not measurable using my HP 5335A frequency counter, an oscilloscope measuring differential frequency showed a frequency error on the order of 1 cycle per several minutes. The phase-drift of the LEA-M8F makes even these oscilloscope measurements difficult for that comparison. </p>
<p>The unit was left running to continue the test, since no relevant frequency error was found.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>TRI AN/PRC-152 (2022/2023 model)</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/tri-anprc-152-20222023-model.html"/>
        <id>https://longview.be/tri-anprc-152-20222023-model.html</id>
        <media:content url="https://longview.be/media/posts/88/_IMG1467.jpg" medium="image" />

        <updated>2023-07-28T15:07:00+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/88/_IMG1467.jpg" alt="" />
                    <p>The TRI(iumph Industries) AN/PRC-152 two way radio is at first glance a rather silly device, a clone of the extremely capable and expensive Harris AN/PRC-152 (Falcon III) software defined hand held radio.</p>
<p>Is it worth the money at all?</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/88/_IMG1467.jpg" class="type:primaryImage" alt="" /></p>
                <p>The TRI(iumph Industries) AN/PRC-152 two way radio is at first glance a rather silly device, a clone of the extremely capable and expensive Harris AN/PRC-152 (Falcon III) software defined hand held radio.</p>
<p>Is it worth the money at all?</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1h6er1rb66">Introduction</a></li>
<li><a href="#mcetoc_1h6erb0vg1g">Specifications</a></li>
<li><a href="#mcetoc_1h6erb0vg1h">Is It Good?</a></li>
<li><a href="#mcetoc_1h6et7ftib6">Hardware Overview</a>
<ul>
<li><a href="#mcetoc_1h6et7ftib7">Processor</a></li>
<li><a href="#mcetoc_1h6et7ftib8">Radio Transceiver IC's &amp; PA</a></li>
<li><a href="#mcetoc_1h6et7ftib9">Audio/Interface Board</a></li>
<li><a href="#mcetoc_1h6et7ftiba">Front Panel</a></li>
<li><a href="#mcetoc_1h6et7ftibb">KDU</a></li>
<li><a href="#mcetoc_1hqdh92aiq3">Battery</a></li>
</ul>
</li>
<li><a href="#mcetoc_1h6etidbgbn">RF Performance</a></li>
<li><a href="#mcetoc_1h6f1pk62gk">Summary</a></li>
<li><a href="#mcetoc_1h6ev72rff5">Future Work</a>
<ul>
<li><a href="#mcetoc_1h6f1pk62gl">Chassis Upgrades</a></li>
</ul>
</li>
<li><a href="#mcetoc_1h6ev72rff6">Addendum: Reliable AM Squelch</a></li>
</ul>
</div>
<h2 id="mcetoc_1h6er1rb66">Introduction</h2>
<p>TRI is a fairly well known name in some circles, the company seems to have very limited direct presence with no English language web site. They seem to have found a niche in catering primarily to the airsoft/mil-a-boo crowd, a market that generally favours authentic-looking military replicas including for their communications solutions.</p>
<p>The TRI 152 is certainly polarising in the ham radio world, and looking at various forums we generally find a few different groupings which I'll summarise as:</p>
<ul>
<li>”it's for fucking plebs that can't afford the real thing”</li>
<li>”it's probably shit for airsoft weebs”</li>
<li>”I used the real thing in —insert country here— and the real deal was shit too”</li>
<li>”I bought one and it's cool”</li>
<li>”—various racist remarks on Chinese manufacturing—”</li>
</ul>
<p>I will admit to having a certain attraction to the military æsthetic, and so I ordered one to try out. Shipping took a while, I was informed by the seller that the delay was due to this being the latest production batch directly from the factory.</p>
<p>It is worth noting that these radios exist in various variants, with some differences in features. TAC-sky is another manufacturer of a seemingly very similar device, that model seems to include a GPS receiver as well.</p>
<p>Pre-2022 models of the radio seem to have a more limited feature set. The first issue of this radio from memory popped up around 2017, and seemed to essentially be a Baofeng UV-5R radio in every way.</p>
<h2 id="mcetoc_1h6erb0vg1g">Specifications</h2>
<p>The basic listed specifications are:</p>
<ul>
<li>Aluminium shell, æsthetic replica of the Harris product</li>
<li>Compatible with e.g. H-250 handsets, dynamic or electret microphones supported (MIL-DTL-55116 6 pin handset connector; 5 pin compatible)</li>
<li>Compatible with genuine Harris batteries and antennas
<ul>
<li>One battery option is a 6-cell 12 V (3S) case that can be fitted with 6 18650 cells</li>
</ul>
</li>
<li>Transmit/receive coverage 136-174 and 400-480 MHz at 15 W power, standard narrow-band FM
<ul>
<li>Limited power in the 220 (220-259) and 350 (330-370) MHz bands</li>
<li>(The Harris device covers approximately 30-512 MHz with software defined modulation types)</li>
</ul>
</li>
<li>Broadcast FM and Air-band AM reception</li>
<li>Dual receiver (implied to be a true double receiver, not just a scanner)</li>
<li>Cross-band repeater support</li>
<li>Speech compander &amp; encryption (assumed to be a basic spectral inversion type)</li>
<li>Support for an external wrist-mounted external control unit (KDU)</li>
</ul>
<p>The TRI variant does not seem to support PC-programming, while the TAC variant seems to have a USB-cable that plugs into the U-229 connector. The TAC variant does seem to be slightly different from available pictures, using e.g. a slightly greener LCD backlight vs. the TRI unit.</p>
<p>The biggest question to answer is how does the radio perform, have TRI used the fairly large internal volume and price to stuff in a high performance radio with excellent performance, or did they just put some COTS radio modules in a fancy case and call it good?</p>
<h2 id="mcetoc_1h6erb0vg1h">Is It Good?</h2>
<p>The answer to this question revealed itself pretty quickly when I received it, it's an <em>extremely</em> well made enclosure around what is basically a slightly upgraded standard radio, probably some earlier variant of a Quansheng UV-K5 based on the internals. There are however some nice touches here.</p>
<p>I won't be too hard on it but there are certainly issues that could have been resolved with slightly more engineering and user testing put into it. I'm not sure I'd recommend it unless you go hard on mil-sim.</p>
<p>The biggest issue I had with the radio is simply that the audio quality is not very good and the audio routing system is not very flexible. The original speaker rattles like crazy at even slightly elevated audio levels, and there is a compander-like noise reduction system that seems to make things even worse in most modes.</p>
<p>Further, there is no option to route audio to both the handset and internal speaker, or to auto-switch it. Additionally there is no option to use mic-follows-PTT, so if you set it to external handset mode the internal PTT works, but the handset microphone is used. This may be usable in some configurations but for a handset the microphone is normally switched so no audio is transmitted.</p>
<p>Transmit audio quality with an external H-250 handset was quite poor, with lacking treble and distortion, but receive audio was fine (better than the internal speaker).</p>
<p>The user interface is also somewhat confusing, especially the way air-band and broadcast FM reception is implemented as some kind of transient overlay mode. Also there is no squelch for AM receive, a pretty serious omission.</p>
<p>In general it seems like a fairly standard radio firmware was used (hell, it's likely software-compatible with some other radio). This means the UI doesn't really utilise this radio's user interface options, and things like the keypad arrow markings don't really mean anything.</p>
<p>Cross-band repeat does work, but the repeated audio is severely degraded, most likely due to improper filtering and level adjustment (this could probably be fixed with firmware or minor hardware modifications).</p>
<h2 id="mcetoc_1h6et7ftib6">Hardware Overview</h2>
<p>I'll skip a software overview, it's a mix of fairly standard two way radio interfacing (similar to Baofeng, Tyt etc.) and slightly confusing additions and one typo. At the time of writing, the original PCB's are spread across various tables anyway.</p>
<p>I took various pictures of the radio while disassembling it:</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5095.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5095-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Radio in box</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5099.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5099-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Rear label</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5100.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5100-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Radio front panel</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5102.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5102-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Radio top panel</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5103.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5103-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Radio RF board</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5106.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5106-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Radio front panel rear</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5107.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5107-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Interface/AF board</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5141.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5141-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Side connector</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5144.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5144-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Front panel with buttons</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5143.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5143-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>PTT board</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5147.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5147-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Rear of RF board</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5148.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5148-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Main chassis, RF side</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5151.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5151-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>Side connector flex</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5266.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_5266-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>KDU in box</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_5277.jpeg" data-size="3528x2430"><img src="https://longview.be/media/posts/88/gallery/IMG_5277-thumbnail.jpeg" alt="" width="720" height="496"></a>
<figcaption>KDU powered on</figcaption>
</figure>
</div></div>
<h3 id="mcetoc_1h6et7ftib7">Processor</h3>
<p>The main radio processor is a <a href="http://www.weltrend.com/en-global/product/detail/67/105/485">Weltrend WT58F165</a> ARM processor, a relatively low powered but moderately capable processor for the task of running a basic radio.</p>
<h3 id="mcetoc_1h6et7ftib8">Radio Transceiver IC's &amp; PA</h3>
<p>The radio includes two transceiver chips, <a href="http://www.bekencorp.com/en/goods/detail/cid/50.html">BK4819</a> by Beken. These are typically used in $20 two way radios, though from what I gather they are considered quite good for their price range. However, this is a $300 radio. I suspect a very large portion of the price went into the mechanical aspects.</p>
<p>Quite recently (during the course of writing this article) a firmware hack was announced for these devices, which could in principle be applied to this radio as well. <span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">See </span><a href="https://github.com/Tunas1337/UV-K5-Modded-Firmwares" style="font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">https://github.com/Tunas1337/UV-K5-Modded-Firmwares</a></p>
<p>Additionally, there is a <a href="http://www.bekencorp.com/en/goods/detail/cid/36.html">BK1088</a> broadcast receiver which is presumably used for the FM broadcast reception. This chip is underutilised, being capable of AM and SW reception as well, but only the FM side is used here.</p>
<p>The main PA is common for VHF/UHF, it is a <a href="https://power-wey.com/product/rf-power-device-ldmos/">HTL7G06S011P</a>, which is listed as an 11 W PA transistor, but I will note that there is fairly decent heatsinking so running it at ~11 V to give around 15 W is likely not a major issue.</p>
<h3 id="mcetoc_1h6et7ftib9">Audio/Interface Board</h3>
<p>Opposite the RF board is a relatively packed but simple interfacing board which connects to the RF board and provides connections to the audio PA's, microphone preamps, the front panel PCB, side panel PCB, aux connector, volume/AF mode select (top), and the 6 pin handset connector.</p>
<p>Basically every interconnect in the radio is a flex, with several custom flex PCB's made, which does speak to the good build quality.</p>
<p>The side connector only breaks out a handful of the connections as seen in pictures above, the majority of the pads on the side are unconnected. It was also quite strongly glued in place.</p>
<p>The handset connector seems to be a genuine quality part, it has 5 V available to power external circuitry if needed.</p>
<p>The top knob has two decks, one is a volume control potentiometer (top) and the bottom deck has 3 positions selecting between different audio modes (bad, awful (companding), and spectral inversion scrambler). The bottom deck is a bit too lose in my opinion, and it is relatively easy to move accidentally.</p>
<p>Note that the original hardware clearly has a 9 position (36° increment) rotary switch for the top position, but from what I can tell there is no open-market combo switch that would work so they used a potentiometer with switch + coaxial encoder for the bottom deck.</p>
<p>Curiously, there is an option to switch between potentiometer or digital volume, digital volume is adjusted with the top left side buttons like a real PRC-152. The KDU supports 20 volume levels, but I found both the analog and digital volume levels were far too high for indoor use (especially with such a poor speaker), and only the bottom 3 settings were usable.</p>
<h3 id="mcetoc_1h6et7ftiba">Front Panel</h3>
<p>The front panel has a custom PCB which interfaces the LCD, speaker, and microphone, as well as the keypad. Note that for some reason the chassis includes positions for dual microphones but only one is installed (this may be intended as a pressure relief port though).</p>
<p>The keypad itself was adequate though not amazing.</p>
<p>The LCD controller appears to use an ST7567 controller or something very similar. The actual display is a pretty unusual 128⨉34 line. The two centre lines are also mapped to the end of the display memory, making bitmap-displaying pretty annoying.</p>
<p>Over all it's a pretty good display with decent viewing angles and contrast, and the pixel density is acceptable for a device of this type. The user interface implemented is not optimal though.</p>
<p>While the flex is marked YJD7567-64 this doesn't seem to turn up anything, but I believe the <a href="http://www.yab-lcm.net/index.php?m=content&amp;c=index&amp;a=show&amp;catid=13&amp;id=2">YBC12834</a> by Shenzen Ya Bin Electronics co. ltd. is a close match, and similar products can be found under various brands on sites like AliExpress.</p>
<p><img src="https://ae01.alicdn.com/kf/S14e91c62e57e46968b59107ba8764c1fd.jpg" width="420" height="290"></p>
<p>Above is the dimensioned drawing of a module that appears to match the original LCD mechanically and electrically, but I have not purchased one to verify this. Just look for "12834 LCD" or similar.</p>
<p><img src="https://ae01.alicdn.com/kf/S3cce7ee4be724ba08d29a164748f48a4j.jpg" width="165" height="262"></p>
<p>The table above shows the pinout, which seems to be correct.</p>
<h3 id="mcetoc_1h6et7ftibb">KDU</h3>
<p>The KDU is a very nicely constructed device, it comes in a dedicated box as well!</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_7608.jpeg" data-size="3916x2216"><img src="https://longview.be/media/posts/88/gallery/IMG_7608-thumbnail.jpeg" alt="" width="720" height="407"></a>
<figcaption>Main PCB with rear cover removed. Watch the flex cables when prying apart.</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_7609.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/88/gallery/IMG_7609-thumbnail.jpeg" alt="" width="720" height="540"></a>
<figcaption>GD32F330 MCU (STM32-like)</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_7610.jpeg" data-size="3003x2692"><img src="https://longview.be/media/posts/88/gallery/IMG_7610-thumbnail.jpeg" alt="" width="720" height="646"></a>
<figcaption>Rear cover, glued along the whole length but no clips</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_7611.jpeg" data-size="3637x2300"><img src="https://longview.be/media/posts/88/gallery/IMG_7611-thumbnail.jpeg" alt="" width="720" height="455"></a>
<figcaption>Side-button membranes and top/bottom PCB's with buttons</figcaption>
</figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/88/gallery/IMG_7612.jpeg" data-size="3423x1825"><img src="https://longview.be/media/posts/88/gallery/IMG_7612-thumbnail.jpeg" alt="" width="720" height="384"></a>
<figcaption>The display seems to be a 2.2" 128x64 ST7567 based module with green backlight</figcaption>
</figure>
</div></div>
<p>The device is fully glued together, and I didn't initially attempt disassembly. It appears to be more or less waterproof, and feels very solid. It uses a Hirose HR10 series 6 pin connector.</p>
<p>The KDU a serial device, the radio sends display state ever 50 ms or so in the form of a 32 byte burst, which is interpreted by a processor inside to drive the display. If the KDU is not refreshed every 100 ms or so it blanks the display.</p>
<p>This means there is no bitmap mode from what I can tell, and the display is largely limited to displaying the elements shown in the pictures. The top/bottom row indicators are generated by the KDU and mostly match what's printed on the radio button membrane.</p>
<p>It also transmits its' state every 10 ms, in the form of a 4 byte burst, this starts immediately upon power-on, even if no communications come from the radio.</p>
<p>The KDU is actually a pretty nice device on its own, and I've used it as an interface for a future project.</p>
<p>The main processor is a GD32F330C8, which is somewhat similar to a STM32F303 (but lacking the more advanced ADC's). This is a pretty powerful processor with an ARM-Cortex M4 processor core at up to 84 MHz. Below I clipped the GD32 and STM32F3 device pinouts, showing that they are almost pin compatible, except for pins 35 and 36.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/88/Screenshot-2024-04-13-at-10.44.22.png" alt="" width="304" height="260"></figure><figure class="post__image"><img  src="https://longview.be/media/posts/88/Screenshot-2024-04-13-at-10.46.02.png" alt="" width="386" height="245"></figure>
<p>There is an unpopulated SWD programming header on the PCB that could be used with a GD-Link programmer to reprogram this device if desired.</p>
<p>The LCD is heat-staked and soldered in place, but can be removed by sacrificing the heat stakes. The closest match for the LCD is a ERC12864-8, but some dimensions are slightly different.</p>
<p>Case disassembly was slightly painful but using a metal spudger I was able to crack the glue at the corners and work my way through until it popped open.</p>
<h3 id="mcetoc_1hqdh92aiq3">Battery</h3>
<p>The battery supplied seems to be around 60-70 Wh, and feels very solid. The charger PCB is just a straight adapter, only containing a single fuse (which is good).</p>
<p>I didn't measure idle power consumption, but the radio seems to have strong power saving modes typical of analog hand held radios (with no option to disable it). I would be surprised if the battery life was anything less than 48+ hours in standby.</p>
<p>This is basically excessive in my opinion, and they could have burned a bit more power instead to achieve more functionality.</p>
<h2 id="mcetoc_1h6etidbgbn">RF Performance</h2>
<p>I didn't bother testing it beyond the basics, it's a modern single-chip radio, and performs as such. Sensitivity is excellent as usual, but audio quality is lacking.</p>
<p>The RF power seemed to be in spec for the standard 144/433 bands.</p>
<h2 id="mcetoc_1h6f1pk62gk">Summary</h2>
<p>It bears repeating; the chassis and build quality is excellent, all the right gaskets are in place, custom flex PCB's with gold plating are used even where cheaper options would have worked.</p>
<p>A significant number of gluing operations have been done to ensure watertightness. The side connector seems to be made from custom machined metal pieces and plastic casting jigs. The chassis is cast and machined aluminium. The battery spring terminals have their own PCB with a custom silicone moulded plug-seal.</p>
<p>All the buttons are snap-domes which seem to be assembled in a jig and retained with a clear polyester tape that covers the PCB (fairly standard high-volume technique).</p>
<p>It seems like several custom hardware pieces were made for this device even though they could have easily skimped out. </p>
<p>Unfortunately the audio and UI issues were a bit too much for me to actually use this radio.</p>
<h2 id="mcetoc_1h6ev72rff5">Future Work</h2>
<p>I have deemed the chassis to be worthwhile, and my current long term plan is to design a new SDR transceiver to fit inside the rather spacious internal volume.</p>
<p>At initial issue of this article (July 2023) I've gotten to the point of driving the external KDU with custom software demodulators (using two RTL-SDR's as receivers, currently capable of FM/AM/SSB). Some chassis pieces have also been modified.</p>
<p>This system will definitely burn significantly more power, but one benefit of a large chassis is the accompanying large battery.</p>
<p>Additionally, I've made a new front panel PCB with a better speaker and dual microphones, though the work of driving the original LCD (it's an unusual LCD…) with a new processor has not started yet.</p>
<h3 id="mcetoc_1h6f1pk62gl">Chassis Upgrades</h3>
<p>Note: the new front panel PCB is in no way compatible with the original radio hardware, though it would be possible to e.g. replace the speaker with the OWS-4065T-4C 4 Ω 3 W speaker I used here without any major issues.</p>
<p>This waterproof speaker works fairly well in this enclosure only requiring a 1st order 400 Hz high pass filter to eliminate some boomyness.</p>
<p>I also selected CMC-2742WBL-25L IP57 microphones for this project. This microphone doesn't fit the holes as such, requiring some minor reaming on one side and a bushing on the other. They also require a 1st order high-shelf filter to boost the treble to acceptable levels.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/88/IMG_5491.jpeg" alt="" width="490" height="615"></figure>
<p>I decided to put in a front facing bi-colour LED, and added top/front light-sensors to auto-dim the backlights.</p>
<p>The top knob can be replaced with a MA00S1NCGF 10 position rotary switch with only a minor reaming operation and fits the top knob both in shaft distance and angular increments. Two pins can be installed in this switch to limit the rotational range to the 9 assigned positions.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/88/IMG_5508.jpeg" alt="" width="545" height="601"></figure>
<p>Above the mentioned rotary switch is installed and aligned, a new FFC PCB has been ordered for this purpose. Also visible are new custom FFC PCB's to break out all the side-connector pads (though a few are dedicated to ground and commoned).</p>
<p>As part of this effort, I had reason to work out the exact make and model of the original LCD to be able to drive it properly.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/88/IMG_7545.jpeg" alt="" width="326" height="435"></figure> <figure class="post__image"><img  src="https://longview.be/media/posts/88/IMG_7547.jpeg" alt="" width="320" height="434"></figure>
<p>Above a work in progress from April 2024 shows the new front panel with functioning keyboard, backlight, and LCD drive. Additionally, a red/green front panel indictor was installed, and a set of light sensors is used to control the brightness of all indicators.</p>
<h2 id="mcetoc_1h6ev72rff6">Addendum: Reliable AM Squelch &amp; FM Threshold Extension</h2>
<p>During my recent work on implementing my own SDR transceiver (at present only a receiver though), I implemented FM reception and noise squelch using fairly standard principles.</p>
<p>The basic concept of noise squelch for FM reception is to detect the signal to noise ratio of the received signal, for FM this can be done by tapping the discriminator, passing it through a band-pass filter centered higher than the audio cutoff (e.g. 5-10 kHz), and rectifying this.</p>
<p>With decreasing SNR, a combination of gaussian noise and impulse noise increases significantly near the quieting threshold (typically around 8-10 dB RF SNR). This increase in noise occurs at higher frequencies first (in particular, the impulse noise generates high order harmonics). By sensing high frequency noise, a reliable SNR estimator can be made, and the squelch simply checks the level of the noise detector to determine if a signal of sufficient quality is present. For more information look up FM thresholds effects, and also this NASA paper: <em><a href="https://ntrs.nasa.gov/citations/19720014482">A study of FM threshold extension techniques</a></em></p>
<p>Note that since higher frequencies degrade first, CTCSS reception is generally possible at extremely poor signal levels, which is why CTCSS detectors are always paired with a noise squelch system. Use a Goertzel tone detector for CTCSS by the way, I implemented a single detector and found performance was excellent, though it needs noise squelch to work well (since it only measures power in a band, it will trigger on noise as well).</p>
<p>Note also that the noise squelch detector signal can be used as a gain-control signal for the receiver audio to implement a basic noise reduction/soft-squelch system in combination with a noise-gate signal from an audio level detector. When correctly tuned, a few dB of extra sensitivity can be achieved for typical speech.</p>
<p>In any case, I started with FM reception and then later implemented AM reception (which is far simpler, and actually a side-product of my FM demodulator). I was initially surprised I had a functioning squelch, given that I hadn't implemented AM squelch yet. The FM noise squelch system was instead active, and this actually worked!</p>
<p>My observations indicate: running a full FM receiver with noise squelch in parallel with the AM demodulator works, though is a bit resource intensive. The reason this works is since the FM receiver is more or less able to lock on to the AM carrier and detect this (also possible is AFC, using this system).</p>
<p>The SNR to noise-detection function is more linear with AM signals (it's quite non-linear with FM), requiring different thresholds and narrower hysteresis to work well.</p>
<p>Testing thus far indicates that this squelch method works quite well in my area, and the noise-rejection ability is more or less equivalent to an FM receiver (i.e. significantly better than what actual airplanes have).</p>
<p>I suspect this squelch method may have some caveats in certain RF environments with e.g. adjacent channel signals, though I haven't tested it yet. In my area this does not seem to cause issues.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Racal RA5000 &quot;Raptor&quot; Headset</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/racal-ra5000-raptor-headset.html"/>
        <id>https://longview.be/racal-ra5000-raptor-headset.html</id>
        <media:content url="https://longview.be/media/posts/87/_IMG2168.jpg" medium="image" />
            <category term="Audio"/>

        <updated>2023-05-06T14:31:18+02:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/87/_IMG2168.jpg" alt="" />
                    <p>The Racal Acoustics RA5000 "Raptor" is a military-grade hearing protection/headset, in this article we'll be looking closer at the RA5000/1/1025 model.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/87/_IMG2168.jpg" class="type:primaryImage" alt="" /></p>
                <p>The Racal Acoustics RA5000 "Raptor" is a military-grade hearing protection/headset, in this article we'll be looking closer at the RA5000/1/1025 model.</p>

<p>This headset is available in a variety of modified configurations, the specific model I have seems to be intended for use with a TOCNET intercom system. Prices for this model sit around $50-100 on eBay at the time of writing.</p>
<p>I wasn't able to find a solid lead on how old this model is, most of the documentation available is for a slightly upgraded RA5001 model. Given the internals shown later it's likely an early 2010's or late 2000's design, though the basic design could be slightly older as this level of integration would likely be practical as early as 2000.</p>
<p>Modern devices of this class likely use modern low power DSP's to perform more intelligent noise filtering and cancellation but this is strictly analog affair, though a nicely built and implemented one.</p>
<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1h0a5v37i5e">Headset Overview</a></li>
<li><a href="#mcetoc_1h0a5v37i5f">PTT/Interface</a></li>
<li><a href="#mcetoc_1h0a5v37i5g">States &amp; Modes</a></li>
<li><a href="#mcetoc_1h0a6uodo79">Battery Life</a></li>
<li><a href="#mcetoc_1h0a5v37i5h">Pinout</a></li>
<li><a href="#mcetoc_1h0a5v37i5i">Internals</a></li>
<li><a href="#mcetoc_1h0a5v37i5j">Appendix – Operator's Manual</a></li>
</ul>
</div>
<h2 id="mcetoc_1h0a5v37i5e">Headset Overview</h2>
<p>The headset is a neck-band type suitable for use under combat helmets, a soft strap goes over the head and a rigid band goes behind the head to provide clamping force. This is one of generally two ways to do a combat headset — the other method seems favoured by Peltor and is to just attach the earpiece directly to the helmet.</p>
<p>A boom microphone is integrated in one ear-piece as usual. The datasheet notes that this can be swapped left/right easily but I don't really see how that would work without some new plastic covers as a minimum.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4844.jpeg" alt="" width="530" height="579"></figure>
<p>Comfort is quite good for being a fairly high noise rejection headset. Gel-pads seem to be used similar to but slightly stiffer than the Peltor ones. The headset is attached with a velcro-fastened over-head strap to keep it up, and a behind-head strap that provides clamping force on the ears. This arrangement allows the user to select how much clamping force is applied, allowing for improved comfort at the expense of isolation.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4847.jpeg" alt="" width="551" height="629"></figure>
<p>Informal comparisons found this headset in passive mode seems to have more rejection than the Peltor SportTac.</p>
<p>I have yet to find hearing protection that doesn't become sweaty and uncomfortable after an hour or two of use and this is no exception, but the amount of adjustability in the straps does make it possible to adjust it to change the pressure points.</p>
<h2 id="mcetoc_1h0a5v37i5f">PTT/Interface</h2>
<p>A PTT/control block is permanently attached to the headset via a wire, and the headset connects to an external radio via a AP-107 7 pin breakaway connector. This connector is quite common, and while pinout and functionality is application specific, it generally includes headset audio, microphone, PTT, and power. It seems to be manufactured primarily by Amphenol Nexus with no MIL-number, and is intended as a waterproof break-away self-cleaning field connector. The AP/AJ-107 connector seems to only exist as a cable-cable connector, and is probably only used for this purpose.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4842.jpeg" alt="" width="478" height="509"></figure>
<p>The PTT can be powered by a single 1.5 V AA size battery, or from an external 13-36 V DC power source from the radio/intercom system.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4843.jpeg" alt="" width="491" height="550"></figure>
<p>The PTT is a momentary-off-on toggle switch, the on-state connects a 470 Ω resistor to the PTT lines while the momentary-state is a short. This can easily be modified by opening the PTT and re-soldering if desired.</p>
<p>A small flap on the top of the PTT hides a gas-mask microphone connector. When the flap is opened a set of reed-switches switch the active microphone to this connector.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4840.jpeg" alt="" width="3024" height="1974"></figure>
<h2 id="mcetoc_1h0a5v37i5g">States &amp; Modes</h2>
<p>The headset has the following modes</p>
<ol>
<li>Unpowered, passive noise canceling, passive mic and speaker</li>
<li>AA battery powered hear-through, passive mic and speaker?</li>
<li>Powered, active &amp; passive noise canceling, active mic and speaker</li>
<li>Powered, better hear-through, active mic and speaker</li>
</ol>
<p>Note that only mode 3 and 4 are really meant to be used with an external radio, since it's expected that whatever radio/intercom you plug in will have a power source to supply. Modes 1/2 are meant for dismounted use, but can technically be used with an external radio as well.</p>
<p>When powered externally, the microphone is amplified, and an active sound cancellation seems to be activated, which seems to use the ambient microphones to to cancel out external noise.</p>
<p>The active ANC is not massively effective at higher frequencies, but does a good job canceling low and low-mid tones (I'd guess it's useful to around 1 kHz max). It's very effective with e.g. engine rumbling, and it's pretty good when e.g. using a milling machine. It's also pretty nice to use with a talk-through microphone (must be done external to the headset) for longer conversations.</p>
<p>A datasheet lists attenuation values for this headset.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/Screenshot-2023-05-11-at-22.19.15.png" alt="" width="1170" height="530"></figure>
<p>When powered by the AA battery, the talk-through mode can be used (provides ambient stereo sound through the headset). The talk-through mode in battery mode seems to have a slightly worse frequency response than the powered mode, and is slightly quieter.</p>
<p>Talk-through mode is specified as providing approximately equal sound levels as without the headset (seems accurate). The compression threshold is specified as 140 dB SPL, though my informal testing suggests some compressions starts in the 90-100 dB SPL range (tested by holding my phone speaker up against a SPL meter and the Racal ambient mics, battery mode.)</p>
<p>The <a href="https://longview.be/peltor-sporttac-upgrades-for-two-way-radios.html">Peltor SportTac</a> for comparison has much lower compression thresholds, which can affect perceived sound somewhat, increasing subjective noise in a tiring way.</p>
<p>Below is a table of sensitivities for various modes, the sensitivity of -56 dBm for the ANR unpowered mode seems to line up with typical sensitivities for this type of microphone. The –32 dBm powered figure seems to approximately line up with expected figures for electret microphones. Note that no acoustic level is specified here, but I previously calculated that a H-250 handset has a nominal sensitivity of –56 dBm/2.8 Pa to this may be the reference pressure. (The difference between 2.8 and 1 Pa is fairly minimal)</p>
<p>The passive mode listed below is for a variant without electronics, but I'm not sure why the sensitivity is almost 30 dB less for the microphone there.</p>
<p>The internal microphone preamp is not the best in the world since it does add some slightly audible hiss, but it's acceptable for radio communications. The microphone itself has good acoustic noise canceling, it's possible to have a conversation while running a vacuum cleaner (90+ dBSPL) without issue (though some background noise will be present).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/Screenshot-2023-05-11-at-22.20.43.png" alt="" width="1018" height="488"></figure>
<p>Above we can also note that the speaker characteristics change from a direct speaker connection in unpowered mode a high impedance amplified input in powered mode. Note that powered in this context means externally powered; in battery mode the speaker and microphones are both unamplified even when in talk-through mode.</p>
<p>In both internal and externally powered cases the push-button on the device is used to cycle between off/talk-through (AA battery) or ANC/talk-through (external power). An audible beep sequence gives feedback on what mode is selected, and the headset powers on to ANC mode when external power is applied.</p>
<h2 id="mcetoc_1h0a6uodo79">Battery Life</h2>
<p>The various versions of manuals list various battery life times ranging from 50-150 hours. This will certainly depend on the temperature and volume levels used.</p>
<p>I did some measurements in a reasonably quiet room and found the following current consumptions from a AA Lithium primary battery (at 1.7 V):</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 30.5278%;"><strong>State</strong></td>
<td style="width: 20.1141%;"><strong>Current</strong></td>
<td style="width: 49.3581%;"><strong>Batttery Life Estimate (L91)</strong></td>
</tr>
<tr>
<td style="width: 30.5278%;">Off</td>
<td style="width: 20.1141%;">5 µA</td>
<td style="width: 49.3581%;">700'000 hours (&gt;10 years)</td>
</tr>
<tr>
<td style="width: 30.5278%;">Talk-Through</td>
<td style="width: 20.1141%;">8 mA</td>
<td style="width: 49.3581%;">437.5 hours (18 days)</td>
</tr>
</tbody>
</table>
<p>For the above calculation the <a href="https://data.energizer.com/pdfs/l91.pdf">Energizer L91 "Ultimate Lithium"</a> specification of approximately 3500 mAh for low-current loads was used. The off-state current is sufficiently low that the shelf life of the battery is the limiting factor in most cases.</p>
<p>Battery life with alkaline cells will be less, especially at lower temperatures. Lithium based primary batteries (Energizer/Varta sell largely equivalent batteries here) should perform approximately as well across the entire temperature range for this low current draw.</p>
<p>However, these measurements indicate that the manufacturers battery life estimates are likely quite conservative. Given the stated operation temperature range of –40 - +50°C I suspect their estimates assume an alkaline battery at –40°C, which is an extreme worst case and you might only get 10-20% capacity.</p>
<p>At least we know that leaving the batteries in won't drain them very quickly.</p>
<h2 id="mcetoc_1h0a5v37i5h">Pinout</h2>
<p>My kit included a ”yoyo cord,” also known as a bailout-cable, it is a 13 pin 38999 socket connector to AJ-107 coiled extension cable. This is an extremely heavy and very long coiled cable that would be extremely impractical to walk around with, it connects to a TOCNET intercom system. It does give us a free AJ-107 plug that can relatively easily be disassembled and reused.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4848.jpeg" alt="" width="506" height="486"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4849.jpeg" alt="" width="507" height="437"></figure>
<p>Pinouts use the Nexus pin numbers, which are viewed from the cable entry side (i.e. the side you'd solder the wires to when assembling the plug, mirrored from looking into the connector:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/Screenshot-2023-05-11-at-21.58.34.png" alt="" width="1464" height="728"></figure>
<p>If you're looking into the mating side of e.g. the AP-107, then refer to the AJ-107 figure above.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 13.1241%;"><strong>AP-107</strong></td>
<td style="width: 12.1255%;"><strong>38999</strong></td>
<td style="width: 27.9863%;"><strong>Function</strong></td>
<td style="width: 46.6214%;"><strong>Note</strong></td>
</tr>
<tr>
<td style="width: 13.1241%;">1</td>
<td style="width: 12.1255%;">N/C</td>
<td style="width: 27.9863%;">N/C</td>
<td style="width: 46.6214%;">Second audio in some models?</td>
</tr>
<tr>
<td style="width: 13.1241%;">2</td>
<td style="width: 12.1255%;">6</td>
<td style="width: 27.9863%;">PTT</td>
<td style="width: 46.6214%;">0 Ω (470 Ω when latched)</td>
</tr>
<tr>
<td style="width: 13.1241%;">3</td>
<td style="width: 12.1255%;">4</td>
<td style="width: 27.9863%;">GND</td>
<td style="width: 46.6214%;">Common for speaker, PTT, Power</td>
</tr>
<tr>
<td style="width: 13.1241%;">4</td>
<td style="width: 12.1255%;">2</td>
<td style="width: 27.9863%;">Microphone Return</td>
<td style="width: 46.6214%;">Powered: Common to GND for amplified mic</td>
</tr>
<tr>
<td style="width: 13.1241%;">5</td>
<td style="width: 12.1255%;">8</td>
<td style="width: 27.9863%;">16 Ω Speaker</td>
<td style="width: 46.6214%;">Powered: 500 Ω amplified</td>
</tr>
<tr>
<td style="width: 13.1241%;">6</td>
<td style="width: 12.1255%;">1</td>
<td style="width: 27.9863%;">Microphone Signal</td>
<td style="width: 46.6214%;">Powered: Amplified mic, electret levels</td>
</tr>
<tr>
<td style="width: 13.1241%;">7</td>
<td style="width: 12.1255%;">12</td>
<td style="width: 27.9863%;">13.5-36 VDC</td>
<td style="width: 46.6214%;">Around 50 mA consumption</td>
</tr>
</tbody>
</table>
<p>Note that when powered externally (but not on batteries) the microphone is amplified to an electret-compatible level, but when unpowered the 150 Ω dynamic microphone is directly connected to the pins (directly connected, floating).</p>
<p>I'm not sure if the device uses dual speakers (one for radio, one for hear-through), or if the battery powered hear-through+comms mode is done using clever tricks.</p>
<p>External power seems to be selected when a voltage of at least 11 V or so is applied, though the specification is 13.5-36 V.</p>
<h2 id="mcetoc_1h0a5v37i5i">Internals</h2>
<p>A full tear-down was not done, but the top of the PTT can easily be accessed by undoing two M3 DIN912 screws (2.5 mm allen-key).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4799.jpeg" alt="" width="3024" height="3930"></figure>
<p>The inside consists of two boards with a cable between them (red). The upper right has the battery and external cable connections, the lower left connector is the microphone connections. A PIC16F630 microcontroller is the only smarts in the device, and seems to control the ANC/TT modes. The 630 was introduced around 2006 or so, dating the design to no earlier than this.</p>
<p>We can also note EMI filters installed for all inputs/outputs, these seem to shield relative to the ground-line internally, and the electronics are not referenced to the chassis/wire shields.</p>
<p>The relays seem to be used to switch in the microphone preamp, and possibly to switch the headset speakers to the internal amplifiers in powered mode. Not visible in the picture is a set of reed-relays that sense the mask-microphone port cover state to switch the microphones around.</p>
<p>I don't see anywhere to e.g. put in a stereo audio input, so stereo models may simply use different PCB's.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4800.jpeg" alt="" width="3024" height="4032"></figure>
<p>The bottom board contains more discrete analog &amp; digital circuitry. The opamps seem to be OPA4244's, which are decent performance very low power opamps. There seems to be a charge pump generating 3 V from the battery input when in TT battery mode. None of the chips I identified can run directly off a 1.5 V battery so this is probably the main supply for everything.</p>
<p>The OPA4244 is not an amazingly low noise device, but it does seem to be doing an acceptable job at amplifying the dynamic microphone.</p>
<p>An ST TS922 MSOP-8 BiCMOS opamp is also visible, I initially assumed this was driving the speakers. On further review it seems this is used as the microphone pre-amplifier in powered mode. This 10 nV⁄√Hz 4 MHz device is basically adequate for the task.</p>
<p>A slightly better alternative for improved audio may be a TL972IPWR, which has around half the noise. I tried putting this device in and while it did work I can't say I found any noticeable improvement.</p>
<p>The loose wire-wire connector is the PTT signal and the ground line from the external connector. The PTT switch looks to be relatively simple to remove if you wanted to re-wire it.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4801.jpeg" alt="" width="3024" height="3147"></figure>
<p>The PTT case seems to be made of a nylon-glass-fibre composite and seems pretty good. Internally it has a conductive shielding paint.</p>
<h2 id="mcetoc_1h0a5v37i5j">Appendix – Operator's Manual</h2>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4807.jpeg" alt="" width="1649" height="2337"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4808-2.jpeg" alt="" width="1899" height="2690"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4809.jpeg" alt="" width="1917" height="2761"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/87/IMG_4810.jpeg" alt="" width="1764" height="2563"></figure>
            ]]>
        </content>
    </entry>
    <entry>
        <title>Adding In-Tree Kernel Modules to RHEL/CentOS</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/adding-in-tree-kernel-modules-to-rhelcentos.html"/>
        <id>https://longview.be/adding-in-tree-kernel-modules-to-rhelcentos.html</id>
        <media:content url="https://longview.be/media/posts/86/2x03-Dragon-Rouge-720p-WEB-DL.mkv_snapshot_08.43_2022.07.21_11.21.36.jpg" medium="image" />

        <updated>2023-03-25T11:47:30+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/86/2x03-Dragon-Rouge-720p-WEB-DL.mkv_snapshot_08.43_2022.07.21_11.21.36.jpg" alt="" />
                    <p>Red Hat Enterprise Linux and the closely associated CentOS Stream 9 remove a lot of legacy kernel modules from their kernels. This seems to also include removing sources from their distributed kernels.</p>
<p>I wanted to add the scsi/bfa driver to support Brocade Fibre Channel adapters, this is mainlined but not part of the RHEL kernel sources.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/86/2x03-Dragon-Rouge-720p-WEB-DL.mkv_snapshot_08.43_2022.07.21_11.21.36.jpg" class="type:primaryImage" alt="" /></p>
                <p>Red Hat Enterprise Linux and the closely associated CentOS Stream 9 remove a lot of legacy kernel modules from their kernels. This seems to also include removing sources from their distributed kernels.</p>
<p>I wanted to add the scsi/bfa driver to support Brocade Fibre Channel adapters, this is mainlined but not part of the RHEL kernel sources.</p>

<p><em>To actually use a Brocade FC adapter you also need the bfa-firmware package, which can be found in the Fedora repos (just download the RPM and install directly, it's not getting any updates). For Debian the package is firmware-qlogic.</em></p>
<p>DKMS is the de facto tool to add kernel drivers to your Linux, this tool will automatically re-compile and install any out-of-tree kernel drivers you add. Unfortunately the documentation for adding something that's already part of the Linux kernel but was left out intentionally is less documented.</p>
<p>The CentOS Wiki has good documentation on usage  <a href="https://wiki.centos.org/HowTos/BuildingKernelModules">https://wiki.centos.org/HowTos/BuildingKernelModules</a></p>
<p>I installed kernel-devel and kernel-sources packages, and the other requirements for compilation as defined in various wikis.</p>
<p>I then downloaded the matching kernel base version from kernel.org, in this case 5.14.19, and extracted it.</p>
<p>To add my drivers/scsi/bfa module, I made a folder /usr/src/bfa-5.14 and copied the contents of the kernel source drivers/scsi/bfa folder to it.</p>
<p>I then made a dkms.conf file in that folder:</p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>PACKAGE_NAME="bfa"</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>PACKAGE_VERSION="5.14"</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>BUILT_MODULE_NAME[0]="bfa"</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>DEST_MODULE_LOCATION[0]="/kernel/driver/scsi/bfa"</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>AUTOINSTALL="yes"</code></p>
<p lang="nb-NO">There is a problem with the module Makefile, which I fixed manually:</p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>obj-$(CONFIG_SCSI_BFA_FC) := bfa.o</code></p>
<p lang="nb-NO">Should be replaced with:</p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>obj-m := bfa.o</code></p>
<p lang="nb-NO">This is since the Makefile is conditionally compiled based on the kernel .config, which doesn't include this module. You can also build by passing CONFIG_SCSI_BFA_FC=m to make, but adding this to the dkms.conf seemed daunting since I would have had to define the entire make-command from first principles.</p>
<p lang="nb-NO">As root:</p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>dkms add -m bfa -v 5.14</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>dkms build -m bfa -v 5.14</code></p>
<p lang="nb-NO" style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"><code>dkms install -m bfa -v 5.14</code></p>
<p lang="nb-NO">This then installed and compiled successfully, and I observed that the module was recompiled automatically by yum when a new kernel release was installed.</p>
<p lang="nb-NO"><span style="text-decoration: line-through;">Now I haven't actually tested this module, since I'm still waiting on the Brocade hardware, but the module is definitely compiled and plumbed up!</span></p>
<p lang="nb-NO">Update! It works, so if anyone needs to get a Brocade 400/800 series (e.g. 815, 825) FC HBA working on RHEL/CentOS, these are the exact instructions.</p>
<p lang="nb-NO">Use the open source LTFS project to talk to tapes.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>BFU550X Based TIA Performance Characterisation</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/bfu550x-based-tia-performance-characterisation.html"/>
        <id>https://longview.be/bfu550x-based-tia-performance-characterisation.html</id>
        <media:content url="https://longview.be/media/posts/85/20120320T231823__IGP1729_2k.jpg" medium="image" />
            <category term="RoF"/>

        <updated>2023-03-11T12:26:24+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/85/20120320T231823__IGP1729_2k.jpg" alt="" />
                    <p>This is a followup to the previous <a href="https://longview.be/king-ka-42b-adf-antenna-system.html">ADF antenna system</a> article, and details performance measurement of the BFU550X based cascoded TIA.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/85/20120320T231823__IGP1729_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>This is a followup to the previous <a href="https://longview.be/king-ka-42b-adf-antenna-system.html">ADF antenna system</a> article, and details performance measurement of the BFU550X based cascoded TIA.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1gr8bclghfj">Design Overview</a>
<ul>
<li><a href="#mcetoc_1gr8bclghfk">TIA Basics</a></li>
<li><a href="#mcetoc_1gr8bclghfl">TIA Design</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gr8bd5defp">Trans-Impedance Amplifier Measurement</a>
<ul>
<li><a href="#mcetoc_1gr88sro87e">Initial Measurement, 220 Ω Collector/10 kΩ Feedback</a></li>
<li><a href="#mcetoc_1gr88sro87f">1 kΩ Collector/10 kΩ Feedback</a></li>
<li><a href="#mcetoc_1gr88sro87g">220 Ω Collector/1 kΩ Feedback</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gr8bclghfn">Summary</a></li>
</ul>
</div>
<h2 id="mcetoc_1gr8bclghfj">Design Overview</h2>
<h3 id="mcetoc_1gr8bclghfk">TIA Basics</h3>
<p>A trans-impedance amplifier (TIA) is a current to voltage amplifier, in electronics terms this is usually shown as an inverting operational amplifier, with the source-resistance set to 0 Ω. This in principle increases the voltage gain to infinity (for the case of a 0 Ω source impedance voltage source), but when a current-source is connected it makes sense again.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/TIA_Drawings_TIA_Basic.drawio.svg" alt="" width="575" height="229"></figure>
<p>The output voltage is then set by the input current, and since the input signal is a current in Amperes, and the output is voltage in Volts, the gain unit is V⁄A. This happens to be equivalent to Ohm (Ω), and the gain is therefore often expressed in this way.</p>
<p>A TIA then has a gain unit of Ω, and since it's a current input amplifier, the noise performance is normally expressed as an input referred current noise density with unit Amperes per square-root of bandwidth. This mode of measurement is useful since it eliminates the bandwidth dependency by normalising it to 1 Hz. RMS noise (for white/thermal noise) follows the measurement bandwidth — increasing with the square root of the bandwidth — and this represents that fact. </p>
<p>TIA's are very commonly used in sensor applications, most commonly photodiodes, whose output is a current corresponding to the input optical power. Basically they give you one electron per photon – the gain unit is A⁄W. PIN photodiodes are standard for optical communications (APD's are better but harder to use and expensive).</p>
<p>PIN diodes require a 5 V reverse bias to achieve optimal performance, and they therefore have a fairly limited output voltage range if simply connected to a resistor; the DC component of the output current will quickly reach a significant voltage if a high value resistor is added. TIA's are used to effectively short circuit the diode.</p>
<h3 id="mcetoc_1gr8bclghfl">TIA Design</h3>
<p>The design under test today is a cascoded bipolar design, intended for use with PIN diodes in optical communications. The design can therefore make some assumptions about the signal, simplifying biasing.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/Screenshot-2023-03-11-at-13.38.06.png" alt="" width="2206" height="1376"></figure>
<p>BFU550X high speed Silicon NPN transistors are used in this design, this is somewhat a compromise solution since MOSFET amplifiers generally have better current noise performance. However, good MOSFET amplifiers are getting harder to find as discrete devices, in particular dual gate MOSFETs are basically nonexistent in the market now.</p>
<p>The input current is generated in PD1, which is reverse biased to around 5 V to lower the diode's junction capacitance. RV1 is used to bias the amplifier, this design is relatively tolerant of variations in DC current level, but the assumption is that the average optical power to the PIN diode is constant. Therefore, the average DC photocurrent will be constant, and adjustment is not required.</p>
<p>Additional stabilisation is effected by using R6 as emitter-feedback.</p>
<p>Q1 is the cascode transistor, this operates as a common-base amplifier, ensuring that the emitter voltage is fixed. The effect of this is that the collector voltage of Q2 is fixed, meaning that the miller-capacitance from collector to base is eliminated. Ordinarily due to the voltage gain, the effective collector-base capacitance is multiplied by the voltage gain of the amplifier, limiting bandwidth.</p>
<p>The amplifier gain is set by R3, which provides AC feedback to the input. An emitter-followed output driver is included as well, this isolates the amplifier core from the output loading, and reduces the output impedance.</p>
<p>The circuitry is shown below:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/IMG_4209.jpg" alt="" width="2473" height="2081"></figure>
<h2 id="mcetoc_1gr8bd5defp">Trans-Impedance Amplifier Measurement</h2>
<p>The test setup is shown below, an RF generator is applied to the TIA through a high value series resistor. Since the TIA is assumed to operate in closed loop, the voltage at the input base is assumed to be zero. We can then calculate the input current based on the input voltage, and we can measure the output voltage directly.</p>
<p>A DC blocking capacitor and termination resistor is included to ensure that the applied voltage is well defined.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/TIA_Drawings-TIA_Measurement.drawio-2.svg" alt="" width="672" height="241"></figure>
<p>This allows measurement of the current→voltage transfer function, or the trans-impedance gain (V⁄A, or Ω).</p>
<p>For the basic design, a 10 kΩ series resistor was used, since this matches the intended gain of the amplifier core.</p>
<p>Bias current was adjusted using a signal generator for maximum gain and minimal distortion for each test. In general it was found that the bias-level had a major effect on the stability of the amplifier, though it was possible to stabilise in all tested configurations.</p>
<h3 id="mcetoc_1gr88sro87e">Initial Measurement, 220 Ω Collector/10 kΩ Feedback</h3>
<p>The initial measurement used the as-designed values from the schematic. Collector resistor of 220 Ω and 10 kΩ feedback.</p>
<p>The applied input voltage was –20 dBm (50 Ω), this corresponds to a voltage of 22 mV RMS into 50 Ω.</p>
<p>The input current then follows as 22 mV ⁄ 10 kΩ = 2.2 µA RMS.</p>
<p>We can then measure the output power vs. frequency. The calculation of gain is simply the output voltage ÷ input current, yielding the TIA gain in Ω.</p>
<p>The TIA gain can usefully be expressed relative to 50 Ω, the gain is calculated as 20·log<sub>10</sub>(TIA ⁄ 50), and can be compared to MMIC amplifiers.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 24.2511%;">Frequency [MHz]</td>
<td style="width: 29.2628%;">Output Power [dBm/mV RMS]</td>
<td style="width: 29.9383%;">TIA Gain [kΩ]</td>
<td style="width: 16.5478%;">Gain [dB]</td>
</tr>
<tr>
<td style="width: 24.2511%;">10</td>
<td style="width: 29.2628%;">–26/11</td>
<td style="width: 29.9383%;">5</td>
<td style="width: 16.5478%;">40</td>
</tr>
<tr>
<td style="width: 24.2511%;">100</td>
<td style="width: 29.2628%;">–29/8</td>
<td style="width: 29.9383%;">3.6</td>
<td style="width: 16.5478%;">37</td>
</tr>
<tr>
<td style="width: 24.2511%;">200</td>
<td style="width: 29.2628%;">–34/4.4</td>
<td style="width: 29.9383%;">2</td>
<td style="width: 16.5478%;">32</td>
</tr>
</tbody>
</table>
<p>Due to the output buffering and termination, the maximum gain will nominally be half the actual feedback value, so the peak of 5 kΩ is expected. The drop-off at higher frequencies could be equalised in another amplifier stage if required.</p>
<p>Noise measurement involves measurement of the output noise voltage with no RF input, we can then compute the input referred noise floor of the amplifier vs. frequency. The preferred unit for comparison here is A⁄√Hz.</p>
<p>This measurement is performed using a spectrum analyser, and the analyser must be configured such that the output noise floor of the TIA is measurable.</p>
<p>A bandwidth of 1 MHz was used for measurement. The input referred noise floor is then calculated as: noise voltage ⁄ TIA gain = input current; input current ⁄ √BW (1 MHz; = 1000) = noise floor.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 33.2855%;">Frequency [MHz]</td>
<td style="width: 33.2855%;">Noise Power [dBm/µV RMS]</td>
<td style="width: 33.2866%;">Noise Floor [pA⁄√Hz]</td>
</tr>
<tr>
<td style="width: 33.2855%;">10</td>
<td style="width: 33.2855%;">–70/70</td>
<td style="width: 33.2866%;">70 µV ⁄ 5 kΩ ⁄ 1000 = 14</td>
</tr>
<tr>
<td style="width: 33.2855%;">100</td>
<td style="width: 33.2855%;">–70/70</td>
<td style="width: 33.2866%;">19</td>
</tr>
<tr>
<td style="width: 33.2855%;">200</td>
<td style="width: 33.2855%;">–75/39</td>
<td style="width: 33.2866%;">19.5</td>
</tr>
</tbody>
</table>
<p>This noise performance is not atrocious, but this is approximately 4⨉ higher than I'd like to see.</p>
<h3 id="mcetoc_1gr88sro87f">1 kΩ Collector/10 kΩ Feedback</h3>
<p>The collector resistor was increased to 1 kΩ to improve open-loop gain, tests were repeated.</p>
<p>It was found that the gain and noise floor was flat up to around 30 MHz, and then dropped off at a 1st order rate of 10 dB/octave.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 25.831%;">Frequency [MHz]</td>
<td style="width: 40.9307%;">Output Power [dBm/mV RMS]</td>
<td style="width: 16.6904%;">TIA Gain [kΩ]</td>
<td style="width: 16.5478%;">Gain [dB]</td>
</tr>
<tr>
<td style="width: 25.831%;">30</td>
<td style="width: 40.9307%;">–25/12</td>
<td style="width: 16.6904%;">5.5</td>
<td style="width: 16.5478%;">41</td>
</tr>
<tr>
<td style="width: 25.831%;">100</td>
<td style="width: 40.9307%;">–36/3.5</td>
<td style="width: 16.6904%;">1.6</td>
<td style="width: 16.5478%;">30</td>
</tr>
<tr>
<td style="width: 25.831%;">200</td>
<td style="width: 40.9307%;">–47/1</td>
<td style="width: 16.6904%;">450</td>
<td style="width: 16.5478%;">19</td>
</tr>
</tbody>
</table>
<p>Noise measurements were performed:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 33.2855%;">Frequency [MHz]</td>
<td style="width: 33.2855%;">Noise Power [dBm/µV RMS]</td>
<td style="width: 33.2866%;">Noise Floor [pA⁄√Hz]</td>
</tr>
<tr>
<td style="width: 33.2855%;">30</td>
<td style="width: 33.2855%;">–75/39</td>
<td style="width: 33.2866%;">39 µV ⁄ 5.5 kΩ ⁄ 1000 = 7</td>
</tr>
<tr>
<td style="width: 33.2855%;">100</td>
<td style="width: 33.2855%;">–82/18</td>
<td style="width: 33.2866%;">11.3</td>
</tr>
<tr>
<td style="width: 33.2855%;">200</td>
<td style="width: 33.2855%;">–90/7</td>
<td style="width: 33.2866%;">15.6</td>
</tr>
</tbody>
</table>
<p>The usable gain-bandwidth of the amplifier is clearly reduced. This configuration would be useful for e.g. a HFoF receiver which only needs around 30 MHz bandwidth.</p>
<h3 id="mcetoc_1gr88sro87g">220 Ω Collector/1 kΩ Feedback</h3>
<p>This configuration increases TIA bandwidth, but reduces gain as expected.</p>
<p>It was found that the gain was flat up to around 200 MHz, and then dropped off at 10 dB/octave. The 400 MHz drop corresponds approximately to the –6 dB point.</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 24.9763%;">Frequency [MHz]</td>
<td style="width: 41.7854%;">Output Power [dBm/mV RMS]</td>
<td style="width: 16.6904%;">TIA Gain [kΩ]</td>
<td style="width: 16.5478%;">Gain [dB]</td>
</tr>
<tr>
<td style="width: 24.9763%;">10</td>
<td style="width: 41.7854%;">–44/1.4</td>
<td style="width: 16.6904%;">0.630</td>
<td style="width: 16.5478%;">22</td>
</tr>
<tr>
<td style="width: 24.9763%;">100</td>
<td style="width: 41.7854%;">–44/1.4</td>
<td style="width: 16.6904%;">0.630</td>
<td style="width: 16.5478%;">22</td>
</tr>
<tr>
<td style="width: 24.9763%;">200</td>
<td style="width: 41.7854%;">–44/1.4</td>
<td style="width: 16.6904%;">0.630</td>
<td style="width: 16.5478%;">22</td>
</tr>
<tr>
<td style="width: 24.9763%;">400</td>
<td style="width: 41.7854%;">–51/0.63</td>
<td style="width: 16.6904%;">0.28</td>
<td style="width: 16.5478%;">15</td>
</tr>
</tbody>
</table>
<p>Noise measurements were performed:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 30.3852%;">Frequency [MHz]</td>
<td style="width: 27.6748%;">Noise Power [dBm/µV RMS]</td>
<td style="width: 41.7974%;">Noise Floor [pA⁄√Hz]</td>
</tr>
<tr>
<td style="width: 30.3852%;">10</td>
<td style="width: 27.6748%;">–88/9</td>
<td style="width: 41.7974%;">9 µV ⁄ 0.63 kΩ ⁄ 1000 = 14.3</td>
</tr>
<tr>
<td style="width: 30.3852%;">100</td>
<td style="width: 27.6748%;">–88/9</td>
<td style="width: 41.7974%;">14.3</td>
</tr>
<tr>
<td style="width: 30.3852%;">200</td>
<td style="width: 27.6748%;">–88/9</td>
<td style="width: 41.7974%;">14.3</td>
</tr>
<tr>
<td style="width: 30.3852%;">400</td>
<td style="width: 27.6748%;">–93/5</td>
<td style="width: 41.7974%;">18</td>
</tr>
</tbody>
</table>
<p>This performance is also not fantastic, but is expected.</p>
<h2 id="mcetoc_1gr8bclghfn">Summary</h2>
<p>The TIA design used here appears to work sufficiently well, but I'm not super amazed by the performance.</p>
<p>The bandwidth as shown below is sufficient for the intended use case:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/Gain.svg" alt="" width="2356" height="1673"></figure>
<p>The major issue in my opinion is the noise floor, which is around 4⨉ more than I'd like to see:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/Noise.svg" alt="" width="2356" height="1673"></figure>
<p>Future work will be to build and characterise a similar design using a S982 dual-gate MMIC amplifier. This could potentially improve on the noise performance, and in principle may have sufficient bandwidth for the job in most cases.</p>
<p>The downside is that this IC is obsolete, so others will have trouble reproducing the design.</p>
<p>Here's a sneak preview of this circuit:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/85/Screenshot-2023-03-11-at-14.33.50.png" alt="" width="1876" height="900"></figure>
<p>This version is intended to be optimised for higher bandwidth, so an inductor is used to ground, though it could be replaced by a resistor as well.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>King KA-42B ADF Antenna System</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/king-ka-42b-adf-antenna-system.html"/>
        <id>https://longview.be/king-ka-42b-adf-antenna-system.html</id>
        <media:content url="https://longview.be/media/posts/84/20220219T121719__IMG4525_2k.jpg" medium="image" />
            <category term="RoF"/>

        <updated>2023-03-01T21:51:29+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/84/20220219T121719__IMG4525_2k.jpg" alt="" />
                    <p>The King KA-42B ADF antenna is a neat little 3-in-1 antenna-pod for aircraft. With some minor<sup>[0]</sup> effort it can be used as a pretty good HF reception antenna.</p>
<p><sup>[0] </sup>for certain definitions of "minor"</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/84/20220219T121719__IMG4525_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>The King KA-42B ADF antenna is a neat little 3-in-1 antenna-pod for aircraft. With some minor<sup>[0]</sup> effort it can be used as a pretty good HF reception antenna.</p>
<p><sup>[0] </sup>for certain definitions of "minor"</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1gqm4acrc2f">ADF &amp; The KA-42B</a>
<ul>
<li><a href="#mcetoc_1gqm4acrc2g">What is ADF?</a></li>
<li><a href="#mcetoc_1i5dnelsk4s">Not So Brief Aside: A look at WW2-era navigational systems</a>
<ul>
<li><a href="#mcetoc_1i5dqtls25r">B-17 "Flying Fortress"</a></li>
<li><a href="#mcetoc_1i5dqtls25s">Other Systems</a></li>
<li><a href="#mcetoc_1i5dqtls25t">eLORAN</a></li>
<li><a href="#mcetoc_1i5dsfm0h69">H2S</a></li>
</ul>
</li>
<li><a href="#mcetoc_1i5dqtls25u">Back to ADF</a></li>
<li><a href="#mcetoc_1gqm4u13o3a">Why is ADF?</a></li>
<li><a href="#mcetoc_1gqm66e42g2">The KA-42B</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gqm66e42g3">Outdoor Unit</a>
<ul>
<li><a href="#mcetoc_1gqm66e42g4">Preamplifiers</a></li>
<li><a href="#mcetoc_1gqmg43d0je">Frequency Conversion</a></li>
<li><a href="#mcetoc_1gqm66e42g5">Control System</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gqm66e42g6">Indoor Unit</a>
<ul>
<li><a href="#mcetoc_1gqm66e42g7">Demodulator Design</a></li>
<li><a href="#mcetoc_1gqp3rne2kn">Automatic Phasing System</a></li>
<li><a href="#mcetoc_1gqm66e42g8">Receiver Trans-Impedance Amplifier</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gqp3rne2ko">Summary</a>
<ul>
<li><a href="#mcetoc_1gqpjqtehnf">Future Work</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gqme8sc5ig">Addendum</a>
<ul>
<li><a href="#mcetoc_1gqpfi5i3n0">Prototyping Effort</a></li>
<li><a href="#mcetoc_1gqpfhl5hmt">External TIA/Optical Receiver</a></li>
</ul>
</li>
</ul>
</div>
<h2 id="mcetoc_1gqm4acrc2f">ADF &amp; The KA-42B</h2>
<p>The King KA-42B antenna is an aeronautical navigation antenna, likely intended for use in general-aviation and small commercial aircraft. It can be found used for relatively low prices on sites such as eBay.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-13.09.26.png" alt="" width="1930" height="942"></figure>
<p>The function of the antenna and the associated electronics &amp; display devices is to implement "Automatic Direction Finding," which is also on occasion called a radio-compass. The occasion seems to be the 1940's and earlier.</p>
<h3 id="mcetoc_1gqm4acrc2g">What is ADF?</h3>
<p>ADF is a subset of Radio Direction Finding (RDF or simply DF), which is a technique developed some time before World War 2 for use in signals intelligence. Today this is usually referred to as ADF or NDB navigation; during WW2 it was usually referred to as a Radio Compass. RDF for Radio Direction Finding was a British code name for radar at the time, which is not directly related to ADF systems.</p>
<p>The goal is to determine the direction that a specific radio signal came from, and many techniques can be used to do this. The simplest technique is to get a high gain antenna and rotate it, the signal likely originates from whatever direction gives the strongest signal. This is basically how most radars work.</p>
<p>Unfortunately when the signal of interest has a wavelength of hundreds of meters, this becomes slightly impractical.</p>
<p>Fortunately, magnetic loop antennas have a nice property where their antenna diagrams are cardioids:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-Loop_Antenna.drawio.svg" alt="" width="478" height="381"></figure>
<p>In the azimuth plane (for a vertically oriented loop), loop antennas have two deep null-responses, and very broad reception lobes.</p>
<p>The principle of a basic DF system is to rotate a loop antenna tuned to the frequency of interest, when the signal amplitude is minimal, the antenna is aligned to either the direction of the signal, or exactly opposite to it.</p>
<p>The loop antenna is sensitive to the H-field (magnetic), and by including an E-field (electric) antenna in the system the relative phase of the signal in the H and E-fields can resolve the ambiguity, and a single direction can be determined with reasonable certainty. The E-field antenna is essentially a "<a href="https://longview.be/hf-over-fiber-an-optical-mini-whip-antenna.html">Mini-Whip</a>" antenna.</p>
<h3 id="mcetoc_1i5dnelsk4s">Not So Brief Aside: A look at WW2-era navigational systems</h3>
<p>World War 2-era systems were built using the loop+E-field antenna with a rotatable or fixed loop. The SCR-242 introduced ca. 1937 could be used with a fixed or rotatable loop + whip, and had a 180° ambiguity. The instruction manual says to just try steering the plane to see if the needle moves the right way to work out the ambiguity.</p>
<p>With the rotatable loop option the navigator (or radio operator, not sure) could manually rotate the loop to measure the bearing of a given station and perform e.g. triangulation across multiple beacons if available. It seems this generation of receiver was primarily intended as a "fly towards beacon" mode of operation, or as a very occasional triangulation receiver.</p>
<p>The later SCR-246 seems to have been a less capable variant with limited frequency coverage (up to 400 kHz) and no loop rotation option, but the loop was at least enclosed in a radome instead of just hanging in the wind.</p>
<h4 id="mcetoc_1i5dqtls25r">B-17 "Flying Fortress"</h4>
<figure><figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2024-08-16-at-16.06.07.png" alt="" width="1742" height="1160"></figure>
<figcaption><a href="https://www.tuberadio.com/robinson/Manuals/Airborne_Radio_Equipment_Handbook.pdf">https://www.tuberadio.com/robinson/Manuals/Airborne_Radio_Equipment_Handbook.pdf</a></figcaption>
</figure>
<p>The B-17 "Flying Fortress" bomber plane is the breakout star of the 2024 popular TV series "Masters of the Air", where they were famously piloted by the whitest guys you've never forgotten; after all, we saw the unforgettable Buck from Arkansas starring alongside the main guy: Bucky (jr.) from Nebraska! While historically accurate I do wonder if unrestricted submarine warfare in the first World War may have lead to a critical name shortage in the US.</p>
<p>The plane was developed in the 1930's to counter the state of the art anti-air technology of the late 1920's and were used — very strategically — in what was basically WW1 cavalry charge tactics. I guess the outdated plane was well matched to outdated tactics, but you go to war with the army you have and hopefully you'll get a better one before you lose.</p>
<p>It's interesting to look back to a time where American military technology was just barely adequate vs. what the rest of the world was using. We do have to keep in mind that military expenditure in the US ca. 1930-1940 was around 2-3% of GDP, compared to 30-40% <em>during</em> WW2, and 8-10% during most of the Cold War (and around 5% in 2016; economic growth has been higher than military expenditure growth for the last few decades).</p>
<p>These <span style="text-decoration: line-through;">canned goods</span> planes mainly flew very slowly in tightly knit appetising box-formations in broad daylight, trying to deliver a full complement of 2-3 small bombs hopefully to the same continent as a ball bearing factory outside Schweinfurt. The long flights were mostly passed developing frostbite in intimate areas or trying vainly to put out the many random electrical fires the plane became famous for, interrupted briefly by playing catch with anti-air and fighter-plane cannon rounds. Frankly it's amazing anyone flew more than one mission.</p>
<p>Precision bombing was attempted using the exceptionally well marketed (and factoidly classified) Norden bombsight, trying to visually identify the target through the thickest rain clouds you've ever seen.</p>
<p>That aside, it seems to have had a pretty good radio compass, the SCR-269! <span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">It was pretty popular as the B-24, B-25, B-26, C-46, and C-54 also used this compass.</span></p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2024-08-16-at-16.04.21-2.png" alt="" width="518" height="601"></figure>
<p>No manual seems to be available online, but this is noted as being "automatic" using a motor-driven loop with a true unambiguous bearing indicator. It was probably linked to the mag-compass to convert the plane-relative heading of the radio beacon into a compass heading. Frequency range was up to 1500 kHz, comparable to modern equipment.</p>
<h4 id="mcetoc_1i5dqtls25s">Other Systems</h4>
<p>Also worth noting that the only other noted radionavigation equipment listed in my source is e.g. the RC-43 "Marker Beacon" receiver.</p>
<p>Marker beacon is an older term for a Localiser, part of what we now collectively call ILS (Instrument Landing System). These receivers work in the "UHF" range of ~60-80 MHz (currently ~110-118 MHz is used) and provided crosstrack (side to side) information to the landing plane — I believe the principle of operation was identical to a modern system. No glideslope-system (vertical information) seems to have been present at that time.</p>
<p>They also had a few radio sets, including MW, HF, and crystal controlled VHF (the same VHF AM that planes still use).</p>
<p>Specialty equipment such as the hyperbolic Gee system and the various forms of radar such as H<sub>2</sub>S/H<sub>2</sub>X that would have been fitted during/after 1943 are not listed since they were likely far too classified to mention in a "RESTRICTED" document. These were also conspicuously absent in the TV series.</p>
<p>Gee was a passive-receiver British time-of-flight navigational system operating in the 30-90 MHz range that was also used by the USAAF in Europe as of 1943. In the Pacific Theatre they used LORAN(-A) which operated at 2 MHz (night) and 7 MHz (day) for extended range though probably worse accuracy. They also mostly flew B-24's.</p>
<p>At a high-level the early LORAN and Gee systems were functionally the same, but the later LORAN-C (100 kHz) lived until the 2000's when GPS finally killed it.</p>
<h4 id="mcetoc_1i5dqtls25t">eLORAN</h4>
<p>Hellen Systems Inc. acquired a <a href="https://www.ofcom.org.uk/siteassets/resources/documents/spectrum/eloran-licences/eloran-licence-hellen-systems/?v=330673">U.K. (Ofcom) license</a> to operate a new eLORAN service in 2024 (at a the eye-watering cost of £200 per year!), indicating that it may come back yet. Note that their website hasn't been updated since 2020, but some reporting in late 2023 and <a href="https://www.mountainhome.af.mil/News-Photos-Videos/Article-Display/Article/3681900/innovation-cell-hosts-eloran-demonstration/">early 2024</a> indicates there is something happening in this field.</p>
<p>See also Omega, an even longer range system that had a similar life-span but required atomic clocks in the transmitter sites.</p>
<h4 id="mcetoc_1i5dsfm0h69">H<sub>2</sub>S</h4>
<p>H<sub>2</sub>S/H<sub>2</sub>X were "centrimetric" ground scanning radar sets that could more or less make a top-down map of the surrounding area. Early H<sub>2</sub>S used a 10 cm wavelength (~3 GHz; S-band), later and better systems including H<sub>2</sub>X operated near ~10 GHz (3 cm; X-band). Some later systems moved to 1.25 cm wavelengths (K-band), and though resolution was better, the range wasn't great since this wavelength range is readily absorbed by water and the whole point was to see through wet clouds.</p>
<p>The K-band variant apparently did see some success in Mosquito planes doing lower level tactical bombing and attack raids towards the end of the war, and as a ground surveillance radar for Army use. The post-war V-bomber H<sub>2</sub>S IX/IXA systems used a higher power 3 cm magnetron transmitter<sup>[1]</sup>.</p>
<p>See this fantastic video about the post-WW2 V-bomber navigational system, which while more advanced was fundamentally very similar: <a href="https://youtu.be/w1lkKUspejo">Navigation and Bombing System Mk1, V Bomber, Valiant, Victor &amp; Vulcan avionics (posted by Spen Crowson, 2021)</a>.</p>
<p><sup>[1]</sup> <em>Sir Bernard Lovell, ECHOES OF WAR: The Story of H<sub>2</sub>S Radar, Chapter 30 et al.</em></p>
<h3 id="mcetoc_1i5dqtls25u">Back to ADF</h3>
<p>Getting back to ADF (took a while): Eliminating moving parts is generally good for reliability, and it turns out that using two loop antenna oriented 90° from each other (orthogonally) can be used with only slightly more complex circuitry. Using fairly simple electronics involving a lot of transformer-magic, two loop antennas can be combined with a variable phase offset to synthesise a single loop antenna with variable azimuth angle.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-13.11.38.png" alt="" width="450" height="294"></figure>
<p>Above the connection of the loops to a goniometer indicator is shown, the rotor is driven by a signal derived from the E-field, and this adds up to a direction indication. The actual hookup is through various amplifiers and matching networks, but the principle holds.</p>
<h3 id="mcetoc_1gqm4u13o3a">Why is ADF?</h3>
<p>An ADF system is a somewhat obsolete radio-navigation technique, the principle is to use an ADF receiver in the airplane to indicate the relative direction to a radio transmitter. The transmitter is usually a Non-Directional Beacon (NDB, no big deal), which are still found near various airports and transmit in the 200-400 kHz range.</p>
<p>Most ADF receivers cover the 100-1700 kHz range, making them capable of navigating to NDB's, as well as long-wave and medium-wave AM transmitters. Note that many AM transmitters are simulcast, with multiple transmitters used at various sites all transmitting the same frequency, making such stations unusable for radio-navigation.</p>
<p class="msg msg--info">One of the first electronic warfare (EW) actions taken by the British at the outbreak of WW2 was to switch all BBC long/medium wave transmitters to operate on the same frequency. Otherwise, enemy night-bombers could have used these transmitters as navigational beacons<sup>[2]</sup>.</p>
<p>NDBs transmit a slow morse-code AM signal giving their station ID, and ADF receivers generally have an audio output allowing monitoring of this signal to confirm the correct stations is being received. Because of this feature they are also usable as medium-wave radio receivers.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Triangulation.drawio.svg" alt="" width="719" height="573"></figure>
<p>In principle multiple ADF receivers can be used to triangulate the aircraft position using 3 or more reference stations as shown above. I don't think this was done in practice though.</p>
<p>Note that this is not the same as e.g. LORAN, OMEGA, and Decca navigational systems, those systems all rely on measurement of relative time differences between reference stations (hyperbolic navigation). This system would purely use angle of arrival information instead.</p>
<p>In practice a single receiver is used, and distance and relative angle to a given station can be resolved by flying the aircraft in specific directions for some time, knowing the approximate ground-speed and magnetic heading — this concept is shown below.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Navigation.drawio-2.svg" alt="" width="861" height="354"></figure>
<p>The angular speed of the ADF receiver then gives a measure of distance, and the difference between ADF and magnetic compass angle can be used to tell the direction, allowing for surprisingly precise navigation. In the example above the calculation of range is basically trigonometric. Obviously another variation is to simply point the plane <em>at</em> the NDB, upon reaching it the reading will reverse, and the next NDB in the route can be tuned.</p>
<p>Unfortunately, this navigation technique does require you to know which station you're tuned to, which might not be obvious if frequencies are reused and you really have no idea where in the world you have ended up. This was not the <em>cause</em> of the crash of <a href="https://en.wikipedia.org/wiki/Varig_Flight_254">Varig Flight 254</a>, but it contributed to compounding the error.</p>
<p>See also this — excellent as always — <a href="https://www.cryptomuseum.com/df/dag1/index.htm">article on the DAG-1 MW/HF DF receiver</a> by Cryptomuseum.</p>
<p>A more advanced and modern concept is VHF Omnidirectional Range (VOR), which uses a special signal modulation that allows direct angle measurement using a single non-directional antenna, and is often paired with Distance Measuring Equipment (DME) which is a separate transponder system using two-way time-of-flight measurement principles to determine range. VOR-DME can then be used to navigate between stations, and it allows sufficient precision to intercept an Instrument Landing System (ILS) localiser to precision landings.</p>
<p><sup>[1]</sup> <em>Alfred Price, Instruments of Darkness (second edition ca. 1977), page 33.</em></p>
<h3 id="mcetoc_1gqm66e42g2">The KA-42B</h3>
<p>The KA-42B is an ADF antenna, it is a "modern" type that includes all three antennas needed. Earlier models of ADF antenna only included the loop antennas in the antenna-pod, and expected a whip antenna to be installed on top of the aircraft to provide the E-field channel.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_8298.jpeg" alt="" width="460" height="613"></figure>
<p>Connections are via a BNC plug for the E-field whip (the whip is active, and requires around 8 V bias), and a tube socket is used for the loop connections.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Antenna_Wiring.PNG" alt="" width="484" height="505"></figure>
<h2 id="mcetoc_1gqm66e42g3">Outdoor Unit</h2>
<p>Below the block diagram of the outdoor antenna unit is shown, this assembly is installed in an aluminium box that the antenna is mounted to.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Antenna.drawio.svg" alt="" width="1331" height="648"></figure>
<p>Above the block diagram of the antenna and antenna-near electronics are shown. The antenna consist of the actual antenna (left) with E-field sensor and orthogonal loops and associated pre-amplifiers. Each antenna-signal is amplified in variable-gain amplifiers to normalise the RF levels, and the signals are frequency shifted in mixers and combined.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_4668.jpeg" alt="" width="2856" height="3148"></figure>
<p>A clock reference signal (VCXO⁄4) is inserted, and the combined FDM multiplex is levelled in another AGC amplifier before being applied to the laser diode. An ESP-32 microcontroller controls the AGC loops and provides a web interface to control and monitor the signals.</p>
<p>The primary electronics assembly is installed in the base-plate of the antenna electronics box, shown below. The red PCA is the FDM Combiner, and the purple board is the mixer-assembly (which was made first). The laser driver electronics were installed later. Power is via a SP-13 3-pin connector, it runs off a standard 12 V power supply, which is regulated to the usual 10, 5, and 3.3 V DC internally.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_2175.jpeg" alt="" width="485" height="647"></figure>
<p>The RF bandwidth is set using Mini-Circuits SCLF-21.4 filters, I got a good deal on eBay for 25 of them and made extensive use of them in this project. The typical performance is shown below, they more or less eliminate anything above 30 MHz.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-05-at-19.40.32.png" alt="" width="566" height="338"></figure>
<p> </p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Spectrum.drawio.svg" alt="" width="698" height="243"></figure>
<p>Above we see the idealised output spectrum of the multiplex, showing the clock carrier and three double-sideband/AM carriers. The frequencies align such that the three signals should have around 10 MHz of space between them. The three carrier frequencies are fairly suppressed, but some leakage is present due to imperfections in the mixers, this will be useful later.</p>
<p>I had intended to use this antenna as a long &amp; medium-wave reception antenna, though as seen below I found that this didn't perform particularly well there, but fortunately the short-wave performance is quite good up to around 18 MHz.</p>
<p>Note that while the system could be used to implement a null-steering antenna, this is not possible to do in a broad-band system, the primary use of this system is to simply use one of the three channels as the receiver. Orienting the loops such that one of the antenna nulls falls in the direction of noise is then a compromise, but initial testing seemed promising.</p>
<h3 id="mcetoc_1gqm66e42g4">Preamplifiers</h3>
<p>The loop antennas have an inductance of around 100 µH, and they produce extremely small signal currents. This is not unexpected since they are physically quite small.</p>
<p>In system they would be connected to a frequency specific matching network which would make then resonant, but I wanted a broad-band system. To provide initial amplification, a S982 dual-gate FET pre-amplifier is used. This amplifier is modified vs. the schematic shown below by hard-wiring gain to maximum, and by connecting a feedback resistor from the drain to the RF gate (AC coupled). This turns it into a trans-impedance amplifier (TIA).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-12.14.37.png" alt="" width="560" height="293"></figure>
<p>This provides the initial amplification, and this is immediately fed into a pre-amplifier PCA:</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-12.13.57.png" alt="" width="1488" height="558"></figure>
<p> </p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-12.18.49.png" alt="" width="350" height="425"></figure>
<p>This pre-amplifier <em>was</em> intended to be the only preamp, but I found that achieving the required total gain with just the operational amplifiers was not practical without oscillations. As such the FET pre-amp was installed between this amplifier and the actual loop.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_4669.jpeg" alt="" width="455" height="607"></figure>
<p>This method of amplification has higher sensitivity at higher frequencies (the H-field induces a current in the coil, the voltage follows the 2πfL impedance of the loop).</p>
<p>I found that the loop channels seemed to perform best above 3 MHz, and that performance below 3 MHz was quite poor, while performance in the 10-15 MHz range often outperformed the Mini-Whip. The E-field performance was generally somewhat worse than the <a href="https://longview.be/hf-over-fiber-an-optical-mini-whip-antenna.html">Mini-Whip</a>, so I think that implementation is better than the King antenna.</p>
<h3 id="mcetoc_1gqmg43d0je">Frequency Conversion</h3>
<p>The frequency conversion is as usual done with AD831 high power IC mixers, these are still some of the best on the market for this frequency range. The output opamps are not in use for these converters, instead the current mode output is used through an RF balun.</p>
<p>To generate the reference frequencies, a <a href="https://longview.be/mc349x5-016-7776-mhz-vcxo.html">77.76 MHz VCXO</a> is used as the core, this is divided by 2 and 4, and these divided frequencies are fed to <a href="https://longview.be/crcd83a-rambus-clock-generator-as-a-local-oscillator-for-radios.html">CDCR83</a> clock generators. This configuration was selected since I already had the parts laying around.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-05-at-19.42.59.png" alt="" width="551" height="234"></figure>
<p>Unfortunately the division ratios and clock generators are not guaranteed to keep a specific phase relative to the 19.44 MHz (77.76÷4) reference frequency, necessitating the active phase alignment system in the indoor unit.</p>
<h3 id="mcetoc_1gqm66e42g5">Control System</h3>
<p>An ESP-32 is used as the outdoor unit controller, it mostly controls DACs that set the gain of the various channels, and monitors the power-detectors.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-10.49.12.png" alt="" width="424" height="399"></figure>
<p>Above the highly sophisticated hypertext based control interface is shown, it implements both monitoring of levels and gain control, and control of target set points and PID regulator parameters.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-04-at-10.50.41.png" alt="" width="701" height="445"></figure>
<p>Above we see a slightly more sophisticated hypertext interface of type "Grafana," which shows the ADF antenna status vs. time.</p>
<h2 id="mcetoc_1gqm66e42g6">Indoor Unit</h2>
<p>The indoor unit takes the multiplexed signal and converts one of the carriers to baseband for use by standard HF receivers. The reference indoor unit is shown, but since the system is fiber optic, alternate indoor units can be connected if desired.</p>
<h3 id="mcetoc_1gqm66e42g7">Demodulator Design</h3>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Demodulator.drawio.svg" alt="" width="773" height="379"></figure>
<p>The demodulator takes the FDM multiplex signal and recovers one of them to baseband. The multiplex includes a clock reference at 19.44 MHz, this is recovered by a low pass filter, and amplified. The amplified clock reference is used to phase lock a local VCXO using a basic XOR PLL, this ensures that the local oscillator will be at the exact right frequency.</p>
<p>The demodulator is powered by 5 &amp; 12 V supplies, and pulls around 1 W.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_4208.jpeg" alt="" width="536" height="584"></figure>
<p>Above two demodulators are shown during initial development testing, at this time the internal TIA was not functioning well, so a <a href="https://longview.be/bfu550x-based-tia-performance-characterisation.html">stand-alone TIA</a> was used instead (external TIA mounted to the bottom left on the leftmost board).</p>
<p>The design of the transmitter clock generator means that the generated local oscillator and carrier-frequency can have one of multiple stable phase relationships. Slight phase errors are not of major concern, but 90 or 270° phase offsets correspond to null-responses and must be avoided. The demodulator needs to determine what phase is applicable and correct, this is done by measuring the D.C. output level of the down-converting mixer.</p>
<p>The D.C. level of the mixer output will follow the sine of the relative phase between the LO and the incoming carrier. By controlling a voltage controlled phase shifter inserted in the clock recovery circuitry, the LO vs. carrier phase can be adjusted. Automatic adjustment is performed by sweeping the phase shifter to reach the maximum mixer D.C. voltage, which corresponds to the optimal phase alignment.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/ADF-ADF_Phase.drawio.svg" alt="" width="642" height="358"></figure>
<p>This adjustment is repeated every time a new carrier-frequency is selected, or if the optical signal is removed and reinserted.</p>
<p>Note that if additional filtering were used in the antenna, the transmission scheme could be single sideband, and many of these issues would be avoided.</p>
<h3 id="mcetoc_1gqp3rne2kn">Automatic Phasing System</h3>
<p>The implementation of automatic phasing is not the most reliable thing in the world, but tweaking has made it usable.</p>
<p>The STM32F303 ADC is used to sample the mixer DC level, while the built in DAC is used to drive a BB152 varactor diode, controlling the phase. The sensing circuitry is shown below.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-05-at-19.48.43.png" alt="" width="2316" height="1276"></figure>
<p>And the PLL circuitry is shown below, the RF_CLOCK signal is tapped from the TIA output. The BB152 varactor diode and L6 form a series resonant circuit, where the phase shift is controlled by the applied voltage. An XOR gate and low pass filter do the rest.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-05-at-19.49.12.png" alt="" width="2174" height="554"></figure>
<p>The phasing is performed in two steps, a coarse and fine search. The coarse search is performed in wide steps, and this measurement was (after considerable trial and error) found to work best when the criteria was the highest derivative. To actually evaluate which sample index is the best match, 5 adjacent samples are summed before comparison.</p>
<p>Below is a sample phase-sweep (values are derivatives), we can see that there is a periodicity to the table, and the peaks and valleys are at least 4-5 samples wide. This source will generally land around index 7 or 12, where the 5-27 index range is the allowed search range.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/Screenshot-2023-03-05-at-18.52.24.png" alt="" width="323" height="445"></figure>
<p>After coarse search, the phase-adjust is swept across a narrower range centered on the found coarse index, but this search attempts to minimise the derivative. I'm not sure why this works best, but this setup appears to achieve fairly optimal matching and it seems to be quite repeatable.</p>
<p>The optimal match is fairly stable, so the phasing result is stored per antenna channel, and is reset when channel 0 (i.e. "Off") is set. This way the phasing can be retried if it did fail to achieve optimal results, or if e.g. the external transmitter were lost. This automatic phasing is also performed on startup.</p>
<p>The system works reasonably well, but will need further adjustment and testing before it can be considered "good."</p>
<h3 id="mcetoc_1gqm66e42g8">Receiver Trans-Impedance Amplifier</h3>
<p>To receive the signal, a broad-band trans-impedance amplifier (TIA) was required, and a high performance 10 kΩ/300 MHz cascoded TIA was included along with the usual PIN diode optical receiver.</p>
<p>This design had been successfully tested on 2-layer boards, and to summarise: it didn't work. I believe the major issue is a combination of putting the 3.3 V rail power plane under the TIA circuitry, causing capacitive coupling, and slightly less optimal layout.</p>
<p>The TIA was therefore prone to self-oscillation and this was compounded by the use of high speed clocks on the 3.3 V power net, which tended to pump the oscillating TIA, causing massive noise and spikes.</p>
<p>The fix was to simply keep using the 2-layer standalone TIA design, this means the footprint of the design increases slightly but otherwise the external TIA has identical performance to what was intended here.</p>
<p>The external TIA will be the subject of a <a href="https://longview.be/bfu550x-based-tia-performance-characterisation.html">future article</a>, as it is generally a useful design, but by it's high speed discrete nature, a rather sensitive one. </p>
<h2 id="mcetoc_1gqp3rne2ko">Summary</h2>
<p>The ADF antenna is a fairly usable HF receiving antenna, offering a decent 3-in-1 package. The orthogonal loops are fairly useful, and for many stations I find that one is consistently the stronger (and it's not just that one is always better).</p>
<p>The very low output level from the loops in broad-band mode is an issue, and requires very careful pre-amplifier design.</p>
<p>The FDM multiplex transmission scheme could have been better implemented. The biggest issue is the automatic phasing system, which is a cludge and ideally should not have been required.</p>
<h3 id="mcetoc_1gqpjqtehnf">Future Work</h3>
<p>The next big step after this is to integrate the demodulators into e.g. the <a href="https://longview.be/itt-mackay-marine-3021n-receiver.html">3021N receiver</a> and my PlutoSDR system.</p>
<p>The 3021N integration is expected to take the form of an antenna selector PCA, with <a href="https://longview.be/hf-over-fiber-an-optical-mini-whip-antenna.html">HFoF</a> and ADF inputs, and room for 1-2 future work inputs (TBD what those will be).</p>
<p>PlutoSDR integration is the subject of a future article.</p>
<h2 id="mcetoc_1gqme8sc5ig">Addendum</h2>
<h3 id="mcetoc_1gqpfi5i3n0">Prototyping Effort</h3>
<p>Below are some pictures of the development testing of the system, the very early tests used a flex PCB pre-amp (the FET pre-amp mentioned above) and discrete coax transmission. A later test used just the mixer-PCA, with a matching mixer-PCA inside providing all 3 antenna outputs, this led to the discovery of the LO vs. carrier phase issues.</p>
<p>Below the antenna is mounted with a small active pre-amp board, the FET pre-amp is installed in a ceramic tube socket, and a closeup of the amplifier board is shown.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_1853.jpeg" alt="" width="359" height="479"></figure> <figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_1841.jpeg" alt="" width="360" height="293"></figure>
<p>Below the antenna has been installed with the final box, but without full electronics integration. This was mainly testing the pre-amplifiers still. The box was recycled, with many holes drilled in the sides, I later filled these with epoxy resin and aluminium tape on the inside.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_1886-2.jpeg" alt="" width="4032" height="3024"></figure>
<h3 id="mcetoc_1gqpfhl5hmt">External TIA/Optical Receiver</h3>
<p>The external TIA (abbreviation for Thanks in Advance) mentioned above deserves a picture too, it's a design I put together in late 2022 for use with the Mini-Whip and ADF system. It was also hoped based on simulations that it would be suitable for VHF &amp; UHF use, and I believe that it can be used up to around 1 GHz if gain tradeoffs are made.</p>
<p>It uses a 5 &amp; 10 V power supply, though the 10 V supply does not need to be exact.</p>
<p>It is built as a reusable module, with pin headers for power and an MCX-F contact for RF output. A potentiometer adjusts the operating point, this must generally be set according to how much optical power is applied, though there is some margin.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/84/IMG_4209.jpeg" alt="" width="2473" height="2081"></figure>
<p>Over all this is a pretty successful design, but as mentioned proper characterisation is <a href="https://longview.be/bfu550x-based-tia-performance-characterisation.html">for another day</a>.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>The NAGRAFAX — Fixing The Phasing Circuit</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/the-nagrafax-fixing-the-phasing-circuit.html"/>
        <id>https://longview.be/the-nagrafax-fixing-the-phasing-circuit.html</id>
        <media:content url="https://longview.be/media/posts/83/IMG_4093.jpeg" medium="image" />

        <updated>2023-02-27T21:43:08+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/83/IMG_4093.jpeg" alt="" />
                    <p>A followup to the previous <a href="https://longview.be/the-nagrafax.html">NAGRAFAX article</a>, this details how I fixed the automatic phasing circuitry, and has some detail pictures of the electronics boards.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/83/IMG_4093.jpeg" class="type:primaryImage" alt="" /></p>
                <p>A followup to the previous <a href="https://longview.be/the-nagrafax.html">NAGRAFAX article</a>, this details how I fixed the automatic phasing circuitry, and has some detail pictures of the electronics boards.</p>

<h2>PCA Overview</h2>
<p>The PCAs are hinged at various offsets, once a few sets of screws are undone all the cards can simply be rotated up to access the front and back. The only annoyance is the short cable going to the write head (the coax).</p>
<div class="gallery-wrapper"><div class="gallery"  data-is-empty="false" data-translation="Add images" data-columns="3">
<figure class="gallery__item"><a href="https://longview.be/media/posts/83/gallery/IMG_4153.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/83/gallery/IMG_4153-thumbnail.jpeg" alt="" width="720" height="540"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/83/gallery/IMG_4154.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/83/gallery/IMG_4154-thumbnail.jpeg" alt="" width="720" height="540"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/83/gallery/IMG_4157.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/83/gallery/IMG_4157-thumbnail.jpeg" alt="" width="720" height="540"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/83/gallery/IMG_4155.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/83/gallery/IMG_4155-thumbnail.jpeg" alt="" width="720" height="540"></a></figure>
<figure class="gallery__item"><a href="https://longview.be/media/posts/83/gallery/IMG_4156.jpeg" data-size="4032x3024"><img src="https://longview.be/media/posts/83/gallery/IMG_4156-thumbnail.jpeg" alt="" width="720" height="540"></a></figure>
</div></div>
<h2>How The Phasing Circuitry Works</h2>
<p>Below is an example of the defective phasing circuitry I received the fax with. The diagonal lines are the index pulse, and DIP switch 1 is on to make the fax print the entire phasing sequence. The diagonal lines is the fax trying to synchronise by speeding up the chain drive slightly.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/83/IMG_4158.jpeg" alt="" width="442" height="589"></figure>
<p>Clearly not working right, the phase is random at the end, and it only goes in one direction, even passing the correct phase without doing anything.</p>
<p>The system took some head scratching to understand, I drew a block diagram of approximately how it operates to aid in understanding it.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/83/Phasing_Circuitry.drawio.svg" alt="" width="918" height="528"></figure>
<ul>
<li>Video Sync is the video synchronisation pulse, the period of this pulse is measured in the phase accumulator. It controls a ripple counter U21 that clocks a 7 bit counter (2⨉4522) acting as the phase accumulator
<ul>
<li>This is clocked by the chain drive direct tachometer signal, this is fairly high speed signal</li>
<li>I think using the chain drive speed signal instead of the crystal speed affects the loop dynamics, probably it results in a stable loop gain independent of the LPM count</li>
</ul>
</li>
<li>The phase accumulator is sampled (latched) once per head sync pulse</li>
<li>If in phasing mode, the 2-line head pulse counter triggers a JK flip flop that modifies certain bits in the phase accumulator result
<ul>
<li>(Not shown in the block diagram) I think this pulse counter ticks up when the measured phase is a specific value, terminating the phasing operation early when it find a good lock? </li>
<li>When not in phasing mode, a fixed divider value is used</li>
<li>When in phasing, the phase-count is added to the divide ratio, and the base value is offset such that a mid-scale phase accumulator will yield the nominal divide ratio</li>
</ul>
</li>
<li>The phase accumulator result is used to set up a chain of frequency dividers, which run off a 100 kHz crystal controlled clock
<ul>
<li>In normal locked operation, the divide ratio is such that it generates 400 Hz pulses</li>
<li>When the phasing circuitry is activated, the divide ratio is modified proportionally to the phase error</li>
</ul>
</li>
<li>The 400 Hz clock is compared to a fixed 400 Hz (i.e. divided down based on speed selection) chain drive pulse in the 4046 PLL</li>
<li>By modifying the divide ratio proportionally to the line phase error, a digital PLL is effected, this adjusts the frequency of the machine to align the phase
<ul>
<li>The phasing circuitry also seems to increase the PLL loop gain/control authority when active, adding in additional loop filter components with a lower impedance</li>
</ul>
</li>
<li>After a timeout of around 25 seconds or successful lock for two lines, the phasing circuitry is disabled and the standard frequency is output under crystal control
<ul>
<li>My unit seems to have been built with a 4-line phase check, but this had been modified to only check for two lines, matching the schematics</li>
</ul>
</li>
<li>By this time the phase should be aligned, and it will print under crystal control from then on, ignoring the video signals synchronisation pulses entirely (and it it failed to lock, it will just stick with whatever phase it happened to align to)</li>
</ul>
<figure class="post__image"><img  src="https://longview.be/media/posts/83/Screenshot-2023-02-27-at-21.05.34-2.png" alt="" width="1940" height="1086"></figure>
<p>The schematic above shows the functionality.</p>
<p>The design is clever, I do feel that it could probably have been implemented in a simpler way, but it's a good example of a fairly sophisticated control system implemented using the then modern 4000 series of CMOS logic.</p>
<h3>The Issue</h3>
<p>After doing some analysis of the circuitry and probing the video and tachometers, I determined that the video sync pulse should be 90° off the phasing tachometer signal.</p>
<p>I made a test loop recording that contained nothing but synchronisation pulses, allowing me to quickly start/stop the fax to test the sync circuitry.</p>
<p>I had good tachometer pulses, and good video sync pulses, but the phasing circuitry appeared to only apply a slight fixed speed offset (1% faster) instead of adjusting the frequency to lock.</p>
<p>Probing U33 (the head pulse divider), I found no activity whatsoever, this should be receiving tachometer pulses. Tracing back, I found U30 pin 2 was stuck low, this is the small Schmitt trigger inverter that drives the tachometer signal to the phase accumulator latches and frequency divider.</p>
<p>I also found another inverter output in the same chip that seemed bad, but this didn't seem to affect the primary function.</p>
<p>Lifting pin 2 and shorting the pad to pin 1 (bypassing the inverter), I immediately saw the phasing circuitry start to operate! Since the tachometer pulse polarity was now wrong it locked in slightly offset, but this was repeatable, which is a good sign.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/83/IMG_4161.jpeg" alt="" width="4032" height="3024"></figure>
<p>Above a looped recording was played two times, showing repeatable results!</p>
<p>A replacement 4584 hex Schmitt trigger inverter has been ordered, and is expected to fully correct the issue. A 4069 non-Schmitt inverter is installed temporarily, and functioning quite well.</p>
<p>I had noticed some occasional phase glitches during poor signal reception previously, I now suspect this issue may have been caused by the failure of the phasing circuitry. This may have been left partially active, allowing it to occasionally try to phase even after it should have terminated.</p>
<h2>What Do The Potentiometers Do?</h2>
<p>The front panel potentiometers are in fact the horizontal adjust feature. Measuring the Stylus Correct strap during operation made this pretty clear.</p>
<p>The way it works: during printing, the 4066 switch cycles through each potentiometer in turn, applying the potentiometer voltage to the speed reference signal (which is normally crystal locked by the speed PLL).</p>
<p>This applies a dynamic speed shift, shifting the phase temporarily. This allows fine adjustment of the three heads in the horizontal direction without bending the styluses around.</p>
<h2>What's It Like?</h2>
<p>Very cool, everyone loves weather faxes.</p>
<figure class="post__video"><video width="800" height="480" controls="controls" data-mce-fragment="1">
<source src="video/IMG_4180.MOV" /></video></figure>
            ]]>
        </content>
    </entry>
    <entry>
        <title>The NAGRAFAX</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/the-nagrafax.html"/>
        <id>https://longview.be/the-nagrafax.html</id>
        <media:content url="https://longview.be/media/posts/81/_IMG0517_4k.jpg" medium="image" />

        <updated>2023-02-25T18:02:30+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/81/_IMG0517_4k.jpg" alt="" />
                    <p>The NAGRAFAX is an early 1980's weather-fax printer, sold as a kit along with a weather-fax FM receiver and intended for marine use. I picked up this unit for $10 at a local auction (first and only offer, surprisingly).</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/81/_IMG0517_4k.jpg" class="type:primaryImage" alt="" /></p>
                <p>The NAGRAFAX is an early 1980's weather-fax printer, sold as a kit along with a weather-fax FM receiver and intended for marine use. I picked up this unit for $10 at a local auction (first and only offer, surprisingly).</p>

<h2 id="mcetoc_1gq6r0omc16n">Overview</h2>
<p>The NAGRAFAX was manufactured by Swiss company Nagra Kudelski (I believe these are two separate companies working together). Nagra is fairly well known for making tape machines, and I guess making a fax machine is not too big of a stretch.</p>
<p>The manual indicates this unit entered the market in 1980 (<a href="https://www.cryptomuseum.com/manuf/nagra/index.htm">Crypto Museum</a> says 1977), and was likely sold for some time after. Surprisingly Nagra still provides schematics and mechanical alignment information on their official website, though the quality of the scan is not exactly great which made some things hard to work out.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4091.jpeg" alt="" width="4032" height="3024"></figure>
<p>Above the machine is shown without the plexi-glass front cover, and with a modern LED strip replacing the two light bulbs that would normally (poorly) illuminate the printer area.</p>
<p>The fax machine is housed in a two-piece aluminium chassis with various gaskets. I/O is via two 9-pin D-Subs, which have port covers providing some weather protection.</p>
<p>The power supply for the fax is approximately 13 V and up to somewhere near 30 V, making it easy to power. The current consumption in operation is typically less than 200 mA average at around 14 V. The paper advance stepper motor pulls a further 300 mA or so when active.</p>
<p>This fax can still be used with a suitable demodulator and radio in 2023, and for European users <a href="https://www.dwd.de/EN/specialusers/shipping/broadcast_en/broadcast_fax_102020.pdf">DWD</a> (Pinneberg, Germany) and <a href="http://www.blackcatsystems.com/software/multimode/fax.html">GFA</a> (Bracknell, UK) are still on the air every day on multiple HF frequencies.</p>
<p>The specific unit was the property of the Norwegian Meteorological Services communications department. From what I have learned, these units were installed at various sites such as airports which had use for meteorological data. In this use case they were connected to telephone lines rather than radio receivers, and provided with video data that way.</p>
<p class="msg msg--info">At the time of initial publication, only the low resolution scans from NAGRA were available, making repair challenging. I have since recovered original copies of the schematics for the fax and HF receiver. See <a href="https://longview.be/imgupload/Nagrafax_Schematics.pdf">Nagrafax_Schematics.pdf</a> (~150 MB!)</p>
<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1gq6r0omc16n">Overview</a></li>
<li><a href="#mcetoc_1gq6s789a19p">Principle of Operation</a>
<ul>
<li><a href="#mcetoc_1gq7v5tbt9f">Printer Mechanism</a></li>
<li><a href="#mcetoc_1gq7v5tbt9g">Control Circuitry</a></li>
<li><a href="#mcetoc_1gq7ush8992">Speed Detect</a></li>
<li><a href="#mcetoc_1gq7ush8993">Phasing &amp; Speed Control</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gq7mg0kf1n">Controls</a>
<ul>
<li><a href="#mcetoc_1gq6r0omc16o">DIP Switches</a></li>
<li><a href="#mcetoc_1gq7mg0kf1o">Bar Graph</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gq6r0omc16p">Printer Alignment</a></li>
<li><a href="#mcetoc_1gq6r0omc16q">AM Demodulator</a></li>
<li><a href="#mcetoc_1gq6r0omc16r">FSK &amp; Video Format</a>
<ul>
<li><a href="#mcetoc_1gq6r0omc16s">FM Demodulation in an ADAU1701</a></li>
<li><a href="#mcetoc_1gq6r0omc16t">webSDR Playback Woes</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gq6u0nku1ae">Future Work</a></li>
</ul>
</div>
<h2 id="mcetoc_1gq6s789a19p">Principle of Operation</h2>
<p>The fax machine was primarily meant to be used with a "FAXDM" HF/VLF receiver, which was a crystal controlled receiver that generated the video signal for the fax, as well as providing some signal monitoring capabilities beyond just looking at the print.</p>
<p>Unfortunately this receiver was not available.</p>
<h3 id="mcetoc_1gq7v5tbt9f">Printer Mechanism</h3>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4085.jpeg" alt="" width="581" height="436"></figure>
<p>Above the print heads and drive chain are shown, the mechanism is fairly unusual these days. The printer uses special aluminised paper, which seems to be a laminate of aluminium over dark paper, not dissimilar to old school candy wrappers.</p>
<p>The printing mechanism selectively darkens the paper by striking an arc between the print head and the paper, this vaporises the aluminium layer, exposing the darker paper below. This paper seems to be fully waterproof and no ink/toner is required, both would be a benefit when operating at sea.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4065.jpeg" alt="" width="353" height="330"></figure>
<p>The printer came with some spare paper, I don't know if it's possible to get any more.</p>
<p>This process deposits vaporised aluminium all over the machine, which made it quite messy after probably 10-20 years of operation seemingly without any cleaning. Surprisingly this dust doesn't appear to be conductive, so even with the electronics covered in dust they still worked.</p>
<h3 id="mcetoc_1gq7v5tbt9g">Control Circuitry</h3>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4060.jpeg" alt="" width="547" height="411"></figure>
<p>Above the rear of the machine is shown after some compressed air removed <em>most</em> of the dust. The right-most circuit boards are stacked and hinged allowing for service. They are documented in the manual and contain the video amplifiers, servo drive, and logic state machines.</p>
<p>The logic seems to be entirely 4000B series running at 10 V, in mostly ceramic packaging indicating high cost. The left-most circuit board is discussed below. Capacitors appear to be almost exclusively military-grade silver-tantalums, which are not great capacitors but as far as I know these are not known to fail.</p>
<p>Weird connectors are used, they use a retention screw with micro-D like contacts only much much bigger, and the PCB side of the connector is simply a set of sockets with no shroud.</p>
<p>The center motor is the chain drive motor, which is a standard brushed DC type. There is magnetic tachometer feedback from the chain drive, which is used to close the speed loop of the receiver. A stepper motor is used to drive the paper advance, and there is a paper-empty micro-switch that disables the machine if it runs out.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-13.37.36.png" alt="" width="569" height="312"></figure>
<p>I don't fully understand all the circuitry, but it seems the chain speed is crystal controlled through some complex circuitry. This circuitry presumably ensures that the scan speed is well defined, and implements automatic phase control, which means that it tried to "center" the image based on some initial synchronisation pulses. The three potentiometers on the front do not appear to be in use when the crystal synchroniser is enabled, and I'm not sure exactly what they would do in any case.</p>
<p>Note that WEFAX does not use continuous synchronisation, the printer has to run at the right speed, and it's not uncommon to see the image "slant" due to small frequency errors. The benefit of not synchronising continuously is that no matter how poor the signal is it can't lose what it doesn't have.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4094.jpeg" alt="" width="410" height="547"></figure>
<p>The above image shows the first real-time on-air fax I received, the signal quality was not particularly amazing but the image can clearly be seen even if the text can't be easily read. This particular image was received using my <a href="https://longview.be/itt-mackay-marine-3021n-receiver.html">3021N receiver</a> and the <a href="https://longview.be/hf-over-fiber-an-optical-mini-whip-antenna.html">optical Mini-Whip</a>, received from DWD at 3855 kHz. I have found that 7880 kHz is a better bet during the early evening.</p>
<h3 id="mcetoc_1gq7ush8992">Speed Detect</h3>
<p>After receiving the start tone (or if manually set to an IOC), the fax will start looking for phasing pulses. The fax signal will stay at black for some time, sending white pulses during the blanking interval.</p>
<p>The fax appears to perform an automatic alignment of speed based on this signal, the circuitry is not very well explained but I think I have a story here:</p>
<ul>
<li>Initial search, speed is minimum (no speed control signal set)</li>
<li>An operational amplifier circuit thresholds the video signal to generate an external phasing reference</li>
<li>The period of these pulses is measured in a 4 bit counter circuit relative to the internal crystal oscillator
<ul>
<li>The output is routed to a set of digital comparators</li>
<li>When one finds a match the associated speed is set unless the found speed is inhibited</li>
</ul>
</li>
<li>The speed control signal bus is then valid and the process can continue
<ul>
<li>The counter circuitry is stopped if any speed signal is set</li>
<li>The speed control bus is used in several places around the fax, especially in the scan motor drive system</li>
</ul>
</li>
<li>The circuitry is shown below</li>
</ul>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-21.40.51-2.png" alt="" width="521" height="307"></figure>
<p>The circuitry to the bottom middle generates a control signal that enables automatic phase alignment of the receiver. This circuitry is activated when the STOP signal is released, which occurs e.g. when a start tone is generated, or when manually started.</p>
<p>Below is a typical 2023 transmission, showing the phasing sequence lasts approximately 30 seconds. The fax seems to be configured to turn off the phasing system slightly before the 30 second mark, at this time whatever phase it locked to will be used for the remainder.</p>
<p class="msg msg--info">See followup article, the unit was defective at this time.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-22.20.54.png" alt="" width="1398" height="776"></figure>
<h3 id="mcetoc_1gq7ush8993">Phasing &amp; Speed Control</h3>
<p>The system that controls automatic phasing and crystal regulated speed is… complex. At the time of original issue, I had not yet worked out all the details of this circuitry, but I had worked out that the automatic phasing system was not functioning in my unit.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-21.49.47.png" alt="" width="1874" height="1004"></figure>
<p>Measurements on this system will be the subject of <a href="https://longview.be/the-nagrafax-fixing-the-phasing-circuit.html">future work</a> to try to make the automatic phase alignment actually work reliably, since right now it seems mostly useless.</p>
<h2 id="mcetoc_1gq7mg0kf1n">Controls</h2>
<p>The front panel controls are limited to a set of speed and IOCs (Indices of Compliance), manual phasing, illumination control, and a manual stop button. Modern red LEDs indicate the current state. A potentiometer controls the video contrast; I can't say that I've found it particularly significant.</p>
<p>To manually start, select an IOC, then optionally select a speed (not required if the video input is in the initial phasing stage).</p>
<h3 id="mcetoc_1gq6r0omc16o">DIP Switches</h3>
<p>The DIP switch functions are listed in tabular form below:</p>
<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 15.8345%;">Number</td>
<td style="width: 27.5654%;">Controls</td>
<td style="width: 56.6001%;">Comment</td>
</tr>
<tr>
<td style="width: 15.8345%;">1</td>
<td style="width: 27.5654%;">Phasing signal write suppressor</td>
<td style="width: 56.6001%;">When 'On', the phasing is unblanked</td>
</tr>
<tr>
<td style="width: 15.8345%;">2</td>
<td style="width: 27.5654%;">Internal test pattern generator</td>
<td style="width: 56.6001%;">
<p>Requires switch 1 to be 'On'.</p>
<p>Generates a set of vertical stripes across the image (using an internal pulse generator)</p>
</td>
</tr>
<tr>
<td style="width: 15.8345%;">3</td>
<td style="width: 27.5654%;">Disable 60 LPM</td>
<td style="width: 56.6001%;"> </td>
</tr>
<tr>
<td style="width: 15.8345%;">4</td>
<td style="width: 27.5654%;">Disable 90 LPM</td>
<td style="width: 56.6001%;"> </td>
</tr>
<tr>
<td style="width: 15.8345%;">5</td>
<td style="width: 27.5654%;">Disable 120 LPM</td>
<td style="width: 56.6001%;"> </td>
</tr>
<tr>
<td style="width: 15.8345%;">6</td>
<td style="width: 27.5654%;">Disable 240 LPM</td>
<td style="width: 56.6001%;"> </td>
</tr>
<tr>
<td style="width: 15.8345%;">7</td>
<td style="width: 27.5654%;">Disable IOC 288</td>
<td style="width: 56.6001%;"> </td>
</tr>
<tr>
<td style="width: 15.8345%;">8</td>
<td style="width: 27.5654%;">Disable IOC 576</td>
<td style="width: 56.6001%;"> </td>
</tr>
</tbody>
</table>
<p>The disabling of modes is likely meant to be used to prevent false-detection of modes in automatic operation. I did observe it try to use 90 LPM for a 120 LPM signal in one case, and for most uses only one or two modes will actually be utilised. My unit came with 90 LPM already disabled, which suggests this was a common issue.</p>
<h3 id="mcetoc_1gq7mg0kf1o">Bar Graph</h3>
<p>My unit does not have the bar-graph, but this is shown in the available schematics. This was likely added in a later revision of the front panel PCB. I annotated this circuitry below, based on the hookup it appear to be intended as a tuning aid, showing the current video level.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-21.13.25-2.png" alt="" width="365" height="297"></figure>
<p>It is shown in use in this video from 'The Fixman':</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-21.26.00.png" alt="" width="1402" height="434"></figure>
<h2 id="mcetoc_1gq6r0omc16p">Printer Alignment</h2>
<p>The internal test pattern generator is good for alignment of the print heads in the scan direction, run it at 60 LPM and you'll see if any heads are misaligned and note which head colour to adjust.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4109.jpeg" alt="" width="546" height="482"></figure>
<p>Above shows my alignment sequence, you can see the sequence, ending in a somewhat decent printout of of a DWD chart footer that I used as a reference test image.</p>
<p>The heads are coloured red, yellow, and blue. Alignment of scan direction error appears to be via bending the stylus with pliers, I couldn't find any better way of doing it. Perhaps as mentioned above, the stylus dynamic correction potentiometers are intended for this purpose? I didn't try this alignment method, but will investigate further in future.</p>
<p class="msg msg--info">See <a href="https://longview.be/the-nagrafax-fixing-the-phasing-circuit.html">part 2</a>, the potentiometers do affect the head-timing, so this is the preferred adjustment method.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4087-2.jpeg" alt="" width="418" height="275"></figure>
<p>Below the key components of the head are shown, the stylus is retained by a small pin and a spring, it can simply be pulled off for replacement. The azimuth adjust is done by loosening the flat head set-screw, and rotating the shaft above it.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4089.jpeg" alt="" width="418" height="279"></figure>
<p>As received my unit had <em>extremely</em> worn down styles (styluses?) that were basically flats instead of points. Since Nagra doesn't appear to stock spares anymore, I ended up using a diamond cut-off wheel to "sharpen" them into new points. This procedure makes them a fair bit shorter, so I had to realign in the scan direction. Since the new points weren't fully on point I also did the vertical align, which went pretty well.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4090.jpeg" alt="" width="523" height="604"></figure>
<p>Above a comparison between unaligned and aligned quality is shown; the vertical striping was later improved further with a better demodulator design.</p>
<h2 id="mcetoc_1gq6r0omc16q">AM Demodulator</h2>
<p>My unit came with what appears to have been a factory fitted optional extra board, and included a sticker noting that an internal (transformer isolated) AM demodulator was included. This suggests the unit was used with something other than HF WEFAX or similar, and I'm not entirely sure what that would be. The AM input can apparently have any center frequency between 1.5 and 5 kHz.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4064.jpeg" alt="" width="403" height="461"></figure>
<p>Above is the result of using the Twente webSDR FM demodulation mode, and feeding that into the AM demodulator. It looks awful, but this was the first comprehensible image I made. Feeding the FM signal into the AM card produced unreadable results, so it's clearly made for some other format.</p>
<p>Below are pictures of the board, there are various test points, probing these I suspect the board implements a synchronous AM demodulator of some sort. This is mostly based on the fact that I found a recovered square wave carrier signal on one test point.</p>
<p>The ICs found include: CD40107 NAND gate, MC14538 monostable multivibrator (oscillators perhaps), MC14001B series logic gates, MC14053 analog switch (maybe a mixer), MC3303 quad opamps, and an MLM2901 (a LM2901 comparator?). The ICs are all dated 1980.</p>
<p>The two LEDs are automatic level control indicators indicating high/low AF levels, and there is a potentiometer accessible from the side which adjusts the output DC offset (i.e. image brightness).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4110.jpeg" alt="" width="587" height="398"></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4111.jpeg" alt="" width="590" height="391"></figure>
<p>Best guess would be it's a line<em> </em>type interface, it was probably connected to a phone line via some interfacing circuitry provided by the state telecom provider. As for why they would use AM instead of FSK, who knows. Probably comes down to cost.</p>
<p>The Nagra schematics don't mention this board at all, and from the way it was installed it looks slightly retrofitted, the board mounting is completely different from the standard cards and looks somewhat unsteady.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4113.jpeg" alt="" width="309" height="519"></figure>
<h2 id="mcetoc_1gq6r0omc16r">FSK &amp; Video Format</h2>
<p>The NAGRAFAX uses unusual but not entirely insensible video levels of 2 V p-p centered at 5 V DC. <span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">The video is positively modulated, so 6 V is full white. </span></p>
<p><span style="color: var(--text-primary-color); font-family: var(--editor-font-family); font-size: inherit; font-weight: var(--font-weight-normal);">The video is in fact analog, which surprised me. For weather charts a binary digital signal would suffice but the almost identical PRESS-FAX was used for both images and text, and I have printed PRESS-FAX recordings successfully with reasonable photography quality.</span></p>
<p>The NAGRAFAX supports analog video levels, but the video levels appear to be quantised to 8 discrete levels in the video drive circuitry.</p>
<p>The signal is conventionally transmitted as analog FM radio in a ~3 kHz HF channel. It is tempting to call this FSK, but it is as mentioned analog FM with some special characteristics. Current on-air stations use ±425 Hz deviation with positive modulation (and IOC 576/120 LPM).</p>
<p>Documentation suggests VLF fax transmission was done in the past (with ±150 Hz deviation). The only specific VLF transmitter I know of is CFH, Halifax Canada, but according to an article from <a href="https://worldradiohistory.com/hd2/IDX-Short-Wave/Monitoring-Times-IDX/00s/Monitoring-Times-2011-01-OCR-Page-0026.pdf">MONITORING TIMES in 2011</a> these services have been shut down.</p>
<p>The bandwidth is limited to 3 kHz, and knowing the ~1 kHz deviation I figured 1 kHz of video bandwidth would be fine (following the rule of thumb ∆f+2fu=bandwidth). This certainly works, but the actual signal bandwidth is around 3 kHz or so, and the demodulator needs to support this to make finely printed text readable.</p>
<p>Some start/stop sine tones are normally transmitted, these are detected by the fax machine, and allow it to (in principle) operate unattended. I didn't have any false starts, but I found that when conditions were poor the machine often misses both start and stop signals, so I had to manually control this.</p>
<p>Lacking an application specific fax radio receiver, I did it the normal ham-radio way and use an SSB radio to offset-tune the signal. By convention the offset to the nominal center frequency is 1.9 kHz, though I went with a round 2 kHz because I'm special.</p>
<h3 id="mcetoc_1gq6r0omc16s">FM Demodulation in an ADAU1701</h3>
<p>To actually demodulate the signal, I implemented an FM receiver in an ADAU1701 DSP board. This choice was driven largely by the effort needed to put a 4046 on a bread-board vs. using the ADAU1701 based board I had sitting around already.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4114.jpeg" alt="" width="423" height="498"></figure>
<p>This board has a high-level audio output that was easily modified to operate DC-coupled. This way the DSP board could plug directly into — and be powered through — the NAGRAFAX accessory port without additional interfacing circuitry.</p>
<p>The demodulator design is somewhat novel, at least doing it this way in this DSP. Previously I had used <a href="https://www.embedded.com/dsp-tricks-frequency-demodulation-algorithms/">this one weird trick</a> to demodulate without atan(), but I found it hard to achieve the required video bandwidth and linearity needed for good quality prints.</p>
<p>My alternate design is not ground-breaking, but is simply a digital implementation of a quadrature tank demodulator.</p>
<p>The principle is to do the usual filter + thresholding of the FM signal, then we feed one branch into a 1st order all-pass filter tuned to the center frequency, and multiply this with the non-filtered signal.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-13.02.20.png" alt="" width="2154" height="982"></figure>
<p>The all-pass filter will yield a phase shift proportional to frequency (leaving amplitude unchanged), and by multiplying the shifted and non-shifted signals, the D-C component of the result is the phase difference between the two signals. Two filters are used, the second filter provides a mostly fixed phase offset for convenience.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-12.59.37-2.png" alt="" width="371" height="435"></figure>
<p>Since the phase shift shown above is proportional to and fairly linear vs. frequency, the result is that the output voltage becomes proportional to the signal frequency.</p>
<p>A low pass filter must be used to remove the frequency-sum term from the multiplication. I implemented this as a 10th order inverse-Chebyshev filter, which has somewhat poor pass-band linearity but extremely high stop-band attenuation. This allowed me to place the cut-off very close to the harmonic contents.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-13.03.35.png" alt="" width="1898" height="690"></figure>
<p>The nominal usable bandwidth of the demodulator is limited by 2⨉f_l where f_l is the lowest input frequency of the FM signal. A future improvement could be to mix the 2 kHz IF to a higher frequency before demodulation to move the sum frequency further away from the pass-band.</p>
<p>A modification to the basic scheme was implemented, where I placed a 2nd order low-Q (~0.5) peaking-filter tuned to the center frequency between the thresholding and the actual demodulator core. This seemed to improve the effective bandwidth of the demodulator, and I suspect that in practice this cuts out a lot of the lowest input frequencies, alleviating the frequency sum problem mentioned above.</p>
<p>This demodulation scheme was quite easy to set up, is relatively efficient, and with some tuning it significantly outperformed the more complex atan()-less solution linked above. It should be noted that the fixed point processing of the SigmaDSP may have played a part, and that this demodulator does not need to be particularly linear, only particularly fast.</p>
<h3 id="mcetoc_1gq6r0omc16t">webSDR Playback Woes</h3>
<p>The original Web SDR (<a href="http://websdr.ewi.utwente.nl:8901">The Twente!</a>) has some practical issues with doing real-time radio fax reception.</p>
<p>The real-time playback uses buffers, and I found that the sample-rate of the computer I was using was almost certainly slightly off from what the webSDR service supplies.</p>
<p>This lead to frequency "hunting" during playback, the audio would normally e.g. play slightly too fast. This will lead to buffer-underrun at some point, so when the browser starts running out of samples it slows down (probably down by '1' sample rate unit).</p>
<p>This slower unit is too coarse though, so then it starts filling up with excess samples, and it goes up '1' sample rate unit again, and now it's too fast again!</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4074-2.jpeg" alt="" width="430" height="401"></figure>
<p>Radio fax doesn't use synchronisation pulses per line, the transmission is "phased" on startup, either automatically or manually by the operator. Once this is complete, the fax machine runs at whatever rate it's been calibrated to (under crystal control). In the case described above, this leads to very obvious steps in the horizontal alignment of the image, and this case was pretty extreme.</p>
<p>Ordinarily this error would simply lead to a slanted image, which is normally acceptable if annoying, and this could be calibrated in the fax machine if it were a recurring issue. An example of a slanted image is shown below, from a PRESSFAX recording.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/IMG_4093.jpeg" alt="" width="625" height="220"></figure>
<p>The good news is that the recording functionality of the Twente webSDR works beautifully, supplying glorious uncompressed wave data that can be played back at a steady (if perhaps slightly incorrect) rate in e.g. Audacity or foobar 2000! The  prints shown in this article were mostly printed from files sourced this way.</p>
<p>Below is a segment of such a recording, showing the spectral content vs. time. The relatively high bandwidth is shown, and this bandwidth is proportional to the frequency content of the signal. This case shows mostly empty lines, with text near the middle of the recording.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/81/Screenshot-2023-02-26-at-15.40.20.png" alt="" width="1786" height="898"></figure>
<h2 id="mcetoc_1gq6u0nku1ae">Future Work</h2>
<p>I will likely remove the internal AM demodulator, and replace it with a new custom board containing an ADAU1701 demodulator.</p>
<p>One neat idea is to use e.g. an ESP-32 to drive the printer with synthetic images directly, allowing it to act as an image-printer. This would require additional effort, but in principle all that's needed is to generate start &amp; phasing tones, then scan out a bitmap at a suitable rate.</p>
<p>As noted above, the phasing circuitry is complex, and there are indications that it remains active for longer than the current duration of sync pulses. If this is true, then a modification will be attempted to reduce the phasing time to less than 30 seconds. Failing this, I may have to find some way to increase the phasing circuitries loop gain.</p>
<p>I may also look further into the dynamic stylus correction feature to determine if this is intended to correct horizontal head offsets, since I didn't initially try this method.</p>
<p class="msg msg--info">The two previous have been implemented in <a href="https://longview.be/the-nagrafax-fixing-the-phasing-circuit.html">part 2</a>!</p>
<p>Adding a bar-graph circuit to show the video levels would be fairly neat, the bar graph  can be fairly trivially retrofitted to show video levels in real-time.</p>
<p>I am also considering adding some type of phasing-aid circuit. My thinking is that adding a bi-color LED and driving one from the internal phase-reference pulse, and the other connected to the video signal (active when white) could be sufficient.</p>
            ]]>
        </content>
    </entry>
    <entry>
        <title>The 3021N RF Section/1st Converter (Part 7)</title>
        <author>
            <name>LA2YUA</name>
        </author>
        <link href="https://longview.be/the-3021n-rf-section1st-converter.html"/>
        <id>https://longview.be/the-3021n-rf-section1st-converter.html</id>
        <media:content url="https://longview.be/media/posts/77/20220619T144038__IMG1882_2k.jpg" medium="image" />
            <category term="3021N"/>

        <updated>2022-11-20T12:29:32+01:00</updated>
            <summary type="html">
                <![CDATA[
                        <img src="https://longview.be/media/posts/77/20220619T144038__IMG1882_2k.jpg" alt="" />
                    <p>The RF Section or 1st Converter consists of the pre-amplifier, first mixer, and first IF filter in the receiver signal chain. This is typically the most important part of the radio since it determines the sensitivity and selectivity of the radio.</p>
<p>This card was finished in late 2022, at the time of initial publication it has not been integrated yet.</p>

                ]]>
            </summary>
        <content type="html">
            <![CDATA[
                    <p><img src="https://longview.be/media/posts/77/20220619T144038__IMG1882_2k.jpg" class="type:primaryImage" alt="" /></p>
                <p>The RF Section or 1st Converter consists of the pre-amplifier, first mixer, and first IF filter in the receiver signal chain. This is typically the most important part of the radio since it determines the sensitivity and selectivity of the radio.</p>
<p>This card was finished in late 2022, at the time of initial publication it has not been integrated yet.</p>

<div class="post__toc">
<h3>Table of Contents</h3>
<ul>
<li><a href="#mcetoc_1gigdpvq37i2">The Original Design</a></li>
<li><a href="#mcetoc_1gnap9h8ci">The New Design</a>
<ul>
<li><a href="#mcetoc_1gnapj8712u">Pre-Amplifier</a></li>
<li><a href="#mcetoc_1gnapj8712v">Mixer</a></li>
<li><a href="#mcetoc_1gnapj87130">IF Filtering</a></li>
<li><a href="#mcetoc_1gnapj87131">IF Amplifier</a></li>
<li><a href="#mcetoc_1gnb4i1e016">External Interface</a></li>
</ul>
</li>
<li><a href="#mcetoc_1gnb4i1e017">Performance</a></li>
</ul>
</div>
<h2 id="mcetoc_1gigdpvq37i2">The Original Design</h2>
<figure class="post__image" ><img src="https://longview.be/media/posts/77/20221120T130807__IMG9399_2k.jpg" alt="" width="6192" height="4128">
<figcaption >RF Section/1st Converter Original Schematic</figcaption>
</figure>
<p>The original 1st converter (RF Section) was built using a JFET pre-amplifier, and a double balanced diode-ring mixer. A crystal filter and dual-gate MOSFET post-amplifier were used for AGC.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-19.33.37.png" alt="" width="2026" height="1466"><figcaption>Original RF Section Gain/Noise Level</figcaption></figure>
<p>Transformer impedance-matching was used for the preamp, for much the same reason as I did in the new design.</p>
<p>The filter bandwidth of the original design was around 6-8 kHz, slightly wider than the 2nd Mixer crystal filter.</p>
<h2 id="mcetoc_1gnap9h8ci">The New Design</h2>
<p>The new 1st Converter was designed as part of the solution to the problem of the rather poor IF filter performance that has been mentioned previously in the <a href="https://longview.be/the-3021n-synthesizer.html">Synthesizer article</a>. When I acquired the new crystal filters I figured this would be a suitable place to test them, and I was also interested in a higher sensitivity input stage.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/3021N_PCA_Blocks-3021N_RF_Section.drawio.svg" alt="" width="847" height="331"></figure>
<p>The new 1st Converter is more or less a 1:1 replacement of the old one, with the primary functional difference being a new 1st IF frequency of 100.2 instead of 92 MHz, wider IF bandwidth, and a RF frequency range of up to 60 MHz. This card also uses a 12-15 V supply voltage instead of the previous designs 24 V supply.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/77/IMG_2718.jpg" alt="" width="4032" height="3024">
<figcaption >3021N 1st Converter</figcaption>
</figure>
<h3 id="mcetoc_1gnapj8712u">Pre-Amplifier</h3>
<p>The converter features a high sensitivity pre-amplifier built using an OPA847 that is driven through a 1:16 impedance transformer and giving a gain of around 30 dB.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-19.28.27.png" alt="" width="2072" height="1030"><figcaption>Pre-Amplifier Schematic </figcaption></figure>
<p>The frequency coverage is approximately 15 kHz to 60 MHz, slightly extended. The RF transformer is the Mini-Circuits ADT16-6T, which is AC-terminated to 800 Ω on the secondary, this AC termination extends the low frequency pass band a fair bit at the cost of strong signal handling capabilities.</p>
<p>A SCLF-65+ low pass filter is used on the input to limit VHF interference.</p>
<p>The use of the transformer increases the source voltage level, and this reduces the effect of the operational amplifiers input referred noise voltage. The benefit of this amplifier is the high linearity, due to it's closed loop operation.</p>
<h3 id="mcetoc_1gnapj8712v">Mixer</h3>
<p>The amplified RF is applied to the AD831 high linearity mixer, which multiplies the RF with the LO1 signal from the synthesizer.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-19.36.22.png" alt="" width="978" height="1000"><figcaption>AD831 Block Diagram</figcaption></figure>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-19.29.40.png" alt="" width="2000" height="1260"><figcaption>Mixer Schematic</figcaption></figure>
<p>For æsthetic purposes I used 1:1 RF transformers for the RF and LO signals. The mixer is operated in the highest linearity mode, which makes it dissipate around 1 W of power, so a large heat sink was designed in. This is larger than required but it was already available and there's plenty of room here.</p>
<h3 id="mcetoc_1gnapj87130">IF Filtering</h3>
<p>The IF output is routed through a Romanian (assumed) made "PLS 006 F" crystal filter with center frequency of 100.2 MHz, I acquired a few of these filters from eBay. These are installed in soldered turned pin sockets and retained with the M2.5 studs applied. A conductive foam gasket is used to as a spacer and to ensure a solid ground connection for the filter case.</p>
<figure class="post__image" ><img src="https://longview.be/media/posts/77/IMG_2716.jpg" alt="" width="4032" height="3024">
<figcaption >Step-wise IF frequency response plot</figcaption>
</figure>
<p>Seen above is a manually stepped frequency response plot of the IF filter, it has a flat 6 dB bandwidth of around 20 kHz (±10 kHz), with high out of band rejection.</p>
<h3 id="mcetoc_1gnapj87131">IF Amplifier</h3>
<p>The filter output is amplified further in the 1st IF amplifier, which is a dual gate FET MMIC of type S982 made by Temic. The effective maximum gain is around 20 dB, while the total gain control range is around 60 dB.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-20.01.38.png" alt="" width="475" height="239"></figure>
<p>This is a self-biased dual gate FET amplifier suitable for use up to around 1 GHz, and a basic L-match is used to match the 50 Ω filter signal to gate 1 to increase conversion gain.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-20.00.19.png" alt="" width="1022" height="946"><figcaption>S982 Transducer Gain Control</figcaption></figure>
<p>Gate 2 is the AGC signal, and is controlled by the 2nd IF Processor, though a potentiometer on the board will drive it if no external signal overrides it. This simplifies testing.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-19.30.57.png" alt="" width="2292" height="1260"><figcaption>IF Filter and Amplifier</figcaption></figure>
<p>In this design I used a 1:1 transformer as the RF-choke for the device, and the signal is output on the secondary side. An AD8307 RMS detector is also connected to sample the RF power here, which can be used by the 2nd IF Processor to quickly detect saturation.</p>
<h3 id="mcetoc_1gnb4i1e016">External Interface</h3>
<p>The external interface for operational use is a card-edge connector with 0.157" pitch, fairly standard for the era. Power is supplied at 12-15 V DC, and there is an RF in, LO in, and IF out port.</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-22.43.32.png" alt="" width="311" height="453"></figure>
<p>In addition, there is an AGC control input (from the 2nd Converter) and a power-detect output which can be used by the 2nd Converter but probably won't (it doesn't measure anything the converter can't work out on its own).</p>
<figure class="post__image"><img  src="https://longview.be/media/posts/77/Screenshot-2023-01-21-at-22.37.20.png" alt="" width="2194" height="598"><figcaption>External Interface Circuitry</figcaption></figure>
<p>Above the analog interfaces are shown, the PWRDET1 (for IF 1) is a buffered AD8307 signal, and the AGC1 external input is 0-1 V, with the amplifier applying adequate gain matching the S982 MOSMICs control range.</p>
<p>AGC1 has a weak link to a potentiometer, so when undriven for testing this potentiometer can be used to manually set the gain.</p>
<h2 id="mcetoc_1gnb4i1e017">Performance</h2>
<p>Performance testing indicated that noise floor is very low, as expected, and conversion gain is sufficient that it can easily be digitised in the next converter.</p>
<p>However, the design may be slightly front-loaded wrt. gain so I may go back later and reduce the pre-amplifier gain to improve interference handling.</p>
            ]]>
        </content>
    </entry>
</feed>
