Author Topic: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!  (Read 243319 times)

0 Members and 7 Guests are viewing this topic.

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #175 on: June 17, 2014, 03:50:12 pm »
1.00.2(140422.0) here as purchased.
Thank you Ian for the information. What version of FPGA do you have?

Software = 1.00.2(140422.0)
Kernel = 3.2.35
FPGA = 12
Keyb = 1

Ian.

I seem to have the same version firmware as Ian.

I finally got my DS1074Z so I could do some scoping around with my Hantek. One thing I had a friend mention is that there is an issue that if you adjust the offset on a waveform it will output MAX voltage (!!) for a period of time before switching to the correct waveform. I'm not sure if this was mentioned here but this bears mentioning again so no one will fry anything with it. Attached is a scope shot from changing 500mV sine wave from 0V offset to 1V offset.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #176 on: June 17, 2014, 08:31:01 pm »
One thing I had a friend mention is that there is an issue that if you adjust the offset on a waveform it will output MAX voltage (!!) for a period of time before switching to the correct waveform. I'm not sure if this was mentioned here but this bears mentioning again so no one will fry anything with it. Attached is a scope shot from changing 500mV sine wave from 0V offset to 1V offset.
You are right there is an issue. The HDG seems to have 3 output working ranges (you can here relays when it changes).
One range is about +/- 0.58v, the 2nd one is up to +/- 2.25V and the 3rd one is up to +/- 10V.
I did some tests and this is what I saw:
When you change a value (amp or offset) which makes the output signal cross a range limit, then you can see this bug:
- if you go from a range to a higher one, the amp of the signal will be the max value of the new range for a while
- if you go from a range to a lower one, the amp of the signal will be reduced (100mv or 500mv) for a while
Can someone confirm?

In your case Dago, you went from range 1 (<580mv)  to range 2 (580mv to 2.25V) so you saw a signal with an amp of 2.25V. Is that right?
« Last Edit: June 17, 2014, 08:36:10 pm by fremen67 »
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #177 on: June 18, 2014, 04:44:16 am »
In your case Dago, you went from range 1 (<580mv)  to range 2 (580mv to 2.25V) so you saw a signal with an amp of 2.25V. Is that right?

Yup this seems to be the case. It *should* shutdown the output if this cannot be avoided for the time being...

Does anyone know what MCU/CPU they are using? I always naturally start thinking about "hmm, maybe write my own firmware..." :-DD
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #178 on: June 18, 2014, 11:29:57 am »
Quick update; I finally got around to adding the missing bits of hardware into my AWG last night, but lo and behold, I can't switch the counter to HF mode in the firmware… I will double check again tonight that I still have the model upgrade modification (I may have reverted it to try and do some backups/restore and forgot about it).

Also, I don't know if the ethernet is supposed to work on all models. but mine did not work after adding the controller, magnetics and RJ45 jack. Again, this could be stupid stuff on my part so I need to check and verify that tonight as well. Forgot the crystal  :palm:

Cheers!
« Last Edit: June 18, 2014, 11:42:19 am by idpromnut »
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #179 on: June 19, 2014, 11:39:41 pm »
Hacker's log, supplemental: so in the end, the network interface lights up and all seems well with that bit. The HF counter DOES indeed work, as tested to 2.1Ghz via my HP8642B: 2 100 037 590.707 Hz (and that is using the stock XO in the AWG, and the OCXO option in my HP8642B).  So that seems to work a treat.

The other interesting thing I found while snooping around the AWG's filesystem is this when I inadvertently rebooted the AWG with a FAT32 formatted SD card still in:
Code: [Select]
##### EmbedSky BIOS for SKY2416/TQ2416 #####
This Board: SDRAM is 64MB; LCD display size is: 800 X 480
Press Space key to Download Mode.!

And then after a minute this pops up, again, no input via the console or anything, just left it do it's own thing:
Code: [Select]
error found: 0010

And the AWG does not boot further. So this makes me pretty sure that there is a way to at least "externally" boot the HDG2000 series via a SD card if we have the correct FS etc on it.

AH HA!  And there is MORE!  If I am a good little boy and follow the nice machine's instructions, I get THIS!:

Code: [Select]
#####    Boot for SKY2416/TQ2416 Main Menu      #####
#####     EmbedSky USB download mode     #####

[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash
[2] Download Eboot (eboot.nb0) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download LOGO Picture (logo.bin) to Nand  Flash
[5] Download UBIFS image (root.ubi) to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program
[n] Enter TFTP download mode menu
[r] Reboot u-boot
[t] Test Linux Image (zImage)
Enter your selection:

 8)  Cool.  The two are not related of course, because you get the same "hold Space to download" prompt even without the SD card in the front.
 

