MVM-VC: Difference between revisions

From DaqWiki
Jump to navigation Jump to search
Line 78: Line 78:


<pre>
<pre>
ESP32 pin and name - WROOM32 - HUZZA32 - header - baseboard - function
RPi3B name - header pin - baseboard name - function


"bottom row"
3.3VDC - 1 - "+3V_CPU2", N/C if JMP4 open
GND - 9 - GND
3.3VDC - 17 - "+3V_CPU2", see above
GND - 25 - GND
SDA0 - 27- N/C
GND - 39 - GND


42 - GPIO21 - IO21 - 21      - JP1-1  - A1 - CPU SPI CS (SPI) - (output) SPI nCS - mux GPIO21 or VSPIHD
GPIO10 - 24 - CPU SPI CS (SPI) - (output) SPI nCS
41 - U0TXD  - TXD0 - TX/17  - JP1-2  - A2 - FTHR CPU TX - N/C - mux GPIO1 or U0TXD
GPIO15/TX -  8 - Pi3 CPU TX - N/C
40 - U0RXD  - RXD0 - RX/16  - JP1-3  - A3  - FTHR CPU RX - N/C - mux GPIO3 or U0RXD
GPIO16/RX - 10 - Pi3 CPU RX - N/C
38 - GPIO19 - IO19 - MISO/19 - JP1-4  - A4  - CPU MISO (SPI) - (input) SPI MISO - mux GPIO19 or U0CTS or VSPIQ
GPIO13/MISO - 12 - CPU MISO (SPI) - (input) SPI MISO
35 - GPIO18 - IO18 - MOSI/18 - JP1-5  - A5  - CPU MOSI (SPI) - (output) SPI MOSI - mux GPIO18 or VSPICLK
GPIO12/MOSI - 19 - CPU MOSI (SPI) - (output) SPI MOSI
34 - GPIO5  - IO5  - SCK/5  - JP1-6  - A6  - CPU SCK (SPI) - (output) SPI CLK - mux GPIO5 or VSPICS0
GPIO14/SCLK - 23 - CPU SCK (SPI) - (output) SPI CLK
24 - GPIO4  - IO4/A2_0 - ADC2/A5/4    - JP1-7  - A7  - CPU DRV STAT4 - (open drain 3.3V input) - mux GPIO4 or RTC_GPIO10
GPIO3 - 15 - CPU DRV STAT4 - (open drain 3.3V input)
5 - SENSOR_VP C16/270pF - IO36/SEN_VP/A1_0 - ADC1/A4/36  - JP1-8  - A8  - CPU DRV STAT3 - (same) - mux GPIO36 or RTC_GPIO0 (input only)
GPIO21 - 29 - CPU DRV STAT3 - (same)
8 - SENSOR_VN C17/270pF - IO39/SEN_VN/A1_3 - ADC1/A3/39  - JP1-9  - A9  - CPU DRV STAT2 - (same) - mux GPIO39 or RTC_GPIO3 (input only)
GPIO22 - 31 - CPU DRV STAT2 - (same)
10 - VDET_1 - I34/A1_6 - "input only" ADC1/A2/34  - JP1-10 - A10 - CPU DRV STAT1 - (same) - mux GPIO34 or RTC_GPIO4 (input only)
GPIO32 - 33 - CPU DRV STAT1 - (same)
14 - GPIO25 - IO25/DAC1/A2_8 - ADC2/A1/DAC1/25 - JP1-11 - A11 - N/C - reserved for DAC output - mux GPIO25 or RTC_GPIO6 or DAC1
GPIO25 - 37 - CPU BUZZ - (maybe output) direct connection to BUZZ screw terminal
15 - GPIO26 - IO26/DAC2/A2_9 - ADC2/A0/DAC2/26 - JP1-12 - A12 - CPU BUZZ - (maybe output) direct connection to BUZZ screw terminal - mux GPIO26 or RTC_GPIO7 or DAC2
none - none - GND    - JP1-13 - A13 - GND
none - none - NC      - JP1-14 - A14 - N/C
none - none - "3V"    - JP1-15 - A15 - "+3V_CPU2"
none - none -  RST    - JP1-16 - A16 - CPU RESET - N/C
 
