Adding new boards for Gravitymon

New ESP32 boards for Gravitymon
I have now shifted my focus to ESP32 based boards for my projects and update Gravitymon to support some new options. The challenge is that most existing PCB's still focus on the ESP8266 so I have started to collaborate with a few PCB designers to see if we can get some boards focused on fully supporting Gravitymon as well supporting new features. I'm also considering to design some own PCB's but that is a longer journey.
In order to make it easier to maintain the project I will drop support for some of the older options; ESP32 d1 mini, ESP32 Lite / Floaty option. I will focus on supporting ESP32 c3 and ESP32 s3 variants since those support Bluetooth. I will keep support for the ESP8266 but that will be more on maintenance mode and new features will not be added to that version.
Identifying possible boards
Today there are lots of different ESP32 based boards available on the market and the pinout differs some, so its hard to support multiple vendors with one firmware version.
The ones I have been using for a while is mainly the Lolin boards which are quite consistent in pinout and features, but they are larger. Boards called Zero or Super Mini have a smaller form-factor but poses some challenges in the limitation on what pins are available. One thing the smaller boards lack is an exposed reset pin and there is no standardisation across manufacturers, so sourcing components could be a challenge.
New features
One of the new features I'm looking into adding is a charging pin that when voltage is applied the device will go into deep sleep and wakeup when the voltage is removed (device is removed from charger). The current design with placing the device on cap means that you need to apply a reset to the board for it to wakeup. This can be done using a reed switch and a magnet but I belive the charging pin is a better solution.
An ESP32 based design also need to have a voltage divider for the battery monitoring.
Other features that I have already implemented is the option to force the device into configuration mode.
Hardware options
Other options that i believe to be part of the design are:
- Bluetooth 5 support.
- Enough GPIO pins for supporting the features
- RTC memory support to keep data in memory during deep sleep which enables filtering and gravity velocity.
- 8Mb flash memory (this would be needed to support Arduino 3)
- Smaller form factor
- Good options for sourcing and availability, i.e. easy to find across the globe
- Support for wireless charging
Out of these the most challening is the Memory since most boards use 4Mb flash so I might be forced to stay with Arduino 2 for a while. When I did some testing using Arduino 3 the size of the firmware increased with 300kb which makes the total firmware larger than the 1.8Mb reserved for the application today. I will look into optimization of the code and UI to see if it's possible to reduce that, but the code base might then differ between ESP8266 and ESP32 making it harder to maintain.
Prototypes
Currently I'm focusing on testing two new boards, Waveshare ESP32c3 Zero (18-pin) and Tenstar ESP32c3 Super Mini (16-pin) boards that I believe could be a good fit for the features I want to implement. It might be an option to look into other types of batteries and charging boards if there are newer onces that are better.
In order to test these boards i had to create some adapters to they would work with
my existing test setup.
Here is a view on how the adapters look like for the two new boards and also my one
of my test rigs. On these adapters I have added the
missing components and connectors unique to Gravitymon so they can be properly
tested.
It will take some time for the next version to be ready since testing new hardware is time consuming and I'm still waiting for some components to arrive so I can complete some prototypes. Once I have tested the adapter boards I will publish them on github.
Happy brewing, Magnus