Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    How to measure the current when Fipy + pysense working?

    Scheduled Pinned Locked Moved Guides
    ello
    6 Posts 3 Posters 623 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      Bismarck501
      last edited by Bismarck501

      Hello, I am working on building a LoRa-based IoT system by using a node composed by FiPy + pysense. I have successfully connect this node to TTN. So now I want to measure the power consumption when the node working via measuring the current. But I have no idea how to do this.
      There are two problems:

      1. I use USB cable to upload programs (by Atom) and supply voltage rather than external battery. I can only run the program by button in Atom. But when I use external battery to supply power. How to run the program which has been uploaded in the FiPy without Atom?

      2. The second one is that how to measure current when Fipy + pysense working?

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Bismarck501
        last edited by

        @bismarck501 There are low cost (low precision) USB power meters which you can insert into the USB cable, for instance this one: https://de.aliexpress.com/item/RD-UM34-UM34C-f-r-APP-USB-3-0-Typ-C-DC-Voltmeter-amperemeter-spannung-strom/32880908871.html?spm=a2g0x.search0604.3.15.1df826c79yO79Y&s=p&ws_ab_test=searchweb0_0%2Csearchweb201602_2_10320_10065_10068_10547_319_317_10548_10696_453_10084_454_10083_433_10618_431_10304_10307_10820_10821_537_10302_536_10902_10843_10059_10884_10887_10319_321_322_10103%2Csearchweb201603_45%2CppcSwitch_0&algo_pvid=96ee37b7-9c9a-4fcb-b034-bb2e6b672244&algo_expid=96ee37b7-9c9a-4fcb-b034-bb2e6b672244-1
        But there are gazillion of the like. They do not tell you low current values. The one above has a lowest reading of 1 mA.
        You can also take a USB cable, split the 5V wire (red) and insert a DMM for current measurement. And there is professional equipment for that purpose, at a price tag of several 100 €.

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          Bismarck501 @robert-hh
          last edited by

          @robert-hh Thanks for your response! Actually I can try to use some devices in university lab to measure in high precision. The problem is:
          I program the FiPy to send message to TTN and upload the file to FiPy. Then only after I click "run" button in Atom window can the whole program run and work. That means I must use a computer with Atom to run FiPy.
          0_1548958833992_1.png
          If I use an external power supply, my FiPy module seems work because the blue LED lights. However, there is no data transmitted to TTN.

          robert-hhR C 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Bismarck501
            last edited by

            @bismarck501 No. It looks as if you did not permanently upload the scripts to the device. So Atom does a little bit of bug hiding. Try to upload your files with ftp and start them form the REPL command line.

            1 Reply Last reply Reply Quote 0
            • C Offline
              crumble @Bismarck501
              last edited by

              ensure that your code is called in main.py If always use the run part, it seems that you never call you code in the boot process.

              Otherwise welcome in the wonderful world of debugging.
              Sadly you have only 3 ways:

              • use print to see the actual position and status. You can see this in a REPL via a telnet over WiFi as well. Use a long utime.sleep as first statement, so you can connect
              • Write to a file instead to print your messages
              • Play around with the LED colours to find the problem, if print and writes are too slow.
              B 1 Reply Last reply Reply Quote 0
              • B Offline
                Bismarck501 @crumble
                last edited by

                @crumble
                Very useful information! I have found the cause of the problem that I changed the file name as "mainA.py" to distinguish different code. Now, I corrected and the system worked. Thanks a lot!

                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom