This commit is contained in:
cpu
2025-09-27 14:36:02 +02:00
parent f7c19cfa8d
commit dbbbf5b08c
9 changed files with 28 additions and 539 deletions

View File

@@ -2,8 +2,8 @@
#pragma experiment("MODULE_TEMPLATING")
import ElectricPower
import Resistor
import Pad
from "parts/UNI_ROYAL_0805W8F1001T5E/UNI_ROYAL_0805W8F1001T5E.ato" import UNI_ROYAL_0805W8F1001T5E_package
from "atopile/mounting-holes/MountingHole.py" import MountingHole
from "parts/PANASONIC_EEEFK1A471AP/PANASONIC_EEEFK1A471AP.ato" import PANASONIC_EEEFK1A471AP_package
from "parts/hongjiacheng_M1/hongjiacheng_M1.ato" import hongjiacheng_M1_package
@@ -22,7 +22,7 @@ from "parts/SOFNG_PJ_320B/SOFNG_PJ_320B.ato" import SOFNG_PJ_320B_package
# Component for the SMD 3.5mm Audio Jack
component AudioJack3_5mm from SOFNG_PJ_320B_package:
footprint = "Jack_3.5mm:Jack_3.5mm_PJ320B_Horizontal"
# lcsc = "C22355831"
lcsc_id = "C22355831"
signal TIP ~ pin 1 # Left Channel
signal RING ~ pin 2 # Right Channel
signal SLEEVE ~ pin 3 # Ground
@@ -30,14 +30,14 @@ component AudioJack3_5mm from SOFNG_PJ_320B_package:
# Component for JST PH series vertical connectors
component JST_PH_Vertical_2Pin from JST_Sales_America_B2B_PH_SM4_TBT_LF__SN_package:
footprint = "JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal"
# lcsc = "C265003"
lcsc_id = "C265003"
signal SPK_1 ~ pin 1
signal SPK_2 ~ pin 2
# Component for JST PH series vertical connectors
component JST_PH_Vertical_4Pin from JST_Sales_America_B4B_PH_SM4_TB_LF__SN_package:
footprint = "JST_PH_S4B-PH-K_1x04_P2.00mm_Horizontal"
# lcsc = "C160354"
lcsc_id = "C160354"
signal VCC ~ pin 1
signal GND ~ pin 2
signal RX ~ pin 3
@@ -46,6 +46,7 @@ component JST_PH_Vertical_4Pin from JST_Sales_America_B4B_PH_SM4_TB_LF__SN_packa
# Components for the SMD 1x8 pin sockets for the DFPlayer
component DFPlayer_Socket_Left from hanxia_HX_PM2_54_1x8P_TP_H8_5_YQ_package:
footprint = "Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Left"
lcsc_id = "C46635844"
signal VCC ~ pin 1
signal RX ~ pin 2
signal TX ~ pin 3
@@ -57,6 +58,7 @@ component DFPlayer_Socket_Left from hanxia_HX_PM2_54_1x8P_TP_H8_5_YQ_package:
component DFPlayer_Socket_Right from hanxia_HX_PM2_54_1x8P_TP_H8_5_YQ_package:
footprint = "Connector_PinSocket_2.54mm/PinSocket_1x08_P2.54mm_Vertical_SMD_Pin1Left"
lcsc_id = "C46635844"
signal IO_1 ~ pin 1
signal GND ~ pin 2
signal IO_2 ~ pin 3
@@ -68,13 +70,18 @@ component DFPlayer_Socket_Right from hanxia_HX_PM2_54_1x8P_TP_H8_5_YQ_package:
component SOD123_Diode from hongjiacheng_M1_package:
footprint = "Diode_SMD:D_SOD-123"
# lcsc = "C18199093"
lcsc_id = "C18199093"
component Elec_Cap_6_3x5_4 from PANASONIC_EEEFK1A471AP_package:
footprint = "Capacitor_SMD:CP_Elec_6.3x5.4"
lcsc_id = "C178529"
signal plus ~ pin 1 # positive terminal
signal minus ~ pin 2 # negative terminal
component Resistor_SMD from UNI_ROYAL_0805W8F1001T5E_package:
footprint = "Resistor_SMD:R_0805_2012Metric"
lcsc_id = "C17513"
module DFPlayerCarrierBoard:
# --- Signals and Power rails ---
power_5v = new ElectricPower
@@ -91,23 +98,17 @@ module DFPlayerCarrierBoard:
df_header_left = new DFPlayer_Socket_Left
df_header_right = new DFPlayer_Socket_Right
# Power Supply Components
# Diode for dropout protection (cathode to VCC)
power_protection_diode = new hongjiacheng_M1_package
# power_protection_diode.lcsc = "C18199093"
# Capacitor for power filtering (electrolytic, 470uF, 10V)
power_filter_cap = new Elec_Cap_6_3x5_4
power_filter_cap.capacitance = 470uF +/- 20%
power_filter_cap.voltage = 10V
# power_filter_cap.lcsc = "C178529"
# Input Connector (Power and UART)
uart_connector = new JST_PH_Vertical_4Pin
# 1k Ohm series resistor for the DFPlayer's RX line for 5V tolerance.
rx_protection_resistor = new Resistor
rx_protection_resistor.resistance = 1kohm +/- 5%
rx_protection_resistor.package = "0805"
# rx_protection_resistor.lcsc = "C17513"
rx_protection_resistor = new Resistor_SMD
# Output Connectors
speaker_connector = new JST_PH_Vertical_2Pin
@@ -143,9 +144,8 @@ module DFPlayerCarrierBoard:
power_5v.gnd ~ df_header_left.GND
# 3. UART Serial Connection
uart_connector.RX ~> rx_protection_resistor ~> df_header_left.RX # Connect UART RX to resistor input
uart_connector.RX ~ rx_protection_resistor.1; rx_protection_resistor.2 ~ df_header_left.RX # Connect UART RX through resistor
uart_connector.TX ~ df_header_left.TX # TX (direct connection)
# 4. Speaker Output Connection
speaker_connector.SPK_1 ~ df_header_left.SPK_1
speaker_connector.SPK_2 ~ df_header_left.SPK_2