Waveform generator resistor ladder

Sjaak pointed me to this instructable using an RP2040 to do arbitrary waveform generation at up to 125MHz using the PIO and an external resistor ladder.

That project is CC NC-BY so I won’t touch it directly, but I understand from the write-up how it works and we should be able to implement the same kind of thing.

I made a little board with a resistor ladder and quick connector. I’m going to add an op-amp too, but I don’t have a lot of experience with op-amps at these speeds. I think GS8091 will probably work for a <20MHz 5vp-p.

1 Like

I hope there are going to be at least unpopulated pins for BNC connector, if you end up selling it :smiley:

1 Like

image

Thank you, good call.

I ended up sending this beast to the board house. What a confused creature :slight_smile:

I assume it will take a few revisions to figure out the analog bits so I didn’t put much thought into it yet. Thank you for the suggestion.

Any thoughts on these parts:

Aside: I swear szlcsc runs coin mining browser scripts. My whole PC freezes up when I have a tab open. I’m running ghostery, ad guard, and ublock origin…

Did you do impedance matching for traces?

From my experience as HAM, quality of connector is quite important. I do not know enough about those 2, to say anything.

Most of the equipment I encounter uses 50Ohm impedance, but I might be in a bubble… There are always impedance matching adapters if someone wants something different

Most of the examples of this board that I saw were made with perf board or just loads of resistors on a breadboard. I didn’t think about impedance matching. I’ll have to do a bit more research.

I also need to spend some more time with op-amp datasheets to find something common and affordable that will work at these speeds. Everything I’ve seen in the sub $10 price range is qualified at 0.1Vp-p which seems like it will take a huge speed hit scaling to 5Vp-p. I’ve only worked with op-amps as simple slow buffers and amplifiers, I’m aware there’s a whole other universe of knowledge working at 125MHz.

I’m excited to try this out. I ordered the 50ohm connector to check the quality. I also got 0.1% 2K resistors so I can avoid sorting and matching values (as is done in the instructable). It should all arrive in the next week or so.

Impedance matching is important if you want to avoid reflection of signal. If you want to keep the shape of signal, it is important, if you are ok with a bit of shape change, you are ok with whatever. Also, keep in mind, you need to terminate BNC with 50Ohm load while checking if signal looks good

I would recommend reading up on transmission line theory if you care about generated signal integrity, if not, just use whatever you find, it will work in most use cases

1 Like

Great advise, thank you. This is far from my area of experience, I’ll read up on it and try to get something workable at minimal cost.

What are your goals for amplification? What values do you see on output without amplification?

I’m thinking more as a unity gain buffer. There is a note in the project write-up that the current is quite low:

There is no attempt here to provide a buffer or amplifier for the produced signal, it is beyond my skills and my equipment to come up with a buffer/amplifier beyond the 10MHz range. The produced signal is thus rather weak, with an output impedance of ~1kOhm, and a maximum current draw of ~1mA.

Actually, now that I look at the project again, there’s 100 comments. Many are like mine :slight_smile: “I can get a buffer going in the MHz range, but more is black magic”. I need to read all the comments, it seems there’s some good discussions and some attempts to build out the concept further.

media_20240209_141254_6831717290761892083
media_20240209_141254_2142875280742310430
media_20240209_141254_2203484890029778333

I finally made up this board and wrote a firmware to test it.

The Bus Pirate isn’t an ideal platform for an R2R DAC. 330ohm 5% series resistors on the IO pins contribute some slop, and the buffers limit speed. Next I’m going to replace the R2R with a proper DAC chip ($1 AD9708 clone) and op-amp buffer.