Device crash if the voltage input left open

I recently bought a JS220 and during the tests I had a lot of trouble with the stability. The UI restarted the measurement randomly.

I figured out that the root cause of the instability was the open voltage input. If nothing is connected to the input my device crashes after some seconds. The log output looks like this:

WARNING:2023-05-10 13:14:44,717:backend.c:404:jsdrv:bulk_in error 1
WARNING:2023-05-10 13:14:44,717:backend.c:404:jsdrv:bulk_in error 1
WARNING:2023-05-10 13:14:44,717:backend.c:404:jsdrv:bulk_in error 1
WARNING:2023-05-10 13:14:44,718:backend.c:404:jsdrv:bulk_in error 1
WARNING:2023-05-10 13:14:44,802:jsdrv.c:763:jsdrv:API command _/!unsub invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2023-05-10 13:14:44,802:jsdrv.c:763:jsdrv:API command u/js220/000165/s/stats/ctrl invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2023-05-10 13:14:44,804:jsdrv.c:763:jsdrv:API command u/js220/000165/@/!close invoked on jsdrv thread with timeout.  Forcing timeout=0.
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/stats/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/i/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/v/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/p/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/i/range/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/gpi/0/ctrl but device already removed
WARNING:2023-05-10 13:14:44,805:jsdrv.c:397:jsdrv:u/js220/000165/s/gpi/1/ctrl but device already removed

I tested with:

*****************************
* Joulescope User Interface *
* UI Version = 0.10.14      *
* Driver Version = 1.1.3    *
*****************************

With a connected a 1MOhm to input I have no trouble with the device.

Is this maybe a device issue?

Kind regards

Sven

Hi @sven - Sorry to hear that you had stability issues with the JS220 and Joulescope UI. Thank you for reporting this issue, which I have definitely not seen. The log snippet does seem to indicate the JS220 either reset on its own or was reset by the host.

The voltage input is extremely high impedance by design. It tends to drift towards the JS220’s power rails due to the opamp input bias current. This gives strange “noise” measurements when left open, but it should not cause the JS220 to reset.

What host OS are you using?

Would you mind trying your JS220 with the voltage open using the Joulescope UI 1.0.x alpha? Does the same error occur?

I’m using Linux 20.04 LTS. I also tried the alpha version 1.0.12. It makes no difference. The device seems to do an reset.
I also tried to install the newest ui and driver (git master) but I run into several issues. The driver installation fails. I installed it manually. But then the UI couldn’t be started with the following error:

Publish to unknown topic registry/style/settings/enable
*****************************
* Joulescope User Interface *
* UI Version = 1.0.14       *
*****************************

info = {
  "joulescope": {
    "ui_version": "1.0.14"
  },
  "platform": {
    "name": "linux",
    "python_version": "3.10.11 (main, Apr 21 2023, 10:03:19) [GCC 9.4.0]",
    "platform": "Linux-5.4.0-148-generic-x86_64-with-glibc2.31",
    "processor": "x86_64",
    "executable": "/home/sven/install/joulescope/pyjoulescope_ui2/.venv/bin/python3",
    "frozen": false
  }
}

=====
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: offscreen, wayland, linuxfb, vnc, eglfs, minimalegl, wayland-egl, minimal, xcb, vkkhrdisplay.

Abgebrochen (Speicherabzug geschrieben)

It’s the same behavior on Ubuntu 20.04 and 22.04

Thanks for trying this and for the additional detail. Thanks for creating issue #6.

I ran two different JS220’s with Joulescope UI 1.0.12 and Ubuntu 22.04 with all JS220 inputs unconnected. I waited for about 2 minutes for each, and no reset. Do you typically see the crash within two minutes?

I still don’t know why this would happen. I see no electrical (hardware) reason. I suppose some floating point error could happen. However, the JS220 sensor-side is all FPGA, which really doesn’t care. The microcontroller on the host controller side just passes the data without caring. So, I suppose it could be some unhandled math error on the host in either the voltage sample stream data or statistics data.

A few questions if you have time:

  1. What exactly is your workaround? 1 MΩ resistor between Voltage+ and Voltage-?

  2. What if you just short Current+ and Voltage+? Do you still need the 1 MΩ between Voltage+ and Voltage-?

  3. Without the 1MΩ resistor and with Joulescope UI 1.0.12, if you disable all streaming inputs, do you still see the crash? You can use the multimeter view.


    If so, that isolates the problem to the device or host-side statistics math.

  4. You wouldn’t happen to have access to a Microsoft Windows machine, would you? I would be interested to know if you see the same behavior on Windows with Joulescope UI 1.0.12 alpha.

Thanks!

I got the current version to work. Due to some reason the library ‘libxcb-cursor0’ was missing. These posts were very helpful. You can start the application with QT_DEBUG_PLUGINS=1. After installing the library the newest version starts. (It is very strange. Yesterday I created a VM with fresh installation of Ubuntu 22.04 and compiled pyjoulescope_ui one the same way and it started even the library wasn’t installed.)

I did some more research on this issue and I think I got it. It is definitely device related. It only happens when V+ and C+ is connected. Then the voltage rises slowly to the maximum. Then it crashes very reliable (on my USB hub) even if there is no streaming at all. I made some videos.

I figured out, that it correlates to the power supply. The voltage of my USB hub drops down to 4.7V if I connect the joulescope. Then I connected the joulescope through an adapter and provided the joulescopes power from my bench PSU. For voltages greater than 4.78V everything works fine. Below this voltage the strange behavior comes up. I guess that internally the current consumption is slightly higher if the measured voltage is on the limit. Then it crashes.

4.75 is within the specification and it isn’t something unusual in the world of USB. It would be nice that the device monitors the USB power and gives a warning to the user that the USB power supply is insufficient. The current behavior is very annoying.

Hi @satirebird - Thanks for your time in tracking down these issues, and it sounds like you made great progress! Very interesting about the missing libxcb-cursor0 library, and hopefully that will help out someone here in the future.

Thank you for the videos. They definitely show the JS220 rebooting, which should not happen under normal operation.

I confirm that the Joulescope JS220’s ±15V voltage front-end draws a lot of power pretty much all the time, but especially when the V+ and V- signals are at opposite rails. The Joulescope JS220 generates the isolated sensor side power through a boost converter and transformer, so efficiency is not great either. The JS220 contains an internal current limiter to protect both the JS220 and the host. I am fairly confident that this is tripping which causes the reset you observe.

The JS220 does have the hardware connected to monitor the USB VBUS, but it is not yet supported in firmware or the host software. It is on our todo list, and will actually be possible once we launch Joulescope UI 1.0.

I could not see the USB connection topology in your videos. We recommend connecting the Joulescope JS220 directly to a USB port on the host computer, with no USB Hubs or Docks. In addition to power issues, we have many field reports of USB hubs, even some name-brand ones, causing data communication errors.

Do note that the USB specification for the voltage at the host or powered hub is 5V ± 5% => 4.75 to 5.25V. Your USB hub voltage is definitely marginal. Your particular Joulescope either has slightly higher power consumption or slightly lower current threshold (both are possible), which makes it marginal, too.

The Joulescope JS110 and JS220 are NOT compatible with unpowered hubs which somehow only need to provide a minimum supply voltage of 4.4V.

First of all, thank you very much for the great support.

The USB hub is external powered from the 5V supply of the desktop computer. This shouldn’t be a problem. But the cables and the connectors seems to be problematic. I’m going to fix this.

1 Like