Silicon ChipPico Mixed-Signal Analyser (PicoMSA) - September 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Intel is in trouble
  4. Product Showcase
  5. Subscriptions
  6. Feature: Energy Harvesting by Dr David Maddison, VK3DSM
  7. Review: Exteek C28 transmitter/receiver by Allan Linton-Smith
  8. Project: Compact OLED Clock/Timer by Tim Blythman
  9. Feature: Mains Earthing Systems by Brandon Speedie
  10. Project: Pico Mixed-Signal Analyser (PicoMSA) by Richard Palmer
  11. Project: IR Helper by Tim Blythman
  12. Project: No-IC Colour Shifter by Tim Blythman
  13. Feature: Electronics Manufacturing in Oz Part 2 by Kevin Poulter
  14. Project: Discrete Ideal Bridge Rectifiers by Phil Prosser & Ian Ashford
  15. Project: Electric Guitar Pickguards by Brandon Speedie
  16. Serviceman's Log: Turning to the dark side by Dave Thompson
  17. Vintage Radio: Stromberg-Carlson “Air Hostess” model 4A19 by Associate Professor Graham Parslow
  18. PartShop
  19. Market Centre
  20. Advertising Index
  21. Notes & Errata: 180-230V DC Motor Speed Controller, July-August 2024
  22. Outer Back Cover

This is only a preview of the September 2024 issue of Silicon Chip.

