Author Topic: MHS-5200A function generator teardown / review / reverse engineering  (Read 49123 times)

0 Members and 4 Guests are viewing this topic.

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
After seeing WD5GNR’s work on reversing the serial protocol for the cheap MHS-5200A function generators, I picked one up off of eBay.

I hadn’t seen much info in terms of how well these units meet their claimed specifications, so I started doing a short review/teardown video, and ended up reverse engineering the analog front end trying to track down the source of harmonic distortion that happens at higher output amplitudes and higher frequencies:



TL;DW: it looks like the main issue is that they aren’t providing a large enough supply voltage to the final output stage (an AD812 dual op-amp), and it’s causing clipping/distortion. This is backed up by the datasheet, although it is also clearly a frequency dependent issue.

Here's a schematic of channel 1's analog front end (channel 2 is identical) for anyone interested.
 
The following users thanked this post: Microcheap

Offline biot

  • Regular Contributor
  • *
  • Posts: 70
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #1 on: August 05, 2015, 10:56:47 pm »
Great video, thanks a lot!
 

Offline albert22

  • Regular Contributor
  • *
  • Posts: 177
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #2 on: August 05, 2015, 11:18:13 pm »
Very good video. I liked the detailed analysis and the rev eng. schematics.
Thanks and regards
 

Offline Lightages

  • Supporter
  • ****
  • Posts: 4314
  • Country: ca
  • Canadian po
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #3 on: August 06, 2015, 02:09:00 am »
That was very well done.
 

Offline gby

  • Regular Contributor
  • *
  • Posts: 246
  • Country: us
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #4 on: August 08, 2015, 03:04:42 am »
Impressive work getting all the way down to a reverse engineered schematic and building those separate test circuits.

I suspect a lot of the distortion is explained by the slew and current limits of the AD812 amplifier used in the output buffer for the generator.  To make a 15 MHz 7.5 V0-p signal you need an amplifier slew rate capability higher than 7.5*2*pi*15e6 = 710 V/uSec.  Although the headline slew rate number for the AD812 is 1600 V/uSec that is at +/-15V supplies and optimum feedback resistance.  At +/-5V the data sheet lists only 425 V/uSec slew rate for +2 gain.  It would not surprise me if at +/- 7.5V and 1K feedback R if the typical slew rate was still less than the required 710 V/uSec.

Note also that the AD812 was design for video with net terminated load R of 150 Ohm.  In this generator with 50 Ohm load you are down to only 100 Ohm which means the AD812 does not have enough output current capability before current limiting.  See Figure 6. Output Voltage Swing vs. Load Resistance in the data sheet.

For another low cost (< $85) you could consider the FY3224S generator.  This one is almost the same as the MHS-5200/MHS-3200.  Key differences are 12 bit R, 2R DAC, +/-12V supply, and a better output buffer amplifier.  The main drawback to the FY3224S is the current limit of only about 70 mA before clipping.  So, 10+ MHz open circuit looks fine up to 20 Vp-p while with 50 Ohm load the current limit clips you to only about 12 Vp-p set point and 6Vp-p across the 50 Ohm load.  Still much better than the MHS-5200 result.

See the FY3224S thread for lots more info.  A specific MHS-5200 and FY3224S comparison table is given in that thread at:

https://www.eevblog.com/forum/testgear/feeltech-fy3224s-24mhz-2-channel-dds-aw-function-signal-generator/msg697718/#msg697718

gby
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #5 on: August 12, 2015, 12:51:54 am »
Well, seems like I did the right thing to buy the 12Mhz-Version instead of paying 20€ more for the 25Mhz-Version :D

