Files
journal/stockcropper/SC Electronics Architecture.md
Thaddeus Hughes 608c43a71f init
2025-10-09 20:43:40 -05:00

130 lines
7.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

1. MCU
Looks like the **ESP32-WROOM-32** will work swimmingly. Pinout is as follows:
| Peripheral | Pin Assignment | GPIO Number | Notes/Functions |
| ---------------- | -------------- | ----------- | ------------------------------------ |
| Analog Input 1 | SENSOR_VP | 36 | ADC1_CH0, input-only |
| Analog Input 2 | SENSOR_CAPP | 37 | ADC1_CH1, input-only |
| Analog Input 3 | SENSOR_CAPN | 38 | ADC1_CH2, input-only |
| Analog Input 4 | SENSOR_VN | 39 | ADC1_CH3, input-only |
| Digital Output 1 | IO25 | 25 | General I/O, output-capable |
| Digital Output 2 | IO26 | 26 | General I/O, output-capable |
| Digital Output 3 | IO27 | 27 | General I/O, output-capable |
| Digital Output 4 | MTCK/IO13 | 13 | General I/O, output-capable |
| Digital Output 5 | MTMS/IO14 | 14 | General I/O, output-capable |
| Digital Output 6 | MTDO/IO15 | 15 | General I/O, output-capable |
| Digital Input 1 | VDET_1 | 34 | General input, input-only |
| Digital Input 2 | VDET_2 | 35 | General input, input-only |
| I2C SDA | IO21 | 21 | I2C data, configurable |
| I2C SCL | IO22 | 22 | I2C clock, configurable |
| CAN TX | IO4 | 4 | TWAI TX, connects to transceiver TXD |
| CAN RX | IO5 | 5 | TWAI RX, connects to transceiver RXD |
| RTC Crystal XP | 32K_XP | 32 | 32.768 kHz crystal for RTC |
| RTC Crystal XN | 32K_XN | 33 | 32.768 kHz crystal for RTC |
GPIO0, 2, 12, 16, 17, 18, 19, 23 are available for future expansion.
2. CAN Bus
1. Just need a 3.3V CAN Transceiver - **SN65HVD231DR**
2. Connector - M12 bulkhead? BoardLock bulkhead?
1. https://www.digikey.com/en/products/filter/circular-connectors/circular-connector-assemblies/436?s=N4IgjCBcoGwJxVAYygMwIYBsDOBTANCAPZQDaIAzABwUDscMIh1dcEAuoQA4AuUIAZR4AnAJYA7AOYgAvoXi1EIFJAw4CxMpQCscOFUXNdegCxMdeveYowADLe1Vrd2zAjMXMAEzP7MRh62YGBOgWBe7pR24WZhdL5g2toJdr5etoZRtukI8tq0XibJnCC8-EJiUrKEALQ%2B0MpQIgCuGiSQ5MUyciCMDaIAJvw1YEHmZZAg5jwAnly4-OjYKN1AA
2. T4140012081-000 $13.09
3. RTS712ND4S03 $15.97
4. https://www.digikey.com/en/products/filter/circular-connector-assemblies/436?s=N4IgjCBcoGwJxVAYygMwIYBsDOBTANCAPZQDaIAzABwUDscMIhALGGFXLSALqEAOAFyggAygIBOASwB2AcxABfQgFpmiECkgYcBEADdpaLHkIlI5GOwo9%2BQyCEUqATOs0SArrrPkArDwVKIIzQIJIAJsLKYAAMELbCTCACAJ58uMLo2CgBQA
5. 54-00216 $4.80 (4p male)
6. 54-00235 $5.05 (4p female)
7. I think we're gonna end up at M12 connectors for sensors and flying pigtails for motors
3. Voltage Regulator
1. Most of the time will be spent sleeping. A low quiescent current, then, is actually more important than live current, perhaps?
2. **TLV1117-33IDCYR** would work but emits 4.35W at 500mA - thermals need looked into for this.
3. **TPS629210DRLR** is also good. Just need 2 resistors and an inductor as well. Good cost. Probably better.
1. 4.7 uF input cap
2. 22 uF output cap
3. 2.2 uH inductor - **BDCD002520122R2MS1** (1008 case)
4. RTC (use builtin to MCU)
1. Need ext. osc: **CM315D32768DZFT** (2-SMD package)
5. Jack Motor - 1 AI, 2 DO
1. Motor: **RP-785615**
2. Motor connector: **AT06-2S**
3. Motor to cable connector: **AT04-2P**
4. Cable: **16/2 PVC jacket cable**
5. Cable to Control Box: **PG9 Cord Grip + Faston Tabs**
6. Relays (2): **A161CS12VDC.64** (25A current, 53.3 mA coil)
7. Relay driver: **2N7002AK-Q** (240 mA max) (TO-236AB, TO-236-3, SC-59, SOT-23-3 package)
8. Fuse: **20A ATO fuse**
9. Current sensor: **ACS37042KLHBLT-030B3** (30A max, -030B5 exists which is a 5v variant)
6. Fluffer (Accessory) Motor - 1 AI, 2 DO
1. Motor: *TBD*
2. Motor connector: **AT06-2S**
3. Motor to cable connector: **AT04-2P**
4. Cable: **16/2 PVC jacket cable**
5. Cable to Control Box: **PG9 Cord Grip + Faston Tabs** ([1217861-1](https://www.digikey.com/en/products/detail/te-connectivity-amp-connectors/1217861-1/1148769))
6. Relays (2): **A161CS12VDC.64** (25A current, 53.3 mA coil)
7. Relay driver: **2N7002AK-Q** (240 mA max)
8. Fuse: **20A ATO fuse** (3522-2 holder)
9. Current sensor: **ACS37042KLHBLT-030B3** (30A max, -030B5 exists which is a 5v variant) (SOT-23W)
7. Drive Motor - 1 AI, 2 DO
1. Motor: **80ZYT-12/JW-7** -OR- **80ZYT-12/JW-3B** (50A)
2. Motor connector: **6mm Ring Terminals with Boots**
3. Cable: **12/2 PVC jacket cable**
4. Cable to Control Box: **PG9 Cord Grip + Faston Tabs**
5. Relays (2): **A31CSP12VDC2** (70A current, 150 mA coil)
6. Relay driver: **2N7002AK-Q** (240 mA max)
7. Fuse: No fuse, just the fuse/breaker for the main battery
8. Current sensor: **ACS37220LEZATR-100B3** (100A max, -100B5 exists which is a 5v variant) (7-PowerLQFN / 7-QFN)
8. Jack Limit Switch - 1 DI
1. Sensor: **PBM6-AN-1H** (-1A exists also which is a 2m pigtail. -1H is a M12 connector)
9. Odometry Geartooth Sensor - 1 DI
1. Sensor: **PBM6-AN-1H** (-1A exists also which is a 2m pigtail. -1H is a M12 connector)
10. Solar Charging Circuit
1. **BQ24650 charge controller**
2. N-channel MOSFETs (Q1 high-side, Q2 low-side): 40V-rated, low RDS(on) (e.g., 20mΩ), such as **AO3400** or equivalent, for synchronous rectification.
3. Inductor (L): 10µH, rated for at least 5A saturation current (e.g., Wurth **7447788220**) to support switching at 400kHz.
4. Current sense resistor (R\_SR): 10mΩ, 1% tolerance, 5W rating (e.g., **WSMS5515L1000FEK**) for \~4A maximum charge current (differential voltage of 40mV).
5. Input capacitors: 10µF ceramic (X7R, 35V) × 3, placed near MOSFETs.
6. Output capacitors: 4.7µF ceramic (X7R, 25V) × 2, near the battery connection.
7. Schottky diodes: For reverse protection (e.g., **1N5819**) and status indication.
8. Resistors for voltage setting: Precision 1% types (e.g., R1 \= 100kΩ, R2 \= 576kΩ for 14.4V regulation).
9. Optional: LEDs and resistors for charge status (e.g., bulk/absorption indication).
11. Battery - 1 AI
1. Battery: **TL1212**
2. Battery to cable conn: **Female Fastons**
3. Cable: **12/2 PVC jacket cable with fuseholder**
4. Cable to control box: **PG9 Cord Grip + Faston Tabs**
5. Voltage divider to sense battery voltage (goes to ESP32) - **1M + 150k resistors**
12. Display
1. Focus LCDs **C162A-FTW-DS23** (-30 to +80C operating range)
2. This will be driven by an I/O Expander. It could be shared with the buttons.
1. 8 bit: **PCF8574**
2. 16 bit: **MCP23017** - pin 7 of each 8-bit bank can only be used as an output which is odd. or PCF8575 which is a little more $. Or best yet TCA9555PWR
13. Settings Adjust Buttons (4 buttons)
1. Option (SMD): **TL3305BF260QG**
2. Option (THT): **TS02-66-43-BK-260-SCR-D**
14. Manual Override Buttons (4 buttons)
1. Option A: Hardwired, with an enclosed PCB
2. Option B: Hardwired, with simple waterproof switches
3. Option C: Remote
| Pros of Remote | Pros of Hardwire |
| ------------------------------------ | ------------------------------------------ |
| Can operate from all around the coop | Can't lose it |
| Easiest cable management | Easy to repair |
| | No pairing required |
| | Easy interrupt (wake from sleep) |
| | If you need to make it custom, it's easier |
| | No batteries to die |