modelBattery

Raspberry Pi Pico supplied by two AA cells on VSYS: current drawn from the battery

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Without the USB cable (usbConnected = false), the Pico is supplied by two AA cells (3 V, 0.3 Ω) on VSYS; the regulator makes the 3.3 V rail from it (buck-boost: VSYS may be below 3.3 V). Expected result: the same blinking as Blink, the log prints VSYS ≈ 3 V. iBattery.i (also pico.iSys) is about 25 mA while the LED is off — RP2040 and flash, 20 mA under 3.3 V, divided by the efficiency (0.9) and by VSYS — and rises by about 6 mA while the LEDs (on-board and GP15, lit together) are on: the current of the pins is drawn from the 3.3 V rail.

Components

TypeNameDefaultDescription
RPi_Picopicono USB cable: supplied through VSYS
Modelica.Electrical.Analog.Basic.Groundground
Modelica.Electrical.Analog.Sources.ConstantVoltagecellstwo AA cells in series
Modelica.Electrical.Analog.Basic.ResistorrInternalinternal resistance of the cells
Modelica.Electrical.Analog.Sensors.CurrentSensoriBatterycurrent delivered by the battery
Modelica.Electrical.Analog.Basic.Resistorr15limits the current of led15
MicroPythonMCU.Peripherals.LEDled15GP15 (physical pin 20)