selenaalpha77-sketch/arduino-nano

This code defines the physical hardware layout of an Arduino Nano-compatible board, incorporating key components such as the ATmega328P microcontroller, CH340C USB-to-serial converter, AMS1117 voltage regulators, and USB connector with their associated footprints and pin configurations.

Version
1.0.0
License
unset
Stars
0

lib/NanoHeaders.tsx

/**
 * Arduino Nano pin headers
 * The Nano has two rows of 15 pins on each side (2.54mm pitch)
 *
 * Left header (J1) - top of board looking from component side:
 *   D1/TX, D0/RX, RESET, GND, D2, D3~, D4, D5~, D6~, D7, D8, D9~, D10~, D11~/MOSI, D12/MISO
 *
 * Right header (J2):
 *   D13/SCK, 3V3, AREF, A0, A1, A2, A3, A4/SDA, A5/SCL, A6, A7, 5V, RST, GND, VIN
 */
export const NanoHeaders = () => (
  <group name="headers">
    {/* Left header - Digital pins D0-D12, RESET, GND */}
    <pinheader
      name="J1"
      pinCount={15}
      pitch="2.54mm"
      pcbX="-20mm"
      pcbY="0mm"
      pcbRotation={90}
      schX={-30}
      schY={0}
      connections={{
        pin1: "net.D1",
        pin2: "net.D0",
        pin3: "net.RESET",
        pin4: "net.GND",
        pin5: "net.D2",
        pin6: "net.D3",
        pin7: "net.D4",
        pin8: "net.D5",
        pin9: "net.D6",
        pin10: "net.D7",
        pin11: "net.D8",
        pin12: "net.D9",
        pin13: "net.D10",
        pin14: "net.D11",
        pin15: "net.D12",
      }}
    />

    {/* Right header - D13, 3V3, AREF, A0-A7, 5V, RST, GND, VIN */}
    <pinheader
      name="J2"
      pinCount={15}
      pitch="2.54mm"
      pcbX="20mm"
      pcbY="0mm"
      pcbRotation={90}
      schX={30}
      schY={0}
      connections={{
        pin1: "net.D13",
        pin2: "net.V3_3",
        pin3: "net.AREF",
        pin4: "net.A0",
        pin5: "net.A1",
        pin6: "net.A2",
        pin7: "net.A3",
        pin8: "net.A4",
        pin9: "net.A5",
        pin10: "net.A6",
        pin11: "net.A7",
        pin12: "net.V5",
        pin13: "net.RESET",
        pin14: "net.GND",
        pin15: "net.VIN",
      }}
    />

    {/* ICSP header (6-pin 2x3) */}
    <pinheader
      name="J3"
      pinCount={6}
      pitch="2.54mm"
      pcbX="12mm"
      pcbY="-6mm"
      schX={20}
      schY={-10}
      connections={{
        pin1: "net.D11",
        pin2: "net.V5",
        pin3: "net.D13",
        pin4: "net.GND",
        pin5: "net.D12",
        pin6: "net.RESET",
      }}
    />
  </group>
)