"top row"
 
none - none - BAT    - JP3-1  - B1  - N/C
none - none - EN    - JP3-2  - B2  - N/C
none - none - USB    - JP3-3  - B3  - "+5V_USB"
20 - MTCK  - IO13/A2_4 - "red LED" ADC2/13/A12 - JP3-4  - B4  - CPU_LED1 - (output) drives open-drain 3.3V AUX2 - mux GPIO13 or RTC_GPIO14
20 - MTCK  - IO13/A2_4 - "red LED" ADC2/13/A12 - JP3-4  - B4  - CPU_LED1 - (output) drives open-drain 3.3V AUX2 - mux GPIO13 or RTC_GPIO14
18 - MTDI  - IO12/A2_5 - "internal pulldown, output only" ADC2/12/A11 - JP3-5  - B5  - CPU_LED2 - (output) same, AUX3 - mux GPIO12 or RTC_GPIO15 - "boot fail if pulled high"
18 - MTDI  - IO12/A2_5 - "internal pulldown, output only" ADC2/12/A11 - JP3-5  - B5  - CPU_LED2 - (output) same, AUX3 - mux GPIO12 or RTC_GPIO15 - "boot fail if pulled high"

Revision as of 10:50, 5 April 2020

Links

General information

  • external power supply: 24 VDC screw terminals
    • regulated down to 5V USB power (+5V_USB) which is
    • regulated down to 3.3V (+3V_CPU)
  • 4 channels of relay drivers
  • 2 screw terminals (CPU_BUZZ/BUZZ and CPU_AUX/AUX1)
  • 2 screw terminals (CPU_LED1/AUX2 and CPU_LED2/AUX3)
  • connection for "featherwing 2.4in" display
  • 7 screw terminals for I2C (I2C 0..6)
  • 1 screw terminal for SPI (EXT_SPI_CS0)
  • 1 pressure sensor
  • 3 sites for microcontroller (only 1 at a time): Adafruit HUZZA32, NanoPi, RaspberryPi

Switches and Jumpers

  • JMP3/JMP4 - select +3V_CPU from our regulator or from ESP32 internal regulator
  • SW1/SW2/SW3/SW4 - select I2C power +3V_CPU or +5V_USB
  • JMP1_DRV1/JMP2_DRV1 (DRV1..DRV4) - select relay driver

Test plan

Done:

  • ESP32 I2C communication with pressure sensor (standalone): [BS 2020apr2].
  • board powered 24V: [DB/BS 2020apr4]
  • ESP32 runs: [BS 2020apr4]

Partial:

  • control and readback of relays (valves): ESP32 [BS 2020apr4], RPi [...], NanoPi [...]
  • SPI communication: ESP32 [BS 2020apr4], RPi [...], NanoPi [...]
  • I2C communication: ESP32 [BS 2020apr4], RPi [...], NanoPi [...]
  • Pressure sensor readout (I2C): ESP32 [BS 2020apr4], RPi [...], NanoPi [...]

Pending:

  • RaspberryPi runs date done [...]
  • NanoPi runs date done [...]
  • external I2C: ESP32 [...], RPi [...], NanoPi [...]
  • BUZZ, AUX1, AUX2, AUX3: ESP32 [...], RPi [...], NanoPi [...]
  • featherwing display: ESP32 [...], RPi [...], NanoPi [...]
  • flow meter readout (TBD)
  • proportional valve control and monitor (TBD)

System configurations permitted by hardware

  • "Italian model": [ MVM-VC + ESP32 ] ---- usb-serial ---- [ RPi3 + GUI ] (remote control) ---- wifi or cat5 or SD/USB flash for data collection
  • "one ESP32": [ MVM-VC + ESP32 + small LCD + mini-GUI ] ---- wifi for data collection (no cat5, no SDflash)
  • "one Pi": [ MVM-VC + RPi + GUI ] ---- wifi or cat5 or SD/USB flash for data collection
  • "two Pi": [ MVM-VC + RPi/NanoPi ] ---- cat5 ---- [ RPi + GUI ] ---- wifi or SD/USB flash for data collection
  • "three Pi": [ MVM-VC + RPi/NanoPi (control) ---???--- RPi + GUI (local control) ] ---???--- [ RPi + GUI ] (remote control)
  • "2.5 Pi": [ MVM-VC + ESP32 --- usb-serial --- RPi + GUI (local control) ] ---- cat5 ---- [ RPi + GUI ] (remote control)

