Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pmos #327

Closed
wants to merge 9 commits into from
Closed

Pmos #327

wants to merge 9 commits into from

Conversation

Suke0811
Copy link
Collaborator

@Suke0811 Suke0811 commented Apr 1, 2024

  • Add: PMOS and PMOS reverse charger protection in the lib

  • Add: test_protected_charger

  • TODO: manufacture the charger


Q: For the LipoConnector, there is no current_draw value, which errors out self.vbatt.link().current_draw.upper()
So currently, using current_limit instead. Is this a general implementation?

max_vcharge_voltage = self.chg.link().voltage.upper()
max_vcharge_current = self.chg.link().current_drawn.upper()
max_vbatt_voltage = self.vbatt.link().voltage.upper()
max_vbatt_current = self.vbatt.link().current_limits.upper() # TODO: check if we should use current_limit or current_draw
# Create the PMOS transistors and resistors based on the provided schematic
self.mp1 = self.Block(Fet.PFet(
drain_voltage=(0, max_vcharge_voltage), drain_current=(0, max_vcharge_current),
gate_voltage=(- max_vbatt_voltage, max_vbatt_voltage),
rds_on=self.rds_on,
power=(0, max_vcharge_voltage * max_vcharge_current)
))
self.mp2 = self.Block(Fet.PFet(
drain_voltage=(0, max_vbatt_voltage), drain_current=(0, max_vbatt_current),
gate_voltage=(0, max_vcharge_voltage),
rds_on=self.rds_on,
power=(0, max_vbatt_voltage * max_vbatt_current)
))


related issues

#323

Suke0811 and others added 9 commits April 1, 2024 10:03
Note: adding it cause EDG compiling: generate netlist to get stuck
Note: adding it cause EDG compiling: generate netlist to get stuck
Fix: revert test_pcbbot changes
Fix: PMOS charger protection m1 being flipped
Add: PMOS on the power out. This does not save the board from people connecting the battery to this port accidentally. But protect reverse connection
@Suke0811 Suke0811 closed this Apr 1, 2024
@Suke0811 Suke0811 deleted the pmos branch April 1, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant