Just so I can compare and try on my own rig, can you confirm the hardware setup and how you are measuring and supplying power. Secondly, could you repost your code please.
I will then put the code into my board and see what current I get. I’ll also try my original code later to see if it helps in any way, although I have remade the solder link so I can’t perform that test.
Interestingly I think I may be seeing the same as both of you! @mattb1969 - the code you've posted above doesn't actually use the LoRa sending; if I run a similar sketch just to check sleep power without using the LoRa radio then I get 15-20uA. However, as soon as I've used the LoRa radio I get ~300uA in sleep (like @LDBM)
I've tried all sorts to get the modem to completely power down / sleep and get all the pins back to their default states (having checked what the MKRWAN library does in begin) - but nothing seems to do the trick.
As I said in my own thread, even a brief power cycle (changing range on my multimeter) is enough to get the modem to power down completely; so I've ordered some logic level mosfets and have a little monostable multivibrator circuit here that I'm going to use to get the unit to power cycle itself after each transmission... Its a bit hacky and is adding to the component cost of the units I'm building, but its better than having to add a load more primary cells to get multi-year battery life.
I use a CurrentRanger to measure the current. Here Batt. connected to MKR's batt input. This morning it shows 600uA... yesterday 350uA , it makes no sense... :o (see image on previous post)
Note: I use a MKR Zero, that likely use different battery charging IC and LDO than other MKRs. Here, for the MKRZero:
batt management: MCP738312
voltage regulator: AP7215
Their combine quiescient (standby) current could lead to ~ 200uA, but the typical figure would rather be 60-100uA...
.... !!! I figured it out... That is crazy, or should I kick myself to not have try this before? I am now getting 65uA...
What was wrong?? well.. the MKR I have here was tested "bare" with no shield or daughter board, so it was sitting on insulating foam, it has been all along for other tests, no apparent issue. When I take the foam out, the sleep current drops to 65uA. There is some current drain through the foam... ... enough to draw an extra 400-500uA likely depending on ambient humidity (?) but not enough to compromise the operation of the board...