I know this is not directly related to Arduino, but I figured this would be a nice place to post my doubts. Lately I have been into model rockets and I want to make one TVC stabilized rocket like BPS.space one. And for that I would need a flight computer with an IMU, barometer, micro SD card slot, etc. I have chosen an ESP32 as the microcontroller although I am open to another suggestions since this is my first PCB.
I have seen some tutorials on the internet showing how to wire the microcontroller to passive components/USB/power source, but they don´t say exactly why these connections are made that way and where the components values come from. I´ve copied a schematic I found on a youtube video but I´m not sure it works.
Those are the schematics without the IMU and the other sensors and peripherals. This is because I haven’t chosen the peripherals yet and this is one of my problems: I’m not sure how the ESP32 on the PCB is programmed.
Do I just have to connect it to the Arduino IDE and choose the ESP32 board or is there anything else that I have to do? Also, do the libraries work only with the modules of the sensors ex. MPU6050 or do they work with them correctly wired outside the modules? I know some of my questions may seem obvious but as I said before I have never made a PCB and I want to make sure it turns out good because it takes a lot of time to make and costs some money. My main doubts are:
How do I code the PCBs?
How do I choose which sensors to use and how to use them with the microcontroller?
Is the ESP32 a nice fit or is there any cheaper/better/easier to use alternative?
More importantly, what’s the best way to learn how to design it and what is a good method to design?
would the BME280 be a suitable sensor? works with ESP32 esp32-bme280-arduino-ide-pressure-temperature-humidity
how much data do you need to save to the SD card? e.g. the ESP32S3 has 520Kbyte of SRAM - could you store the data until required or even use the preferences library
do you need to build a PCB with onboard ESP32 ? you could use a esp32-super-mini as a daughter board on a PCB with your sensors
I would suggest that it is much too early to think about designing a PCB, given your level of experience. You will make many mistakes and waste components if you try. You need to build prototypes first, test them and refine the circuit until it is fairly stable and you have fixed most of the bugs and quirks. Begin with breadboards, then solder to stripboard/veroboard for longer term field testing.
Obviously these prototypes will be larger and heavier than you would like for a rocket payload, but there must be ways to test your design before you attempt to miniaturise with a custom design PCB.
First go to the Espressif website and download the data sheet and all the design notes they have for the ESP you choose. Spend a few weeks reading all the documentation. If you fully understand all the documentation you can then proceed with a PCB prototype.