Author Topic: DIY oscilloscope (yet again)  (Read 10526 times)

0 Members and 1 Guest are viewing this topic.

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY oscilloscope (yet again)
« Reply #25 on: November 19, 2019, 09:28:40 am »
The HMCAD1511 is a nice chip, however pretty darn expensive, for just a 10 or 20 MHz frontend. For 8 channels, you would need also 2 of them.

For the simple lowMHz DSO a dedicated VGA and ADC may become cheaper.  Although, with 2pcs HMCAD1511, the whole thing may look much simpler on the PCB.

If it'd be me and cheaping out on some project cobbling for fun, I'd opt for external voltage controlled VGA such as AD8330 from the far east sources ($2-3 a pop) and a 100MSps ADC, such as AD9288 (also dirt cheap from far east), four times.  Leaving me at about $30 for the whole VGA+ADC saga.  Of course this does not likely make much if any sense for a commercial design, at least I won't be quite worried about damaging a $70 IC in the process.

There may be even cheaper possibility than AD8330, as a DC to 20MHz or so VGA, this is still a bit overkill.

And also, I've never worked with LVDS on an FPGA, hence a lot of parallel buses from the smaller ADCs are more familiar to me as to what I can do :)
 

Offline PMATopic starter

  • Contributor
  • Posts: 23
  • Country: fi
Re: DIY oscilloscope (yet again)
« Reply #26 on: November 19, 2019, 05:50:51 pm »
Won't you need DAC with VGA to set gain, or have I missed something? To my (quite limited) understanding, I prefer PGA. Small gain adjustments can be done on digital side if needed.
« Last Edit: November 19, 2019, 07:37:50 pm by PMA »
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY oscilloscope (yet again)
« Reply #27 on: November 19, 2019, 10:51:43 pm »
Well, at the time I was interested in building my own single channel DSO (with the sole purpose to learn VHDL), I couldn't find any cheaper gain selector other than the AD8330. Any PGA I came across was either way to slow, way to fast (hence extremely expensive) or didn't provide enough gain steps.  AD8330 as a continuously variable gain stage was easy to set the gain using a DAC. I already had available two 12bit D/A channel in the MCU I wanted to control the system, so that was easy (one DAC for the VGA setting, the other for input offset setting, with a couple of offset range switches from analog MUXes). MCP4921/4922 are also very cheap external SPI DACs.

/EDIT: Small gain adjustments on the digital side would mean fractional multiplication of high bandwidth data, which was a nono for me. I wanted to use a cheap CPLD (Altera MAX II), where such would become impossible. I had a 480x272px display, so I didn't have to scale the 8bit data, just place directly on screen.
 

« Last Edit: November 19, 2019, 11:07:20 pm by Yansi »
 

Offline PMATopic starter

  • Contributor
  • Posts: 23
  • Country: fi
Re: DIY oscilloscope (yet again)
« Reply #28 on: November 19, 2019, 11:41:27 pm »
Thanks for the clarification.

I am much more comfortable in digital domain than in analog domain, so I probably see things in different light. That's why I prefer integrated solutions (where somebody else have solved analog issues for me), instead of more discrete solutions. I wouldn't say that money is no option, but in any case this exercise will cost more than commercial product so cost effectiveness isn't highest priority.

I am planning to use HDMI output and external screen with the scope - I know, it is a bit unusual configuration. External display enables enough of real estate to display multiple signals, but in the same time it would be responsive because it is connected to the scope. PC mouse could be used to control the UI. In my case, raw data can be read to the memory and scaled when it is drawn on the display, which eliminates scaling of high bandwidth data.
« Last Edit: November 20, 2019, 12:02:46 am by PMA »
 

Offline roy5

  • Newbie
  • Posts: 3
  • Country: il
    • Flowtek
Re: DIY oscilloscope (yet again)
« Reply #29 on: November 21, 2019, 08:24:42 am »

I have used an Arduino as an oscilloscope and signal generator in the past. It works great as long as 5V is sufficient for you. I suppose it probably wouldn't work so well at very high frequencies either, but again, for my application it was great. It actually worked much better than a $50 oscilloscope I bought from China which connects by USB to my computer and runs via software on the computer.
we provide custom enclosure design and thermal analysis https://www.flowtekthermal.com
 

Offline PMATopic starter

  • Contributor
  • Posts: 23
  • Country: fi
Re: DIY oscilloscope (yet again)
« Reply #30 on: November 21, 2019, 08:40:52 am »
Although I am a bit Arduino fan boy, it isn't right tool for this. I want to have moderate bandwidth, which means that FPGA based solution is the only option (in practice).
 

Offline fmkit

  • Contributor
  • Posts: 35
  • Country: il
