diff --git a/docs/guides/importing-modules-and-chips/using-micromod-m2-connectors.md b/docs/guides/importing-modules-and-chips/using-micromod-m2-connectors.md new file mode 100644 index 00000000..04117056 --- /dev/null +++ b/docs/guides/importing-modules-and-chips/using-micromod-m2-connectors.md @@ -0,0 +1,194 @@ +--- +title: Using MicroMod M.2 Connectors +sidebar_position: 5 +description: Model SparkFun MicroMod M.2 connectors in tscircuit with an imported footprint and named ports. +--- + +SparkFun MicroMod processor boards plug into carrier boards through a keyed +M.2 edge connector. In tscircuit, model the connector as a reusable +`` wrapper: import or define the exact M.2 footprint, assign +selector-safe names to the official MicroMod pins, then connect your carrier +board circuits to those names. + +Use the SparkFun references as the source of truth while checking your work: + +- [MicroMod Interface pin descriptions](https://cdn.sparkfun.com/assets/learn_tutorials/1/2/0/6/SparkFun_MicroMod_Interface_v1.0_-_Pin_Descriptions.pdf) +- [MicroMod Interface pinout](https://cdn.sparkfun.com/assets/learn_tutorials/1/2/0/6/SparkFun_MicroMod_Interface_v1.0_-_Pinout.pdf) +- [MicroMod graphical datasheet](https://cdn.sparkfun.com/assets/learn_tutorials/1/1/8/9/MicroMod_General_Pinout_v10_Graphical_Datasheet.pdf) +- [MicroMod product family](https://www.sparkfun.com/micromod) +- [Getting started with MicroMod](https://learn.sparkfun.com/tutorials/getting-started-with-micromod) + +## Workflow + +1. Pick the MicroMod processor board first. Each board can map processor + features differently onto the shared connector. +2. Import the connector footprint from KiCad or a supplier footprint. See + [Importing from KiCad](./importing-from-kicad.md) and + [Importing from JLCPCB](./importing-from-jlcpcb.mdx) for those flows. +3. Wrap the imported footprint with a `MicroModConnector` component so the rest + of your board connects to names like `I2C_SDA`, `SPI_COPI`, `USB_D_P`, and + `V3_3` instead of raw pad numbers. +4. Connect only the buses your carrier board needs. Leave processor-specific or + unused pins unconnected unless the processor board documentation says a + pull-up, pull-down, test point, or keepout is required. +5. Before ordering boards, compare the generated Gerbers against the SparkFun + pinout PDF, the graphical datasheet, and the connector manufacturer's land + pattern. The module key, insertion direction, and top-side pad numbering are + easy to mirror by accident. + +## Pin-label scaffold + +The labels below are based on SparkFun's MicroMod Interface v1.0 pinout. They +use selector-safe names, so `USB_D+` becomes `USB_D_P`, active-low pins use +`_N`, and `3.3V` becomes `V3_3`. + +```tsx +export const MicroModConnector = (props: { + name: string + footprint: any +}) => ( + +) +``` + +Keep this wrapper next to the footprint import in your carrier-board project. +If your footprint uses different pad names, update the `pinLabels` keys to +match its pad hints before routing. + +## Carrier-board example + +This example connects a simple I2C expansion header to the primary MicroMod I2C +bus and adds the carrier-side pull-ups described in the SparkFun interface +documentation. + +```tsx +import microModM2Footprint from "./SparkFun_MicroMod_M2.kicad_mod" + +export default () => ( + + + + + + + + + + + + + + + + + + + + + +) +``` + +## Signal groups to check + +| Group | Pins | Notes | +| --- | --- | --- | +| Power | `V3_3`, `GND`, `USB_VIN`, `V3_3_EN`, `RTC_3V_BATT`, `BATT_VIN_DIV3` | MicroMod logic is 3.3 V. Do not expose 3.3 V pins to 5 V. | +| USB | `USB_D_P`, `USB_D_N`, `USBHOST_D_P`, `USBHOST_D_N` | Route USB pairs together, keep them short, and avoid stubs. | +| I2C | `I2C_SDA`, `I2C_SCL`, `I2C_INT_N`, `I2C_SDA1`, `I2C_SCL1` | I2C is open drain; place pull-ups on the carrier when the attached boards do not already provide them. | +| SPI and SDIO | `SPI_COPI`, `SPI_CIPO`, `SPI_SCK`, `SPI_CS_N`, secondary `SPI_*1` and `SDIO_*` pins | Check whether the processor board exposes these as SPI, SDIO, or GPIO. | +| UART | `UART_TX1`, `UART_RX1`, `UART_RTS1`, `UART_CTS1`, `UART_TX2`, `UART_RX2` | UART1 and UART2 are intended to be free of USB-to-serial circuitry. | +| CAN | `CAN_RX`, `CAN_TX` | Add the transceiver and termination required by your carrier-board design. | +| Audio and camera | `AUD_*`, `PCM_*`, `I2S_*`, `PDM_*`, `CAM_*` aliases | These pins are shared by function; pick names that match the processor board mode you are using. | +| Debug and control | `RESET_N`, `BOOT`, `SWDIO`, `SWDCK`, `G11_SWD_SWO` | Reset and boot are open-drain control pins in the SparkFun descriptions. | +| General purpose | `A0`, `A1`, `PWM0`, `PWM1`, `D0`, `D1_CAM_TRIG`, `G0_BUS0` through `G10_ADC_D_P_CAM_VSYNC` | Do not assume every processor board supports every alternate function. | + +## Layout checklist + +- Place and lock the M.2 connector before routing nearby circuits. +- Confirm the keyed section and insertion direction against the processor board. +- Keep connector keepouts, board-edge clearance, and mounting hardware clear. +- Route USB as a differential pair and keep it away from switching supplies. +- Put I2C pull-ups on one side of the bus only. +- Add test points for `V3_3`, `GND`, `RESET_N`, and the buses you expect to + debug. +- Review processor-board current limits before powering displays, radios, + motors, or sensor stacks from MicroMod power pins.