I’ve designed a schematic for an Arduino-based project using KiCad, and I would really appreciate it if someone could take a look and let me know if there are any mistakes or improvements I should make.
I’m fairly new to hardware design, so any feedback would be helpful – especially regarding common issues I might have overlooked (e.g. decoupling capacitors, reset circuits, etc.).
I also have a question regarding programming. I added both ICSP headers and a USB-to-TTL connection to my design.
If I’m using a brand-new ATmega2560 chip (without a bootloader), should I first upload the bootloader using the ICSP pins, and then upload sketches via the USB-to-TTL interface afterward?
You seem to have a 3.3V converter circuit, but the only place it seems to be used is to pull the i2c lines up. Why is that? Why not pull them up to 5V and not need the 3.3V converter circuit? Or power the whole circuit from 3.3V only? (For that you would need to drop the crystal to 8MHz, or use the atmega's internal oscillator.)
EDIT: now you have added more of the schematic, I see there are other parts of the circuit that run at 3.3V. Why not run everything at 3.3V?
You can do that. Or you can continue to upload via ICSP. But using serial programming is convenient because you can use it to both problem and debug using serial monitor.
There seem to be a lot of unused pins on the atmega2560. Why not use a smaller, cheaper chip? If you need more flash & RAM memory than atmega328 has, could you use use a ATSAMD21 or even an RP2040?
I chose to power the circuit with 5V because most reference designs that use the ATmega chip also use 5V. This provides better compatibility and ensures a more stable operation overall. As for the I2C lines, I used 3.3V pull-ups because some peripherals on the bus operate at 3.3V, and I wanted to avoid any level mismatch issues.
I decided to use the GPS module over UART mainly because most off-the-shelf GPS modules typically use UART by default. So it's simply a matter of familiarity and easier integration.
The reason I went with the ATmega2560 is that the Arduino UNO was not sufficient for my needs in terms of both I/O pins and UART ports. My project requires three separate UART interfaces for GPS, LoRa, and serial communication with a PC. The ATmega2560 provides enough UARTs, and I also wanted to stay within the Arduino ecosystem for easier development and familiarity.
While I understand that more modern and compact chips like the ATSAMD21 or RP2040 are available, I preferred the simplicity and stability of working with ATmega, especially considering its full compatibility with the Arduino environment.
That said, I’d really appreciate it if you could take a quick look at the design and let me know if you notice any potential mistakes or improvements. Thanks in advance!