gPY ADC consumes 50mA current??
[link text](link url)Re: Pycom Gpy ADC pins consumes 250mA ???
I am still concerned about Pycom GPY ADC power consumption. Even after deint LTE, BLUETOOTH AND WIFI. It consumes about 50mA of current with just ADC. ps- I have to initialize the LTE,Bluetooth and wifi every-time when the chip starts and then de intialize it as I belive that is how it works.---Correct me if I am wrong.
Please help me how can I reduce the current to uA when I just doing ADC.
Below is my simple code:-
from network import LTE
from network import WLAN
from network import Bluetooth
bluetooth = Bluetooth()
wlan = WLAN(mode=WLAN.STA)
lte = LTE()
for w in range(0,100000):#-------------------------------Just reading Pressure start
adc = machine.ADC() # create an ADC object apin = adc.channel(pin='P16') # create an analog pin on P16 val = apin() value = (val/34) print(value)#-------------------------------------Just reading Pressure stops
@tanmay07 Got it thanks a ton!
I was also looking for another scenario where I do not have to use this. Suppose I configure my device to be on a deepsleep it consumes about 25uA current. But I want it to wake up on certain levels of voltage from my sensors on analog pins. Is it possible to do this using:-
machine.pin_deepsleep_wakeup(pins, mode, enable_pull)
?? Because I believe this function can only wakeup the decice from deep sleep if the specidied pins goes high or low.This can be used for specific voltage levels on analog pins right?
jmarcelino last edited by
No nothing yet, that is a very advanced and specialised topic. The example I linked to is the best help.
Is there any link or video which could explain how to program Pycom chips or ESP32 with ULP ???
jmarcelino last edited by jmarcelino
You can use Atom as a source code editor for sure, but to compile it you'll need the ULP toolchain. See the link I posted below.
You'll also need to integrate it with the MicroPython source at https://github.com/pycom/pycom-micropython-sigfox, compile that as well and flash the result onto the board, it's not just like Python where you can upload code from Pymakr.
There is also some ULP ADC example code at https://github.com/espressif/esp-idf/tree/master/examples/system/ulp_adc
You will still need to integrate it, can't use that example directly with MicroPython
ng ULP as
Can I compile this ULP program into the Gpy chip through ATOM?
jmarcelino last edited by
Yes 50mA is a typical current when the just the processor is running (without WiFi, etc.)
If you need μA level you'll have to code for the ULP, but that's only possible in C calling ULP assembler functions and requires source customisations