Notable hardware limitations:

  • MVM-VC can be fully operated by ESP32 or RPi or NanoPi (not at the same time)
  • ESP32: yes wifi, no cat5 ethernet, no usb, no sd flash (sd flash maybe via adafruit LCD "feather")
  • NanoPi: maybe wifi, maybe HDMI/DP connector to drive monitor (NanoPi to be confirmed)
  • RPi is the most capable: cat5/rj45 ethernet, wifi, HDMI/DP, USB, SD flash slot.

Abbreviations: MVM-VC - TRIUMF PCB, ESP32 - adafruit HUZZA32/WROOM32/ESP32 icrocontroller, RPi - RaspberryPi, NanoPi - NanoPi, GUI - medium size LCD running the MVM python GUI, mini-GUI - small size LCD running minimal GUI coded in ESP32.

RPi3/4 connections

Per board schematic, using RPi3B pinouts.

RPi3B name - header pin - baseboard name - function

3.3VDC - 1 - "+3V_CPU2", N/C if JMP4 open
GND - 9 - GND
3.3VDC - 17 - "+3V_CPU2", see above
GND - 25 - GND
SDA0 - 27- N/C
GND - 39 - GND

GPIO10 - 24  - CPU SPI CS (SPI) - (output) SPI nCS
GPIO15/TX -  8 - Pi3 CPU TX - N/C
GPIO16/RX - 10 - Pi3 CPU RX - N/C
GPIO13/MISO - 12 - CPU MISO (SPI) - (input) SPI MISO
GPIO12/MOSI - 19 - CPU MOSI (SPI) - (output) SPI MOSI
GPIO14/SCLK - 23 - CPU SCK (SPI) - (output) SPI CLK
GPIO3 - 15 - CPU DRV STAT4 - (open drain 3.3V input)
GPIO21 - 29 - CPU DRV STAT3 - (same)
GPIO22 - 31 - CPU DRV STAT2 - (same)
GPIO32 - 33 - CPU DRV STAT1 - (same)
GPIO25 - 37 - CPU BUZZ - (maybe output) direct connection to BUZZ screw terminal
20 - MTCK   - IO13/A2_4 - "red LED" ADC2/13/A12 - JP3-4  - B4  - CPU_LED1 - (output) drives open-drain 3.3V AUX2 - mux GPIO13 or RTC_GPIO14
18 - MTDI   - IO12/A2_5 - "internal pulldown, output only" ADC2/12/A11 - JP3-5  - B5  - CPU_LED2 - (output) same, AUX3 - mux GPIO12 or RTC_GPIO15 - "boot fail if pulled high"
16 - GPIO27 - IO27/A2_7 - ADC2/27/A10 - JP3-6  - B6  - CPU DRV CH1 - (output) drives buffer - mux GPIO27 or RTC_GPIO17
13 - 32K_XN - IO33/A1_5/X32N - ADC1/33/A9  - JP3-7  - B7  - CPU DRV CH2 - (same) - mux GPIO33 or RTC_GPIO8
21 - MTDO   - IO15/A2_3 - ADC2/15/A8  - JP3-8  - B8  - CPU DRV CH3 - (same) - mux GPIO15 or RTC_GPIO13
12 - 32K_XP - IO32/A1_4/X32P - ADC1/32/A7  - JP3-9  - B9  - CPU DRV CH4 - (same) - mux GPIO32 or RTC_GPIO9
17 - MTMS   - IO14/A2_6 - ADC2/14/A6  - JP3-10 - B10 - CPU DRV RSTn - (output, pull up to 3.3V) drives nRESET of I2C and SPI chips, mux GPIO14 or RTC_GPIO16
39 - GPIO22 - IO22 - SCL/22 - JP3-11 - B11 - CPU SCL - (I2C, pull up to 3.3V) - mux GPIO22 or U0RTS
36 - GPIO23 - IO23 - SDA/23 - JP3-12 - B12 - CPU SDA - (I2C, pull up to 3.3V) - mux GPIO23

