kicad:EasyEDA→KiCad 工程(Board1/Board2)、库、脚本与评审文档(IC 引脚、风扇、热、EDL 供电、布局规则)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
这个提交包含在:
@@ -0,0 +1,35 @@
|
||||
Draft only; not sent.
|
||||
|
||||
Subject: Electrical interface and startup data for SANYO DENKI 9G0612P4S001
|
||||
|
||||
We are evaluating two 9G0612P4S001 fans in a 12V system (10.8 to 13.2V
|
||||
system supply). Please provide specifications explicitly applicable to
|
||||
this complete part number, including temperature and voltage conditions:
|
||||
|
||||
1. PWM input: recommended frequency range, VIH/VIL, absolute maximum
|
||||
voltage, open-circuit voltage, maximum source current, input leakage
|
||||
and behavior when the fan is unpowered. Can two inputs share one
|
||||
open-drain driver? Is 0% duty guaranteed to keep running?
|
||||
2. Pulse sensor: output topology, pulses per revolution, maximum pull-up
|
||||
voltage, sink current, guaranteed VOL, off-state leakage, rise/fall
|
||||
times, and output behavior during power-up, power-down and rotor lock.
|
||||
3. Supply: maximum operating current (not nominal rated current), startup
|
||||
peak current and duration, input capacitance/inrush, locked-rotor
|
||||
current and automatic restart pulse/retry timing, and minimum off-time
|
||||
before restart. Please include worst cases over the operating range.
|
||||
4. Are the published general PWM/pulse-sensor example limits guaranteed
|
||||
for 9G0612P4S001? If so, please identify the governing document/revision.
|
||||
5. Please supply recommended branch protection, permissible supply ramp,
|
||||
signal connection order, and any restrictions on live connection.
|
||||
|
||||
Current interface for review:
|
||||
- Fan power switched by a common high-side MOSFET; fan grounds stay fixed.
|
||||
- PWM: shared open-drain NMOS, nominal 25kHz.
|
||||
- Each yellow sensor wire: 10k pull-up to switched fan power; 15k series
|
||||
to an NMOS gate, 10k gate-to-ground. The NMOS drain has a separate
|
||||
10k pull-up to 3.3V and drives its own MCU input.
|
||||
- Red=power, black=ground, yellow=pulse sensor, brown=PWM.
|
||||
|
||||
Please identify any interface restrictions that make this circuit
|
||||
incompatible. We have not treated the family example limits or the
|
||||
0.67A rated current as guaranteed model-specific worst-case values.
|
||||
@@ -0,0 +1,79 @@
|
||||
--- a/firmware/main/board_pins.h
|
||||
+++ b/firmware/main/board_pins.h
|
||||
@@ -22,8 +22,11 @@
|
||||
|
||||
#define BOARD_PIN_I2C_SDA 14 /* 模组脚 22 —— 6×INA226 + 2×DAC + PCA9555(+ 载板 LM75) */
|
||||
#define BOARD_PIN_I2C_SCL 15 /* 模组脚 8 */
|
||||
-#define BOARD_PIN_FAN_TACH 16 /* 模组脚 9 → R731/R732 分压 */
|
||||
-#define BOARD_PIN_FAN_PWM 18 /* 模组脚 11 → R733 */
|
||||
+/* KiCad FAN-R2: common power enable, inverted open-drain PWM, two receivers. */
|
||||
+#define BOARD_PIN_FAN_EN 5 /* Module pin 5 -> R742/Q8; active high */
|
||||
+#define BOARD_PIN_FAN_TACH_IN 16 /* Module pin 9 -> Q9; intake */
|
||||
+#define BOARD_PIN_FAN_TACH_OUT 4 /* Module pin 4 -> Q10; exhaust */
|
||||
+#define BOARD_PIN_FAN_PWM 18 /* Module pin 11 -> R733/Q6; GPIO duty = 1 - fan duty */
|
||||
#define BOARD_PIN_UP_VBUS_DET 47 /* 模组脚 24 → J24.25,上游 VBUS 有没有插 */
|
||||
#define BOARD_PIN_NTC1 1 /* 模组脚 39,ADC1_CH0 —— 必须是 IO1~IO10 */
|
||||
#define BOARD_PIN_NTC2 2 /* 模组脚 38,ADC1_CH1 */
|
||||
--- a/firmware/main/rail_cfg.c
|
||||
+++ b/firmware/main/rail_cfg.c
|
||||
@@ -107,7 +107,7 @@
|
||||
static bool pins_ok(const rail_cfg_t *t)
|
||||
{
|
||||
/* 全板用掉的每一个脚。顺序无所谓,这里只查「都能用」和「不重复」。 */
|
||||
- int used[2 * PHONERAIL_RAIL_COUNT + 14];
|
||||
+ int used[2 * PHONERAIL_RAIL_COUNT + 16];
|
||||
size_t n = 0;
|
||||
|
||||
for (int rail = 1; rail <= PHONERAIL_RAIL_COUNT; rail++) {
|
||||
@@ -116,7 +116,9 @@
|
||||
}
|
||||
used[n++] = BOARD_PIN_I2C_SDA;
|
||||
used[n++] = BOARD_PIN_I2C_SCL;
|
||||
- used[n++] = BOARD_PIN_FAN_TACH;
|
||||
+ used[n++] = BOARD_PIN_FAN_EN;
|
||||
+ used[n++] = BOARD_PIN_FAN_TACH_IN;
|
||||
+ used[n++] = BOARD_PIN_FAN_TACH_OUT;
|
||||
used[n++] = BOARD_PIN_FAN_PWM;
|
||||
used[n++] = BOARD_PIN_UP_VBUS_DET;
|
||||
used[n++] = BOARD_PIN_NTC1;
|
||||
--- a/firmware/test/test_rail_cfg.c
|
||||
+++ b/firmware/test/test_rail_cfg.c
|
||||
@@ -136,6 +136,20 @@
|
||||
TEST_ASSERT_EQUAL_HEX32(RAIL_SELFTEST_PINS, rail_selftest_table(t));
|
||||
}
|
||||
|
||||
+static void test_each_fan_pin_collision_is_caught(void)
|
||||
+{
|
||||
+ const int fan_pins[] = {
|
||||
+ BOARD_PIN_FAN_EN, BOARD_PIN_FAN_PWM,
|
||||
+ BOARD_PIN_FAN_TACH_IN, BOARD_PIN_FAN_TACH_OUT,
|
||||
+ };
|
||||
+ rail_cfg_t t[N];
|
||||
+ for (unsigned i = 0; i < sizeof(fan_pins) / sizeof(fan_pins[0]); i++) {
|
||||
+ copy_real_table(t);
|
||||
+ t[0].efuse_en = fan_pins[i];
|
||||
+ TEST_ASSERT_EQUAL_HEX32(RAIL_SELFTEST_PINS, rail_selftest_table(t));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* 两样一起坏,两位一起报 —— 别在第一个错上就 return。 */
|
||||
static void test_two_kinds_of_breakage_report_two_bits(void)
|
||||
{
|
||||
@@ -378,7 +392,8 @@
|
||||
static const int strapping[] = BOARD_PINS_STRAPPING;
|
||||
static const int reserved[] = BOARD_PINS_RESERVED;
|
||||
static const int others[] = {
|
||||
- BOARD_PIN_I2C_SDA, BOARD_PIN_I2C_SCL, BOARD_PIN_FAN_TACH, BOARD_PIN_FAN_PWM,
|
||||
+ BOARD_PIN_I2C_SDA, BOARD_PIN_I2C_SCL, BOARD_PIN_FAN_TACH_IN, BOARD_PIN_FAN_PWM,
|
||||
+ BOARD_PIN_FAN_EN, BOARD_PIN_FAN_TACH_OUT,
|
||||
BOARD_PIN_NTC1, BOARD_PIN_NTC2, BOARD_PIN_USB_DM, BOARD_PIN_USB_DP,
|
||||
BOARD_PIN_UP_VBUS_DET, SR595_PIN_SER, SR595_PIN_SRCLK, SR595_PIN_RCLK,
|
||||
SR595_PIN_OE_N, PCA9555_PIN_INT_N,
|
||||
@@ -583,6 +598,7 @@
|
||||
RUN_TEST(test_a_faithful_copy_of_the_real_table_passes);
|
||||
RUN_TEST(test_a_cell_that_drifted_from_the_driver_is_caught);
|
||||
RUN_TEST(test_every_kind_of_bad_pin_is_caught);
|
||||
+ RUN_TEST(test_each_fan_pin_collision_is_caught);
|
||||
RUN_TEST(test_two_kinds_of_breakage_report_two_bits);
|
||||
RUN_TEST(test_no_two_rails_share_anything);
|
||||
RUN_TEST(test_shift_chain_bits_avoid_hub_reset_and_the_unused_pins);
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"source": "D:\\DCDC\\firmware",
|
||||
"candidate": "D:\\DCDC\\kicad\\out\\firmware-fan-r2",
|
||||
"files": [
|
||||
{
|
||||
"path": "main/board_pins.h",
|
||||
"source_sha256": "bea092ed746c1415ac1e4e6df5978c1de2c7b763ae914936a9f3755d12afef17",
|
||||
"candidate_sha256": "7bc45527503b595587be851e70630ee8192c833d1a87cbcd98d0ba0dc45e6325"
|
||||
},
|
||||
{
|
||||
"path": "main/rail_cfg.c",
|
||||
"source_sha256": "772956bfbf519de07350556073f8363174c75363108a9e5868f5a490ca471871",
|
||||
"candidate_sha256": "70ec0330c3973c098612bdbc100d108838b12e921b953fd1a3e408ce40f3363e"
|
||||
},
|
||||
{
|
||||
"path": "test/test_rail_cfg.c",
|
||||
"source_sha256": "175f6721ec58e3e00575aebe136cfc32ba2006455621110aedef6d1b20da5cb6",
|
||||
"candidate_sha256": "aa1560ed8b60935dc4e670b5f18f5e3322b9d0af693163070bc6280195b17ea1"
|
||||
}
|
||||
]
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户