Re: DIY oscilloscope (yet again)
« Reply #31 on: November 21, 2019, 10:14:11 am »
if you need GHz bandwith isn't  easier to shift portion of spectrum dwn tofit existing scope bandwith?
 just like SDR and older receivers do.  2 years back  I made 0-2GHz spectrum analyzer using  STM32F103(HY-Mini32v 3.2" TFT) and now thinking to add DSO function to existing setup,that is adding 2nd mixer and IF  amp:

 
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY oscilloscope (yet again)
« Reply #32 on: November 21, 2019, 10:31:53 am »
 Jeeeez... read at least the first post of the thread!
 

Offline PMATopic starter

  • Contributor
  • Posts: 23
  • Country: fi
Re: DIY oscilloscope (yet again)
« Reply #33 on: November 21, 2019, 03:06:08 pm »
if you need GHz bandwith isn't  easier to shift portion of spectrum dwn tofit existing scope bandwith?
 just like SDR and older receivers do.

This is mostly learning experience for me. Scope is just good excuse to learn more about analog electronics and FPGA development.

I don't think that there is any simpler way to acquire full waveform (0-50 Mhz, 500 MS/s per ch) than proper analog front end and FPGA, since there isn't too many oscilloscope specific ICs on the market.

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: DIY oscilloscope (yet again)
« Reply #34 on: November 23, 2019, 06:11:23 pm »
Many low cost commercial designs use the extra resolution provided by a higher resolution converter as a free programmable gain stage.

You mean the polular HMCAD1511?

No, I mean many low cost USB and "toy" DSOs use a 12 bit ADC but only return 8 bit results except in high resolution mode.  The extra 4 bits are only used in place of a PGA.

What the HMCAD1511 does relies on the error correction included in its pipelined subranging ADC design which is different as it is not designed to return 12 bit results.

Well, at the time I was interested in building my own single channel DSO (with the sole purpose to learn VHDL), I couldn't find any cheaper gain selector other than the AD8330. Any PGA I came across was either way to slow, way to fast (hence extremely expensive) or didn't provide enough gain steps.  AD8330 as a continuously variable gain stage was easy to set the gain using a DAC. I already had available two 12bit D/A channel in the MCU I wanted to control the system, so that was easy (one DAC for the VGA setting, the other for input offset setting, with a couple of offset range switches from analog MUXes). MCP4921/4922 are also very cheap external SPI DACs.

High bandwidth integrated solutions suitable for oscilloscope gain control have been largely proprietary until relatively recently.  There are ways to do it with commonly available parts, and you can learn the details by studying old oscilloscope design, but the techniques are not well known because it is a rare and difficult application.

if you need GHz bandwith isn't  easier to shift portion of spectrum dwn tofit existing scope bandwith?
 just like SDR and older receivers do.  2 years back  I made 0-2GHz spectrum analyzer using  STM32F103(HY-Mini32v 3.2" TFT) and now thinking to add DSO function to existing setup,that is adding 2nd mixer and IF  amp:

That is possible and some very wide bandwidth DSOs now work that way but in general that method is not suitable for a baseband (time domain) applications because it requires a huge amount of postprocessing to merge the frequency ranges.

Sampling and equivalent time sampling oscilloscopes could be considered to operate that way.  Sampling and mixing are essentially the same process and may use the same parts and circuits.  The same diodes used in microwave mixers are used in microwave samplers.  Direct coupled mixers make fine sampling elements.
« Last Edit: November 23, 2019, 06:14:37 pm by David Hess »
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1425
  • Country: de
Re: DIY oscilloscope (yet again)
« Reply #35 on: November 24, 2019, 12:01:02 am »
No, I mean many low cost USB and "toy" DSOs use a 12 bit ADC but only return 8 bit results except in high resolution mode. The extra 4 bits are only used in place of a PGA.

OK. At lower speeds, 12-bit ADC is certainly not so challenging as at 1GSPS.

Quote
What the HMCAD1511 does relies on the error correction included in its pipelined subranging ADC design which is different as it is not designed to return 12 bit results.

It works differently, but eventuelly it can act as a PGA as well, up to gain of 50 (when both, coarse and fine gain are turned up to the maximum). The application notes recommend, however, not to choose a gain > 10, otherwise SNR suffers.

While it returns 8 bits only, the returned value is already scaled by the selected "digital gain", having ENOB of still almost 8 bits (in the recommended gain range).

Quote from: Application Notes
"This feature is based on the fact that the HMCAD1511, though it is an 8-bit converter, has more resolution available in its core circuitry. This means that although the SNR available to the user is limited by the quantization noise floor of an 8-bit converter, the actual noise floor deep within the ADC’s core is significantly lower than that."
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: DIY oscilloscope (yet again)
« Reply #36 on: November 24, 2019, 02:34:16 am »
No, I mean many low cost USB and "toy" DSOs use a 12 bit ADC but only return 8 bit results except in high resolution mode. The extra 4 bits are only used in place of a PGA.

OK. At lower speeds, 12-bit ADC is certainly not so challenging as at 1GSPS.

Lower is relative.  12 bit settling, noise, and linearity are very challenging at even low oscilloscope bandwidths.

I have seen very old 100 MHz 8 bit DSOs which delivered better than 8 bit noise (1) but I have never seen a modern 8 bit instrument achieve the same thing.  Part of it is the result of software upgradable bandwidth which means the hardware is designed for a higher than necessary bandwidth resulting in higher device noise.  Another part is the use of CMOS preamplifiers that have much higher noise than the bipolar preamplifiers they replaced.  The physics of today is the same as the physics of 30 years ago.

Oscilloscope noise is rarely a concern however so higher noise than 30 years ago is not really a disadvantage.  If you need a lower noise oscilloscope, then there is probably a better way to make your measurement.  But I still chuckle that seemingly every marketing department advertises their oscilloscopes as "low noise" now.

(1) It is a little weird to turn the vertical position control and be able to select a single ADC code with little or no noise producing a straight line.  A noisier signal looks more natural.
 

Online gf

  • Super Contributor
  • ***
  • Posts: 1425
  • Country: de
Re: DIY oscilloscope (yet again)
« Reply #37 on: November 24, 2019, 09:27:08 am »
I have seen very old 100 MHz 8 bit DSOs which delivered better than 8 bit noise (1) but I have never seen a modern 8 bit instrument achieve the same thing.

At 10V/div, 1V/div and 100mV/div, the analog SNR seems indeed too exceed 8 bits on my Hantek 6074BD (only sporadic 1 LSB spikes). These are the attenuator steps where the HMCAD1511 gets driven at 2Vpp full-scale, w/o unnecessary attenuation and subsequent re-amplification in the signal chain. All other V/div steps rely on re-amplification (via digital gain) of the 10:1 or 100:1 pre-attenuated input signal and are noticeably noisier.

[ Yet another candidate for unnecessary attenuation and subsequent re-amplification I'm aware of is the Hantek 2000. Every V/div step is first attenuated to a 10mV/div equivalent and then (re-)amplified to the ADC's required full-scale voltage by a (fixed) gain stage. ]

Quote
Part of it is the result of software upgradable bandwidth which means the hardware is designed for a higher than necessary bandwidth resulting in higher device noise.

(Unnecessary) bandwidth is certainly a significant contributor. On my JyeTech DSO 112a toy scope (~50 bucks, ~1-2MHz bandwidth), I can clearly see ~1.2mV quantization steps in the output of a DDS generator. But on my 1GSPS Hantek 6074BD, these steps drown in noise...
 

Offline PMATopic starter

  • Contributor
  • Posts: 23
  • Country: fi
Re: DIY oscilloscope (yet again)
« Reply #38 on: November 24, 2019, 06:21:50 pm »
Here is my war plan for the first test. I will make 1ch on separate PCB and attach it to PYNQ-board with ribbon cable (not sure if this is good idea for high speed data).

Edit:
PLL chip for ADC: ADF4360-7
Relays: NEC UD2

I have seen two variants of ADC buffer. In some designs ADC is driven with PGA without any additional components and in some designs there is additional buffer between them. I don't fully understand why additional buffer is needed because output impedance of the PGAs are typically quite low. What are pros and cons of these design choices?
« Last Edit: November 24, 2019, 09:53:22 pm by PMA »
 

Online Yansi

  • Super Contributor
  • ***
  • Posts: 3930
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY oscilloscope (yet again)
« Reply #39 on: November 24, 2019, 09:04:37 pm »
good find on that AD8370!
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: DIY oscilloscope (yet again)
« Reply #40 on: November 24, 2019, 10:49:22 pm »
Part of it is the result of software upgradable bandwidth which means the hardware is designed for a higher than necessary bandwidth resulting in higher device noise.

(Unnecessary) bandwidth is certainly a significant contributor. On my JyeTech DSO 112a toy scope (~50 bucks, ~1-2MHz bandwidth), I can clearly see ~1.2mV quantization steps in the output of a DDS generator. But on my 1GSPS Hantek 6074BD, these steps drown in noise...

If it was just caused by the greater bandwidth, then the bandwidth limiting filter would remove it.

Most of the noise comes from the FET used for the impedance converter at the front end.  (1) All other things being equal, higher frequency parts have higher noise and higher flicker noise so designing a wider bandwidth front end and then limiting the bandwidth results in higher noise than if the front end was lower bandwidth to start with.

(1) Unless integrated CMOS preamplifiers are used.  Those things have incredibly high noise; like above 1000nV/SqrtHz at low frequencies.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf