Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
5954b9f
Create Joystick_XboxElite2.kicad_mod
ducky64 Mar 23, 2025
8633835
Update Joystick_XboxElite2.kicad_mod
ducky64 Mar 23, 2025
a11c351
Create Joystick_Xbox.py
ducky64 Mar 23, 2025
6002ae1
magnetic sensors
ducky64 Mar 23, 2025
70c1c7f
Update Joystick_XboxElite2.kicad_mod
ducky64 Mar 24, 2025
7daa898
Create test_iot_blinds.py
ducky64 Mar 24, 2025
b25faf2
drv8870
ducky64 Mar 24, 2025
4f5e38e
progress
ducky64 Mar 25, 2025
404f0de
to building
ducky64 Mar 25, 2025
507e755
Update test_iot_blinds.py
ducky64 Mar 25, 2025
048c623
wip connector refactor
ducky64 Mar 29, 2025
6150443
picoblade
ducky64 Mar 29, 2025
69044d4
wip skeleton
ducky64 Mar 30, 2025
a8be3db
wip
ducky64 Mar 30, 2025
89d70d8
board outline
ducky64 Mar 30, 2025
cc74efb
Update IotCurtainRoller.kicad_pcb
ducky64 Mar 30, 2025
b6c1848
better outlines
ducky64 Mar 30, 2025
1dda6a7
Merge branch 'master' into funparts
ducky64 Apr 8, 2025
9350349
Update MotorDriver_Drv8870.py
ducky64 Apr 8, 2025
755af3f
Merge branch 'master' into funparts
ducky64 Apr 13, 2025
f5432ea
import nano2 fuseholder
ducky64 Apr 20, 2025
e54ec23
to erc clean
ducky64 Apr 20, 2025
c679c3d
netlists checkpoint
ducky64 Apr 20, 2025
1b0a85b
checkpoint actually
ducky64 Apr 20, 2025
94ecca0
less plumbing
ducky64 Apr 20, 2025
d1396ce
beginnings
ducky64 Apr 20, 2025
97d5439
coarse placement
ducky64 Apr 20, 2025
f2eae3b
wip
ducky64 Apr 20, 2025
26e8a4a
productionization
ducky64 Apr 21, 2025
098c15c
Update IotRollerBlinds.kicad_pcb
ducky64 Apr 21, 2025
1bf7862
wip
ducky64 Apr 21, 2025
cf143cd
Update IotCurtainRoller.kicad_pcb
ducky64 Apr 21, 2025
b479adc
wip
ducky64 Apr 21, 2025
d2279a3
wip led driver + polish on rest
ducky64 Apr 21, 2025
5f0daa4
Revert "wip led driver + polish on rest"
ducky64 Apr 21, 2025
5d38b4f
rebaseline netlists
ducky64 Apr 21, 2025
8a5de6b
wip ble joystick
ducky64 Apr 21, 2025
6dfeee1
ble joystick beginnings + erc clean
ducky64 Apr 21, 2025
d44c830
joystick powerpath
ducky64 Apr 21, 2025
66a96c8
layout blocks
ducky64 Apr 21, 2025
412b0f8
Update BleJoystick.kicad_pcb
ducky64 Apr 21, 2025
4088d81
floorplanning rough
ducky64 Apr 22, 2025
5381a71
to no more uncs
ducky64 Apr 22, 2025
f262756
Update BleJoystick.kicad_pcb
ducky64 Apr 22, 2025
c4394e2
Update BleJoystick.kicad_pro
ducky64 Apr 22, 2025
e6280af
rebaseline netlists
ducky64 Apr 23, 2025
ce8c508
obdapter beginnings
ducky64 Apr 23, 2025
e4a1a93
obdapter wip
ducky64 Apr 23, 2025
b185c79
Update CanAdapter.kicad_pcb
ducky64 Apr 23, 2025
00a6eb9
checkpoint
ducky64 Apr 23, 2025
c05b6b4
wip smaller inductor
ducky64 Apr 23, 2025
f295bd8
done!
ducky64 Apr 23, 2025
885f543
final fabrication data
ducky64 Apr 23, 2025
2c55f20
24v devices + fixes
ducky64 Apr 23, 2025
f337ed9
wip
ducky64 Apr 30, 2025
735f274
tps92200 led driver
ducky64 May 1, 2025
d070d6a
wip bulk placement
ducky64 May 1, 2025
540e901
not quite line-to-line
ducky64 May 1, 2025
3afcbeb
led driver concepts
ducky64 May 1, 2025
1bce936
wip
ducky64 May 1, 2025
635596b
54202 wip
ducky64 May 2, 2025
2bf227a
wip
ducky64 May 2, 2025
7cf407f
concept
ducky64 May 2, 2025
5590310
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
3429044
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
539f22d
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
b3069d9
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
5923a80
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
49b0a52
Update IotLedDriver.kicad_pcb
ducky64 May 3, 2025
ce95b4b
wip layout
ducky64 May 20, 2025
602786a
wip
ducky64 May 20, 2025
583347d
continued compactification
ducky64 May 20, 2025
cdf02af
wip
ducky64 May 21, 2025
642162c
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
50d7ca4
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
3e244b5
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
26931c3
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
79c0a8b
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
8292693
Update IotLedDriver.kicad_pcb
ducky64 May 21, 2025
a0349e2
wip
ducky64 May 22, 2025
94e3ab5
Update IotLedDriver.kicad_pcb
ducky64 May 22, 2025
12c366f
breakout routing
ducky64 May 23, 2025
8cf268a
Update IotLedDriver.kicad_pcb
ducky64 May 23, 2025
c88e042
Update IotLedDriver.kicad_pcb
ducky64 May 23, 2025
54a6005
Update IotLedDriver.kicad_pcb
ducky64 May 23, 2025
d7ed061
Update IotLedDriver.kicad_pcb
ducky64 May 24, 2025
ad714d3
Update IotLedDriver.kicad_pcb
ducky64 May 24, 2025
26b5a4b
netlist complete
ducky64 May 24, 2025
1f9da20
pin assigns
ducky64 May 24, 2025
927f52a
Update IotLedDriver.kicad_pcb
ducky64 May 24, 2025
cf58ce8
wip
ducky64 May 24, 2025
e020572
refdes place
ducky64 May 25, 2025
aaf0c6f
almost done?
ducky64 May 25, 2025
922e07c
layout done and drc clean-enough
ducky64 May 29, 2025
5ba2b33
merge
ducky64 Jun 17, 2025
39c00a3
wip
ducky64 Jun 19, 2025
20a3fd8
Update test_iot_led_driver.py
ducky64 Jun 21, 2025
72d64c8
merge
ducky64 Jun 25, 2025
c74654f
new netlists
ducky64 Jun 25, 2025
3e5c598
rebaseline
ducky64 Jun 26, 2025
1571828
merge
ducky64 Jun 26, 2025
9959d6b
secondary inductor sort by DCR
ducky64 Jun 28, 2025
e7dc85f
renaming and pruning
ducky64 Jun 28, 2025
4ed6405
update boards
ducky64 Jun 28, 2025
aa07e29
led driver bucl layout wip
ducky64 Jun 29, 2025
842d90e
layout cleaning
ducky64 Jun 29, 2025
17218ce
led driver layout
ducky64 Jun 29, 2025
54f3827
Create MPS_QFN-22_2.5x3.5mm_P0.4mm.kicad_mod
ducky64 Jun 29, 2025
71a9027
mp2722 beginnings
ducky64 Jun 29, 2025
345c24a
initial mp2722 circuit
ducky64 Jun 30, 2025
82a76b1
Update BuckConverter_Mps.py
ducky64 Jun 30, 2025
3378866
wip integration, not quite
ducky64 Jun 30, 2025
079eebc
towards erc clean(er)
ducky64 Jun 30, 2025
465020f
wip
ducky64 Jun 30, 2025
834432a
wip initial placements
ducky64 Jun 30, 2025
3f67a20
Update BleJoystick.kicad_pcb
ducky64 Jun 30, 2025
1a0d89b
all clean
ducky64 Jun 30, 2025
66f817c
wip
ducky64 Jul 1, 2025
91f920f
BoM merge
ducky64 Jul 1, 2025
f269308
as ordered
ducky64 Jul 1, 2025
0f7e310
updated netlists
ducky64 Jul 2, 2025
a3d2b0d
Merge branch 'master' into funparts
ducky64 Jul 2, 2025
661b895
Update EspLora.net
ducky64 Jul 2, 2025
85bdfa4
fixes
ducky64 Jul 9, 2025
3383e0a
Update jlcpcb_pcba_postprocess.py
ducky64 Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions edg/BoardTop.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def refinements(self) -> Refinements:
(Fpc050Bottom, HiroseFh12sh),
(UsbEsdDiode, Tpd2e009),
(CanEsdDiode, Pesd1can),
(Fuse, Nano2Fuseholder),
(TestPoint, TeRc),

