Read from USB (debug QI Charger odd influence on board behaviour)

  • Hi,

    I have my wipy3+pytrack build into a IP67 case and fitted it with QI wireless charger so I don't have to reopen de box every time I need to charge the battery.

    Since I have set this up, I noticed random shutdowns and reboots of the board. To be sure, I tested in parallel my code on a few boards with and without QI charger. The boards without show no problems.

    So: I'd like monitor what goes on with the USB, what is causing this behaviour? I read USB is UART0 which normally is REPL. Can I disable REPL temporary to be able to read what is going on?

    I was think about putting a config file on /sd and depending on the value of it, the REPL is activated, deactivated?

    I'm totally in the dark here, any tips or suggestions are welcome.

  • @fsergeys I'm not familiar with Qi chargers, but isn't there a chance the electromagnetic field generated when you transmit data may "trigger" the charger somehow? Since those chargers are designed to be inserted into phones it shouldn't be an issue, but you never know...

  • @jcaron
    The battery is Lipo - 3.7v 1300mAh
    The Qi receiver (connected to the micro USB) is a QProd 1000mha
    The transmitter is a CHOETECH PROMU Qi T511 Charger.

    I have the boards in machine.deepsleep when charging (I haven't tested the behaviour while charging)
    When in operations (not on the charger), this is where the odd behaviour happens. So that is the really funky part, because at that time, the Qi receiver is not supposed to be having any effect.

  • @fsergeys What's the full setup? Do you have a battery? Is the charger on a charging base?

    Have you checked that the supplied power is within specs, both in terms of voltage and available current? You may want to insert a USB power monitoring device between the charger and Pytrack to check.

    What's the charger model?

  • @jcaron
    Normally there should be no serial communication if you read the Qi specifications. Just charging the battery.
    My hypothesis is indeed that I will not "find" anything. But need to confirm that.
    What else could be causing the boards to randomly reboot or shutdown when the Qi chargers are plugged into the USB and not charging on the transmitter. If you have hypotheses I can test, I'd be glad with a few clues...
    I'm going to rerun my tests this afternoon with the boards yesterday connect to the Qi charger and today not connect to validate my findings that Qi charger plugged or unplugged does make a difference

  • @fsergeys What do you mean by "read"? Unless the charger emulates the host side of a serial connection compatible with the Pytrack and communicates on that, I don't think you'll be able to do much, or did I miss something?

  • @fsergeys

    If you modify your to have:

    import os

    The REPL will no longer run on UART 0, in order to recover from this you will need to use either safe boot or FTP

Pycom on Twitter