<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m sharing the schematic and design instructions for OVMS v3. Attached is the schematic and pinout file.<div class=""><br class=""></div><div class="">This was a first draft, to the board design and PCB layout guys in China, but should give you an idea of what we’re trying for. The guys in China are now working on it, but I welcome any feedback from this group. As you can see, we have managed to incorporate pretty much all our goals, although the ESP32 expansion pins are pretty much maxed out (SD card, flash, and SPI take most) - only GPIO 2 pins free. We could use an I/O expander (via SPI, I guess), but that wouldn’t help that much.</div><div class=""><br class=""></div><div class="">Here are some guideline instructions that went along with this to China:</div><div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">We are using ESP-WROOM-32 module. We have one problem with this module - Flash memory size is too small. When using OTA (over-the-air) updates, the flash must be divided into 3 (1 for factory image, 1 for running image, and 1 for new download image). So, 4MB flash in ESP-WROOM-32 module is really just 1.3MB for each image. We tried arranging external flash, but not possible in ESP-WROOM-32 design. We will talk to Espressif about a custom ESP-WROOM-32 module with 16MB flash chip (instead of standard 4MB flash chip), or even perhaps no flash chip at all (then we can simply connect to pins 17-22 on our board ourselves). Anyway, for development, 4MB is ok, so let’s start with that.<br class=""><br class=""></li><li class="">The ESP-WROOM-32 connection arrangement is the same as DEVKIT reference design. Using the same EN and BOOT two buttons. The same CP2102 USB-UART. Just the power supply is different. Please check this reference design and double-check our schematic. It should follow almost exactly. This circuit is really just a DEVKIT circuit, but with different power supply, SD card, CAN bus, etc.<br class=""><br class=""></li><li class="">We want a high efficiency power supply. In particular on the 12V side. Suggestion is to use a AOZ1280 buck converter chip (but happy for you to use something better if you know of it). That has a wide input voltage range, and can support both 5V (from USB) and 12V-15V (from car). I haven’t given the schematic for that part of the circuit, as you can take it straight from the data sheet. As car power maybe not so stable, I suggest some big capacitor and inductor. We use diodes to protect against reverse polarity, and to allow circuit to be powered BOTH from the USB and CAR at the same time. There is a voltage divider circuit to go to ADC pin on ESP32 so we can measure the 12V voltage exactly.<br class=""><br class=""></li><li class="">We’ve use a 5V->3.3V converter also on the USB side, although not sure if that is necessary. Supposedly the AOZ1280 can take 5V->3.3V itself. Can you have a look at that and suggest? Maybe we can skip that component completely and just wire 5V from USB through a diode into input side of AOZ1280 next to 12V from the car?<br class=""><br class=""></li><li class="">We would like to be able to provide a high-side switched 12V car power output on the expansion connector. This will be under ESP32 control, so we can turn on/off external peripherals. We’ve used a simple BTS452R here.<br class=""><br class=""></li><li class="">We need a micro SD card slot. It would be good if this is externally reachable so card can be put in / taken out even with module in a case. We just used normal ESP32 schematic for this.<br class=""><br class=""></li><li class="">For the connectors, there is one DA26 female, and one DB9 male (same as OVMS v2). Also a USB connector for the CP2102. For the CAN bus, we’ve included 120R resistors which can be enable/disabled using jumpers. You can leave these jumpers open (termination disabled).<br class=""><br class=""></li><li class="">For the CAN bus, we’ve used the main controller in the ESP32 and a SN65 3.3V transceiver. We’ve also added two MCP2515 SPI can controllers and two SN64 3.3V transceivers for those.<br class=""><br class=""></li><li class="">For the expansion sockets, We’ve used two strips of 1x10 female SIP. We suggest putting these 40mm apart (to make two 40mm x 40mm squares). The top and bottom of any expansion board can be longer. There are two expansion sockets (one for modem, the other for custom).<br class=""><br class=""></li><li class="">We haven’t specified a GSM modem. We can work on that later (let’s just get wifi and bluetooth working first). The expansion sockets have GND, 3.3V, MDM_EN, MDM_TXD and MDM_RXD, which should be sufficient for this (same as OVMS v2). The modem expansion board will have GSM and GPS antennas on it, to come through case.<br class=""><br class=""></li><li class="">We don’t think we have enough pull-ups / pull-downs / current limiting resistors on the circuit (some pins on ESP32 have this internally, but not well documented, so safer to use external components). We think each line to/from the ESP32 needs these. Can you check, and add as necessary?<br class=""></li></ol></div><div class=""><br class=""></div><div class="">Please have a look at it, and let me have your questions / suggestions.</div><div class=""><br class=""></div><div class="">Thanks, Mark.</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">
<table border="0" cellpadding="0" cellspacing="0" width="1235" style="border-collapse:
collapse;width:1235pt" class="">
<!--StartFragment-->
<colgroup class=""><col width="65" span="2" style="width:65pt" class="">
<col width="619" style="mso-width-source:userset;mso-width-alt:26410;width:619pt" class="">
<col width="94" style="mso-width-source:userset;mso-width-alt:4010;width:94pt" class="">
<col width="392" style="mso-width-source:userset;mso-width-alt:16725;width:392pt" class="">
</colgroup><tbody class=""><tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl69" width="65" style="height:15.0pt;width:65pt">Pin</td>
<td class="xl69" width="65" style="width:65pt">Type</td>
<td class="xl64" width="619" style="width:619pt">Function</td>
<td class="xl64" width="94" style="width:94pt">Name</td>
<td class="xl64" width="392" style="width:392pt">Function</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">1</td>
<td class="xl68">P</td>
<td class="">Ground</td>
<td class="xl67">GND</td>
<td class="">Ground</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">2</td>
<td class="xl68">P</td>
<td class="">Power supply.</td>
<td class="xl67">3.3V</td>
<td class="">Power supply to ESP32 WROOM32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">3</td>
<td class="xl68">I</td>
<td class="">Chip-enable signal. Active high.</td>
<td class="xl67">ESP32_EN</td>
<td class="">"EN" switch</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">4</td>
<td class="xl68">I</td>
<td class="">GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0</td>
<td class="xl67">ADC_IN</td>
<td class="">ADC in (from 12V vehicle power voltage divider)</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">5</td>
<td class="xl68">I</td>
<td class="">GPIO39, SENSOR_VN, ADC1_CH3, ADC_H, RTC_GPIO3</td>
<td class="xl67">SD_DET</td>
<td class="">SD Card DETECT</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">6</td>
<td class="xl68">I</td>
<td class="">GPIO34, ADC1_CH6, RTC_GPIO4</td>
<td class="xl67">SP_INT1</td>
<td class="">VSPI INT 1</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">7</td>
<td class="xl68">I</td>
<td class="">GPIO35, ADC1_CH7, RTC_GPIO5</td>
<td class="xl67">SP_INT2</td>
<td class="">VSPI INT 2</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">8</td>
<td class="xl68">I/O</td>
<td class="">GPIO32, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4,
TOUCH9, RTC_GPIO9</td>
<td class="xl67">MDM_EN</td>
<td class="">UART 2, Modem Enable</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">9</td>
<td class="xl68">I/O</td>
<td class="">GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5,
TOUCH8, RTC_GPIO8</td>
<td class="xl67">SW_CTL</td>
<td class="">Switched 12V control signal</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">10</td>
<td class="xl68">I/O</td>
<td class="">GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0</td>
<td class="xl67">CAN_TXD</td>
<td class="">CAN, tx to transceiver</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">11</td>
<td class="xl68">I/O</td>
<td class="">GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1</td>
<td class="xl67">CAN_RXD</td>
<td class="">CAN, rx from transceiver</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">12</td>
<td class="xl68">I/O</td>
<td class="">GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV</td>
<td class="xl67">SP_CS2</td>
<td class="">VSPI CS 2</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">13</td>
<td class="xl68">I/O</td>
<td class="xl63">GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK,
SD_CLK, EMAC_TXD2</td>
<td class="xl67">SD_CLK</td>
<td class="">SD Card CLK</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">14</td>
<td class="xl68">I/O</td>
<td class="">GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2,
EMAC_TXD3</td>
<td class="xl67">SD_DATA2</td>
<td class="">SD Card DATA2</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">15</td>
<td class="xl68">P</td>
<td class="">Ground</td>
<td class="xl67">GND</td>
<td class="">Ground</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">16</td>
<td class="xl68">I/O</td>
<td class="">GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3,
EMAC_RX_ER</td>
<td class="xl67">SD_DATA3</td>
<td class="">SD Card DATA3</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">17</td>
<td class="xl71">I/O</td>
<td class="xl65">GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">18</td>
<td class="xl71">I/O</td>
<td class="xl65">GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">19</td>
<td class="xl71">I/O</td>
<td class="xl65">GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">20</td>
<td class="xl71">I/O</td>
<td class="xl65">GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">21</td>
<td class="xl71">I/O</td>
<td class="xl65">GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">22</td>
<td class="xl71">I/O</td>
<td class="xl66">GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS</td>
<td class="xl65">n/a</td>
<td class="xl65">SPI flash on ESP-WROOM-32</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">23</td>
<td class="xl68">I/O</td>
<td class="">GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD,
EMAC_RXD3</td>
<td class="xl67">SD_CMD</td>
<td class="">SD Card CMD</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">24</td>
<td class="xl68">I/O</td>
<td class="">GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0</td>
<td class="xl67">SD_DATA0</td>
<td class="">SD Card DATA0</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">25</td>
<td class="xl68">I/O</td>
<td class="">GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1, EMAC_TX_CLK</td>
<td class="xl67">ESP32_IO0</td>
<td class="">"BOOT" switch</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">26</td>
<td class="xl68">I/O</td>
<td class="">GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1,
EMAC_TX_ER</td>
<td class="xl67">SD_DATA1</td>
<td class="">SD Card DATA1</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">27</td>
<td class="xl68">I/O</td>
<td class="">GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT</td>
<td class="xl67">MDM_TXD</td>
<td class="">UART 2, TX to modem</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">28</td>
<td class="xl68">I/O</td>
<td class="">GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180</td>
<td class="xl67">MDM_RXD</td>
<td class="">UART 2, RX from modem</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">29</td>
<td class="xl68">I/O</td>
<td class="">GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK</td>
<td class="xl67">SP_CS1</td>
<td class="">VSPI CS 1</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">30</td>
<td class="xl68">I/O</td>
<td class="">GPIO18, VSPICLK, HS1_DATA7</td>
<td class="xl67">SP_CLK</td>
<td class="">VSPI CLK</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">31</td>
<td class="xl68">I/O</td>
<td class="">GPIO19, VSPIQ, U0CTS, EMAC_TXD0</td>
<td class="xl67">SP_MISO</td>
<td class="">VSPI MISO</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl71" style="height:15.0pt">32</td>
<td class="xl71">-</td>
<td class="xl65">-</td>
<td class="xl65">n/a</td>
<td class="xl65">No connection</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">33</td>
<td class="xl68">I/O</td>
<td class="xl63">GPIO21, VSPIHD, EMAC_TX_EN</td>
<td class="xl67">EXP_1</td>
<td class="">Expansion #1</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">34</td>
<td class="xl68">I/O</td>
<td class="">GPIO3, U0RXD, CLK_OUT2</td>
<td class="xl67">CSL_TXD</td>
<td class="">UART 0, TX to console</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">35</td>
<td class="xl68">I/O</td>
<td class="">GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2</td>
<td class="xl67">CSL_RXD</td>
<td class="">UART 0, RX from console</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">36</td>
<td class="xl68">I/O</td>
<td class="">GPIO22, VSPIWP, U0RTS, EMAC_TXD1</td>
<td class="xl67">EXP_2</td>
<td class="">Expansion #2</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">37</td>
<td class="xl68">I/O</td>
<td class="">GPIO23, VSPID, HS1_STROBE</td>
<td class="xl67">SP_MOSI</td>
<td class="">VSPI MOSI</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">38</td>
<td class="xl68">P</td>
<td class="">Ground</td>
<td class="xl67">GND</td>
<td class="">Ground</td>
</tr>
<tr height="15" style="height:15.0pt" class="">
<td height="15" class="xl70" style="height:15.0pt">39</td>
<td class="xl68">P</td>
<td class="">Ground</td>
<td class="xl67">GND</td>
<td class="">Ground</td>
</tr>
<!--EndFragment-->
</tbody></table></div></blockquote><div class=""><br class=""><div class=""><br class=""></div><div class=""></div></div></div></body></html>