Skip to content
beakaPublic

About

HF transceiver based on LGT8F328P

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

lsdx — LGT8F328P HF SDR & Polar EER SSB Transceiver

lsdx is a standalone, single-chip HF SSB/CW transceiver built on the LGT8F328P (32 MHz LQFP48 Nano board). By exploiting the LGT8F328P's hardware DSP unit (uDSU FMACSS instructions) and 12-bit ADC, lsdx runs both a quadrature phasing SDR receiver and a polar Envelope Elimination and Restoration (EER) SSB exciter on an 8-bit microcontroller with only 2 KB of SRAM.


Key Features

  • Dual-Mode DSP Engine (15.625 kSPS):
    • Receive: 12-bit simultaneous I/Q sampling, digital DC-offset removal, I/Q gain & phase trim, 4th-order Butterworth biquad roofing filters (switchable 400 Hz CW, 2.2 kHz Narrow SSB, 2.8 kHz Wide SSB), 47-tap Hilbert transform, and fast digital AGC with noise-floor hold.
    • Transmit (Polar EER): Automatic mic DC tracking, fast-attack/slow-release speech compressor & soft-knee limiter, 47-tap Hilbert analytic splitter, hardware dsu_mag() / dsu_atan2() polar conversion, 125 kHz fast PWM envelope output (OC2B), and direct 40-bit phase/frequency modulation of an AD9850 DDS.
  • Dual Synthesizer Architecture:
    • RX LO: Si5351A generating hardware quadrature (CLK0 / CLK1 90° phase offset) across 100 kHz – 30 MHz.
    • TX Exciter: AD9850 driven via direct-port bit-banging (~125 MHz reference clock), powered down automatically during RX.
  • Non-Blocking UI & Persistence:
    • Incremental 16×2 I2C character LCD driver (PCF8574) with S-meter / TX envelope bargraph (updates 1 character per loop pass so audio DSP never stutters).
    • Built-in calibration menus for I/Q Gain, I/Q Phase, and Si5351 Crystal Offset, saved automatically to I2C FRAM (MB85RC256V / FM24C64).

System Architecture

  RECEIVE PATH
  ────────────
  Antenna ─► Bandpass ─► Quadrature Mixer ◄── Si5351A (CLK0 / CLK1 90° LO)
                              │
                         I (A0) / Q (A1)
                              ▼
                     ┌─────────────────┐
                     │   LGT8F328P     │
                     │  12-bit ADC +   │
                     │  uDSU Biquads + │
                     │  47-tap Hilbert │
                     │  + Digital AGC  │
                     └────────┬────────┘
                              │ 31.25 kHz PWM (OC3A)
                              ▼
                      Audio LPF & Amp ─► Speaker / Phones

  TRANSMIT PATH (POLAR EER)
  ─────────────────────────
  Mic ─► Preamp ─► A2 ─► Compressor ─► 47-tap Hilbert ─► uDSU Polar (r, θ)
                                                               │       │
                                            Envelope (OC2B) ◄──┘       └──► ΔPhase FTW
                                                   │                             │
                                           2-Pole RC Filter               AD9850 DDS (RF)
                                                   │                             │
                                                   ▼                             ▼
                                           Op-Amp + NPN ───► Drain ───► SOT-89 RF MOSFET
                                           Modulator         (0-9.5V)       Driver
                                                                               │
                                                                               ▼
                                                                     SK3218 Push-Pull PA
                                                                       (~1W PEP @ 10V)
                                                                               │
                                                                               ▼
                                                                       5-Pole Band LPF ─► Antenna

Pinout (LGT8F328P LQFP48 Nano)

Pin Port Function Notes
D3 PD3 (OC2B) TX Envelope PWM 125 kHz 8-bit Fast PWM → 2-pole RC filter (1.5 kΩ + 15 nF ×2)
D4 PD4 Rotary Encoder Switch INPUT_PULLUP (Active LOW)
D6 PD6 PTT Input Active LOW (recommend external 4.7 kΩ pull-up to +5 V)
D7 PD7 AD9850 W_CLK Direct port write
D8 PB0 AD9850 DATA Direct port write
D9 PB1 AD9850 RST Direct port write
D10 PB2 AD9850 FQ_UD Direct port write
A0 PC0 RX I Audio Input Biased to AVCC / 2 (2.5 V)
A1 PC1 RX Q Audio Input Biased to AVCC / 2 (2.5 V)
A2 PC2 TX Mic Audio Input Biased to AVCC / 2 (2.5 V)
A4 / A5 PC4 / PC5 I2C Bus (SDA / SCL) Si5351A (0x60), LCD (0x27), FRAM (0x50)
PF3 / PF4 LQFP48 Pins 35/36 Rotary Encoder A & B Internal pull-ups enabled
OC3A OC3A RX Audio PWM Output 31.25 kHz 10-bit PWM

Controls & Calibration

  • Rotate Encoder: Tune VFO frequency (100 kHz – 30 MHz).
  • Press & Rotate Encoder: Change tuning step size (10 Hz → 100 Hz → 1 kHz → 10 kHz → 100 kHz).
  • Single Click: Toggle sideband (USB / LSB).
  • Double Click: Cycle receiver roofing filter bandwidth (2.8 kHz → 400 Hz CW → 2.2 kHz Narrow).
  • Long Press (> 0.8 s): Enter / Exit Calibration Menu (single-click cycles through I/Q Gain Trim, I/Q Phase Trim, and Si5351 Crystal Offset; long-press saves to FRAM).

Hardware & Build Notes

  • Power Supply: Use a dedicated regulated 5 V rail for the LGT8F328P, Si5351A, AD9850, and LCD backlight rather than relying on weak USB power.
  • RF Driver & PA Chain:
    • Driver: Drain-modulated SOT-89 RF MOSFET (RD00HHS1 / RD01MUS1) driven by an LM358 + NPN emitter-follower (2N2222A / BD139) scaling the 0–5 V filtered OC2B envelope up to 0–9.5 V.
    • Final PA: Broadband Class AB push-pull stage using a pair of SK3218 (or NTE278 / 2N5109) TO-39 transistors on a regulated 10 V rail (keeps collector swings safely within the 20 V (V_{CEO}) rating) delivering ~1.0 W – 1.2 W PEP into a 5-pole Chebyshev band low-pass filter.

Dependencies

  • Arduino core (dbuezas) with LGT8F328P support (lgtx8p.h)
  • uDSU hardware DSP library (https://github.com/beaka/uDSU_DSP) (udsu.h, uDSU_Biquad.h, uDSU_FIR.h)
  • Standard Arduino Wire library

About

HF transceiver based on LGT8F328P

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages