tscircuit/ti
ti tscircuit library
- Version
- 1.0.186
- License
- unset
- Stars
- 0
examples/RearviewMirrorModule.circuit.tsx
import {
CommunicationInterface_TCAN1042_TIDA01428,
ElectrochromicMirrorDriver_TIDA01539,
LampDriver_TPS92638_TIDA00356,
LightSensor_OPT3001_TIDA01539,
Microcontroller_MSPM0G3507,
PowerSupply_LM74202_TPS7E81_Q1,
TemperatureSensor_LM50HV_Q1,
} from "@tsci/tscircuit.ti";
import "tscircuit";
/**
* Rearview Mirror Module assembled from the reusable block subcircuits.
*
* TI does not list a product or reference design for the MCU block. The
* existing MSPM0G3507 subcircuit is used because the device provides the CAN,
* I2C, ADC and GPIO interfaces required by the surrounding blocks.
* MCU capabilities: https://www.ti.com/product/MSPM0G3507
*/
export default () => (
<board autorouter="beta_pipeline9">
<schematicsheet
name="power_supply"
displayName="Power Supply"
sheetIndex={0}
/>
<schematicsheet
name="communication_interface"
displayName="CAN Communication Interface"
sheetIndex={1}
/>
<schematicsheet
name="microcontroller"
displayName="Rearview Mirror Microcontroller"
sheetIndex={2}
/>
<schematicsheet
name="mirror_driver"
displayName="Electrochromic Mirror Driver"
sheetIndex={3}
/>
<schematicsheet
name="light_sensor"
displayName="Ambient Light Sensors"
sheetIndex={4}
/>
<schematicsheet
name="lamp_driver"
displayName="Map Lamp Driver"
sheetIndex={5}
/>
<schematicsheet
name="temperature_sensor"
displayName="Temperature Sensor"
sheetIndex={6}
/>
<net name="VBATT_12V" isPowerNet />
<net name="VPROTECTED" isPowerNet />
<net name="V5P0" isPowerNet />
<net name="V3P3" isPowerNet />
<net name="GND" isGroundNet />
<net name="CANH" />
<net name="CANL" />
<net name="CAN_TXD" />
<net name="CAN_RXD" />
<net name="CAN_STB" />
<net name="SCL" />
<net name="SDA" />
<net name="TEMP_SENSE" />
<net name="OPT_B" />
<net name="OPT_F" />
<net name="DISC" />
<net name="LED_EN" />
<net name="LED_SW" />
<net name="HEALTH_MONITOR" />
<net name="LOAD_MONITOR" />
<PowerSupply_LM74202_TPS7E81_Q1
name="power_supply"
schSheetName="power_supply"
schX={-3.6}
pcbX={-30}
pcbY={20}
pcbPositionMode="relative_to_board_anchor"
/>
<CommunicationInterface_TCAN1042_TIDA01428
name="communication_interface"
schSheetName="communication_interface"
pcbX={-30}
pcbY={-10}
pcbPositionMode="relative_to_board_anchor"
/>
<Microcontroller_MSPM0G3507
name="microcontroller"
schSheetName="microcontroller"
pcbX={20}
pcbY={10}
pcbPositionMode="relative_to_board_anchor"
/>
<ElectrochromicMirrorDriver_TIDA01539
name="mirror_driver"
schSheetName="mirror_driver"
pcbX={50}
pcbY={20}
pcbPositionMode="relative_to_board_anchor"
/>
<LightSensor_OPT3001_TIDA01539
name="light_sensor"
schSheetName="light_sensor"
pcbX={0}
pcbY={-15}
pcbPositionMode="relative_to_board_anchor"
/>
<LampDriver_TPS92638_TIDA00356
name="lamp_driver"
schSheetName="lamp_driver"
pcbX={50}
pcbY={-10}
pcbPositionMode="relative_to_board_anchor"
/>
<TemperatureSensor_LM50HV_Q1
name="temperature_sensor"
schSheetName="temperature_sensor"
pcbX={0}
pcbY={-35}
pcbPositionMode="relative_to_board_anchor"
/>
{/* Vehicle power input, protected rail and regulated logic supplies. */}
<trace from=".power_supply > .U1 > .IN" to="net.VBATT_12V" />
<trace from=".power_supply > .U1 > .OUT" to="net.VPROTECTED" />
<trace from=".power_supply > .U2 > .OUT" to="net.V3P3" />
{/* TCAN1042 VCC needs a regulated 5 V rail not generated by this power block. */}
<trace from=".communication_interface > .R21 > .pin1" to="net.V5P0" />
<trace from=".communication_interface > .R22 > .pin1" to="net.V3P3" />
<trace from=".microcontroller > .U1 > .VDD" to="net.V3P3" />
<trace from=".mirror_driver > .U1 > .VA" to="net.V3P3" />
<trace from=".light_sensor .U4Sensor .U4 > .VDD" to="net.V3P3" />
<trace from=".light_sensor .U5Sensor .U5 > .VDD" to="net.V3P3" />
<trace from=".lamp_driver > .J3 > .pin3" to="net.V3P3" />
<trace from=".lamp_driver > .R9 > .pin1" to="net.V3P3" />
<trace from=".temperature_sensor > .U1 > .VS" to="net.V3P3" />
<trace from=".mirror_driver > .Q2 > .collector" to="net.VPROTECTED" />
<trace from=".lamp_driver > .D3 > .anode" to="net.VPROTECTED" />
{/* Common ground across all reusable subcircuits. */}
<trace from=".power_supply > .U1 > .GND" to="net.GND" />
<trace from=".communication_interface > .U6 > .GND" to="net.GND" />
<trace from=".microcontroller > .U1 > .VSS" to="net.GND" />
<trace from=".mirror_driver > .U1 > .GND" to="net.GND" />
<trace from=".light_sensor .U4Sensor .U4 > .GND" to="net.GND" />
<trace from=".light_sensor .U5Sensor .U5 > .GND" to="net.GND" />
<trace from=".lamp_driver > .U9 > .GND" to="net.GND" />
<trace from=".temperature_sensor > .U1 > .GND" to="net.GND" />
{/* CAN bus and the TCAN1042 digital interface. */}
<trace from=".communication_interface > .R23 > .pin1" to="net.CANH" />
<trace from=".communication_interface > .R24 > .pin2" to="net.CANL" />
<trace from=".microcontroller > .U1 > .CAN_TX" to="net.CAN_TXD" />
<trace from=".communication_interface > .U6 > .TXD" to="net.CAN_TXD" />
<trace from=".microcontroller > .U1 > .CAN_RX" to="net.CAN_RXD" />
<trace from=".communication_interface > .U6 > .RXD" to="net.CAN_RXD" />
<trace from=".microcontroller > .U1 > .PA7" to="net.CAN_STB" />
<trace from=".communication_interface > .U6 > .STB" to="net.CAN_STB" />
{/* Shared I2C bus for the DAC and the two ambient-light sensors. */}
<trace from=".microcontroller > .U1 > .I2C0_SCL" to="net.SCL" />
<trace from=".mirror_driver > .U1 > .SCL" to="net.SCL" />
<trace from=".light_sensor .U4Sensor .U4 > .SCL" to="net.SCL" />
<trace from=".light_sensor .U5Sensor .U5 > .SCL" to="net.SCL" />
<trace from=".microcontroller > .U1 > .I2C0_SDA" to="net.SDA" />
<trace from=".mirror_driver > .U1 > .SDA" to="net.SDA" />
<trace from=".light_sensor .U4Sensor .U4 > .SDA" to="net.SDA" />
<trace from=".light_sensor .U5Sensor .U5 > .SDA" to="net.SDA" />
{/* MCU sensor inputs and driver controls. */}
<trace from=".temperature_sensor > .U1 > .VO" to="net.TEMP_SENSE" />
<trace from=".microcontroller > .U1 > .PA27" to="net.TEMP_SENSE" />
<trace from=".light_sensor .U4Sensor .U4 > .INT" to="net.OPT_B" />
<trace from=".microcontroller > .U1 > .PA8" to="net.OPT_B" />
<trace from=".light_sensor .U5Sensor .U5 > .INT" to="net.OPT_F" />
<trace from=".microcontroller > .U1 > .PA9" to="net.OPT_F" />
<trace from=".microcontroller > .U1 > .PA10" to="net.DISC" />
<trace from=".mirror_driver > .Q1 > .base" to="net.DISC" />
<trace from=".microcontroller > .U1 > .PA11" to="net.LED_EN" />
<trace from=".lamp_driver > .U9 > .EN" to="net.LED_EN" />
<trace from=".microcontroller > .U1 > .PA16" to="net.LED_SW" />
<trace from=".lamp_driver > .U9 > .PWM1" to="net.LED_SW" />
<trace from=".power_supply > .U1 > .FLT" to="net.HEALTH_MONITOR" />
<trace from=".microcontroller > .U1 > .PA15" to="net.HEALTH_MONITOR" />
<trace from=".power_supply > .U1 > .IMON" to="net.LOAD_MONITOR" />
<trace from=".microcontroller > .U1 > .PA14" to="net.LOAD_MONITOR" />
</board>
);