Dr. Scott M. Baker

DIY Digital RF Attenuator

by admin on Dec.14, 2015, under Electronics Projects

I build a digital RF attenuator for the bench:

So what do I need a digital RF attenuator for? This started out with my DIY RF Generator project. I started out trying to use a plain ordinary potentiometer as my RF output control, and found that it screwed the output impedance all up. Then I bought a stepped RF attenuator on eBay, and found that it was too large to fit inside my case. Then I figured, well I’ll just build my own stepped attenuator, and I’ll make it digitally controlled, and I started researching designs for this. My original plan was to use a bunch of pi-attenuator circuits switched by relays.

I found out that there’s an existing chip, the PE4302, that does this all electronically. It includes 6 steps, each an individual pi-attenuator circuit, and allows them to be switched into circuit. It has a simple serial protocol that can be used, basically just a clocked latch. I ordered a PE4302 breakout board from eBay:

PE4302 breakout board

PE4302 breakout board

The overall project is a combination of this breakout board, together with my RGB encoder project and my VFD project:

Digital stepped RF attenuator, whiteboard schematic

Digital stepped RF attenuator, whiteboard schematic

I haven’t drawn in the connections for the VFD and Encoder; you can check other blog posts for those. The PE4302 is connected to GPIOs 2, 3, and 4. The PE4302 works just like a shift register — you clock in 6 data bits, and then you toggle a latch line to load the shift register into the attenautors output. If gives you 64 steps in 0.5dB increments, from 0 to 31.5dB of attenuation.

I assembled it all in a jameco instrument box and here is the result:

Digital RF attenautor, with the lid off

Digital RF attenuator, with the lid off

Here’s a view of the attenuator in action:

Digital stepped attenuator, in use

As you can see, I have it connected between my DIY RF generator and my rigol DS1054Z.

The source code is available at https://github.com/sbelectronics/pi-atten

5 Comments for this entry

1 Trackback or Pingback for this entry

Leave a Reply

× six = 6

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

New Kickstarter Project!

Interested in Nixie Tube projects? Check out my new Nixie Tube Calculator project on Kickstarter.

Copyright Notice

All content on this website is copyright Scott M. Baker and may not be used or reprinted without explicit permission.

Violators will be eaten by a grue.