Core2 MBus Power Mode 5V Output AXP2101 / AXP192
-
Hi Guys
I have just received a new M5 Core2 with AXP2101 and have installed it in my setup, which has worked perfectly so far. In the setup (previously M5 Core2 with AXP192), I use the Mbus 5V output signal via step up to an external sensor and supply it with power. In the code I was able to supply the sensor with voltage or not with power.setBusPowerMode(). From other entries in the forum, I'm not sure whether this function is even intended for this, but it worked well in any case. I could only activate the sensor for the measurement to keep the power consumption low. With the new M5 Core2 model this no longer works and the sensor always has voltage. Is it because of the new AXP2101?
Is there a function how I can selectively activate or deactivate the Mbus 5V output?Thank you very much
Oli -
Hello @Olbi77
the function to use is called
M5.Power.setExtPower(true/false)
which controls BLDO2 / AXP_BoostEN.Note: turning off only seems to work when M5Core2 v1.1. is running from battery.
Thanks
Felix -
@felmue said in Core2 MBus Power Mode 5V Output AXP2101 / AXP192:
M5.Power.setExtPower(true/false)
Hi Felix
Thank you so much for your response and the help!
I tried to change the code (I use UI Flow 1 and MicroPython), unfortunatelly there always occur errors… Is there maybe a library missing?If I use the function: M5.Power.setExtPower(true/false) following error occurs:
Name ‘M5’ isn’t definedIf I use the function: power.setExtPower(true/false) following error occurs:
‘Axp2101’ object has no attribute ‘setExtPower’Thanks!
-
Hello @Olbi77
my previous post assumed you are using Arduino (and not UIFlow).
That said, I can confirm that in UIFlow1 setting the power mode doesn't work for M5Core2 v1.1. (I assume it has not been implemented yet.)
BTW: It works in UIFlow2.
Thanks
Felix -
Hello @Olbi77
if you want to stay with UIFlow1 you can use the following I2C blocks to turn external 5 V output on and off:
Thanks
Felix -
Thanks a lot! I think I will switch to Arduino at this point, it's probably more suitable for my application. I will give an update!
Cheers
-
@felmue said in Core2 MBus Power Mode 5V Output AXP2101 / AXP192:
BLDO2
Hi Felix,
It's me again, meanwhile we switched to Arduino but the function: M5.Power.setExtPower(true/false) causes still an error: 'class M5Core2' has no member named 'Power'
We just can't get this thing working on Core2 v1.1.
Cheers
Oli -
Hello @Olbi77
M5.Power.setExtPower(true/false)
is part ofM5Unified
library.BTW: I don't see it implemented in
M5Core2
library.Thanks
Felix -