<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=""><div class="">Copying OVMS developers in on this, as it is an interesting question.</div><div class=""><br class=""></div><div class="">Free pins are very tight on the OVMS v3. We’ve added so much as standard (extra flash, SD card, 3 CAN buses, etc, etc) that there is not much free.</div><div class=""><br class=""></div><div class="">In the first draft design (shown on the attached pictures), we had two general GPIO pins free - EXP_1 and EXP_2. However, working with Espressif (the makers of the ESP-32 MCU) it seems that the best and simplest way to use external flash is to change the SPI bus chip select line and add an external flash on that. If we do that, we need one more pin, and that means goodbye EXP_2.</div><div class=""><br class=""></div><div class="">So, only one free GPIO pin - EXP_1.</div><div class=""><br class=""></div><div class="">We do have two internal expansion slots where piggy-back boards can be plugged (one for the optional modem and one free for general use). These use standard 0.1” SIP connectors (two 1x10), so very easy to breadboard. For those, we have EXP_1 on the attached diagram.</div><div class=""><br class=""></div><div class="">These pins are also available on a DA26 female expansion connector on the side of the module (so you can use them directly).</div><div class=""><br class=""></div><div class="">There is also a SW_12V switched 12volt supply on the DA26 female expansion connector.</div><div class=""><br class=""></div><div class="">So, the short answer is if you just need a single GPIO, that is available either internally of externally as EXP_1. If you need a second, you could probably use the SW_12V as well.</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><u class=""><b class="">I/O expansion</b></u></div><div class=""><br class=""></div></blockquote><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class="">If you need more than two, then you could use a SPI bus I/O expander, probably on one of the internal expansion slots, and use EXP_1 to drive that. The MAX7317 is suitable.</div><div class=""><br class=""></div><div class="">In the first draft design for OVMS v3, we have three relatively unused simple I/O pins</div></blockquote><div class=""><ul class="MailOutline"><ul class=""><li class="">MDM_EN - UART 2, modem enable (used to reset the modem - very infrequent)</li><li class="">SW_CTL - Switched 12V control signal (used to turn on/off the external 12V - very infrequent)</li><li class="">EXP_1 - expansion pin</li></ul></ul></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><br class=""></div><div class="">What I’ve been considering is adding a MAX7317 as standard, using EXP_1 to drive that (along with the normal SPI bus used for two of the CAN buses), then moving MDM_EN and SW_CTL to that. The MAX7317 has 10 I/O ports, so if we did that, we’d get 8 free I/O ports from the MAX7317 as well as 2 direct off the ESP32 MCU.</div><div class=""><br class=""></div><div class="">I’m 99% decided to do that, but just trying to work out cost impact and if there is enough room on the board to actually fit it in.</div></blockquote><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""></div><div class=""></div></body></html>