(SwdCortexTargetConnector, SwdCortexTargetHeader),
Expand Down Expand Up @@ -77,6 +78,7 @@ def refinements(self) -> Refinements:
(Resistor, JlcResistor),
(Capacitor, JlcCapacitor),
(Inductor, JlcInductor),
(AluminumCapacitor, JlcAluminumCapacitor),
(FerriteBead, JlcFerriteBead),
(PptcFuse, JlcPptcFuse),
(ResistorArray, JlcResistorArray),
Expand Down
68 changes: 37 additions & 31 deletions edg/abstract_parts/AbstractFuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,41 @@ def contents(self):
"operating voltage not within rating")


class SeriesPowerFuse(Protection):
"""Series fuse for power applications"""
FUSE_TYPE = Fuse

@init_in_parent
def __init__(self, trip_current: RangeLike) -> None:
super().__init__()

self.pwr_out = self.Port(VoltageSource.empty(), [Output]) # forward declaration
self.pwr_in = self.Port(VoltageSink.empty(), [Power, Input]) # forward declaration

self.fuse = self.Block(self.FUSE_TYPE(
trip_current=trip_current,
hold_current=(self.pwr_out.link().current_drawn.upper(), float('inf')),
voltage=self.pwr_in.link().voltage
))
self.connect(self.pwr_in, self.fuse.a.adapt_to(VoltageSink(
voltage_limits=self.fuse.actual_voltage_rating, # TODO: eventually needs a ground ref
current_draw=self.pwr_out.link().current_drawn
)))
self.connect(self.pwr_out, self.fuse.b.adapt_to(VoltageSource(
voltage_out=self.pwr_in.link().voltage, # ignore voltage drop
current_limits=(0, self.fuse.actual_hold_current.lower())
)))

def connected(self, pwr_in: Optional[Port[VoltageLink]] = None, pwr_out: Optional[Port[VoltageLink]] = None) -> \
'SeriesPowerFuse':
"""Convenience function to connect both ports, returning this object so it can still be given a name."""
if pwr_in is not None:
cast(Block, builder.get_enclosing_block()).connect(pwr_in, self.pwr_in)
if pwr_out is not None:
cast(Block, builder.get_enclosing_block()).connect(pwr_out, self.pwr_out)
return self


@abstract_block
class PptcFuse(Fuse):
"""PPTC self-resetting fuse"""
Expand Down Expand Up @@ -97,34 +132,5 @@ def _row_generate(self, row: PartsTableRow) -> None:
self.assign(self.actual_voltage_rating, row[self.VOLTAGE_RATING])


class SeriesPowerPptcFuse(Protection):
"""Series fuse for power applications"""
@init_in_parent
def __init__(self, trip_current: RangeLike) -> None:
super().__init__()

self.pwr_out = self.Port(VoltageSource.empty(), [Output]) # forward declaration
self.pwr_in = self.Port(VoltageSink.empty(), [Power, Input]) # forward declaration

self.fuse = self.Block(PptcFuse(
trip_current=trip_current,
hold_current=(self.pwr_out.link().current_drawn.upper(), float('inf')),
voltage=self.pwr_in.link().voltage
))
self.connect(self.pwr_in, self.fuse.a.adapt_to(VoltageSink(
voltage_limits=self.fuse.actual_voltage_rating, # TODO: eventually needs a ground ref
current_draw=self.pwr_out.link().current_drawn
)))
self.connect(self.pwr_out, self.fuse.b.adapt_to(VoltageSource(
voltage_out=self.pwr_in.link().voltage, # ignore voltage drop
current_limits=(0, self.fuse.actual_hold_current.lower())
)))