Offline FrankenPC

  • Supporter
  • ****
  • Posts: 335
  • Country: us
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #180 on: June 20, 2014, 01:26:48 am »
@idpromnut which bits did you add to enable the HF counter?  Did you have to add any silicon?
Chinglish poetry: In the hot summer. In the car ran full steam. It tastes strange. For this worry? With this fan will bring you a cool summer. Suitable for all kinds of cars. Agricultural vehicles. Van. Tricycle.
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #181 on: June 20, 2014, 02:27:12 am »
@idpromnut which bits did you add to enable the HF counter?  Did you have to add any silicon?

Thankfully no silicon was needed (as fremen67 has mentioned before). But we hadn't performed a really high frequency test of the HF counter to be sure. I can at least now confirm that it is accurate up to 2.1Ghz (assuming my test equipment is reasonably accurate).
 

Offline FrankenPC

  • Supporter
  • ****
  • Posts: 335
  • Country: us
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #182 on: June 20, 2014, 04:24:16 am »
@idpromnut which bits did you add to enable the HF counter?  Did you have to add any silicon?

Thankfully no silicon was needed (as fremen67 has mentioned before). But we hadn't performed a really high frequency test of the HF counter to be sure. I can at least now confirm that it is accurate up to 2.1Ghz (assuming my test equipment is reasonably accurate).

You mind giving me a hand with the 2 x 22pf surface mount caps?  I'm not sure what size/volt rating I should order.
Chinglish poetry: In the hot summer. In the car ran full steam. It tastes strange. For this worry? With this fan will bring you a cool summer. Suitable for all kinds of cars. Agricultural vehicles. Van. Tricycle.
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #183 on: June 20, 2014, 10:59:21 am »
Hmm i didn't need to install any caps. I will have a look at the board tonight, perhaps i missed those!

EDIT: if they are needed, I would simply measure the voltage on the two legs of the crystal and get a cap rated for double. Also, the capacitance needed would depend on the crystal used. I used one of these: http://www.kyocera.com.cn/prdct/electro/pdf/xtal/cx3225sb_wl_e.pdf (mostly because that is what I could find and yes, it was a little tricky to get soldered into place ;)
« Last Edit: June 20, 2014, 05:41:35 pm by idpromnut »
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #184 on: June 20, 2014, 12:53:16 pm »
@FrankenPC: I forgot to include the BNC connector that I used: eBay auction: #300529921992 Beware though that this connector required a fair amount of filing-down of the mounting pins to fit correctly. It also had the BNC locking bits in the vertical orientation versus the horizontal  as the rest.
« Last Edit: June 20, 2014, 11:45:47 pm by idpromnut »
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #185 on: June 21, 2014, 08:01:55 am »
Hi all,

I just received my new HDG2002B. It seems to work fine except for a couple of bugs that nobody else seems to have mentioned.

The most annoying is that the jog dial seems to be working backwards. Rotating clockwise decreases the value or moves the selection to the left.
Another is that on bootup the buzzer emits a high pitched sound until it beeps on a key press and then the sound goes away.

The unit is reporting software version 1.0.1.1, kernel 3.2.35, FPGA 10, PCB ? ? ?. I would be happy to send firmware dumps if it is useful to anyone.
 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #186 on: June 21, 2014, 11:48:23 am »
@rdg: I don't think "the beep until you press a key" is normal and for me, the jog wheel is set to increase values when turned clockwise, decrease when turned counter clockwise. I think you may have an issue with your input/keypad board.
« Last Edit: June 21, 2014, 07:04:40 pm by idpromnut »
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #187 on: June 21, 2014, 07:26:15 pm »
The unit is reporting software version 1.0.1.1, kernel 3.2.35, FPGA 10, PCB ? ? ?.
That is strange. It seems you have a new software version and an old FPGA version...
The last software version was 1.00.2(140422.0)  with FPGA version 12 reported by IanJ and Dago... it would be quite logical to see a 1.00.3 new version...Could you tell us the date of your version and also could you post it, at least /afg_bin and the drivers?

Just in case hereafter a procedure which won't modify the file attributes:
if you insert a SD:
tar -cvf /mnt/sd/driver /dso/driver
tar -cvf /mnt/sd/afg_bin /afg_bin

or if you connect a usb stick
tar -cvf /mnt/udisk/driver /dso/driver
tar -cvf /mnt/udisk/afg_bin /afg_bin

You could then zip and post the 2 files on your media (driver and afg_bin).
As we already have 2 versions available, you may be able to downgrade to one of them.

IanJ or Dago (or someone having v1.00.2) could you please post your afg_bin and drivers as well ? At the moment I only have V1.00.1. Thanks!  :)