not on header, internally connected on HUZZA32:

11 - VDET_2 - I35/A1_7 - ADC1/35/A13 - N/C - VBAT voltmeter (through divider) - mux GPIO35 or ADC1_CH7 or RTC_GPIO5 (input only)

not clear what function:

23 - GPIO0   - IO0/A2_1 - GPIO0 - serial RTS - mux GPIO0 or RTC_GPIO11
22 - GPIO2   - IO2/A2_2 - GPIO2 - serial DTR (looks like mistake on schematic) - mux GPIO2 or RTC_GPIO12
25 - GPIO16  - IO16 - IO16 - not connected? - mux GPIO16 or U2RXD
27 - GPIO17  - IO17 - IO17 - not connected? - mux GPIO17 or U2TXD
 9 - CHIP_PU - EN - RESET - push button - no mux

WROOM32 flash memory connection ("U3"):

28 - SD_DATA_2 - SD2 - n/c - mux SD_DATA2 or GPIO9
29 - SD_DATA_3 - SD3 - n/c - mux SD_DATA3 or GPIO10
30 - SD_CMD - CMD - n/c - mux SD_CMD or GPIO11
31 - SD_CLK - CLK - n/c - mux SD_CLK or GPIO6
32 - SD_DATA_0 - SD0 - n/c - mux SD_DATA0 or GPIO7
33 - SD_DATA_1 - SD1 - n/c - mux SD_DATA1 or GPIO8

Note:
- I2C controller can use any/all GPIO pins
- SPI controller can use any/all GPIO pins

NanoPi connections

AAA

ESP32 connections

  • Pinouts Rev 2020mar31
ESP32 pin and name - WROOM32 - HUZZA32 - header - baseboard - function

"bottom row"

42 - GPIO21 - IO21 - 21      - JP1-1  - A1  - CPU SPI CS (SPI) - (output) SPI nCS - mux GPIO21 or VSPIHD
41 - U0TXD  - TXD0 - TX/17   - JP1-2  - A2  - FTHR CPU TX - N/C - mux GPIO1 or U0TXD
40 - U0RXD  - RXD0 - RX/16   - JP1-3  - A3  - FTHR CPU RX - N/C - mux GPIO3 or U0RXD
38 - GPIO19 - IO19 - MISO/19 - JP1-4  - A4  - CPU MISO (SPI) - (input) SPI MISO - mux GPIO19 or U0CTS or VSPIQ
35 - GPIO18 - IO18 - MOSI/18 - JP1-5  - A5  - CPU MOSI (SPI) - (output) SPI MOSI - mux GPIO18 or VSPICLK
34 - GPIO5  - IO5  - SCK/5   - JP1-6  - A6  - CPU SCK (SPI) - (output) SPI CLK - mux GPIO5 or VSPICS0
24 - GPIO4  - IO4/A2_0 - ADC2/A5/4    - JP1-7  - A7  - CPU DRV STAT4 - (open drain 3.3V input) - mux GPIO4 or RTC_GPIO10
 5 - SENSOR_VP C16/270pF - IO36/SEN_VP/A1_0 - ADC1/A4/36   - JP1-8  - A8  - CPU DRV STAT3 - (same) - mux GPIO36 or RTC_GPIO0 (input only)
 8 - SENSOR_VN C17/270pF - IO39/SEN_VN/A1_3 - ADC1/A3/39   - JP1-9  - A9  - CPU DRV STAT2 - (same) - mux GPIO39 or RTC_GPIO3 (input only)
