aj0070/thermal-camera

A 4-layer handheld thermal-camera PCB combining USB-C LiPo charging, 3.3V regulation, ESP32-S3 control, MLX90640 thermal sensing, TFT display/backlight, microSD storage, and user buttons.

Version
1.0.0
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone aj0070/thermal-camera  # download the package files into ./thermal-camera
tsci add aj0070/thermal-camera    # add it to your project as @tsci/aj0070.thermal-camera

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

parts/display.tsx

import { KH_CL0_5_H2_0_18PIN } from "../imports/KH_CL0_5_H2_0_18PIN"

const fpcPinLabels = {
  pin1: "GND1",
  pin2: "LEDK",
  pin3: "LEDA",
  pin4: "VDD",
  pin5: "IOVCC",
  pin6: "TE",
  pin7: "RESET",
  pin8: "CS",
  pin9: "DC",
  pin10: "SCL",
  pin11: "RD",
  pin12: "SDA",
  pin13: "GND2",
  pin14: "GND3",
  pin15: "GND4",
  pin16: "GND5",
  pin17: "GND6",
  pin18: "GND7",
  pin19: "GND8",
  pin20: "GND9",
} as const

export const DisplaySection = () => (
  <>
    <KH_CL0_5_H2_0_18PIN
      name="J1"
      pinLabels={fpcPinLabels}
      pcbX={0}
      pcbY={-20}
      pcbRotation={180}
      schSheetName="display"
      schSectionName="tft"
      schX={-6}
      schY={1}
      schWidth={2.055}
      schHeight={2.2}
      noConnect={["TE", "RD"]}
      pinAttributes={{
        VDD: { requiresPower: true, mustBeConnected: true },
        IOVCC: { requiresPower: true, mustBeConnected: true },
        GND1: { requiresGround: true, mustBeConnected: true },
        GND2: { requiresGround: true, mustBeConnected: true },
        GND3: { requiresGround: true, mustBeConnected: true },
        GND4: { requiresGround: true, mustBeConnected: true },
        GND5: { requiresGround: true, mustBeConnected: true },
        GND6: { requiresGround: true, mustBeConnected: true },
        GND7: { requiresGround: true, mustBeConnected: true },
        GND8: { requiresGround: true, mustBeConnected: true },
        GND9: { requiresGround: true, mustBeConnected: true },
      }}
    />

    <capacitor
      name="C14"
      capacitance="1uF"
      footprint="0603"
      pcbX={9.0}
      pcbY={-16.0}
      pcbRotation={0}
      schSheetName="display"
      schSectionName="tft"
      schX={-1}
      schY={1}
      schRotation={270}
    />
    <capacitor
      name="C15"
      capacitance="100nF"
      footprint="0402"
      pcbX={9.0}
      pcbY={-14.2}
      pcbRotation={0}
      schSheetName="display"
      schSectionName="tft"
      schX={0}
      schY={1}
      schRotation={270}
    />

    <resistor
      name="R12"
      resistance="10"
      footprint="1206"
      pcbX={10.9}
      pcbY={-18.6}
      pcbRotation={0}
      schSheetName="display"
      schSectionName="backlight"
      schX={3}
      schY={2.5}
      schRotation={270}
    />
    <transistor
      name="Q1"
      manufacturerPartNumber="MMBT3904"
      type="npn"
      footprint="sot23"
      pinLabels={{ pin1: "base", pin2: "emitter", pin3: "collector" }}
      pcbX={15.5}
      pcbY={-17}
      pcbRotation={0}
      schSheetName="display"
      schSectionName="backlight"
      schX={4.5}
      schY={0}
    />
    <resistor
      name="R8"
      resistance="1k"
      footprint="0402"
      pcbX={12.5}
      pcbY={-14.5}
      pcbRotation={0}
      schSheetName="display"
      schSectionName="backlight"
      schX={2.5}
      schY={0}
      schRotation={0}
    />

    <trace from="J1.GND1" to="net.GND" />
    <trace from="J1.GND2" to="net.GND" />
    <trace from="J1.GND3" to="net.GND" />
    <trace from="J1.GND4" to="net.GND" />
    <trace from="J1.GND5" to="net.GND" />
    <trace from="J1.GND6" to="net.GND" />
    <trace from="J1.GND7" to="net.GND" />
    <trace from="J1.GND8" to="net.GND" />
    <trace from="J1.GND9" to="net.GND" />
    <trace from="J1.VDD" to="net.V3_3" />
    <trace from="J1.IOVCC" to="net.V3_3" />
    <trace from="J1.RESET" to="net.LCD_RST" />
    <trace from="J1.CS" to="net.LCD_CS" />
    <trace from="J1.DC" to="net.LCD_DC" />
    <trace from="J1.SCL" to="net.SPI_SCLK" />
    <trace from="J1.SDA" to="net.SPI_MOSI" />
    <trace from="J1.LEDK" to="net.BL_LED" />
    <trace from="J1.LEDA" to="R12.pin1" />
    <trace from="R12.pin2" to="net.V3_3" />

    <trace from="Q1.collector" to="net.BL_LED" />
    <trace from="Q1.emitter" to="net.GND" />
    <trace from="Q1.base" to="R8.pin2" />
    <trace from="R8.pin1" to="net.LCD_BL" />

    <trace from="net.V3_3" to="C14.pin1" />
    <trace from="C14.pin2" to="net.GND" />
    <trace from="net.V3_3" to="C15.pin1" />
    <trace from="C15.pin2" to="net.GND" />
  </>
)