Difference between pages "Serial Terminal" and "RF Attenuators"

From Land Boards Wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== Display Processor ==
+
== Homebrew RF Attenuators ==
  
This is an inexpensive and small serial terminal design. This design can drive 80x25 text and graphics displays. This design is based on Grant Searle's Monitor and keyboard controllers. This design has been implemented on two cards, this card and Serial I/O Processor - which is the other half of this terminal.
+
[[file:Atten_30dB_20dV_P1812-720px.jpg]]
  
Here's Grant's schematic:
+
== Attenuators ==
  
Searle-DisplayProc.gif
+
[[file:Chart_mW_vs_dbM.PNG]]
  
* Video controller specification
+
=== 30 dB Attenuator ===
* Very easy to interface to, fast and requires no host/external memory
 
* Character set
 
* Full "CGA" (8x8) character definitions as used on the IBM PC (DOS).
 
* Screen size
 
** Text - 80x25, 40x25, 80x12, 40x12, Graphics 160x100 or ANY mix (defined per 1 of 25 rows)
 
* Resolution
 
** 640x200 for 80 char text
 
** 160x100 for graphics
 
* Fonts
 
** Font sizes are defined for each line
 
** All chars on the same line have the same font size and style
 
* Graphics
 
** Any part of the active screen, up to 160x100 pixels
 
** Each pixel individually addressable
 
** Defined on any of the 25 screen lines
 
* Video output
 
** Standard composite monochrome video
 
** PAL or NTSC timing
 
** Non-interlaced so no flicker
 
* Display memory
 
** 2000 chars internal + 25 line attributes - no host memory needed
 
** Very fast update and scrolling whichever interface is used
 
* Interface
 
** 8 bit data bus (requires 10 I/O pins)
 
** 4 bit data bus (requires 6 I/O pins)
 
* two-wire (I2C) uses only 2 pins
 
** I2C (thanks to Dave Curran for his guidance and code on this) supports low (100KHz) and high (400KHz) speed clocks or higher (1MHz or more easily achievable).
 
* Hardware
 
** Very low cost - two chips - ATmega328 and 74HCT166 (Shift Register)
 
* Connectors
 
** J1 - Video Connector
 
** RCA Jack
 
** Center is signal
 
** Outside is ground
 
  
== P1 - Card Interconnect ==
+
* [http://leleivre.com/rf_pipad.html Pi Attenuator Calculator]
* 2x8 header, 0.1" pitch
 
*Pinout
 
# VCC
 
# VCC
 
# ID0
 
# ID1
 
# ID2 - MOSI for ISP Download cable
 
# ID3 - MISO for ISP Download cable
 
# ID4 - SCK for ISP Download cable
 
# ID5
 
# ID6
 
# ID7
 
# Unused
 
# RESET*
 
# ACK/SDA (R4 terminator for I2C interface)
 
# AVAIL/SCL (R3 terminator for I2C interface)
 
# GND
 
# GND
 
  
=== ISP Cable ===
+
[[file:Atten30dB_P116-720px.jpg]]
  
P1 Pin Description ISP Pin Description Color
+
[[file:30dB_Attenuator.PNG]]
1 VCC 2 VCC Red
 
2
 
3
 
4
 
5 MOSI 4 MOSI Green
 
6 MISO 1 MISO Grey
 
7 SCK 3 SCK Yellow
 
8
 
9
 
10
 
11
 
12 RESET 5 RST White
 
13
 
14
 
15 GND 6 GND Black
 
16
 
Configuration Resistors
 
Configuration Resistor values can also be set through soft switches in the code
 
R5 - Two-wire interface (I2C)
 
R6 - 4-bit interface
 
R7 - 10K for NTSC, open for PAL
 
R3, R4 - I2C Termination resistors - Install for I2C termination - typical = 2.2K
 
Software
 
Source Code
 
Copy of the Display Processor Code in my GitHub Repository - any changes are here
 
Atmel AVR Studio Download
 
In
 
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin
 
Type
 
avrdude -U lfuse:w:0xc6:m -U hfuse:w:0xd9:m -e -F -v -patmega328p -carduino -PCOM8 -b19200 -D -Uflash:w:"C:\Users\doug_000\Documents\GitHub\lb-Arduino-Code\LBCards\DisplayProc\AssemblerApplication1\AssemblerApplication1\Debug\AssemblerApplication1.hex":i -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf"
 
Checkout
 
Saw a blinking cursor
 
Assembly Sheet
 
Display Processor Assembly Sheet
 
  
SIOPROC-01-640px.jpg
+
* Built
 +
** Standard 5% resistor values
 +
** R1 = 820 in parallel with 22K = 790.6 ohms
 +
** R2 = 2 paralleled 120 Ohm 1/4W resistors paralleled with 470 ohms = 53.2 ohms
 +
** Flat from 0-30 MHz
 +
** Measured attenuation is flat
 +
*** -30.01dB at 1 MHz
 +
*** -30.24dB at 30 MHz
 +
** Input Impedance - 53.1 ohms, 21.3nF
 +
** SWR 1.06
 +
** 1/2W max (5VDC max, 0 ohm source)
  
Contents
+
* NanoVNA scan data
1 Serial I/O Processor
 
2 Features
 
3 Connectors
 
3.1 P1 - Card Interconnect
 
3.2 P2 - PS/2 Keyboard
 
3.2.1 PS/2 Adapter Cable
 
3.3 P3 - 5V FTDI/Power Connector
 
3.4 P4 - In-System Programmer (ISP) Connector
 
4 Configuration Resistors
 
5 Software
 
6 Rev X1 Issues
 
7 Assembly Sheet
 
Serial I/O Processor
 
This is an inexpensive and small serial terminal design. This design can drive 80x25 text and graphics displays. This design is based on Grant Searle's Monitor and keyboard controllers. This design has been implemented on two cards, this card and Display Processor - which is the other half of this terminal.
 
  
Here's Grant's schematic:
+
[[file:30dB_Attenuator_NanoVNA_Setup_Curve_900MHz.PNG]]
  
Searle-SIOProc.gif
+
[[file:30dB_Attenuator_NanoVNA_Data_900MHz.PNG]]
  
Features
+
* LTSPICE Simulation
Serial interface
 
Fully buffered 115200 baud, handshake on receive, TTL levels.
 
Keyboard interface
 
PC PS/2 standard keyboard connector, accepts standard keyboards made for PCs. Keyboard LED illumination implemented, and allows for caps lock and num lock.
 
Hardware
 
Two cards
 
8-bit interface connector for card-to-card connections
 
Connectors
 
P1 - Card Interconnect
 
2x8 header, 0.1" pitch
 
Connector matches the pinout of the other card so it can be mated directly to the other card via 1:1 cable or a female header on this card
 
Pinout
 
VCC
 
VCC
 
ID0
 
ID1 - CS* for ISP Download cable
 
ID2 - MOSI for ISP Download cable
 
ID3 - MISO for ISP Download cable
 
ID4 - SCK for ISP Download cable
 
ID5
 
ID6
 
ID7
 
Unused
 
RESET*
 
ACK/SDA (R4 terminator for I2C interface)
 
AVAIL/SCL (R3 terminator for I2C interface)
 
GND
 
GND
 
P2 - PS/2 Keyboard
 
PS2Conn.png
 
  
1x4 header, 0.1" pitch
+
[[file:LTSPice_30dB.PNG]]
GND
 
VCC
 
KBCLK
 
KBDAT
 
PS/2 Adapter Cable
 
S-l1600-Adapter-Cable-720px.jpg
 
  
Ordered this cable from ebay.
+
=== 20 dB Attenuator ===
Replaced 5 pin connector with 4 pin 0.1" pitch "Dupont" connector
 
Pinout of cable after re-wiring with new connector
 
PS/2 Pin P2 Pin Description Color
 
1 4 Data TBD
 
2 N/C N/C N/A
 
3 1 GND TBD
 
4 2 +5V TBD
 
5 3 Clk TBD
 
6 N/C N/C N/A
 
P3 - 5V FTDI/Power Connector
 
S-l1600.jpg
 
  
1x6 header, 0.1" pitch
+
[[file:Atten_20dB_P115-720px.jpg]]
Pinout
+
 
GND
+
[[file:20dB_Attenuator.PNG]]
RTS
+
 
VCC (+5V)
+
* Build
TX
+
** Standard 5% resistor values
RX
+
** R1 = 2 of 510 in parallel also in parallel with 8.2K = 247.3 ohms
N/C
+
** R2 = 2 paralleled 150 Ohm 1/2W resistors paralleled with 330 ohms = 61.11 ohms
P4 - In-System Programmer (ISP) Connector
+
** Flat from 0-30 MHz
Cable for use with ArduinoISP programmer
+
** Measured attenuation is flat
0.1" pitch "Dupont" connector
+
** Input Impedance - tbd ohms, tbd nF
2x3
+
** SWR tbd
MISO
+
** 1W max (8.6 V max, 0 ohm source)
VCC
+
 
SCK
+
[[file:20dB_Attenuator_NanoVNA_Setup_Curve_900MHz.PNG]]
MOSI
+
 
RESET*
+
[[file:20dB_Attenuator_NanoVNA_Data_900MHz.PNG]]
GND
+
 
Configuration Resistors
+
* LTSPICE Simulation
Configuration Resistor values can also be set through soft switches in the code
+
 
R1, R2 - I2C termination - install to terminate - typically 2.2K
+
[[file:LTSPice_20dB.PNG]]
R5 - Two Wire Interface output (I2C)
+
 
R6 - 4-bit Interface
+
=== 10 dB Attenuator ===
Software
+
 
Source Code
+
[[file:Atten_10dB_P115-720px.jpg]]
Copy of the Serial I/O Processing Code in my GitHub Repository - any changes are located here
+
 
Atmel AVR Studio Download
+
[[file:10dB_Attenuator.PNG]]
avrdude -U lfuse:w:0xc6:m -U hfuse:w:0xd9:m -e -F -v -patmega328p -carduino -PCOM8 -b19200 -D -Uflash:w:"C:\Users\doug_000\Documents\GitHub\lb-Arduino-Code\LBCards\SIOProc\GccApplication1\GccApplication1\Debug\GccApplication1.hex":i -C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf"
+
 
Rev X1 Issues
+
* Build
FTDI handshake moved from P3-6 to pin P3-2
+
** Standard 5% resistor values
Cut etch at FTDI connector P3-6
+
** R1 = 2 of 150 in parallel also in parallel with 1.5K = 71.43 ohms (0.3% error)
Add wire U1-26 to P3-2
+
** R2 = 3 of 330 Ohm 1/4W parallel resistors paralleled with 810 ohms = 96.85 ohms (0.62% error)
Assembly Sheet
+
** Flat from 0-30 MHz
SIOProc-01 Assembly Sheet
+
** Measured attenuation is flat
 +
** Input Impedance - tbd ohms, tbd nF
 +
** SWR tbd
 +
** 3/4W max (9.1 V max, 0 ohm source)
 +
 
 +
[[file:10dB_Attenuator_NanoVNA_Setup_Curve_900MHz.PNG]]
 +
 
 +
[[file:10dB_Attenuator_NanoVNA_Data_900MHz.PNG]]
 +
 
 +
* LTSPICE Simulation
 +
 
 +
[[file:LTSPice_10dB.PNG]]
 +
 
 +
=== Attenuator Construction ===
 +
 
 +
* Single side copper clad PCB
 +
** Approx 2"x1"
 +
* Clean with steel wool
 +
* Solder SMA connectors
 +
** Use large alligator clips to hold while soldering
 +
** Solder on sides only
 +
 
 +
[[file:Atten_01_SMAs_720px.jpg]]
 +
 
 +
* Cut "T" Shaped pads
 +
** I used nibbler
 +
* Center fits between connector ground pins
 +
* Glue down pads with Superglue
 +
 
 +
[[file:Atten_02_Pads_720px.jpg]]
 +
 
 +
* Solder center pin with big solder blob
 +
** A bit too high for direct contact
 +
* Verify raised pad does not short to ground
 +
 
 +
[[file:Atten_03_Solder CenterPads_720px.jpg]]
 +
 
 +
* Solder side resistor(s)
 +
* Leave room for center resistor(s)
 +
 
 +
[[file:Atten_04_Solder Side_Resistors_720px.jpg]]
 +
 
 +
* Measure side resistors from pad to ground
 +
* Should match value
 +
* Solder center resistor(s)
 +
 
 +
[[file:Atten_05_Solder Center_Resistors_720px.jpg]]
 +
 
 +
* Verify no shorts between centers and ground
 +
 
 +
== References ==
 +
 
 +
<video type="youtube">A5gGeV7CiQ0</video>

Revision as of 11:50, 7 September 2021

Homebrew RF Attenuators

Atten 30dB 20dV P1812-720px.jpg

Attenuators

Chart mW vs dbM.PNG

30 dB Attenuator

Atten30dB P116-720px.jpg

30dB Attenuator.PNG

  • Built
    • Standard 5% resistor values
    • R1 = 820 in parallel with 22K = 790.6 ohms
    • R2 = 2 paralleled 120 Ohm 1/4W resistors paralleled with 470 ohms = 53.2 ohms
    • Flat from 0-30 MHz
    • Measured attenuation is flat
      • -30.01dB at 1 MHz
      • -30.24dB at 30 MHz
    • Input Impedance - 53.1 ohms, 21.3nF
    • SWR 1.06
    • 1/2W max (5VDC max, 0 ohm source)
  • NanoVNA scan data

30dB Attenuator NanoVNA Setup Curve 900MHz.PNG

30dB Attenuator NanoVNA Data 900MHz.PNG

  • LTSPICE Simulation

LTSPice 30dB.PNG

20 dB Attenuator

Atten 20dB P115-720px.jpg

20dB Attenuator.PNG

  • Build
    • Standard 5% resistor values
    • R1 = 2 of 510 in parallel also in parallel with 8.2K = 247.3 ohms
    • R2 = 2 paralleled 150 Ohm 1/2W resistors paralleled with 330 ohms = 61.11 ohms
    • Flat from 0-30 MHz
    • Measured attenuation is flat
    • Input Impedance - tbd ohms, tbd nF
    • SWR tbd
    • 1W max (8.6 V max, 0 ohm source)

20dB Attenuator NanoVNA Setup Curve 900MHz.PNG

20dB Attenuator NanoVNA Data 900MHz.PNG

  • LTSPICE Simulation

LTSPice 20dB.PNG

10 dB Attenuator

File:Atten 10dB P115-720px.jpg

10dB Attenuator.PNG

  • Build
    • Standard 5% resistor values
    • R1 = 2 of 150 in parallel also in parallel with 1.5K = 71.43 ohms (0.3% error)
    • R2 = 3 of 330 Ohm 1/4W parallel resistors paralleled with 810 ohms = 96.85 ohms (0.62% error)
    • Flat from 0-30 MHz
    • Measured attenuation is flat
    • Input Impedance - tbd ohms, tbd nF
    • SWR tbd
    • 3/4W max (9.1 V max, 0 ohm source)

File:10dB Attenuator NanoVNA Setup Curve 900MHz.PNG

File:10dB Attenuator NanoVNA Data 900MHz.PNG

  • LTSPICE Simulation

LTSPice 10dB.PNG

Attenuator Construction

  • Single side copper clad PCB
    • Approx 2"x1"
  • Clean with steel wool
  • Solder SMA connectors
    • Use large alligator clips to hold while soldering
    • Solder on sides only

Atten 01 SMAs 720px.jpg

  • Cut "T" Shaped pads
    • I used nibbler
  • Center fits between connector ground pins
  • Glue down pads with Superglue

Atten 02 Pads 720px.jpg

  • Solder center pin with big solder blob
    • A bit too high for direct contact
  • Verify raised pad does not short to ground

Atten 03 Solder CenterPads 720px.jpg

  • Solder side resistor(s)
  • Leave room for center resistor(s)

Atten 04 Solder Side Resistors 720px.jpg

  • Measure side resistors from pad to ground
  • Should match value
  • Solder center resistor(s)

Atten 05 Solder Center Resistors 720px.jpg

  • Verify no shorts between centers and ground

References