10 - VDET_1 - I34/A1_6 - "input only" ADC1/A2/34   - JP1-10 - A10 - CPU DRV STAT1 - (same) - mux GPIO34 or RTC_GPIO4 (input only)
14 - GPIO25 - IO25/DAC1/A2_8 - ADC2/A1/DAC1/25 - JP1-11 - A11 - N/C - reserved for DAC output - mux GPIO25 or RTC_GPIO6 or DAC1
15 - GPIO26 - IO26/DAC2/A2_9 - ADC2/A0/DAC2/26 - JP1-12 - A12 - CPU BUZZ - (maybe output) direct connection to BUZZ screw terminal - mux GPIO26 or RTC_GPIO7 or DAC2
none - none - GND     - JP1-13 - A13 - GND
none - none - NC      - JP1-14 - A14 - N/C
none - none - "3V"    - JP1-15 - A15 - "+3V_CPU2"
none - none -  RST    - JP1-16 - A16 - CPU RESET - N/C

"top row"

none - none - BAT    - JP3-1  - B1  - N/C
none - none - EN     - JP3-2  - B2  - N/C
none - none - USB    - JP3-3  - B3  - "+5V_USB"
20 - MTCK   - IO13/A2_4 - "red LED" ADC2/13/A12 - JP3-4  - B4  - CPU_LED1 - (output) drives open-drain 3.3V AUX2 - mux GPIO13 or RTC_GPIO14
18 - MTDI   - IO12/A2_5 - "internal pulldown, output only" ADC2/12/A11 - JP3-5  - B5  - CPU_LED2 - (output) same, AUX3 - mux GPIO12 or RTC_GPIO15 - "boot fail if pulled high"
16 - GPIO27 - IO27/A2_7 - ADC2/27/A10 - JP3-6  - B6  - CPU DRV CH1 - (output) drives buffer - mux GPIO27 or RTC_GPIO17
13 - 32K_XN - IO33/A1_5/X32N - ADC1/33/A9  - JP3-7  - B7  - CPU DRV CH2 - (same) - mux GPIO33 or RTC_GPIO8
21 - MTDO   - IO15/A2_3 - ADC2/15/A8  - JP3-8  - B8  - CPU DRV CH3 - (same) - mux GPIO15 or RTC_GPIO13
12 - 32K_XP - IO32/A1_4/X32P - ADC1/32/A7  - JP3-9  - B9  - CPU DRV CH4 - (same) - mux GPIO32 or RTC_GPIO9
17 - MTMS   - IO14/A2_6 - ADC2/14/A6  - JP3-10 - B10 - CPU DRV RSTn - (output, pull up to 3.3V) drives nRESET of I2C and SPI chips, mux GPIO14 or RTC_GPIO16
39 - GPIO22 - IO22 - SCL/22 - JP3-11 - B11 - CPU SCL - (I2C, pull up to 3.3V) - mux GPIO22 or U0RTS
36 - GPIO23 - IO23 - SDA/23 - JP3-12 - B12 - CPU SDA - (I2C, pull up to 3.3V) - mux GPIO23

not on header, internally connected on HUZZA32:

11 - VDET_2 - I35/A1_7 - ADC1/35/A13 - N/C - VBAT voltmeter (through divider) - mux GPIO35 or ADC1_CH7 or RTC_GPIO5 (input only)

not clear what function:

23 - GPIO0   - IO0/A2_1 - GPIO0 - serial RTS - mux GPIO0 or RTC_GPIO11
22 - GPIO2   - IO2/A2_2 - GPIO2 - serial DTR (looks like mistake on schematic) - mux GPIO2 or RTC_GPIO12
25 - GPIO16  - IO16 - IO16 - not connected? - mux GPIO16 or U2RXD
27 - GPIO17  - IO17 - IO17 - not connected? - mux GPIO17 or U2TXD
 9 - CHIP_PU - EN - RESET - push button - no mux

WROOM32 flash memory connection ("U3"):

28 - SD_DATA_2 - SD2 - n/c - mux SD_DATA2 or GPIO9
29 - SD_DATA_3 - SD3 - n/c - mux SD_DATA3 or GPIO10
30 - SD_CMD - CMD - n/c - mux SD_CMD or GPIO11
31 - SD_CLK - CLK - n/c - mux SD_CLK or GPIO6
32 - SD_DATA_0 - SD0 - n/c - mux SD_DATA0 or GPIO7
33 - SD_DATA_1 - SD1 - n/c - mux SD_DATA1 or GPIO8

Note:
- I2C controller can use any/all GPIO pins
- SPI controller can use any/all GPIO pins