The ESP32-S3 logger went together very easily. I bought modules that contained the functions I needed. These modules included :
- ESP32-S3 Dev kit for the main controller
- A Micro SD module for to receive the logged data into readable files.
- A DS3231 Real Time Clock (RTC), a battery backed up clock to supply a time stamp for data entries
- An OLED module (128x64, 0.9") for displaying current data.
- An INA226 current sense module for measuring high side battery current, either output current to the load or input current from the charger.
- An ADS1115 4 channel 16 bit analog to digital converter (ADC) for precision measurement of battery voltage for logging.
For bringing up the board I started by bringing up the ESP32-S3. Then adding modules one at a time. ChatGPT turned out to be very nice for this phase. For the controller, I asked it to give me a "Hello World" test program. Starting with that program, I worked through some version issues by simply pasting the Arduino IDE error messages in the ChatGPT chat and letting it correct the code.
For each module, I requested from ChatGPT the optimal wiring assignments and a test program to check the modules. The modules on the I2C bus were very easy to bring up, the wiring on the Micro SD module SPI was slightly more complicated but all the same, not a real challenge.
Using modules has several advantages over building the functions directly from IC and ancillary components. The modules are already design tested and have only to be plugged into the breadboard.
To complete a schematic of the full logger it is generally necessary to generate circuit symbols and footprints to put into the local libraries, but that task goes quickly. Figure 1 shows a schematic of the whole logger.
As can be seen the wiring is very simple. After creating all the module footprints, the starting layout is given in the figure below.
The board as drawn is 3.5" by 5.5". However I have a couple of things I'm thinking about before finalizing the layout:
- Add connection to a module that will mount at the battery terminals. On the module will a 10 milliohm current sense resistor and a PMOS load shutoff switch. So I need to add the wiring and connectors for that change.
- I will also add some protection circuity and connectors for the four analog channels
- Add a connections for a battery temperature sensor.
- Add protection and connection for 8 general purpose DIO lines to the controller.
So there's still some work to be down before ordering a board.
In the meantime I'm going to be working out how to archive this project on GitHub.
To be continued....
No comments:
Post a Comment