[Ovmsdev] OVMS V3 Schematic

Mark Webb-Johnson mark at webb-johnson.net
Sun Apr 23 20:54:44 HKT 2017


I’m sharing the schematic and design instructions for OVMS v3. Attached is the schematic and pinout file.

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.

Here are some guideline instructions that went along with this to China:

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.

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.

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.

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?

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.

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.

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).

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.

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).

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.

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?

Please have a look at it, and let me have your questions / suggestions.

Thanks, Mark.

Pin	Type	Function	Name	Function
1	P	Ground	GND	Ground
2	P	Power supply.	3.3V	Power supply to ESP32 WROOM32
3	I	Chip-enable signal. Active high.	ESP32_EN	"EN" switch
4	I	GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0	ADC_IN	ADC in (from 12V vehicle power voltage divider)
5	I	GPIO39, SENSOR_VN, ADC1_CH3, ADC_H, RTC_GPIO3	SD_DET	SD Card DETECT
6	I	GPIO34, ADC1_CH6, RTC_GPIO4	SP_INT1	VSPI INT 1
7	I	GPIO35, ADC1_CH7, RTC_GPIO5	SP_INT2	VSPI INT 2
8	I/O	GPIO32, XTAL_32K_P (32.768 kHz crystal oscillator input), ADC1_CH4, TOUCH9, RTC_GPIO9	MDM_EN	UART 2, Modem Enable
9	I/O	GPIO33, XTAL_32K_N (32.768 kHz crystal oscillator output), ADC1_CH5, TOUCH8, RTC_GPIO8	SW_CTL	Switched 12V control signal
10	I/O	GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0	CAN_TXD	CAN, tx to transceiver
11	I/O	GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1	CAN_RXD	CAN, rx from transceiver
12	I/O	GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV	SP_CS2	VSPI CS 2
13	I/O	GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2	SD_CLK	SD Card CLK
14	I/O	GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ, HS2_DATA2, SD_DATA2, EMAC_TXD3	SD_DATA2	SD Card DATA2
15	P	Ground	GND	Ground
16	I/O	GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER	SD_DATA3	SD Card DATA3
17	I/O	GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD	n/a	SPI flash on ESP-WROOM-32
18	I/O	GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD	n/a	SPI flash on ESP-WROOM-32
19	I/O	GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS	n/a	SPI flash on ESP-WROOM-32
20	I/O	GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS	n/a	SPI flash on ESP-WROOM-32
21	I/O	GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS	n/a	SPI flash on ESP-WROOM-32
22	I/O	GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS	n/a	SPI flash on ESP-WROOM-32
23	I/O	GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13, HS2_CMD, SD_CMD, EMAC_RXD3	SD_CMD	SD Card CMD
24	I/O	GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP, HS2_DATA0, SD_DATA0	SD_DATA0	SD Card DATA0
25	I/O	GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1, EMAC_TX_CLK	ESP32_IO0	"BOOT" switch
26	I/O	GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD, HS2_DATA1, SD_DATA1, EMAC_TX_ER	SD_DATA1	SD Card DATA1
27	I/O	GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT	MDM_TXD	UART 2, TX to modem
28	I/O	GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180	MDM_RXD	UART 2, RX from modem
29	I/O	GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK	SP_CS1	VSPI CS 1
30	I/O	GPIO18, VSPICLK, HS1_DATA7	SP_CLK	VSPI CLK
31	I/O	GPIO19, VSPIQ, U0CTS, EMAC_TXD0	SP_MISO	VSPI MISO
32	-	-	n/a	No connection
33	I/O	GPIO21, VSPIHD, EMAC_TX_EN	EXP_1	Expansion #1
34	I/O	GPIO3, U0RXD, CLK_OUT2	CSL_TXD	UART 0, TX to console
35	I/O	GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2	CSL_RXD	UART 0, RX from console
36	I/O	GPIO22, VSPIWP, U0RTS, EMAC_TXD1	EXP_2	Expansion #2
37	I/O	GPIO23, VSPID, HS1_STROBE	SP_MOSI	VSPI MOSI
38	P	Ground	GND	Ground
39	P	Ground	GND	Ground





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20170423/d033e895/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ESP32_OVMS3_schematic_20170423.pdf
Type: application/pdf
Size: 365833 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20170423/d033e895/attachment-0002.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20170423/d033e895/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ESP32_OVMS3_pinouts.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 44846 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20170423/d033e895/attachment.xlsx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20170423/d033e895/attachment-0002.htm>


More information about the OvmsDev mailing list