schemeta/examples/i2c-sensor-hub.json
2026-02-19 14:00:05 -05:00

82 lines
4.4 KiB
JSON

{
"meta": {
"title": "I2C Sensor Hub",
"version": "1.0"
},
"symbols": {
"mcu": {
"symbol_id": "mcu",
"category": "microcontroller",
"body": { "width": 180, "height": 220 },
"pins": [
{ "name": "3V3", "number": "1", "side": "left", "offset": 24, "type": "power_in" },
{ "name": "GND", "number": "2", "side": "left", "offset": 56, "type": "ground" },
{ "name": "SCL", "number": "3", "side": "right", "offset": 48, "type": "bidirectional" },
{ "name": "SDA", "number": "4", "side": "right", "offset": 78, "type": "bidirectional" },
{ "name": "INT1", "number": "5", "side": "right", "offset": 122, "type": "input" },
{ "name": "INT2", "number": "6", "side": "right", "offset": 152, "type": "input" }
]
},
"i2c_sensor": {
"symbol_id": "i2c_sensor",
"category": "sensor",
"body": { "width": 140, "height": 120 },
"pins": [
{ "name": "3V3", "number": "1", "side": "left", "offset": 18, "type": "power_in" },
{ "name": "GND", "number": "2", "side": "left", "offset": 44, "type": "ground" },
{ "name": "SCL", "number": "3", "side": "left", "offset": 70, "type": "bidirectional" },
{ "name": "SDA", "number": "4", "side": "left", "offset": 96, "type": "bidirectional" },
{ "name": "INT", "number": "5", "side": "right", "offset": 58, "type": "output" }
]
},
"power_source": {
"symbol_id": "power_source",
"category": "power",
"body": { "width": 130, "height": 90 },
"pins": [
{ "name": "3V3", "number": "1", "side": "right", "offset": 26, "type": "power_out" },
{ "name": "GND", "number": "2", "side": "right", "offset": 56, "type": "ground" }
]
}
},
"instances": [
{ "ref": "U1", "symbol": "mcu", "properties": { "value": "ESP32-S3" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U2", "symbol": "i2c_sensor", "properties": { "value": "IMU" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U3", "symbol": "i2c_sensor", "properties": { "value": "BME280" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U4", "symbol": "i2c_sensor", "properties": { "value": "Mag" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "R1", "part": "resistor", "properties": { "value": "4.7k" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "R2", "part": "resistor", "properties": { "value": "4.7k" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "V1", "symbol": "power_source", "properties": { "value": "3V3/GND source" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } }
],
"nets": [
{ "name": "3V3", "class": "power", "nodes": [
{ "ref": "V1", "pin": "3V3" }, { "ref": "U1", "pin": "3V3" }, { "ref": "U2", "pin": "3V3" },
{ "ref": "U3", "pin": "3V3" }, { "ref": "U4", "pin": "3V3" }, { "ref": "R1", "pin": "1" }, { "ref": "R2", "pin": "1" }
] },
{ "name": "GND", "class": "ground", "nodes": [
{ "ref": "V1", "pin": "GND" }, { "ref": "U1", "pin": "GND" }, { "ref": "U2", "pin": "GND" },
{ "ref": "U3", "pin": "GND" }, { "ref": "U4", "pin": "GND" }
] },
{ "name": "I2C_SCL", "class": "clock", "nodes": [
{ "ref": "U1", "pin": "SCL" }, { "ref": "U2", "pin": "SCL" }, { "ref": "U3", "pin": "SCL" },
{ "ref": "U4", "pin": "SCL" }, { "ref": "R1", "pin": "2" }
] },
{ "name": "I2C_SDA", "class": "signal", "nodes": [
{ "ref": "U1", "pin": "SDA" }, { "ref": "U2", "pin": "SDA" }, { "ref": "U3", "pin": "SDA" },
{ "ref": "U4", "pin": "SDA" }, { "ref": "R2", "pin": "2" }
] },
{ "name": "INT1", "class": "signal", "nodes": [ { "ref": "U2", "pin": "INT" }, { "ref": "U1", "pin": "INT1" } ] },
{ "name": "INT2", "class": "signal", "nodes": [ { "ref": "U3", "pin": "INT" }, { "ref": "U1", "pin": "INT2" } ] }
],
"constraints": {
"groups": [
{ "name": "controller", "members": ["U1"], "layout": "cluster" },
{ "name": "sensors", "members": ["U2", "U3", "U4"], "layout": "cluster" },
{ "name": "pullups", "members": ["R1", "R2"], "layout": "cluster" }
]
},
"annotations": [
{ "text": "Shared I2C bus with pull-ups and interrupt lines.", "x": 24, "y": 24 }
]
}