def connected(self, pwr_in: Optional[Port[VoltageLink]] = None, pwr_out: Optional[Port[VoltageLink]] = None) -> \
'SeriesPowerPptcFuse':
"""Convenience function to connect both ports, returning this object so it can still be given a name."""
if pwr_in is not None:
cast(Block, builder.get_enclosing_block()).connect(pwr_in, self.pwr_in)
if pwr_out is not None:
cast(Block, builder.get_enclosing_block()).connect(pwr_out, self.pwr_out)
return self
class SeriesPowerPptcFuse(SeriesPowerFuse):
FUSE_TYPE = PptcFuse
7 changes: 5 additions & 2 deletions edg/abstract_parts/AbstractInductor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, Optional, cast
from typing import Dict, Optional, cast, Any

from ..electronics_model import *
from .PartsTable import PartsTableColumn, PartsTableRow, ExperimentalUserFnPartsTable
Expand Down Expand Up @@ -143,7 +143,6 @@ def __init__(self, *args, **kwargs) -> None:
self.experimental_filter_fn)

def _row_filter(self, row: PartsTableRow) -> bool:
# TODO eliminate arbitrary DCR limit in favor of exposing max DCR to upper levels
filter_fn_str = self.get(self.experimental_filter_fn)
if filter_fn_str:
filter_fn = ExperimentalUserFnPartsTable.deserialize_fn(filter_fn_str)
Expand All @@ -164,6 +163,10 @@ def _row_generate(self, row: PartsTableRow) -> None:
self.assign(self.actual_frequency_rating, row[self.FREQUENCY_RATING])
self.assign(self.actual_resistance_dc, row[self.DC_RESISTANCE])

@classmethod
def _row_sort_by(cls, row: PartsTableRow) -> Any:
return row[cls.DC_RESISTANCE].center()


class SeriesPowerInductor(DiscreteApplication):
"""VoltageSource/Sink-typed series inductor for power filtering"""
Expand Down
14 changes: 13 additions & 1 deletion edg/abstract_parts/Categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,19 @@ class LightSensor(Sensor):


@abstract_block
class Magnetometer(Sensor):
class MagneticSensor(Sensor):
pass


@abstract_block
class MagneticSwitch(MagneticSensor):
"""A switch that is activated by a magnetic field, including omnipolar and bipolar devices."""
pass


@abstract_block
class Magnetometer(MagneticSensor):
"""Linear response magnetic field sensor, potentially with multiple axes"""
pass


Expand Down
36 changes: 36 additions & 0 deletions edg/abstract_parts/I2cBitBang.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from typing import cast

from ..electronics_model import *
from .Categories import *


class I2cControllerBitBang(BitBangAdapter, Block):
"""Bit-bang adapter for I2C controller"""
@staticmethod
def digital_external_from_link(link_port: DigitalBidir) -> DigitalBidir:
"""Creates a DigitalBidir model that is the external-facing port that exports from
an internal-facing (link-side) port. The internal-facing port should be ideal.
These are basically the semantics of a DigitalBidir bridge.
TODO: unify code w/ DigitalBidir bridge?"""
return DigitalBidir(
voltage_out=link_port.link().voltage, current_draw=link_port.link().current_drawn,
voltage_limits=link_port.link().voltage_limits, current_limits=link_port.link().current_limits,
output_thresholds=link_port.link().output_thresholds, input_thresholds=link_port.link().input_thresholds,
pulldown_capable=link_port.link().pulldown_capable, pullup_capable=link_port.link().pullup_capable
)

def __init__(self) -> None:
super().__init__()
self.i2c = self.Port(I2cController.empty(), [Output])
self.scl = self.Port(DigitalBidir.empty())
self.sda = self.Port(DigitalBidir.empty())

def contents(self) -> None:
super().contents()
self.connect(self.i2c.scl, self.scl)
self.connect(self.i2c.sda, self.sda)

def connected_from(self, scl: Port[DigitalLink], sda: Port[DigitalLink]) -> 'I2cControllerBitBang':
cast(Block, builder.get_enclosing_block()).connect(scl, self.scl)
cast(Block, builder.get_enclosing_block()).connect(sda, self.sda)
return self
7 changes: 4 additions & 3 deletions edg/abstract_parts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from .Categories import PowerConditioner, PowerSwitch, MotorDriver, BrushedMotorDriver, BldcDriver
from .Categories import PowerSource, Connector, ProgrammingConnector
from .Categories import HumanInterface, Display, Lcd, Oled, EInk, Light
from .Categories import Sensor, CurrentSensor, Accelerometer, Gyroscope, Magnetometer, DistanceSensor, Microphone, \
Camera, LightSensor
from .Categories import Sensor, CurrentSensor, Accelerometer, Gyroscope, MagneticSensor, MagneticSwitch, Magnetometer,\
DistanceSensor, Microphone, Camera, LightSensor
from .Categories import EnvironmentalSensor, TemperatureSensor, HumiditySensor, PressureSensor, GasSensor
from .Categories import Label, Testing, TypedJumper, TypedTestPoint, InternalSubcircuit, DeprecatedBlock, Mechanical
from .Categories import MultipackDevice
Expand Down Expand Up @@ -74,7 +74,7 @@
from .PowerCircuits import HalfBridge, FetHalfBridge, HalfBridgeIndependent, HalfBridgePwm, FetHalfBridgeIndependent,\
FetHalfBridgePwmReset
from .AbstractLedDriver import LedDriver, LedDriverPwm, LedDriverSwitchingConverter
from .AbstractFuse import Fuse, PptcFuse, FuseStandardFootprint, TableFuse, SeriesPowerPptcFuse
from .AbstractFuse import Fuse, SeriesPowerFuse, PptcFuse, FuseStandardFootprint, TableFuse, SeriesPowerPptcFuse
from .AbstractCrystal import Crystal, TableCrystal, OscillatorReference, CeramicResonator
from .AbstractOscillator import Oscillator, TableOscillator
from .AbstractDebugHeaders import SwdCortexTargetConnector, SwdCortexTargetConnectorReset, \
Expand All @@ -92,6 +92,7 @@
from .DigitalIsolator import DigitalIsolator
from .I2cPullup import I2cPullup
from .UsbBitBang import UsbBitBang
from .I2cBitBang import I2cControllerBitBang

from .IoController import BaseIoController, IoController, IoControllerPowerRequired, BaseIoControllerPinmapGenerator
from .IoControllerExportable import BaseIoControllerExportable
Expand Down
5 changes: 5 additions & 0 deletions edg/electronics_model/AnalogPort.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,19 @@ class AnalogSource(AnalogBase):
@staticmethod
def from_supply(neg: Port[GroundLink], pos: Port[VoltageLink], *,
signal_out_bound: Optional[Tuple[FloatLike, FloatLike]] = None,
signal_out_abs: Optional[RangeLike] = None,
current_limits: RangeLike = RangeExpr.ALL,
impedance: RangeLike = RangeExpr.ZERO):
supply_range = VoltageLink._supply_voltage_range(neg, pos)
if signal_out_bound is not None:
assert signal_out_abs is None
# signal limit bounds specified as (lower bound added to limit, upper bound added to limit)
# typically (positive, negative)
signal_out: RangeLike = (supply_range.lower() + signal_out_bound[0],
supply_range.upper() + signal_out_bound[1])
elif signal_out_abs is not None:
assert signal_out_bound is None
signal_out = signal_out_abs
else: # generic default
signal_out = supply_range