What I discovered when I powered the unit from my Bench-Supply (Ebay-Seller had sent me a PSU with the wrong type of Plug for European Wall-Plugs) was that the waveforms looked a lot less noisy than when powered with the PSU delivered with the unit. I also measured only 4.75V getting into the unit, suggesting the PSU is not really up to the task.
When I powered the signal-gen with the Bench-Supply, I found a significant improvement on the overall performance when I turned the voltage up to 5.30V (I didn't go higher, as I suspected the 5V-Rail to be directly connected to the PSU): The Display had more contrast and the waveforms didn't seem to flatten at max amplitude.
Also a slight offset of -1 to -2% yielded a much better looking result on the Square-Wave.

Unfortunately, I haven't made any comparison-pictures  |O

I am currently investigating upgrading the unit with a battery and an internal switching PSU: The one I got with the unit clearly is not up to the task, but I'm pretty sure one of these cheap chinese Boost-Converter Boards + a 3,7V Lithium-Accu combined with a small charging-circuit connected to the original PSU-Input, will be. And there is more than enough space inside the case to add this.
I also think about modifying the on-board switching regulators to put out +/-15V or +/-12V if the caps are rated for only 16V. If there is nothing else powered from these rails than the AD812, I think this should be possible without risking damage from overvoltage.
The current-draw at 12Mhz, 15Vpp into 50Ohms was about 450mA @ 5,3V btw.

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #6 on: August 13, 2015, 01:17:25 am »
gby: Yes, the slew rate is almost certainly the problem; the Vpp vs Power Supply issue that I focused on seems to have been a red-herring. After some additional testing and gawking at the datasheet, the slew rate of the final amplifier is probably worse than 400V/uS, much too low. I probably should have guessed that in the first place from the waveform distortion.  |O

The most likely reason seems to be that the AD812 is used in an inverting configuration (I'm no expert in current feedback amps, but this seems unusual for a CFA), i.e., a gain of -3. Although the datasheet doesn't mention much for inverting configurations, even a gain of -1 has a relatively terrible slew rate, and I suspect that a gain of -3 could be notably worse.

I re-built the final AD812 stage as a non-inverting configuration, all else being equal (same supply voltage, feedback resistors, etc); from the graphs in the datasheet, a non-inverting configuration should have a much better slew rate. I saw a noticeable improvement in output amplitude (an extra 3Vpp at 15MHz) and distortion which seems to back up the slew rate theory, and I'm in the process of doing a follow-up video.
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #7 on: August 13, 2015, 02:00:16 am »
I also did some measurements on the Supply for all the components on the board.

The +5V Rail is indeed unregulated inside the unit (directly connected to the PSU-Connector and jumping all over the place between 4.4V and almost 4.7V, depending on Frequency and Amplitude) and the -5V Rail is stable at -4.96V, +9V stable at 9.58V, -9V stable at -9.08V. The 3.3V and 1.2V for the digital circuits are stable too.

In the 12Mhz-Version the Slew-Rate seems to cause only minimal distortion, but the quite significant 10% difference between +5V and -5V-Rail would explain the flattening of the positive amplitude.

The capacitors are all rated for 16V btw. So there shouldn't be any problem increasing the supply-voltage to +/-12V. I haven't found any other component than the AD812 to connected to the +/-9V-Rails.

devttys0: Did you rebuilt the circuit inside the Unit, or did you just built a test-circuit?

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #8 on: August 13, 2015, 03:16:37 am »
SaabFAN: I noticed that the 5/9V rails not being exactly +-5/9V, but I'm surprised the 5V rail is connected directly to the crappy PS. Well, I guess not *that* surprised.

Not sure if the 10% difference on the 5V rail would cause clipping; the AD603 is the only thing directly in the signal chain that runs off the +-5V rails, and IIRC I measured its peak output at 4.5Vpp, and didn't notice any clipping on its output. I have noticed that there is a positive DC offset error in the final output, which could account for the clipping on the positive half of the waveform.

The slew rate doesn't cause huge distortion at 12MHz and below; I'm pretty sure these units were originally designed for 12MHz max, then they decided to get a bit more money by marketing the same hardware as 25MHz and just updated the firmware.

I just built a test circuit, I didn't modify the circuit inside the unit, though I'm pretty confident they would operate identically as my previous test circuit (which was an exact duplicate of the one in the unit) had the exact same frequency response AFAICT.
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #9 on: August 13, 2015, 03:32:10 am »
Interesting: Increasing the Supply-Voltage has both increased the max. Amplitude (as well as putting the amplitude out of calibration by about +5%) and the amount of distortion. Before there were only about 13V into 1MOhm possible, now I see 15.6V @ 12Mhz, but also severe flattening and it seems like the Output is either getting saturated or hits the current-limit (dent in the positive going flank, the negative one looks much better). Activating the 50Ohm-Termination increases this phenomenon.

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #10 on: August 13, 2015, 04:36:03 pm »
This is how the Sine-Wave looks right now on my Rigol 1104Z:





Unfortunately, I only have a 75Ohm Terminator right now (50Ohms is on its way).

Strangely, my PM3320A shows different voltages, while the shape on both instruments looks identical. Probably have to recalibrate again. (Which wont yield the best results, considering what I have here: MHS-5200A Signal-Gen and a XR2206 based analog Signal Generator.
So disregard my earlier comments about changes of the amplitude.

I also took some measurements of the square-wave: It has so much ringing, it doesn't even settle at frequencies above 2Mhz.

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #11 on: August 13, 2015, 06:40:29 pm »
Yeah, the square wave overshoot/ringing is atrocious, even at very low frequencies. :-\
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #12 on: August 13, 2015, 07:03:05 pm »
What could the reason be to fail like that at creating a Square-Wave? Too slow slew-speeds?

For comparison: My 74AC14-Based TDR running at 2.432Mhz (RC-Oscillator driving 5 gates with 220Ohm-Resistors to give 50Ohm output-impedance on a not very RF-ish vero-board - no Ground-Plane and components connected with bare wires and solder-"traces" on the bottom-side) vs. the MHS-5200A. Both are pumping their energy into a 75Ohm termination-resistor via a 50cm 50Ohm Coax-Cable. The Signal-Gen is set to 5V Amplitude and 0% Offset.

Offline commie

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: gb
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #13 on: August 13, 2015, 07:48:30 pm »
The reason this sig.gen. outputs sine distortion on the higher amplitudes and frequencies is because the output op amp(which is possibly a current feedback type) is going into slew rate limiting, which is why you get a triangular wave as the gen. approaches max. bandwidth/amplitude.

Actually, I would expect this kind of gear to be crap, which it is, it's written all over the product.
Why do you guys buy this shit? :popcorn:
 

Offline wd5gnr

  • Regular Contributor
  • *
  • Posts: 179
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #14 on: August 13, 2015, 08:11:55 pm »
Nice work. Maybe we just need to rebuild the output stage.
 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #15 on: August 13, 2015, 08:17:50 pm »
The reason this sig.gen. outputs sine distortion on the higher amplitudes and frequencies is because the output op amp(which is possibly a current feedback type) is going into slew rate limiting, which is why you get a triangular wave as the gen. approaches max. bandwidth/amplitude.

Actually, I would expect this kind of gear to be crap, which it is, it's written all over the product.
Why do you guys buy this shit? :popcorn:


Because it is almost 200€ cheaper than anything similar from Rigol, Siglent, Hantek, etc.
And it meets my requirements: I need an arbitrary waveform-generator to connect to a power-amplifier to simulate a 60W wind-generator.
I had started to build my own Signal-Gen btw. but it proved too time consuming (building everything on Vero-Boards, writing the Firmware and the Software to control the device with the PC).
Despite its shortcomings, this thing is still good value for money in my case (Paid 68€ including shipping for the 12Mhz-Version).

For calibrating my PM3320A I probably have to get something better or find someone with proper Signal-Generators and Pulse-Gens. :)

Offline dadler

  • Supporter
  • ****
  • Posts: 851
  • Country: us
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #16 on: August 13, 2015, 08:24:20 pm »
I have a different (cheap) unit (MHS-2300A), but I bought it to use in the garage for simple automotive purposes. Mine has floating outputs, decent performance for the price, and works well as a beater generator.

I also have a Rigol DG1032Z and now a Keysight 33522B. These are for bench use.

Different people have different use cases. There is value/good reason for cheap, low-end products. I know you don't like the word "low-end" though  :P
 

Offline onrainbow

  • Newbie
  • Posts: 6
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #17 on: August 13, 2015, 08:59:03 pm »
I recently got a GW-Instek 1013 function generator due to Dave's recommendation in one of his videos. Should I have gotten these types of generators instead?
 

Offline commie

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: gb
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #18 on: August 13, 2015, 09:03:43 pm »
Because it is almost 200€ cheaper than anything similar from Rigol, Siglent, Hantek, etc.

But there are two options you can take, one is to buy a old skool (XR2206 based) function generator like the GFG-8215A dc-3MHz, alternatively save your money until you can afford AWG like the Rigol DG1022.

The MHS-5200A is simply badly designed  :-//
 

Offline commie

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: gb
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #19 on: August 13, 2015, 09:06:46 pm »
I recently got a GW-Instek 1013 function generator due to Dave's recommendation in one of his videos. Should I have gotten these types of generators instead?

Yes ways, You did the right thing buying from a reputable make., so how does it perform do you like it?
 

Offline usagi

  • Frequent Contributor
  • **
  • Posts: 393
  • Country: us
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #20 on: August 13, 2015, 09:07:24 pm »
wonder if the MHS-5200A shares the same issues as we found in the MHS-2300A (which seems to share very similar design and components).

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #21 on: August 13, 2015, 09:51:16 pm »
Because it is almost 200€ cheaper than anything similar from Rigol, Siglent, Hantek, etc.

But there are two options you can take, one is to buy a old skool (XR2206 based) function generator like the GFG-8215A dc-3MHz, alternatively save your money until you can afford AWG like the Rigol DG1022.

The MHS-5200A is simply badly designed  :-//

I already have an XR2206, although only capable to do a little over 100kHz, and the DG1022 was among the devices I was considering (the others were a SDG1000-Series and a comparable unit from Hantek), but they both were priced almost 200€ higher. With this unit I spared me the trouble to figure out all the software-stuff and if I need an accurate amplitude-control, I can still build the amplifier and AGC-circuits I have already drawn up for my own signal-gen.
The digital stuff can probably hold its ground pretty well against the units from the other manufacturers. The problem is the final analog output, which we hopefully can modify enough so it does its job properly.
Besides: With only about 15€ I can make this thing portable (LiPo-Cell, Boost-Converter, Charger + some wires and an additional switch). I doubt this is possible with a DG1022. :D

In hindsight, the FY32XX would probably have been better: 12bit, 50Msps more, twice the waveform-length, more amplitude.

Comparison with the MHS-2300 would be interesting indeed: The analog part seems to be a lot more complicated and incorporates even a few adjustable components.

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #22 on: August 13, 2015, 11:25:17 pm »
SaabFAN: The overshoot/ringing on the square wave output is probably due to the elliptic low pass filter they use on the output of the DAC, but I haven't verified that yet.

commie: I didn't expect it to really be any good. Like I pointed out in the video, there's nothing worse than buying test gear you can't trust. But it is fun to take cheap stuff apart and hack at it, which is mostly why I got one.  :)

And yes, the CFA is definitely slew rate limited:

 

Offline SaabFAN

  • Frequent Contributor
  • **
  • Posts: 735
  • Country: de
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #23 on: August 13, 2015, 11:49:21 pm »
Why did they use an inverting configuration in the first place? Is there any benefit to it? Easier to design, issues with DC-Bias, etc.?

Offline devttys0Topic starter

  • Contributor
  • Posts: 21
Re: MHS-5200A function generator teardown / review / reverse engineering
« Reply #24 on: August 13, 2015, 11:57:18 pm »
Not sure exactly, perhaps they did it to more easily set the input impedance to the amp, especially for terminating the DAC filter. Seems uncommon for CFAs.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf