-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainboard.ato
More file actions
128 lines (113 loc) · 4.54 KB
/
mainboard.ato
File metadata and controls
128 lines (113 loc) · 4.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import Resistor, Capacitor, SPI, I2C, USB2_0_IF, ElectricPower
from "atopile/esp32s3/esp32s3.ato" import ESP32S3
from "eigenlucy/particlecounter/main.ato" import ParticleCounter
from "eigenlucy/micromppt/elec/src/micromppt.ato" import Micromppt
from "eigenlucy/e22900m22s/main.ato" import Lora
from "oled.ato" import OLED
from "eigenlucy/nonhumanscent/nose.ato" import Nose
from "atgm336h.ato" import ATGM336H
from "cutoff.ato" import Cutoff
from "atopile/ti-bq2404x//bq2404x.ato" import BQ24040DSQR
from "atopile/ti-tps63020/ti-tps63020.ato" import TPS63020DSJR
from "atopile/usb-connectors/usb-connectors.ato" import USBCConn
from "xh2a.ato" import XH2A
from "oled-128-32.ato" import OLED12832
from "atopile/addressable-leds/sk6805-ec20.ato" import SK6805EC20
from "eigenlucy/ncp1529asnt1g/main.ato" import Regulator
from "4p1mm_jst.ato" import _4P1MMJST
from "ncp03wf104f05rl.ato" import NCP03WF104F05RL
from "gzp6859d101kpp.ato" import GZP6859D101KPP
from "7p1mm_jst.ato" import _7P1MMJST
from "keystone2998.ato" import Keystone_2998
from "ipex.ato" import IPEX
from "murata_electronics_lq_p03t_g47n_j02d.ato" import Murata_Electronics_LQP03TG47NJ02D
module Mainboard:
power = new ElectricPower
power_5V = new ElectricPower; power_5V.gnd ~ power.gnd
power_3V3 = new ElectricPower; power_3V3.gnd ~ power.gnd
power_vbat = new ElectricPower; power_vbat.gnd ~ power.gnd
battery_conn = new XH2A
battery_conn.p1 ~ power_vbat.vcc; battery_conn.p2 ~ power_vbat.gnd
C_batconn = new Capacitor; C_batconn.value = 10uF +/- 20%; C_batconn.package = "C0805"
C_batconn.power ~ power_vbat
usbc = new USBCConn
power_usb = new ElectricPower
power_usb.vcc ~ usbc.usb2.buspower.hv; power_usb.gnd ~ usbc.usb2.buspower.gnd
power_5V ~ power_usb
i2c_conn = new _4P1MMJST
i2c_conn.power ~ power_3V3
i2c_conn2 = new _4P1MMJST
i2c_conn2.power ~ power_3V3
uc = new ESP32S3
uc.power ~ power_3V3
uc.i2c ~ i2c_conn.i2c
uc.i2c ~ i2c_conn2.i2c
uc.usb2 ~ usbc.usb2
gpio_conn = new _7P1MMJST
gpio_conn.p1 ~ uc.io45
gpio_conn.p2 ~ uc.io48
gpio_conn.p3 ~ uc.io47
gpio_conn.p4 ~ uc.io21
gpio_conn.p5 ~ uc.io14
gpio_conn.p6 ~ power_3V3.vcc
gpio_conn.p7 ~ power_3V3.gnd
# 5V 1A Single Cell Lion Charger NOT NEEDED WITH MICROMPPT
# bms = new BQ24040DSQR
# bms.power_in ~ power_usb
# bms.power_batt ~ power_vbat
# bms.power_good.io ~ uc.ioX
# bms.charge_status.io ~ uc.ioX
# led = new SK6805EC20 #Neopixel indicator
# led.power ~ power_3V3
pressure_sensor = new GZP6859D101KPP
pressure_sensor.i2c ~ uc.i2c
pressure_sensor.power ~ power_3V3
C_pres = new Capacitor; C_pres.value = 100nF +/- 20%; C_pres.package = "C0402"
C_pres.power ~ pressure_sensor.power
ldo = new Regulator
ldo.ic.EN ~ ldo.Vin.vcc
ldo.Vin ~ power_vbat
ldo.Vin ~ power_usb
# DO NOT PLUG IN USB-C AND BATTERY AT THE SAME TIME
ldo.Vout ~ power_3V3
assert ldo.OUTPUT_VOLTAGE is 3.3V +/- 5%
lora = new Lora
lora.power ~ power_3V3
lora.spi ~ uc.spi2
lora.lora.spi_cs.line ~ uc.spi2_cs.line
# oled = new OLED12832
# oled.power_3v3 ~ power_3V3
# oled.power_5v ~ power_5V
# oled.i2c ~ uc.i2c
bme688 = new Nose
bme688.power ~ power_3V3
bme688.i2c ~ uc.i2c
gps = new ATGM336H
gps.power ~ power_3V3
gps.i2c ~ uc.i2c
gps.uart ~ uc.uart
C_gps1 = new Capacitor; C_gps1.value = 2.2uF +/- 20%; C_gps1.package = "C0603"
C_gps1.power ~ gps.power
C_gps2 = new Capacitor; C_gps2.value = 100nF +/- 20%; C_gps2.package = "C0402"
C_gps2.power ~ gps.power
# Connect RTC voltage, maybe add another small battery
gps_bat = new Keystone_2998; gps_bat.power.vcc ~ gps.VBAT; gps_bat.power.gnd ~ power.gnd
RF_conn = new IPEX
RF_conn.RF_IN ~ gps.RF_IN
RF_conn.GND ~ gps.GND
rf_L = new Murata_Electronics_LQP03TG47NJ02D
gps.VCC_RF ~ rf_L.p1; rf_L.p2 ~ RF_conn.RF_IN
# detector = new ParticleCounter
# detector.power ~ power_5V # Check if this is right
# detector.out ~ uc.io2 # ADC Channel
cutoff = new Cutoff
cutoff.power ~ power_vbat # cutoff.power--/\1kohm/\-->|supercap|
# IO can be remapped as needed for layout, check esp32s3.ato
cutoff.SC_GATE ~ uc.io0 # Dis/connect supercapacitor
cutoff.CUTOFF_GATE ~ uc.io1 # Fire cutoff, active high
cutoff.SC_Sense ~ uc.io37
ntc = new NCP03WF104F05RL
R_div = new Resistor; R_div.value = 10kohm +/- 5%; R_div.package = "R0201"
R_div.p1 ~ uc.power.vcc; R_div.p2 ~ ntc.p1; ntc.p2 ~ uc.power.gnd
signal TEMP; TEMP ~ ntc.p1
uc.ic.IO16 ~ TEMP