Expand Down
2 changes: 2 additions & 0 deletions edg/electronics_model/DigitalPorts.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ def __init__(self, voltage_out: RangeLike = RangeExpr.ZERO,

@staticmethod
def low_from_supply(neg: Port[GroundLink], *, current_limits: RangeLike = RangeExpr.ALL) -> DigitalSource:
"""Sink-only digital source, eg open-drain output"""
return DigitalSource(
voltage_out=neg.link().voltage,
current_limits=current_limits,
Expand All @@ -320,6 +321,7 @@ def low_from_supply(neg: Port[GroundLink], *, current_limits: RangeLike = RangeE

@staticmethod
def high_from_supply(pos: Port[VoltageLink], *, current_limits: RangeLike = RangeExpr.ALL) -> DigitalSource:
"""Source-only digital source"""
return DigitalSource(
voltage_out=pos.link().voltage,
current_limits=current_limits,
Expand Down
2 changes: 1 addition & 1 deletion edg/electronics_model/footprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def gen_block_comp(block_name: str) -> str:

def gen_block_value(block: NetBlock, refdes_mode: RefdesMode) -> str:
if refdes_mode == RefdesMode.PathnameAsValue:
if block.refdes.startswith('TP'): # test points keep their value
if 'TP' in block.refdes: # test points keep their value
return f'(value "{block.value}")'
else:
pathname = '.'.join(block.path)
Expand Down
4 changes: 2 additions & 2 deletions edg/jlcparts/JlcPartsBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def config_root_dir(root_dir: str):
CapacitorsMultilayer_Ceramic_Capacitors_MLCC___SMDakaSMT.json.gz
This setting is on a JlcPartsBase-wide basis."""
assert JlcPartsBase._config_parts_root_dir is None, \
f"attempted to reassign configure_root_dir, was {JlcPartsBase._config_parts_root_dir}, new {root_dir}"
f"attempted to reassign config_root_dir, was {JlcPartsBase._config_parts_root_dir}, new {root_dir}"
JlcPartsBase._config_parts_root_dir = root_dir

_JLC_PARTS_FILE_NAMES: ClassVar[List[str]] # set by subclass
Expand Down Expand Up @@ -165,7 +165,7 @@ def _parse_table(cls) -> PartsTable:

@classmethod
def _row_sort_by(cls, row: PartsTableRow) -> Any:
return [not row[cls.BASIC_PART_COL], cls._row_area(row), row[cls.COST_COL]]
return [not row[cls.BASIC_PART_COL], cls._row_area(row), super()._row_sort_by(row), row[cls.COST_COL]]

def _row_generate(self, row: PartsTableRow) -> None:
super()._row_generate(row)
Expand Down
2 changes: 1 addition & 1 deletion edg/jlcparts/JlcPartsInductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .JlcPartsBase import JlcPartsBase, JlcPartsAttributes


class JlcPartsInductor(TableInductor, PartsTableSelectorFootprint, JlcPartsBase):
class JlcPartsInductor(PartsTableSelectorFootprint, JlcPartsBase, TableInductor):
_JLC_PARTS_FILE_NAMES = [
"InductorsakaCoilsakaTransformersPower_Inductors",
"InductorsakaCoilsakaTransformersInductors__SMD_",
Expand Down
4 changes: 2 additions & 2 deletions edg/parts/BatteryCharger_Mcp73831.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, actual_charging_current: RangeLike) -> None:
self.stat = self.Port(DigitalSource.from_supply(
self.vss, self.vdd,
current_limits=(-25, 35)*mAmp
))
), optional=True)
self.vbat = self.Port(VoltageSource(
voltage_out=(4.168, 4.232)*Volt, # -2 variant
current_limits=self.actual_charging_current.hull(0 * Amp(tol=0))
Expand Down Expand Up @@ -54,7 +54,7 @@ def __init__(self, charging_current: RangeLike) -> None:
self.pwr_bat = self.Export(self.ic.vbat, [Output])
self.pwr = self.Export(self.ic.vdd, [Input, Power])
self.gnd = self.Export(self.ic.vss, [Common])
self.stat = self.Export(self.ic.stat) # hi-Z when not charging, low when charging, high when done
self.stat = self.Export(self.ic.stat, optional=True) # hi-Z when not charging, low when charging, high when done

self.charging_current = self.ArgParameter(charging_current)

Expand Down
Loading