[Ovmsdev] OVMS Hardware v3.1

Mark Webb-Johnson mark at webb-johnson.net
Wed Jan 17 21:36:21 HKT 2018


We hit a snag with the 3.1 hardware design. The flash voltage (VDD_SDIO) in WROVER module is 1.8V. In WROOM-32 module, VDD_SDIO was 3.3V. Also, as previously mentioned, the WROOM-32 modules uses GPIO16 and GPIO17 for external PSRAM (SPI CLK and CS signals). What wasn’t clear was _why_ they chose those pins. It now is…

The ESP32 design is that some pins (GPIO16, GPIO17, FL_DATA_2, FL_DATA_3, FL_CMD, FL_CLK, FL_DATA_0, FL_DATA_1, and of course VDD_SDIO) operate in the VDD_SDIO domain, and the rest operate in the 3V3 domain. So, switching VDD_SDIO to 1.8V (is 3.3V in OVMS v3) also switches those eight GPIOs to 1.8V. Another complication is that VDD_SDIO is not exposed (not a problem for 3.3v, but an issue if we want 1.8v to power the external flash).

I attach spreadsheet with ESP32, WROOM-32, and WROVER pinouts, along with strapping pins used and power domains (3.3V, SDIO/1.8V, etc). I think this makes things much clearer.

The WROVER pins are essentially the same as WROOM-32. No more, no less. But, VDD_SDIO changes from 3.3V to 1.8V.

It seems that the simplest approach is:

Free GPIO4 (SD_DATA1), GPIO12 (SD_DATA2), and GPIO13 (SD_DATA3) and make SDCARD 1-line protocol.
Note that GPIO12 is MTDI and is a strapping pin for 1.8V/3.3V, so we’ll try not to use that.
GPIO16 and GPIO17 are now used by PSRAM (CS and CLK), and not exposed. So:
Move UART 2 (TX to modem) to GPIO13.
Move UART 2 (TX from modem) to GPIO4.
Leave GPIO16 and GPIO17 unconnected (used internally by WROVER).

That leaves the problem of GPIO22 (FL_CS2) for our external flash. All the other (shared) pins are VDD_SDIO (1.8v), but that pin is in the 3.3v domain, and we need it to drive an external 1.8v flash chip (which is not 3.3v tolerant). From what I can see, there are no free VDD_SDIO domain pins. #17 through #22 are used for SPI flash HSI, and the last two GPIO16 and GPIO17 are used for the PSRAM (and are not exposed outside WROVER so nothing we can do about it anyway).

The only solution we can see is to continue to use GPIO22 for FL_CS2 external flash, but use a level converter 3.3V -> 1.8V. We only need uni-directional, but it must operate fast enough not to interfere with a 40MHz SPI bus. Maybe a resistor voltage divider would be too slow / interfere too much, so safer to use a simple single channel uni-directional 3.3V->1.8V logic level shifter chip. Trying to find a flash chip that is 3.3V tolerant, and test it, would just introduce more delays (for the sake of one extra 9cent component).

Regarding the SDCARD. According to the specs, this is driven at 3.3V and our circuit has this on 3.3V pins, so that should be ok. The only issue is strapping pins GPIO2 and GPIO12. I can’t get this to work with Analog Lamb’s WROOM-32+PSRAM module at all, but it works fine on the Espressif WROVER-KIT I have (in both 1 line and 4 line modes). So we just use the capacitors and pull-up resistors from the WROVER-KIT arrangement, along with our existing GPIO2-GPIO0 link (as per Espressif SDCARD documentation):

The changes to support this now include:

Swap the GPIOs around, as above (freeing some pins from moving SDCARD 4-line to 1-line, and staying clear of the nasty GPIO12).
Add a new small 3.3v->1.8v regulator, to power just our 16MB external flash chip (and level converter).
Add a new unidirectional 3.3v->1.8 level converter for CS line of 16MB external flash.
Switch external 16MB flash to a 1.8v component.
Add a few capacitors on the power lines near external flash and SD CARD, to help with peak power draws.
Re-work SD CARD pull-ups and protection circuitry (as per latest Espressif WROVER-KIT design).
Minimising length of SPI and SD bus lines, and keeping them away from sources of interference (where possible).
Increasing size of solder pad for USB connector, and large capacitors, to make stronger.

I’m triple checking this tonight (as it goes to make boards tomorrow). I would appreciate any feedback from electrical engineers on this list.

Regards, Mark.