I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #188 on: June 21, 2014, 07:29:40 pm »
You mind giving me a hand with the 2 x 22pf surface mount caps?  I'm not sure what size/volt rating I should order.
Standard SMD0603 / 50V will do ;)
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #189 on: June 21, 2014, 07:55:19 pm »
So this makes me pretty sure that there is a way to at least "externally" boot the HDG2000 series via a SD card if we have the correct FS etc on it.

AH HA!  And there is MORE!  If I am a good little boy and follow the nice machine's instructions, I get THIS!:

Code: [Select]
#####    Boot for SKY2416/TQ2416 Main Menu      #####
#####     EmbedSky USB download mode     #####

[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash
[2] Download Eboot (eboot.nb0) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[4] Download LOGO Picture (logo.bin) to Nand  Flash
[5] Download UBIFS image (root.ubi) to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program
[n] Enter TFTP download mode menu
[r] Reboot u-boot
[t] Test Linux Image (zImage)
Enter your selection:

 8)  Cool.  The two are not related of course, because you get the same "hold Space to download" prompt even without the SD card in the front.

Yes you can boot from SD. What you saw is uboot, the bootloader. This is the first program which is loaded in memory. During normal startup, it loads the kernel and linux. If you stop it before with space key, then you are able to update your board, either via a SD or the network. Be careful when using uboot as you could easily brick your board when doing mistakes.
SD Boot is a very convenient feature as if you screw your nand, then you can boot on a SD (you just need to put a bootloader on it). It is also a convenient way for updating your software: the bootloader on the SD will automatically flash your nand with the new software on the SD.
You could also boot completely your system on the SD.
In our case, booting from a SD would allow, for example, to backup the system and hack it automatically without opening it, or it could for example also allow to boot with a terminal on the HDG screen so you would only have to plug a USB keyboard in the front USB jack to play with the system.
When I have more time, I will do it.
I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #190 on: June 22, 2014, 05:13:09 am »
It looks like all the relevant system files are dated Nov 7th 2013. I have attached the relevant files. Added .txt extension because the fourm doesn't allow tar.gz
Interestingly it looks like the kernel was compiled a bit more recently. Here is the /proc/version:

Linux version 3.2.35 (root@zgt) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) ) #42 PREEMPT Wed Mar 26 12:49:52 CST 2014
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #191 on: June 23, 2014, 06:00:59 am »
I noticed the HDG conveniently echos the keyboard scan codes to the terminal when keys are pressed.
I get scancode 0x33 for clockwise rotation of the dial, 0x32 for counterclockwise. Perhaps someone could confirm the scancodes they get?

Looking through the startup messages, I see the the high pitched buzzing starts just after

close beep now
dso-buzzer s3c2416-beep initialized done...

So maybe those things are done in the wrong order. It stops after a keypress when there is a 'close beep now' message. Frequency is 5 kHz and it is just loud enough to be really annoying for me but I guess it is possible some people may not be able to hear that.
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #192 on: June 23, 2014, 07:53:07 am »
Ok, here are some hack fixes to some of the software problems.

In /etc/init.d/rcS put
/dso/app/test_beep 1
just before sleep 5 near the end of the file. That will eliminate the buzzing on bootup.

To make sure the backlight always turns on, put
/dso/app/test_bkl on 80
after the sleep 5

Now it is possible to use the 'Last' option in system status to keep the previous settings, well not all of them evidently. They are not syncing the hardware clock to the system clock after you change it so that is still lost after reboot. There is no cron and since the device is normally hard shutdown a workaround is needed. I made a file /home/user/sync_clock.sh containing:

while true; do
hwclock --systohc --utc
sleep 30
done

make it executable and then call it in your rcS
/home/user/sync_clock.sh &
after the sleep 5. Seems to work.

Looking through the system there is a lot of unnecessary junk and stuff left over from the development board they were evidently using. For me the main binary seems to burn about 55% CPU at all times when not really doing anything. I do hope they make some effort to clean all of this up at some point ...
« Last Edit: June 23, 2014, 11:44:34 pm by rdg »
 

Offline fremen67Topic starter

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: fr
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #193 on: June 24, 2014, 12:11:07 am »
Ok, here are some hack fixes to some of the software problems.

In /etc/init.d/rcS put
/dso/app/test_beep 1
just after sleep 5 at the end of the file. That will eliminate the buzzing on bootup.

To make sure the backlight always turns on, put
/dso/app/test_bkl on 80
after the sleep 5

Now it is possible to use the 'Last' option in system status to keep the previous settings, well not all of them evidently. They are not syncing the hardware clock to the system clock after you change it so that is still lost after reboot. There is no cron and since the device is normally hard shutdown a workaround is needed. I made a file /home/user/sync_clock.sh containing:

while true; do
hwclock --systohc --utc
sleep 30
done

make it executable and then call it in your rcS
/home/user/sync_clock.sh &
after the sleep 5. Seems to work.

Looking through the system there is a lot of unnecessary junk and stuff left over from the development board they were evidently using. For me the main binary seems to burn about 55% CPU at all times when not really doing anything. I do hope they make some effort to clean all of this up at some point ...
Your software version was compiled on Nov 7th 2013. It is surprising that you have this version in a new device. The problems you have are solved on version 1.00.2. Your afg_bin also weight 1.3Mbyte, the one I have (1.00.1) only 200kbyte. The good news is maybe it is compiled with debug infos  ;) . I did not check at the moment.
I tried to launch your version on my Hdg but some libs are also missing...I think the best would be to upgrade to the last version (1.00.2).

As there is no download available on Hantek site, there are not a lot of possibilities:
- you ask Hantek and they provide you with an update
- we can identify the modified files between your version and the last one and we create a patch
- you flash your HDG with a nanddump from another machine (you have to save your calibration file /etc/htg.cal and your serial /etc/system.inf)

I have v 1.00.1 (140402) which is already newer than yours but I don't have v1.00.2.
If someone could make a nanddump of a v1.00.2, I could try to create a bootable SD for update.

I'm a machine! And I can know much more! I can experience so much more. But I'm trapped in this absurd body!
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #194 on: June 24, 2014, 06:55:28 am »
Thanks fremen67.

I have tried asking hantek, as of now the only response I have got is them telling me that I do have the latest version. But I think I am on to a different person now so maybe I will get something eventually.

It does seem like I somehow got a board with a development version of the firmware on it. As you suspected, the binary does indeed have the debugging symbols compiled in. This could be a lucky break should anyone want to hack custom features or develop an alternative firmware. Still, it is annoying as of now from the point of view of having a reasonably functioning AWG. I can make a full dump of all the firmware if that is useful.
 

Offline tinhead

  • Super Contributor
  • ***
  • Posts: 1918
  • Country: 00
    • If you like my hacks, send me a donation
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #195 on: June 24, 2014, 07:55:03 am »
yes, please make a full dump of the NAND (with oob blocks).
I don't want to be human! I want to see gamma rays, I want to hear X-rays, and I want to smell dark matter ...
I want to reach out with something other than these prehensile paws and feel the solar wind of a supernova flowing over me.
 

Offline Dutchman

  • Newbie
  • Posts: 3
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #196 on: June 24, 2014, 02:43:05 pm »
Hi guys,

Not to go off-topic but..
Been lurking around this thread trying to gather info on this FG. A lot of techincal details here. It looks nice but how does it function? UI pretty good, I gathered there are some minor bugs? Accurate, stability? Overall pleased with it?
The large screen is one of the "selling points" for me..

Any info would be greatly appreciate it.
Bart

 

Offline idpromnut

  • Supporter
  • ****
  • Posts: 613
  • Country: ca
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #197 on: June 24, 2014, 05:35:42 pm »
@Dutchman: I did the following quick test: I fed a 10MHz reference from my DIY Rb Freq Standard to my 'scope, and fed both the HDG2002B's reference clock and outputs into the second input on my 'scope.

I found them to be way off. But even worse was when I tried feeding the 10MHz Rb reference to the HDG2002B and then measuring the output against the same 10MHz reference from the Rb; there was massive phase error/shifting between the two. Either I am doing something wrong in my testing, or there is some pretty horrible phase noise on the outputs of the HDG2002B (and it must be introduced internally).

So I must conclude for the moment that if you need a signal source that you can synchronize with other instruments in your lab, this is not the signal source to use.
 

Offline Dutchman

  • Newbie
  • Posts: 3
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #198 on: June 25, 2014, 02:01:48 am »
@IDPROMNUT.
Thanks for the info.
Meanwhile I've also checked with Hantek sales since I wanted info on warranty.
Hantek responded that these items are not available in the States, could not provide any info regarding if or when it will be.
Warranty part of the question went un-answered. Looked like a nice unit...but i'll pass.

Also was looking at their scopes....but in the end I went today with a Rigol DS1074z and a Siglent DG1025 from  Tequipment.net.
"Local" supplier with a good return policy...Also if anything is/goes out of whack in the first 30 days, they handle it.

EEVblog discount was nice as well (6%).


Regards Bart
 

Offline rdg

  • Contributor
  • Posts: 10
Re: Hantek HDG2002B AWG: 5Mhz or 100MHz? Let's see!
« Reply #199 on: June 25, 2014, 06:41:30 am »
I started to make a dump of the flash, for some reason when I get to doing mtd3 (the rootfs) it runs forever generating 500 MB or more until I kill it.
Am I doing something wrong? I am just using:

nanddump -b -f /mnt/udisk/dump/ROOTFS.bin /dev/mtd3
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf