EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: wd5gnr on June 28, 2015, 06:57:39 am

Title: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on June 28, 2015, 06:57:39 am
I picked up an MHS-5200A DDS Signal Generator for about US$80 on eBay. The Windows software is horrible, plus it is in Windows. Would probably work in Wine, but I can't get NI-VISA to install in Wine and don't really care.

So here's the basic serial protocol for the device (it looks like a COM port): https://docs.google.com/document/d/1HbLQ4u87RJkD3Ktyw7k9U7Zh5BPNzbrhMlszNGdXiiY/edit?usp=sharing

I missed one or two, but all I really want it to shove the arbitrary buffers in. I don't even care about a GUI, to be honest so.... that will be my next post is my solution for that ;-)

Here's what I know so far. Corrections or comments welcome.

https://docs.google.com/document/d/1HbLQ4u87RJkD3Ktyw7k9U7Zh5BPNzbrhMlszNGdXiiY/edit?usp=sharing

By the way, the software is listed as for the 5200 or the 3200 but a different document on the 3200 shows a pretty different protocol so the software must adapt.


Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on June 28, 2015, 01:19:01 pm
Ok after a busy day, here you go:
https://github.com/wd5gnr/mhs5200a

(https://raw.githubusercontent.com/wd5gnr/mhs5200a/master/images/screenshot_211.png)

I didn't bother trying to operate the instrument from the software (although you can), I only care about loading the arbitrary waveform memories.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: Muxr on June 28, 2015, 04:26:04 pm
Nice, I should give this a try on my MHS-3225. Wonder if they are compatible. Just re-read your first post, and noticed the protocol is different.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on June 28, 2015, 11:05:11 pm
Yup. In addition, I have a bug somewhere. It only works when I have the port open with some test software. I am trying to fix that this morning. Worse case, I'll rewrite in C.

Ok, fixed and enhanced. I have a few more pushes today and then hopefully done at least for now.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on June 29, 2015, 02:23:07 am
If you can't stand not having a GUI, I found the TTI Waveform Manager Plus runs well under Wine and is free to download (registration required). If you export to "normalized" you can import to the MHS5200A by using the -f flag to the software I provide. Here's some screen shots:

The app:

(https://raw.githubusercontent.com/wd5gnr/mhs5200a/master/images/screenshot_212.png)

The scope showing the uploaded wave from the signal generator:
(https://raw.githubusercontent.com/wd5gnr/mhs5200a/master/images/cardiac.png)

The TTI app is at http://tti1.co.uk/downloads/waveman-plus.htm (http://tti1.co.uk/downloads/waveman-plus.htm)
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: Polossatik on July 02, 2015, 06:43:08 pm
the specs I found on ebay list only higher than 6MHz for “sine wave” in the 3 “top” models (12/20/25 MHz),
all other wave forms are speced at 6MHz


Care to open up and have a look if the difference is pure in firmware or they add in the more expensive ones some kind of additional ( hardware?) sine wave generator.
? :)
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: free_electron on July 02, 2015, 08:00:06 pm
Teardown !
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 03, 2015, 01:01:59 am
Yes it is on my list, although the cost difference between the units is pretty small so I just got the 25MHz one. I think the span is about $10 from low to high, but I might be remembering wrong.

What I am currently about 1/2 way done with is a setup that will create a virtual file system (like ~/dds with a subdirectory for each slot. Then it launches waveman or another editor of your choice. You save your wave to (for example) ~/dds/5 and it sends it to the instrument and moves the file to ~/dds/5/sent for future reference. That would make using waveman a lot easier.

Almost done with it and will update github when it is done.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 03, 2015, 02:20:36 pm
I just posted a draft version of the wavegen script. You WILL have to edit it for your use. Basically, it creates some directories and launches the TTI editor (or any editor). Then you simply save your file in CSV or NRM format into the directory you want and the download happens magically. For example, I save to ~/dds/4 to write to slot 4.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 13, 2015, 04:01:20 am
Fixed a small bug in the software if you haven't updated lately, you should. Meanwhile, here's the innards of the device:


https://imgur.com/a/dAPBi#0 (https://imgur.com/a/dAPBi#0)


Here's the first of the 5 pictures:
(http://i.imgur.com/CHrVNuY.jpg)

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: lcltech on July 13, 2015, 04:29:02 pm
Nice, I should give this a try on my MHS-3225. Wonder if they are compatible. Just re-read your first post, and noticed the protocol is different.

Does anybody know what else is the difference between MHS-3200A and MHS-5200A? The specs are exactly the same.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on July 21, 2015, 07:12:37 am
Teardown !

I have received my 25MHz unit and it is pretty much the same as in the photo. The architecture seems to be an STM8 micro (small TQFP on the right) handling the coms & display, CH340G (upper right TSOP) usb uart bridge deals with the USB part. The signals are produced by a Lattice MachXO2 CPLD/FPGA (large QFT in the center) with 2 8bit resistor DACs (left of it) with some opamps (immediately left of the DAC ladders) and AD603ARs (left from the opams). I didn't remove the heatsink, so not sure what is under it - perhaps some power transistors.

The rest is not very interesting - there are relays to switch the outputs on and off, standard 2 line LCD, encoder knob on a separate board and a boatload of passives. The bottom right of the board is a switching PSU.

It looks fairly well built, actually, especially for the price. I have seen much much worse already.

However, what I would love to get is an English manual. The original is in Chinese, unfortunately. I still haven't figured how to actually use the counter functionality the unit is supposed to have nor how to use the various synchronization inputs, including the TTL inputs and outputs on header in the back.


the specs I found on ebay list only higher than 6MHz for “sine wave” in the 3 “top” models (12/20/25 MHz),
all other wave forms are speced at 6MHz

Care to open up and have a look if the difference is pure in firmware or they add in the more expensive ones some kind of additional ( hardware?) sine wave generator.
? :)

There isn't any separate gen for 25MHz and 6MHz square wave. I have checked the signal on my scope and when set to square wave, the signal starts getting distorted around 1-2MHz and the higher you go, the more sine-like it looks, until you get basically straight sine wave above around 4-5MHz (it might do 6MHz, but I didn't probe it correctly). On the scope it looks like as if there was a heavy low pass filter and the higher harmonics were getting progressively cut from the signal as the frequency was increased. Not sure whether there is a physical low pass filter on the output or whether it is an artifact of the sampling.







Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on July 21, 2015, 07:47:32 am
If you can't stand not having a GUI, I found the TTI Waveform Manager Plus runs well under Wine and is free to download (registration required). If you export to "normalized" you can import to the MHS5200A by using the -f flag to the software I provide.

Thanks for this, that software is really pretty good. I have tried your scripts to upload the waveforms to the generator and hats off to your shell scripting :-p

I would probably rather do it using Python or something like that though, shell/awk isn't the best choice for this type of job, not to mention that Python is a bit more portable than the above combo.

BTW, a pro tip for anyone using this generator - record a waveform with a scope, save as CSV, open it using Waveman, clean up and upload to the generator. Bingo, signal reproduced for debugging stuff. Works like a charm!

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 21, 2015, 02:33:58 pm
I don't have an English manual, but I've worked it all out. You probably figured that what the main buttons do (pgup/dn for the menu). For the counter on the menu look for:

MSR-Sel. Press OK to go external or TTL.
MSR-Mode. Press Ok to select frequency/count/pos pulse width/neg pulse width/period/duty cycle
Gate-Time. Freqency gate


One of the menu items changes depending on your MSR-Mode (the one after Gate time). If it says C it is reading counts.pressing ok pauses. If it says F it is reading frequency. You can probably figure the rest out from there.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 21, 2015, 02:34:40 pm
I'm not a big Python fan, but the script works well and with Cygwin actually that is a pretty portable combo too ;-)

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on July 21, 2015, 06:36:49 pm
I don't have an English manual, but I've worked it all out. You probably figured that what the main buttons do (pgup/dn for the menu). For the counter on the menu look for:

MSR-Sel. Press OK to go external or TTL.
MSR-Mode. Press Ok to select frequency/count/pos pulse width/neg pulse width/period/duty cycle
Gate-Time. Freqency gate


One of the menu items changes depending on your MSR-Mode (the one after Gate time). If it says C it is reading counts.pressing ok pauses. If it says F it is reading frequency. You can probably figure the rest out from there.


Ah ok! Really "obvious"!  :palm:

Jeeze, that user interface was designed by monkeys ...

BTW, any idea how the TTL outputs actually work? There are 8 outputs and in input. I guess the input is for the counter and perhaps to synchronize the frequency sweep, but how to use the outputs?

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on July 21, 2015, 06:39:36 pm
I'm not a big Python fan, but the script works well and with Cygwin actually that is a pretty portable combo too ;-)

Ouch, Cygwin ...  :o I will probably try to hack a little app up to manage the uploads for this.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 21, 2015, 10:09:17 pm

Ah ok! Really "obvious"!  :palm:

Jeeze, that user interface was designed by monkeys ...

BTW, any idea how the TTL outputs actually work? There are 8 outputs and in input. I guess the input is for the counter and perhaps to synchronize the frequency sweep, but how to use the outputs?

Nope, haven't played with the TTL outputs yet.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: przemek on July 22, 2015, 03:50:40 pm
I compiled an English manual from Google-translated original Chinese text and other sources of information:
https://github.com/przemekklosowski/mhs52xx/raw/master/MHS5200.pdf
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: wd5gnr on July 22, 2015, 10:06:04 pm
Awesome! Thank you for doing that!
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: biot on July 23, 2015, 01:38:56 am
May I suggest sticking some sort of license on that document, at least on the translation and protocol documentation part? Perhaps CC-BY-SA or something like it.

Very nice to see such nice work coming out of a community, in view of the vendor's underwhelming support.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: przemek on July 23, 2015, 12:36:57 pm
Initially I thought the translation will be useful to the manufacturer,  but I pinged them by email and they didn't reply. I then essentially rewrote the thing, so I feel I am entitled to controlling the copyright, and of course I prefer a collaborative license like CC. Will do, although I will have to put this project off for a while now.

By the way, it's written in LyX/LaTeX, and the source is on Github, so you're welcome to clone it and push patches. It uses quite a bit of optional packages/style files, easy to pick up from error messages if you start creating PDFs.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: przemek on July 23, 2015, 12:43:35 pm
By the way, I want a FOSS/Linux program to drive MHS5200. I considered writing a Python/Qt app, but it occurred to me that maybe it could be interfaced to sigrok: it already supports Hantek and Siglent generators. Thoughts?
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: biot on July 23, 2015, 07:16:56 pm
By the way, I want a FOSS/Linux program to drive MHS5200. I considered writing a Python/Qt app, but it occurred to me that maybe it could be interfaced to sigrok: it already supports Hantek and Siglent generators. Thoughts?
Alas, sigrok does not support signal generators as an instrument class yet. Those listed on the hardware support page are marked red (planned). You're welcome to take it on.

And you're right, a UI for these just screams Python/Qt.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on July 24, 2015, 07:53:14 pm
I compiled an English manual from Google-translated original Chinese text and other sources of information:
https://github.com/przemekklosowski/mhs52xx/raw/master/MHS5200.pdf

Big kudos for this! This manual looks better than the original, even!

 :-+
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: Kintekobo on August 03, 2015, 11:44:13 pm
I compiled an English manual from Google-translated original Chinese text and other sources of information:
https://github.com/przemekklosowski/mhs52xx/raw/master/MHS5200.pdf

Hi przemek

Thanks for the superb work on the manual. Top class!

I have a couple of things to add if you haven't already found them.

The arbitrary waveform transfer is actually -

:aX0,n2,.........n64<CRLF>
:aX1,n65,n66........n128<CRLF>
.
.
:aXF,n.........n1024<CRLF>

where X is an arbitrary waveform store from 0 to F (Hex). There is an OK<CRLF> returned between each block when transfer is successful.


The Sweep time message is :s5tn from trial and error.

Regards,
Chris
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: pascal_sweden on August 04, 2015, 03:49:53 am
Would be nice if the protocol for the FeelTech signal generator can also be reverse engineered, or has somebody already confirmed that they are identical?
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: danadak on September 15, 2015, 07:09:28 am
Here is some eval of the generator performance.

Regards, Dana.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: Howardlong on September 15, 2015, 07:23:49 am
Here is some eval of the generator performance.

Regards, Dana.

Looking at the ringing, how did you probe it?
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: danadak on September 18, 2015, 03:03:30 am
The pics were all probed with 10X probe, 1M, 12 pF. Also a 10X 10M 14.5 pF probe.

When looked at with 50 ohm scope termination, straight short coax, not much changed in terms
of ringing, distortion.

I looked recently at narrow pulse, low duty cycle, at 1 Mhz pulse looks like slew rate limiting
of output amp. At 6 Mhz just 1.5 V, lots ringing severely distorted.

Regards, Dana.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on September 18, 2015, 07:21:28 am
It is slew-rate limited and heavily downpass filtered.

 This article actually describes two mods that improve the performance somewhat:
http://www.analogzoo.com/2015/08/fixing-the-mhs-5200a/ (http://www.analogzoo.com/2015/08/fixing-the-mhs-5200a/)

I have done it (replaced the opamps and did the "cheap" mod on the filters) and it works better, but I still get distortion at maximum amplitude. That is probably due to the insufficient supply voltage, though.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on October 19, 2015, 06:24:06 am
I was playing with some HF filters today and thought about trying the sweep function on the generator to check the filter characteristics. Of course, I am aware that with the variable amplitude of the sig gen it would be only very approximate, but that's ok for my needs atm.

However, does anyone know how to synchronize the sweep with a scope? I have tried all sorts of things - like feeding the scope trigger output into the input BNC on the sig gen, probed the TTL outputs on the back to see whether there is a sweep start signal or something but nada.

The other thing I have found seems like a bug - when I set the sweep limits (SET SWEEP FREQ1 and SET SWEEP FREQ2) only the lower limit seems to be respected and the generator always sweeps up 25MHz. Is that normal behavior?
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: briselec on October 24, 2015, 11:48:58 pm
If you use channel 1 for sweep, set channel 2 to output a square wave with a period equal to the sweep time.  Connect channel 2 to one of the channels on your scope and use that as the trigger.

TTL OUT1 and TTL OUT2 appear to output a square wave at the same frequency as channel 1 and channel 2.

When a channel is generating a signal that doesn't agree with the settings, try turning the unit off and back on.
Usually fixes it. Definitely has some bugs in it.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on October 25, 2015, 04:38:17 am
Hmm, didn't think of that. However, isn't that going to drift all over the place? The trigger vs. the sweep start, I mean.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: briselec on October 25, 2015, 05:17:15 pm
The display of the sweep will drift slightly.  The settings resolutions aren't fine enough to precisely match the 2 channels.




Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on October 26, 2015, 10:16:00 am
Right, makes sense. I guess better than no sync at all.

On the other hand, this device really begs to have its firmware replaced and these silly problems fixed - there is a ton of free I/O available on the connectors to provide a proper sync signal :(
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: Peter Axelsson on April 01, 2016, 03:03:39 am
Anyone have the serial command to change the display from channel 1 to channel 2?

Best regards
Peter Axelsson
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: EU1 on July 17, 2016, 07:38:07 am
Protocol specification in Chinese, I hope it will be helpful:
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: tomonthelam on September 23, 2016, 04:05:05 pm
This is great work...thanks for the effort...

Just getting my feet wet so I though I would fire up old Hyperterminal, point it at the COMM port, and see if I could tickle the 5200A, but no joy.

Any ideas?
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: nickcres13 on January 10, 2017, 12:43:58 pm
I know im late, but thought I would put in a word about some scripts im developing to further gain access to the MHS5200A device via serial commands. Namely, I have started with a dumb script that asks it for the frequency (on "EXT_IN") once a second and plots it in gnuplot. Links to the github repo and a boring video of me using it below. Let me know what needs fixed!

NOTE: I compile and run on Ubuntu, should work on other Linux distros, as for Windows and hackcoughblechApple there is work to do still obviously...

http://www.youtube.com/watch?v=aVf_DMRtWCs&t=60s (http://www.youtube.com/watch?v=aVf_DMRtWCs&t=60s)
https://github.com/electricsheeplabs/mhs5200aDataLogger (https://github.com/electricsheeplabs/mhs5200aDataLogger)
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on January 13, 2017, 01:00:45 am
Hello,

I have this same generator too and perhaps this is a completely dumb question, but what is your use case for this? Why are you datalogging the frequency?

Are you trying to characterize the stability of the instrument?


EDIT: Yes, it was a dumb question - on re-reading I have found that you are logging the EXT_IN external input, so using the device as a counter, not generator. D'oh!  :palm:

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: nickcres13 on January 13, 2017, 05:20:36 am
Janoc,

Not to worry! Indeed using as a counter... I think this could be a useful tool for certain measurement tools, such as monitoring a frequency in a lab. I was hoping to use it to monitor the frequency of a crystal oscillator, ore more specifically, a quartz crystal monitor, whose freq changes as mass is deposited on it (and by calibrating, one can measure minute amounts of mass that get deposited on it)...anyhow, let me know if you come up with any cool uses for the script! And also if you would like it to have other functionality. Its easy to send and receive other messages to the device...

Nick
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on January 14, 2017, 08:02:56 am
Yes, I know, I have the same generator on my desk. It is not stellar, but hard to beat for the price.

My have asked the original question because I thought you were logging the frequency of the generator - which isn't of much use when measured/provided by the generator itself. So I thought I am missing something there.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: nickcres13 on January 17, 2017, 03:23:33 am
Indeed! Yup im using it to monitor the frequency of external sources...though what is very interesting to me (and as other people in this thread have pointed out) is that if you wire the output into the EXT_IN, the value of the input and output don't agree! For example, you set the generator to "sine wave" at 10 Mhz and read that signal on the EXT_IN, and you will see something like 10.000123...so the counter and generator don't agree, even though they are presumably running on the same clock! Not sure why this is, maybe someone who knows more about FPGA/signal generators can comment...
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on January 17, 2017, 07:15:53 am
Indeed! Yup im using it to monitor the frequency of external sources...though what is very interesting to me (and as other people in this thread have pointed out) is that if you wire the output into the EXT_IN, the value of the input and output don't agree! For example, you set the generator to "sine wave" at 10 Mhz and read that signal on the EXT_IN, and you will see something like 10.000123...so the counter and generator don't agree, even though they are presumably running on the same clock! Not sure why this is, maybe someone who knows more about FPGA/signal generators can comment...

Really??  :wtf:

I haven't tried that on mine. But it is well possible it is the consequence of some firmware problem - the generator has plenty of jitter so who knows how they have implemented the DDS and how accurate the frequency is. I certainly wouldn't use it for something where accurate frequency generation or measurement mattered.

Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: BugCatcher on January 18, 2017, 09:07:31 pm
please read my old comment:
http://www.eevblog.com/forum/testgear/mhs-5200a-function-generator-teardown-review-reverse-engineering/msg1055618/#msg1055618 (http://www.eevblog.com/forum/testgear/mhs-5200a-function-generator-teardown-review-reverse-engineering/msg1055618/#msg1055618)

btw.     to add another surprise
            if you try to tweak the oscillator for correct frequency ...  the nominal crystal frequency is not 16.000.000Hz!

            you can find my other observations/modifications under
            http://www.analogzoo.com/2016/08/revisiting-the-mhs5200a/#comment-16400 (http://www.analogzoo.com/2016/08/revisiting-the-mhs5200a/#comment-16400)

Have Fun
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: janoc on January 19, 2017, 07:15:49 am

Sounds about right.

I remember your blog - I have done the opamp replacement and modded the filter on mine (the older version).
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: JHav on February 16, 2017, 01:36:36 am
Hello,

I purchased recently MHS-5200A and developing control SW for it. Some functions are still not working properly (Save/Load M0 - M9). I can catch all codes with serial port analyzer and original SW but the device behaviour is strange...
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: nickcres13 on February 22, 2017, 10:24:11 pm
JHav,

Looks cool! What language/interface are you developing with? I hope it is Linux compatible, I would love to get a copy of it when you are done (or maybe I could help beta test? haha). Let me know if i can help too, I have mainly C and shell script experience. Best of luck.

Nick
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: technogeeky on February 23, 2017, 02:55:54 pm
JHav,

Looks cool! What language/interface are you developing with? I hope it is Linux compatible, I would love to get a copy of it when you are done (or maybe I could help beta test? haha). Let me know if i can help too, I have mainly C and shell script experience. Best of luck.

Nick

If it can be run in Linux (using WINE or whatever), I can make it happen. I will do it ASAP if I get my hands on the software.
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: nickcres13 on February 25, 2017, 03:39:08 pm
Jhav,

Cool, looking forward to it, lemme know!

Nick
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: diyfan on March 02, 2018, 01:19:53 am
Indeed! Yup im using it to monitor the frequency of external sources...though what is very interesting to me (and as other people in this thread have pointed out) is that if you wire the output into the EXT_IN, the value of the input and output don't agree! For example, you set the generator to "sine wave" at 10 Mhz and read that signal on the EXT_IN, and you will see something like 10.000123...so the counter and generator don't agree, even though they are presumably running on the same clock! Not sure why this is, maybe someone who knows more about FPGA/signal generators can comment...

Hi, I´m new in this forum.
I just bought one of this sets (KKmoon...) mainly as acounter and I could need some help.
I am repairing a wallclock , the pendulum is swinging with 0.86666666 Hz T = 1,153846s.If I want to adjust the pendulum for qanerror of 1s per day I need a resolution of 12ppm, or I have to wait many hours for the next adjustment.
With the period measurement I am not really successful because the periods are not consistant, depending on the accuracy of the cowheels and mainly of the escapement wheel which has 26 teeth. I would have to measure at least 26 periods or better a multiple of that. At the moment the 5th digit is changing continuously.
To read out aall results would help, so I could do the averaging in Excel

thanks in advance
paul
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: kevinateev on November 19, 2018, 12:27:31 am
Here is a different approach.  It is MacOS based and command line driven.  written in Swift 4.2.  It will work for a number of variants of this device and can upload waveforms (this was my primary reason for writing it).
 https://github.com/kpishere/mhs52xxA (https://github.com/kpishere/mhs52xxA)
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: kevinateev on December 30, 2018, 10:29:01 am
Thanks to all for the research and work around this!  Labours of love but still, thanks.

Here is what I managed to put together from this info ... a native macOS control utility written in Swift to control and upload arbitrary waveforms on the  MHS5200 related units.

https://youtu.be/43wMURP_9eg (https://youtu.be/43wMURP_9eg)
Title: Re: MHS-5200A Serial Protocol Reverse Engineered
Post by: proppa on March 11, 2019, 02:32:04 am
Can anyone recommend a way to change the sweep function on channel 2 using the serial monitor?  I can't seem to find a code to select channel. I am using ext.in.