Jyetech AVR digital oscilloscope DIY KIT — Firmware upgrade odyssey

I bought the DIY KIT at seeedstudio recently, as I needed to feed my soldering obsession. Here are some images of the KIT coming right out of the box:

3706434082_2afb0d7e56_o

I had to use my milling machine, because the front panel cutout for the LCD was too small. Oh and DON’T UPDATE to firmware -080. It completely borked my scope. Also the 10pin header for programming is NOT ISP compatible, the layout is different! Consult the manual and make an adapter to standard 10pin ISP. Currently plugging in a normal programmer with short 5V to GND.

That sucks!

The original fuses for the ATmega64 were:

  • LFUSE: 0xAE
  • HFUSE: 0xC0
  • EFUSE: 0xFF

Doing some research with a fuse calculator showed that the EEPROM is preserved during chip erase. Maye the confusion comes from there, so I changed the HFUSE to enable erase.

  • LFUSE: 0xAE
  • HFUSE: 0xC8
  • EFUSE: 0xFF

To flash a new firmware (beware of this) use:

…agonizing hours later…

It seems that the scope writes _important_ data to its eeprom and gets confused if that isn’t there or somehow wrong or incompatible. The timebase settings are among that. According to the manual one needs to flash 3 files to the device to fully program it.

  • firmware ( available on jyetech website )
  • bootloader ( nowhere to be found )
  • eeprom data ( nowhere to be found )

I’ve contacted jyetech and hope they will make all files available. Why would they provide firmware hexfiles so people can brick their scopes ? GIVE US THE DAMN FILES !

…later…

I got an email from jyetech with the latest bootloader hexfile and the matching eeprom data for the current -080 firmware.

Recovery steps:

  • Line 1: restore fuses, EESAVE is programmed to keep eeprom data at chip erase
  • Line 2: flash eeprom data matching the 080 firmware, -B 100 because of timeouts
  • Line 3: flash latest bootloader, full chip erase ( eeprom excluded due to EESAVE fuse )
  • Line 4: flash firmware, use -D to skip chip erase and keep the bootloader intact

… guess what: even later …

I’ve added a 4pin header to the scope to get access to the TTL level serial port. The new 080 firmware supports sending screens to a PC, so I wanted to test that. Unfortunately it doesn’t just push out the data in some sort of CSV list, but it requires a protocol and detects if the listener doesn’t reply with the right code. Bummer. I also wanted to test uploading a new firmware with the onboard bootloader. The program to upload is called “avrubd” and can be downloaded from jyetech.com as well as the latest firmware. Unfortunately the upload software is windows only and does not run with WINE on linux.

Some more thoughts on what might lead to the strange behaviour of the 080 firmware. I’m using a 9V AC wall wart to power the scope right now. It is not regulated as it spits out about 13V without load. The scope has a built in full wave rectifier and a 7805 5V voltage regulator + capacitor. I haven’t used my “real” scope to check if there is significant amount of ripple or other noise left which might upset the ATmega64. I’ll have to use a regulated bench power supply to test if I can get the scope to crash with that as well.

A few improvements for the scope would be:

Use a standard 10pin ICSP header, so one doesn’t plug in a programmer and wonders why all the programmer’s lights go out due to over current. Right now a standard 10pin plug will short 5V to GND. Also a standard header would allow to use a simple jumper to reset the CPU by connecting pin5 (reset) to pin6 (GND). Right now pin6 is not connected. This could be hacked of course, but only _before_ the LCD has been assembled. Add a cutout on the back panel to allow access to the header. Right now the back panel has to be removed to plug in the 4pin serial plug. 90° headers would be an option, but that doesn’t look very clean. Also things like that get bent and break off all to easily.

…later…

Here’s my latest post on the arduino/seeedstudio forum with important news:

New information on the firmware update !

As of NOW jyetech provides these files on their website

  • firmware
  • bootloader
  • eeprom data

If you want to update the firmware and have access to a windows PC, download the updater and update using the bootloader! It also works using a virtualized windows XP (e.g. using virtualbox) and an FTDI cable or a moderndevice BUB (tested) or the equivalent from seeedstudio. You will have to build an adapter cable to match the USB adapter pinout to the 4pin serial connector on the scope. You have to add the serial connector yourself, the parts are not included in the DIY KIT.

Please note that once you have updated and decide to downgrade the firmware, the eeprom data won’t match anymore and you may get odd behaviour!

If you are on LINUX/MAC using a programmer and avrdude seems the only option right now, unless someone finds a way to talk to the bootloader with avrdude directly. The avrdude commands are describes a few posts earlier.

According to seeedstudio the front panel size mismatch is being addressed.

I’ll further investigate if the problems I have with the new firmware might be caused by a bad (unregulated) power supply I’m using right now. Maybe some changes in the firmware use tighter timing settings and make it prone to noise on the supply lines.

…later…

I’ve been able to make it crash with the 070 firmware and a clean power supply. I’ve checked with my big scope that the ADC chip doesn’t get any clock signal form the ATmega64 anymore when it is crashed. That could explain why the screen shows nothing anymore or at least doesn’t get any updates. I’ve also confirmed that the CPU is only rated up to 16MHz (ATmega64-16AU) but it is clocked with 20MHz in the scope. Maybe this one doesn’t tolerate 20MHz and gets upset.

To make sure it’s not caused by bad solder joints, I’ve touched up all the pins of the ATmega and the ADC chip, but that didn’t improve things at all. I will make one last attempt to fix it by replacing the CPU hoping it works. If that doesn’t help I will salvage some parts (display, switches, ADC) and the rest will go into the TRASH.
>> http://groups.google.com/group/jye-tech-oscilloscopes <<

This entry was posted in DIY., Electronics., Fix me. and tagged , , , , . Bookmark the permalink.

5 Responses to Jyetech AVR digital oscilloscope DIY KIT — Firmware upgrade odyssey

  1. Per Blomqvist says:

    Hi. I google -searched for the term: “arduino jyetech serial”, and come across this blog of yours. Im looking for options to update the firmware (wants fft).. and saw that you screw up? Didnt find this blogpost comprehensible. Didnt grasp why you failed. What USB/Serial converter did you use? (can a arduino uno do it???)

  2. robert says:

    I used an USB/TTL adapter with an FTDI chip (USB BUB from moderndevice.com). You will most likely have to build an adapter, because the pinout might be different. Check the schematic of the scope and it’s manual.

    Also this post is somewhat old, and meanwhile all files necessary for updating (bootloader + firmware) are available on jyetech’s website and the manuals (PDFs) are quite simple to follow. The bootloader requires a windows executable for uploading to it. The files are on the website as well and everything works.

  3. Per Blomqvist says:

    Hairy history.. Did any of your firmware/eeprom update make any difference?

    I assembled my oscilloscope previous sunday, and have problems with the screen also. Some blank/black lines. Somebody told me Im lousy on soldering..

    I google -searched on “USBasp”, and come across loads of stuff that are supposed to work.
    (I will follow this diy: http://yuki-lab.jp/hw/usbasp/index-e.html when/if i come to that)

    What toy is Arduino any way? (must there be another $$ adapter for every little thing…?

  4. robert says:

    Arduino is just a very simple AVR prototype board with some libraries and an easy to use IDE, targeted at “non technical” people. The community aspect (forum) is the biggest advantage.

    Getting an USBasp AVR programmer is surely a good thing, and it will be useful in the future.

    The firmware updates helped in terms of overall stability and reduced random lock-ups. But I only ever used the old versions of the scope. The ones they’re selling now are at least one revision newer.

    If your soldering is “lousy”, why get such a kit :-)

  5. Pingback: Blog J.Schweiss | Netduino Plus

Comments are closed.