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
| Type | Name | Default | Description |
|---|---|---|---|
| RPi_Pico | pico | no USB cable: supplied through VSYS | |
| Modelica.Electrical.Analog.Basic.Ground | ground | ||
| Modelica.Electrical.Analog.Sources.ConstantVoltage | cells | two AA cells in series | |
| Modelica.Electrical.Analog.Basic.Resistor | rInternal | internal resistance of the cells | |
| Modelica.Electrical.Analog.Sensors.CurrentSensor | iBattery | current delivered by the battery | |
| Modelica.Electrical.Analog.Basic.Resistor | r15 | limits the current of led15 | |
| MicroPythonMCU.Peripherals.LED | led15 | GP15 (physical pin 20) |