> Begin forwarded message:
> 
> From: Mark Webb-Johnson <mark at webb-johnson.net>
> Subject: [Ovmsdev] OVMS Hardware v3.1
> Date: 10 January 2018 at 2:41:58 PM HKT
> To: OVMS Developers <OvmsDev at lists.teslaclub.hk>
> Reply-To: OVMS Developers <ovmsdev at lists.teslaclub.hk>
> 
> 
> Production…
> 
> Analog Lamb, while interesting, is just (a) too expensive (double the price), (b) unproven, (c) uncertified, and (d) has long lead times. Using proven Espressif certified modules seems the safer way to go.
> 
> So, we’ve decided to go with a switch to a standard certified ESP WROVER module, and external 16MB flash memory. The circuit board footprint for this is a little larger than the WROOM-32 module we’ve been using, and requires one more 3.3V->1.8V power conversion, but seems the safest way to go.
> 
> Accordingly, I’ve agreed with the China guys to proceed along these lines for the main board:
> 
> Change WROOM-32 to WROVER (on circuit antenna version, similar to WROOM-32).
> 
> We can free IO12 (SD_D2), IO13 (SD_D3), and IO4 (SD_D1), by using just 1-line SDCARD. I don’t really want to use IO12 as that is a bootstrapping pin.
> 
> WROVER PSRAM uses IO16 and IO17, so we can’t use that for modem.
> Move modem to IO4 and IO13.
> 
> Change to 1.8V 16MB flash chip (W25Q128FW?). As SDD_VDIO is not exposed, add a simple regulator 3.3V->1.8V for external flash?
> 
> When burning e-fuses, need to take care with 1.8V/3.3V SDD_SDIO fuse - leave at 1.8V.
> 
> Add capacitors for SD CARD and external Flash, as per Espressif example.
> 
> Increase size of solder pad for big capacitors, and USB connector, to make it stronger.
> 
> For the data lines of circuit traces SDCARD, SPI bus, external flash, take care to keep away from power traces or other sources of interference and keep the traces as short as possible.
> 
> The change to WROVER is a PITA at this stage, but that 4MB PSRAM should give us more headroom and the extra bill-of-materials costs is just a couple of US$.
> 
> For the modem, we’re double-checking the power (which seems ok, but check to be sure), and changing passive -> active antenna. At the moment, it seems to be just a couple of passive components soldered inline between two easily accessible points. For existing developer modems in the field, we’ll try to make a simple upgrade kit (passive->active) for GPS, and post them out. If you don’t need GPS (such as Roadster users), the modem boards are functionally the same as the production ones.
> 
> 
> 
> Existing developer OVMS v3 boards (with WROOM-32 module) will continue to be called v3.0. New production OVMS v3 boards (with WROVER module) will be called v3.1. We have conditional compilation in the firmware, to switch the pin assignments and whatever else is required.
> 
>  Branch: refs/heads/for-v3.0
>  Home:   https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3 <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3>
>  Commit: 9504df70be78b6626970ec0ea53d2c2470e90afa
>      https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/9504df70be78b6626970ec0ea53d2c2470e90afa <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/9504df70be78b6626970ec0ea53d2c2470e90afa>
>  Author: Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>
>  Date:   2018-01-10 (Wed, 10 Jan 2018)
> 
>  Changed paths:
>    M vehicle/OVMS.V3/main/Kconfig
>    M vehicle/OVMS.V3/main/ovms_peripherals.h
> 
>  Log Message:
>  -----------
>  Support for OVMS hardware v3.1
> 
> Converting developer v3.0 boards to v3.1 is not really feasible (a skilled solderer could probably use a 16MB Analog Lamb WROOM-32+PSRAM module; that would be a relatively simple de-solder + re-solder of the module, a not-so-simple re-arrange of the traces for IO16->IO4 and IO17->IO13, and disabling of external 16MB flash). Anyway, those existing developer modules should be fine to continue to use (just without the extra PSRAM).
> 
> We are today finalising the circuit schematic and board layout for the above, and building a couple of test boards (with WROVER modules). I should have one in about a week’s time (assuming all the components are available). In that time, we’ll finish the ESP IDF v3.0 support, and test late next week / over next weekend (20th/21st Jan). Assuming no problems, we should be able to give factory the go-ahead to produce early the week after.
> 
> Given that timing, I doubt if we are going to be able to get these boards made before the Chinese New Year holidays. Even if we can get them made, FastTech distribution may not be able to get them out during the holidays. Manufacturing in China starts to close down around the end of January / early February this year. New Year itself is mid-February. Anyway, we’ll get this all finalised, payment and instruction to start manufacturing in place, then do the best we can and get these out available during February. A big warning is going to go with them that this is for early adopters only, and firmware is changing on a daily basis. Updating firmware via wifi / sd card should be fine.
> 
> I’m seeing a light at the end of a long dark tunnel.
> 
> Regards, Mark.
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> Begin forwarded message:
> 
> From: Mark Webb-Johnson <mark at webb-johnson.net>
> Subject: OVMS Hardware v3.1
> Date: 10 January 2018 at 2:41:58 PM HKT
> To: OVMS Developers <OvmsDev at lists.teslaclub.hk>
> 
> 
> Production…
> 
> Analog Lamb, while interesting, is just (a) too expensive (double the price), (b) unproven, (c) uncertified, and (d) has long lead times. Using proven Espressif certified modules seems the safer way to go.
> 
> So, we’ve decided to go with a switch to a standard certified ESP WROVER module, and external 16MB flash memory. The circuit board footprint for this is a little larger than the WROOM-32 module we’ve been using, and requires one more 3.3V->1.8V power conversion, but seems the safest way to go.
> 
> Accordingly, I’ve agreed with the China guys to proceed along these lines for the main board:
> 
> Change WROOM-32 to WROVER (on circuit antenna version, similar to WROOM-32).
> 
> We can free IO12 (SD_D2), IO13 (SD_D3), and IO4 (SD_D1), by using just 1-line SDCARD. I don’t really want to use IO12 as that is a bootstrapping pin.
> 
> WROVER PSRAM uses IO16 and IO17, so we can’t use that for modem.
> Move modem to IO4 and IO13.
> 
> Change to 1.8V 16MB flash chip (W25Q128FW?). As SDD_VDIO is not exposed, add a simple regulator 3.3V->1.8V for external flash?
> 
> When burning e-fuses, need to take care with 1.8V/3.3V SDD_SDIO fuse - leave at 1.8V.
> 
> Add capacitors for SD CARD and external Flash, as per Espressif example.
> 
> Increase size of solder pad for big capacitors, and USB connector, to make it stronger.
> 
> For the data lines of circuit traces SDCARD, SPI bus, external flash, take care to keep away from power traces or other sources of interference and keep the traces as short as possible.
> 
> The change to WROVER is a PITA at this stage, but that 4MB PSRAM should give us more headroom and the extra bill-of-materials costs is just a couple of US$.
> 
> For the modem, we’re double-checking the power (which seems ok, but check to be sure), and changing passive -> active antenna. At the moment, it seems to be just a couple of passive components soldered inline between two easily accessible points. For existing developer modems in the field, we’ll try to make a simple upgrade kit (passive->active) for GPS, and post them out. If you don’t need GPS (such as Roadster users), the modem boards are functionally the same as the production ones.
> 
> 
> 
> Existing developer OVMS v3 boards (with WROOM-32 module) will continue to be called v3.0. New production OVMS v3 boards (with WROVER module) will be called v3.1. We have conditional compilation in the firmware, to switch the pin assignments and whatever else is required.
> 
>  Branch: refs/heads/for-v3.0
>  Home:   https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3 <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3>
>  Commit: 9504df70be78b6626970ec0ea53d2c2470e90afa
>      https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/9504df70be78b6626970ec0ea53d2c2470e90afa <https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/commit/9504df70be78b6626970ec0ea53d2c2470e90afa>
>  Author: Mark Webb-Johnson <mark at webb-johnson.net <mailto:mark at webb-johnson.net>>
>  Date:   2018-01-10 (Wed, 10 Jan 2018)
> 
>  Changed paths:
>    M vehicle/OVMS.V3/main/Kconfig
>    M vehicle/OVMS.V3/main/ovms_peripherals.h
> 
>  Log Message:
>  -----------
>  Support for OVMS hardware v3.1
> 
> Converting developer v3.0 boards to v3.1 is not really feasible (a skilled solderer could probably use a 16MB Analog Lamb WROOM-32+PSRAM module; that would be a relatively simple de-solder + re-solder of the module, a not-so-simple re-arrange of the traces for IO16->IO4 and IO17->IO13, and disabling of external 16MB flash). Anyway, those existing developer modules should be fine to continue to use (just without the extra PSRAM).
> 
> We are today finalising the circuit schematic and board layout for the above, and building a couple of test boards (with WROVER modules). I should have one in about a week’s time (assuming all the components are available). In that time, we’ll finish the ESP IDF v3.0 support, and test late next week / over next weekend (20th/21st Jan). Assuming no problems, we should be able to give factory the go-ahead to produce early the week after.
> 
> Given that timing, I doubt if we are going to be able to get these boards made before the Chinese New Year holidays. Even if we can get them made, FastTech distribution may not be able to get them out during the holidays. Manufacturing in China starts to close down around the end of January / early February this year. New Year itself is mid-February. Anyway, we’ll get this all finalised, payment and instruction to start manufacturing in place, then do the best we can and get these out available during February. A big warning is going to go with them that this is for early adopters only, and firmware is changing on a daily basis. Updating firmware via wifi / sd card should be fine.
> 
> I’m seeing a light at the end of a long dark tunnel.
> 
> Regards, Mark.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ESP32_OVMS3_pinouts.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 48395 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment.xlsx>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OVMS_V3.1_20180117.pdf
Type: application/pdf
Size: 96588 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0002.pdf>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A04F19CE-27D9-439A-89DB-8B70136598A0.png
Type: image/png
Size: 27385 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0002.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0003.htm>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20180117/a4396019/attachment-0004.htm>


More information about the OvmsDev mailing list