You can view 42 of the 112 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Compact OLED Clock/Timer":
  • Compact OLED Clock & Timer PCB [19101231] (AUD $5.00)
  • PIC16F18146-I/SO programmed for the Compact OLED Clock & Timer [1910123A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Short-form kit for the Compact OLED Clock & Timer (Component, AUD $45.00)
  • Firmware (C and HEX) files for the Compact OLED Clock/Timer [0910123A.HEX] (Software, Free)
  • Compact OLED Clock & Timer PCB pattern (PDF download) [19101231] (Free)
Items relevant to "Pico Mixed-Signal Analyser (PicoMSA)":
  • PicoMSA PCB [04109241] (AUD $7.50)
  • Firmware for the PicoMSA (Software, Free)
  • PicoMSA PCB pattern (PDF download) [04109241] (Free)
  • PicoMSA lid panel artwork and drilling diagrams (Free)
Items relevant to "IR Helper":
  • Firmware for JMP010 - IR Helper (Software, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Articles in this series:
  • Electronics Manufacturing in Oz Part 1 (August 2024)
  • Electronics Manufacturing in Oz Part 1 (August 2024)
  • Electronics Manufacturing in Oz Part 2 (September 2024)
  • Electronics Manufacturing in Oz Part 2 (September 2024)
Items relevant to "Discrete Ideal Bridge Rectifiers":
  • Discrete Ideal Bridge Rectifier TH PCB [18108241] (AUD $5.00)
  • Discrete Ideal Bridge Rectifier SMD PCB [18108242] (AUD $2.50)
  • Discrete Ideal Bridge Rectifier all-TH kit (Component, AUD $30.00)
  • Discrete Ideal Bridge Rectifier SMD kit (Component, AUD $27.50)
  • Discrete Ideal Bridge Rectifier PCB patterns (PDF download) [18108241-2] (Free)
Items relevant to "Electric Guitar Pickguards":
  • Guitar Pickguard - Jazz Bass [23109241] (PCB, AUD $10.00)
  • Guitar Pickguard - J&D T-Style Bass [23109242] (PCB, AUD $10.00)
  • Guitar Pickguard - Music Man Stingray Bass [23109243] (PCB, AUD $10.00)
  • Guitar Pickguard - Fender Telecaster [23109244] (PCB, AUD $5.00)
  • Guitar Pickguard PCB patterns (PDF download) [23109241-4] (Free)

Purchase a printed copy of this issue for $12.50.

Project by Richard Palmer USB Mixed-Signal Logic Analyser using a Raspberry Pi Pico A mixed signal analyser can be invaluable as it lets you monitor and decode serial buses and other logic signals while observing other analog signals. Based on a Raspberry Pi Pico, this one provides 16 digital and three analog channels. A logic analyser is a fundamental tool for debugging digital circuitry, whether it is hard-wired logic or involves a microcontroller. Along with traditional parallel and sequential logic, circuit elements are now commonly connected to microcontrollers using I2C, I3C, SPI, or serial connections. Often, analog signals trigger or are triggered by digital signals. This is the domain of the mixed-signal oscilloscope (MSO). While this project does not claim to be an all-bells-and-whistles MSO, it provides flexible logic analyser functionality and the ability to view up to three analog signals synchronously. It is relatively compact and inexpensive. Design overview A block diagram is shown in Fig.1. At the heart of the design is a Raspberry Pi Pico microcontroller. The Pico’s very fast PIO (Programmable I/O) processor captures digital signals, while its inbuilt ADC (analog-to-­ digital converter) captures the analog signals. The captured signals are translated into serial format and transmitted to the host computer via a USB serial connection. 52 Silicon Chip The open-source PulseView program decodes and displays the waveforms. Input signal conditioning and overvoltage protection are provided for both analog and digital channels. The digital side employs logic translators and schottky protection diodes, while the analog channels offer an amplifying buffer, diode protection, AC/ DC switching and potentiometers for gain control. Performance As with digital oscilloscopes, the sampling rate is a critical specification for logic analysers, determining the maximum frequency that can be reliably displayed and, possibly more importantly, the smallest difference in signal timing that can be distinguished. The Pico can sample up to twenty digital signals at an impressive 240 million samples per second. To achieve that, it is overclocked from its default 133MHz to 240MHz, which is well within safe limits. The achieved sampling rate depends on the number of enabled channels and the desired number of samples to be captured – see Table 1. The maximum capture rate reduces when the quantity of data to be captured exceeds the Pico’s internal buffer space and data needs to be streamed via the USB link. The manual contained in the download pack for this project has further details (siliconchip. au/Shop/6/452). PicoMSA Features & Specifications » 20 protected digital inputs for 1.8V, 3.3V or 5V logic » Three protected 7-bit analog inputs » Four additional 3.3V protected digital inputs » 240MHz digital sampling rate » Analog inputs have adjustable sensitivity of 0.33-120V peak-to-peak » 2.4MHz maximum shared ADC sampling rate » Flexible, multi-platform PulseView software with multiple protocol decoders » USB powered and connected Australia's electronics magazine siliconchip.com.au The logic-level translator ICs can handle sixteen 5V, 3.3V or 1.8V logic inputs (D2-D17). The last four digital inputs, D18-D21, do not have logic-­ level translators and are optimised for 3.3V logic levels. All analog and digital inputs are protected against excessive positive or negative voltages. The digital inputs are protected for an absolute maximum signal range of -5V to +20V. The input capacitor’s 250V DC rating determines the upper limit to the analog input voltage, although applied signals should be limited to 25V RMS or 60V peak for safety. Analog signals may be AC or DC coupled, with a selection switch for each channel. The maximum sensitivity for analog inputs is 330mV fullscale. They are sampled with 7-bit accuracy, translating to 2.5mV steps at maximum sensitivity. When analog signals are captured, the maximum sampling rate is limited by the ADC’s 2.4MHz conversion rate, which is shared among the enabled analog channels. As PulseView does not smooth analog signals, five samples per cycle is a practical lower limit for displaying a recognisable sinewave (Screen 1). That gives us a theoretical AC bandwidth of around 500kHz when capturing a single analog channel or 160kHz when all three channels are enabled. With a small number of samples per cycle, if the signal being displayed is not an exact sub-division of the sampling frequency, patterns like the one shown in Screen 2 may appear. It looks like an amplitude-modulated signal due to the sample points near the peak occurring at a slightly different part of the waveform each time. siliconchip.com.au Table 1 – maximum sampling rates # digital # analog # samples Maximum sampling rate Limitation 1-4 0 ≤200k 240Msps PIO 1-4 0 >200k 500ksps+ USB w/RLE 5-7 0 ≤100k 240Msps PIO 5-7 0 >100k 500ksps+ USB w/RLE 8-14 0 ≤50k 240Msps PIO 8-14 0 >50k 250ksps+ USB w/RLE 15-20 0 <25k 240Msps PIO 15-20 0 ≥25k 167ksps+ USB w/RLE 0 1 ≤200k 2.4Msps ADC 0 1 >200k 500ksps USB 0 2 ≤100k 1.2Msps ADC 0 2 >100k 250ksps USB 0 3 <67k 800ksps ADC 0 3 ≥67k 160ksps USB 1-7 1 ≤100k 2.4Msps ADC 1-7 1 >100k 250ksps USB 1-7 2 <67k 1.2Msps ADC 1-7 2 ≥67k 160ksps USB 1-7 3 ≤50k 800ksps ADC 1-7 3 >50k 125ksps USB 8-14 1 <67k 2.4Msps ADC 8-14 1 ≥67k 160ksps USB 8-14 2 ≤50k 1.2Msps ADC 8-14 2 >50k 125ksps USB 8-14 3 ≤40k 800ksps ADC 8-14 3 >40k 100ksps USB Table 1: the maximum sampling rate depends on the number and type of channels active and the number of data points to capture. In each case, the limitation is either the maximum PIO, USB or ADC speed. Fig.1: incoming digital and/or analog signals are conditioned before being captured by the Pico’s internal PIO (digital) and ADC (analog) peripherals. The captured data is transferred to the host computer via USB for display on the open-source PulseView application. Australia's electronics magazine September 2024  53 The frequency of the apparent modulation is related to the remainder of the signal frequency divided by the sampling rate. In DC mode, the analyser has an analog frequency response within +0/-0.5dB to 100kHz and +0/-2dB up to 300kHz. The equivalent lower limits are 2Hz (-0.5dB) and 5Hz (-2dB) in AC-coupled mode (see Fig.2). The Pico PIO peripheral Fig.2: the analyser’s AC analog channel bandwidth. The DC bandwidth is within 0.5dB from DC to 100kHz and within 2dB to 300kHz. Fig.3: the Pico’s PIO (programmable I/O) processor has flexible facilities for interacting with I/O signals at very high speeds, communicating with the main CPU via FIFO buffers. The Pico’s internal PIO is a very fast and flexible secondary processor, optimised for I/O processing – see Fig.3. It can operate up to the CPU speed which, in this case, has been moderately overclocked to 240MHz. The PIO’s instruction set consists of only nine instructions and the maximum length of a PIO program is 32 instructions. Those are not major limitations as each PIO instruction word can accomplish multiple actions, so complex I/O programs can be written with few instructions. For instance, an SPI port can be created with just three PIO instructions. In this project, the PIO executes a loop with a single instruction: read from a defined number of pins and move them into the PIO’s eight-entry first-in, first-out (FIFO) buffer to be picked up by the Pico’s main CPU for further processing. The FIFO buffer is 32 bits wide and, when the number of digital inputs being captured is less than 16, the PIO automatically packs multiple sets into one FIFO entry. Firmware The top of the prototype PCB with the front panel wiring in place. Several components have been moved in the final version to clear space under the switches. Wires are soldered directly to the PCB instead of headers to give enough clearance for the pots & switches. 54 Silicon Chip Australia's electronics magazine The firmware, developed by someone using the nickname ‘pico-coder’, has several main elements. It initially communicates with PulseView to inform the software of the unit’s capabilities and then accepts instructions on how many inputs to capture, the desired sampling rate and capture length. When PulseView’s Run button is clicked, the Pico begins the capture process and starts transmitting data. When PulseView has collected sufficient data, it sends a command to disarm the PIO and stop the data flow. Triggering – selecting the beginning of the saved and displayed capture stream – is left to PulseView, as the additional processing is beyond the Pico’s capabilities at higher sampling rates. siliconchip.com.au The PIO captures digital data and packs it into the FIFO buffer for the main CPU to convert into a suitable form to transmit via USB. While waiting for transmission, the digital samples are stored in another buffer that uses most of the Pico’s onboard 264kiB of SRAM. The size of this buffer determines the maximum number of digital samples that can be captured when the capture rate exceeds the USB data transmission rate. The unit can operate at full speed when the overall capture size is less than the RAM allocated to the buffer. When capturing larger data sets, the acquisition rate is constrained by the USB interface’s maximum transfer rate of 400-800kB/sec; the actual rate depends on the host computer’s capability. For digital-only signals, run-length encoding (RLE) compression automatically increases the effective transfer rate. In situations where there are bursts of digital signal activity followed by long gaps, such as the I2C signal captured in Screen 3, RLE encoding improves the effective data rate in the gaps between bursts by several orders of magnitude. However, when analog signals are (also) being captured, compression is not used. Analog signals are directly captured by the Pico processor’s inbuilt ADC, using round-robin sampling and a second software FIFO. While the Pico’s ADC has a specified twelve-bit resolution at a maximum sampling rate of 500kHz, silicon errors in the chip reduce the accuracy to just under nine bits. Some clever software tweaks (Raspberry Pi forums – siliconchip.au/link/ abwb) increase the maximum ADC sampling rate to 2.4MHz. The accuracy is reduced to slightly over seven bits at this higher rate. In our use case, the sampling rate vs accuracy tradeoff is justified. Keep in mind that your average low-cost DSO only uses eightbit sampling. Circuit details The complete circuit is shown in Fig.4. The first sixteen digital inputs have their signals conditioned by a pair of SN74LVCC3245ADW logic level translators, IC1 & IC2. The 74xxx245 is offered in a plethora of different logic families. It is possible to substitute families other than LVC siliconchip.com.au Screen 1: a 3V 50kHz analog signal captured at 500kHz. With ten samples per cycle, the signal is recognisable as a sinewave. Screen 2: a 60kHz sine wave sampled at 250kHz shows what appears to be amplitude modulation. However, this is simply a macro view of the effect depicted in Screen 1. as long as the selection allows 3.3V logic on the A-side and 1.8V to 5V or better on the B-side. The input logic voltage (VCCB) is selected by a jumper on CON3, with the options being the 5V and 3.3V digital voltage supplies available from the Pico and 1.8V from REG2. This voltage also supplies the cathodes of the protection diodes for channels D2-D17 (GP pins on the Pi Pico). While a voltage selector switch would have been preferred, all the major suppliers’ SP3T slide switches are make-before-break types, which would temporarily short two of the three power rails when the voltage setting is changed! The translator ICs include negative-­ voltage diode protection, while over-voltage protection is provided by BAS40 low-capacitance schottky diodes. Each dual diode protects a pair of inputs from voltages greater than VCCB + 0.3V. 100W input resistors limit the input currents through Australia's electronics magazine the protection diodes and reduce ringing on the input signal lines due to stray capacitance and impedance mismatches. The BAS40 diodes have a maximum continuous current of 200mA, and the logic level translators can handle -50mA, so the absolute voltage limits are -5V/+20V. The final four digital inputs, D18D21, accept only 3.3V logic and have reverse- and over-voltage protection provided by 100W resistor arrays and BAS40-04 serially-connected diode pairs protecting the inputs to ±20V. The digital channel input resistors are SMD quad resistor arrays to reduce the parts count. However, individual M2012/0805 SMD resistors may be used, mounted on their edges. The three analog input channels are configured identically. BNC connectors allow standard ×1/×10 oscilloscope probes to be attached. Each input’s AC/DC selection is via a toggle switch, with 100nF capacitors feeding September 2024  55 into 1MW, allowing AC response down to a few hertz. With oscilloscope probes in ×10 mode, the 50pF capacitors in the circuit are balanced out by 20pF capacitors in parallel with the 10MW series probe resistors. 56 Silicon Chip If oscilloscope probes are not going to be used, panel-mount RCA connectors may be substituted for the BNC connectors. In this case, the 50pF capacitors in parallel with the pots should be omitted, as they may cause a roll-off in sensitivity at higher Australia's electronics magazine frequencies. The amount of roll-off will depend on the impedance of the source signal. The Pico’s ADC has a 0-3.3V input voltage range. As the buffer’s gain is set to 10, this translates to 330mV at the input to the buffer. However, the siliconchip.com.au Fig.4: digital signals pass through protective resistors and are clamped to the positive supply rail by schottky diodes before reaching level shifters IC1 & IC2. The analog inputs have similar protection, but there is also a series capacitor that can be shorted to select between AC and DC coupling, a potentiometer in series for variable attenuation and an op amp gain stage before the signals reach the Pico’s analog input pins. variable attenuator formed by the 1MW potentiometer and 1.2kW fixed resistor in each channel allows much higher voltage signals to be probed, up to the 60V peak safety limit. siliconchip.com.au 24mm diameter pots may provide smoother operation than the 16mm variety, and logarithmic tapers give a more even control of the input voltage. 9mm and 12mm pots should be Australia's electronics magazine avoided, as they are generally only rated to handle up to 20V DC. The 10kW op amp input resistors limit any current through the BAS4004 (series) protection diodes and September 2024  57 Fig.5: most of the components mount on the top of the PCB, including the Raspberry Pi Pico, ICs, connectors and many of the passives. Note that the two resistors marked in red (R17 & R19) can be replaced by a single 19.1kW resistor on R17’s pad. Fig.6: many of the dual diodes are soldered to the underside of the board, along with a few of the passive components. decouple the 10pF combined diode capacitances from the input. They do not impact the gain, as the FET-input op amps have input impedances of 1TW (1012W). TL074H FET-input op amps were chosen to meet the need for high input impedance and bandwidth. They have improved specifications compared with the garden-variety TL074. The most important of these for our purposes is a 5.25MHz gain-bandwidth product. This translates to a theoretical 3.3V peak-to-peak output bandwidth of more than 500kHz at ×10 gain. While these op amps do not have rail-to-rail outputs, they are capable of a positive swing of more than 4V with a 5V supply rail. 58 Silicon Chip The ADC zero point is set by the -165mV reference voltage, Vref. An inverting op amp halves the forward voltage of a schottky diode to create this reference voltage. As the schottky diode’s forward voltage varies slightly with current, trimmer resistor VR4 allows it to be trimmed. The buffer’s feedback capacitor helps filter any high-frequency noise. The input resistance to this op amp is 19.1kW, so the required gain of 0.5 is achieved when VR4 is near its halfway point. While such E96 values are generally not difficult to obtain in the required SMD package, two parallel footprints are provided, allowing you to use 22kW in parallel with 150kW instead. Australia's electronics magazine +5V power for the op-amps is taken from the USB socket’s power pin (Vbus), while -5V is provided by an LM2664 switched capacitor voltage inverter. Larger (3.2 × 2.5mm) SMD ceramic capacitors are used on the voltage inverter for their lower ESR and, therefore, self-heating losses. Separate ground planes are provided for the analog and digital sections of the circuit to limit the transfer of digital noise into the analog environment. The copper is joined on both sides (top and bottom) in the middle of the board. All analog power rails are filtered and decoupled from the digital ground plane by 10W resistors and capacitors. As the LM2664 has siliconchip.com.au a 160kHz switching frequency, only 10μF capacitors are required in the output filters to effectively filter the switching noise. Linear regulator REG1 ensures the Pico’s 3.3V ADC reference voltage is stable and low-impedance, which helps with accuracy, particularly at high sampling rates. Construction The Mixed-Signal Logic Analyser is built on a double-sided PCB coded 04109241 that measures 77 × 148mm. There are parts on both sides; use the overlay diagrams (Figs.5 & 6) as guides during assembly. When sorting the parts for construction, be careful to keep the BAS4004 (series connected) and BAS40-05 (common cathode) variants separate. While they have different markings, these may be difficult to distinguish without a bright light and a magnifying glass. The only place where the variant does not matter is diode D17, where either part would work. Solder IC1 & IC2 first, as access to these becomes more difficult once the Pico’s header sockets are in place. If you have a reflow oven, you can use solder paste, but if you’re using a soldering iron, it’s better to use flux-cored solder wire with a syringe of flux paste. Apply a thin layer of flux paste to all the pads for one IC, then place the IC over its pads. Double-check that its pin 1 orientation is correct, then add a small amount of solder to the clean iron tip and touch it to the junction of one corner pin and its pad. That should tack the IC down. Check that it is correctly aligned with all its pads; if not, remelt that solder joint and gently nudge it in position. Once it’s correctly located, solder the other three corner pins similarly. Then add more solder to your iron tip and gently drag it along the edge of the pins on one side, in contact with the PCB. The solder will flow onto the pads one after another. Don’t worry if some pins are bridged; continue adding solder until all the pins on one side are soldered, and repeat on the other. Once all the pins are soldered, add a little more flux paste to any bridged pins and press solder wick down between the two pins with the iron tip until it sucks up the excess solder. When finished, clean off the flux residue using a flux cleaner or alcohol (eg, isopropyl) and inspect all the joints carefully to ensure they have all formed correctly. If any are no good, clean them up with more flux paste. Next, mount the three voltage regulators, the passives surrounding them and the headers for the Pico. Attach the Pico and connect its USB cable to a power source. I use a USB power monitor on the first connection to check the current draw. For this project, more than 50mA indicates a possible problem. The 1.8V, 3.3V (ADC_VREF), +5V and -5V rails should now be active; check that they are the correct voltages by carefully probing the regulator pins with a DMM. The -5V rail may read a few hundred millivolts less than the +5 rail due to the voltage lost in the switched capacitor voltage inverter. If there are any problems, switch the power off and check everything under magnification. Assuming it passed the tests, fit the remaining SMD ICs, diodes and passive components on both sides of the PCB. We recommend fitting all the SMDs to the top before you move onto the bottom. Remember the comments earlier about not getting the two different kinds of diodes mixed up and I didn’t have any resistor networks on hand when building the prototype, so I used 100W M2012/0805 SMD resistors mounted edge-wise. recall that you can either fit a single 19.1kW resistor on the pad marked R17 (as marked on the overlay diagram) or 22kW for R17 and 150kW for R19. Soldering the five resistor arrays will be a little tricky because each they are not much larger than a single resistor (5.1 × 2.2mm), so the contact pads for each element are tiny. You will need to use flux paste to get the solder to flow into the concave leads and onto the pads below. When finished, clean off the residue and check the solder joints carefully under magnification. With all the SMDs in place, the flux residue cleaned off, and your work checked, proceed to fit the throughhole components, starting with the three 10W axial resistors. Follow with the trimpot, leaving the switches, BNC connectors and right-angle pin header until the end. The right-angle header is configured as two blocks of 8 × 2 pins and one Screen 3: the PulseView display of a decoded I2C signal being read from an EEPROM chip with a clock frequency of 400kHz. Fig.7: remove the pins from the locations shown here on the 23-row dual right-angle header to provide a continuous length of support plastic behind the case opening. You can also check the photos. siliconchip.com.au Australia's electronics magazine September 2024  59 A USB power monitor is useful for identifying faults that draw additional current, such as power rail shorts to ground. We published a DIY version in the December 2012 issue (siliconchip.au/Article/460). Shields made from thick cards can help cover cut-outs in the case, preventing dust ingress and making it look nicer. of 3 × 2 pins with the first, last and intermediate columns of pins removed (see Fig.7). This arrangement provides a solid wall of plastic retaining strip inside the case, extending one unit beyond the pins at each end. Mount the header after removing the pins from the columns shown. Put the jumper on the middle (3.3V) pin of the 3×2 pin section of the header. The BNC connectors may be mounted at this stage or left for later. After soldering them, secure the BNC connectors with a small amount of hot glue or epoxy adhesive on the mounting pins. The analog channel gain potentiometers, AC/DC input switches and the LED on the top of the case connect to the PCB using short lengths of hookup wire (wire stripped from ribbon cable is ideal). As the pots and switches are mounted fairly directly above their connection points to the PCB, 10cm flying leads should suffice. Make them by stripping sets of two or three wires off a 10cm length of ribbon cable. Connect the switches and pots now, as they will be needed for testing. Testing The top and bottom of the finished prototype PicoMSA (mixed-signal analyser) PCB. The final version has some minor differences. 60 Silicon Chip Australia's electronics magazine Download the firmware to load onto the Pico from siliconchip.com. au/Shop/6/452 and plug the Pico into your computer. A new ‘drive’ should appear the first time you plug it in. If it doesn’t, unplug it and plug it back in while holding the BOOTSEL button on the Pico. Copy the UF2 file from the download package onto that drive; once the Pico reboots, it will be running the required software. Next, download and install Pulse­ View from https://sigrok.org/wiki/ PulseView Start PulseView, connect the analyser and click the device selection button (“<No Device>”) in the toolbar (see Screen 4). From the drop-down list in the pop-up window, select “RaspberryPI PICO”. Click the Serial Port radio button and select the appropriate serial device. In Windows, it should have “CDC” in its name, and won’t be COM1. There is no need to select any baud rate option. Click on “Step 3: Scan for devices”, and you should be rewarded with a “Raspberry Pi Pico with 24 channels” message in the “Step 4: Select the Device box”. Select it and click OK. siliconchip.com.au If you have any difficulty with the process, try restarting your computer. You should not need to use Zadig or another driver updater program to install different drivers. The PulseView display should now have a window with twenty digital and three analog signals. You may need to scroll the screen down to see the analog channels. The digital signals are numbered D2-D21, a carry-over from the GPIO pin numbers to which they are connected. If you click the Run button in the top toolbar, the display should fill with random values for both the digital and analog inputs. Screen 4: the logic analyser’s USB serial port setting in the PulseView device setup screen. Calibration Deselect all the digital channels, leaving the analog channels selected. Connect a 1kHz 1V signal to any analog input and set the AC/DC switch to AC. The frequency and voltage values do not need to be exact. Capture 200 samples at the 50kHz sampling rate. Repeat the captures while adjusting the gain pot so that the PulseView displays a waveform of around 200mV peak-to-peak. The captured waveform may be above or below the zero line, as in Screen 5. Adjust the trimpot until the captured waveform is equally above and below the zero line, as in Screen 6. Enable all the digital inputs and set the logic level to 3.3V using the jumper. Check the channels by capturing a 0-3.3V square wave. Test the input channels individually, as that will show any channel-to-channel shorts, which can be hard to detect visually on the finely-spaced pins of the logic translators. Once the unit is working correctly, mount the PCB into the case using 9mm-long self-tappers. 2mm spacers are required between the PCB and case to prevent the ends of the screws coming through the bottom of the case, which has four dimples. The top has rows of lozenge-shaped depressions down both sides. If you don’t have 2mm spacers, use pairs of 1mm-thick Nylon washers. Mark the height and horizontal position on the side panel and drill 3mm pilot holes as shown in Fig.8. Set the unit on the table and line up one end panel against the BNC connectors to check the position of the holes. Ream or drill the holes out to 12mm (10mm for RCA sockets). siliconchip.com.au Screen 5: a 1kHz AC signal captured before Vref has been trimmed is offset from the zero line in PulseView. Screen 6: after Vref trimming, the waveform is centred on the zero line. Screen 7: a PulseView capture of synchronised square and sine waves on digital channel D2 and analog channel A0. Australia's electronics magazine September 2024  61 Fig.8: there are three round holes to be made in the back of the case (for the analog inputs; the sizes vary depending on what type of connector you use) and one rectangular cutout for the input header. For the latter, you can drill a series of round holes in a row, then file the shape out carefully to a neat rectangle with flat files. Fig.9: seven round holes are needed in the case lid. Parts mounted to the lid are wired to the board via flying leads, so the exact positions are not critical as long as the result is neat. We recommend that you drill them as shown here so our label artwork will fit. If RCA connectors are used, they should be directly mounted on the side panel, in line with the BNC socket pads on the PCB, and high enough on the side panel to just clear the top of the PCB. Repeat the process with the right-­ angle pin headers. There should be a 1mm gap in the side panel around the pins to provide clearance for test leads and the digital voltage selection jumper. Mark the location of the USB socket on the side of the case and drill a small pilot hole to check the position. While a hole just the size of a micro-USB plug (7×2mm) may suffice, I chose to make the cut-out the same size as the plastic surround on my USB lead (8×12mm) so I could be sure it would fully insert without binding on the case. If you choose this approach, cut a small piece of heavy paper to cover the hole. A similar cover can be made for the digital pins by pressing them into a piece of heavy paper to mark the holes, then punching them with a 62 Silicon Chip fat needle. The paper is then pressed over the pins. The top cover should be drilled as shown in Fig.9. You can download the label artwork (shown in Fig.10) from the Silicon Chip website, print it, laminate it and cut it to size. Punch out the holes or cut them out using a sharp hobby knife. Make the holes slightly oversized so they don’t delaminate the label when the pots and switches are inserted. The label can be stuck down with double-sided tape. Mount the pots, switches and LED. The pots and switches have minimal clearance above the PCB, so mount them without any washers or nuts between the cover and the switches or pots. The LED leads should be cut to less than 1cm to clear the PCB, and Fig.10: this artwork can be downloaded from siliconchip.au/Shop/11/456 so you can print it out (at ‘actual size’) to make a label to attach to the lid. Australia's electronics magazine siliconchip.com.au the joins to the hookup wire should be insulated with heatshrink tubing. Snap the case together. As there is minimal clearance between the switches, pots and the PCB, pulling the switch wires out between the BNC connectors, and the pot wires out the other side, makes it easier to fit the top and bottom halves of the case together. Tuck the wires back in before fitting the side pieces. You can then fit the potentiometer knobs. Usage precautions If plugged directly into a computer’s USB port, the Pico MSA’s ground will be Earthed via the computer. If the device under test’s (DUT’s) ground terminal is at a significant potential from Earth, connecting it may damage the USB port, computer or MSA. Therefore, using a USB isolator is highly recommended. They are cheap insurance, typically costing less than $10 from AliExpress. The lowest USB speed option will suffice, as the Pico’s USB port only supports 12MHz full speed operation. Operation The display height of any signal channel can be changed by clicking on its flag and changing the “Div height” value (see Screen 8). This is particularly useful for expanding the vertical axis for analog signals. Click on the red probe icon in the toolbar to reduce the active channels to only those you need to be enabled. The achievable sampling rate is a factor of the number and type of active channels, plus the number of samples to capture, as shown in Table 1. Triggering is handled by the host software; only digital pins can be used Parts List – Pico Mixed-Signal Analyser 1 Ritec grey ABS instrument case, 86 × 155 × 30mm [Altronics H0377] 1 double-sided plated-through PCB coded 04109241, 77 × 148mm 1 Raspberry Pi Pico (MOD1) 3 SPST (or SPDT) mini solder-tail toggle switches (S1-S3) [Altronics S1310, Jaycar ST0546] 3 1MW logarithmic (A) taper rotary potentiometers, 16 or 24mm (VR1-VR3) 3 knobs to suit VR1-VR3 [Altronics HX6020 or H6030, Jaycar HK7705] 1 2kW mini top-adjust trimpot (VR4) [Altronics R2477B, Jaycar RT4354] 1 23 × 2-pin (double row) right-angle header (CON2-CON4) 3 PCB-mount BNC or panel-mount BNC or RCA connectors (CON6, CON8, CON10) [Altronics P0529] 1 jumper shunt (for CON3) 2 20-pin headers (for mounting the Pico) 2 20-pin header sockets (optional; for mounting the Pico) 1 USB micro Type-B cable 1 USB isolator (optional, but highly recommended) [www.aliexpress.com/item/1005001369085297] 1 set of DuPont female plug to mini clip digital test probes (optional) 1 A5 laminating pouch (for label) Hardware, wire etc 4 4G x 9mm panhead self-tapping screws 4 2mm-long 3mm ID spacers OR 8 1mm-thick M3 Nylon washers 1 10cm length of 20-way ribbon cable 1 3cm length of 1.5mm diameter heatshrink tubing (for the LED) 1 small stick of hot-melt glue or tube of epoxy adhesive (to secure the BNC connectors) Semiconductors 2 SN74LVCC3245ADW 8-channel bidirectional level-shifters, wide SOIC-24 (IC1, IC2) [DigiKey, Mouser, element14] 1 TL074H precision quad low-noise JFET op amp, SOIC-14 (IC3) [DigiKey, Mouser] 1 AMS1117-3.3 regulator, SOT-23-3 (REG1) [DigiKey, Mouser, element14] 1 AMS1117-1.8 regulator, SOT-23-3 (REG2) [DigiKey, Mouser, element14] 1 LM2664M6 switched capacitor voltage inverter, SOT-23-6 (REG3) [DigiKey, Mouser] 1 3mm LED in a bezel or LED and separate bezel (LED1) [Altronics Z0238, Jaycar SL2615] 9 BAS40-05 dual common-cathode schottky diodes, SOT-23 (D1-D8, D17) 10 BAS40-04 dual series schottky diodes, SOT-23 (D9-D16, D18, D19) Capacitors (all SMD ceramic M2012/0805-size 16V X7R unless noted) 3 10μF M3225/1210 or M3216/1206 2 3.3μF M3216/1206 8 1μF 3 100nF 250V M3216/1206 or M3225/1210 9 100nF 3 50pF Resistors (all SMD M2012/0805 ⅛W 1% unless noted) 1 150kW 1 22kW 7 10kW 1 4.7kW 1 2.2kW A pinout diagram of CON2-CON4 as shown 3 1.2kW from the front (viewed from outside the enclosure). Note that this diagram and Fig.7 3 1kW shows the plastic shroud on the header 3 100W extending one row beyond the ends. 1 47W 3 10W ¼W axial 5 100W M3216/1206 1/16W Panasonic EXB-S8V101J quad resistor arrays can be substituted with a single 19.1kW resistor 🔹 🔹 This style of female DuPont-style mini probe clips is convenient for connecting to IC leads and test points. They will plug straight into the rightangle header on the unit. siliconchip.com.au 🔹 Hard-to-get parts for the PicoMSA (SC7323; $50): includes the PCB, Raspberry Pi Pico (unprogrammed) plus all semiconductors, capacitors and resistors Screen 8: display parameters for each channel row can be set by clicking on the channel icon at the left of the screen. The vertical resolution in V/div can also be set for analog channels if the default auto-ranging resolution is not optimal. Silicon Chip Binders REAL VALUE AT $21.50* PLUS P&P Are your copies of Silicon Chip getting damaged or dog-eared just lying around in a cupboard or on a shelf? Can you quickly find a particular issue that you need to refer to? Keep your copies safe, secure and always available with these handy binders These binders will protect your copies of S ilicon C hip . They feature heavy-board covers, hold 12 issues & will look great on your bookshelf. for triggering (see Screen 9). Levels, rising, falling and changing signals across multiple inputs can be used to construct the required triggers. The sampling rate may be limited when triggering is enabled, as the analyser needs to be able to stream the data continuously. When only digital signals are being captured, RLE compression can significantly boost the effective streamed transfer rate, allowing higher sampling rates to be used. Digital input channels need to be selected sequentially, with no gaps. If all channels between D2 and the highest input channel enabled are not selected, an ‘unspecified’ PulseView capture error may result. Thus, you cannot select, say, only inputs D2 & D4 or D2-D9 & D11. If any analog channels are enabled, the sampling rate will be no more than 2.4MHz divided by the number of active analog channels so that the digital and analog samples remain synchronised on the display. For mixed signals, one analog sample is sent for every digital sample. If the sampling rate is higher than the maximum ADC sampling rate, any analog signal is not shown at the correct frequency, as it is captured at a different rate from the digital channels. To avoid this, do not exceed a sampling rate of 2.4MHz divided by the number of active analog channels (see Table 1). Further information on using Pulse­ View’s extensive feature set is available in the online manual (siliconchip. au/link/abwa). Conclusion This project would have been significantly more complex without the speed & flexibility of the Raspberry Pi Pico’s PIO processor, pico-coder’s clever firmware and the volunteers who have helped refine the Pulse­View software. Together, these have made providing a high-performance, mixed-signal logic SC analyser relatively easy. H 80mm internal width H Silicon Chip logo printed in goldcoloured lettering on spine & cover Silicon Chip Publications PO Box 194 Matraville NSW 2036 Order online from www. siliconchip.com.au/Shop/4 or call (02) 9939 3295 and quote your credit card number. *see website for delivery prices. 64 Silicon Chip Screen 9: PulseView has flexible triggering options for digital signals. Triggering is processed on the host computer, potentially limiting capture rates. Australia's electronics magazine siliconchip.com.au