Learning how to design custom boards

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Rocketjoe

Member
Joined
May 28, 2022
Messages
16
Reaction score
26
I have recently wanted to design custom boards for my electronics. I have just started learning and would like to check if my schematic has any flaws. It is a basic design of an external model using the MPU-6050 chip. I made it just to learn and play around with KiKad. I will only be using I^2C, and in the final design of this project, I hope to have a functioning altimeter and accelerometer using the RP2040 as my main processor.
 

Attachments

  • Screenshot from 2024-06-10 20-15-45.png
    Screenshot from 2024-06-10 20-15-45.png
    29 KB · Views: 0
I don't know where the I2C is going but make sure either here or where it is attached to that it has pull up resistors. (4.7k-10k) I would also add a bypass capacitor to your clocks VDD. Is 32KHz the correct frequency?
 
I second Mason's recommendations. FYI, if you were planning on using the processor's internal pullup resistors for the I2C lines, don't... they're generally too weak to provide effective signal conditioning.
 
I have re-done the schematic, adding pullup resistors and a bypass capacitor. Also, about the clock, on the documentation it states that the mpu3050 has an "Optional external clock inputs of 32.768kHz or 19.2MHz".
 

Attachments

  • Screenshot from 2024-06-17 20-56-47 - 2.png
    Screenshot from 2024-06-17 20-56-47 - 2.png
    83.5 KB · Views: 0
In your learning journey try to place your components and their designators in a way and orientation that makes it easier to read the part numbers and values. Don’t have them overlapping other components, text and interconnecting wiring.
Also, it is not common practice to use ‘No Connect’ (x) symbols to indicate a schematic wiring crossover; they are typically reserved for device pins that are unused.
Pin 1 of X1 (Vio) should probably be connected to VCC. You currently have it floating. I also question your choice of 32kHz clock frequency.
Some schematics, particularly when they get larger, also benefit from ’implicit’ connections by using net labels on component pins, rather than explicit wiring.
If you post your KiCAD file, then we can make some suggestions to help you on your way, and make your schematic easier to read.
 
Last edited:
Some schematics, particularly when they get larger, also benefit from ’implicit’ connections by using net labels on component pins, rather than explicit wiring.
Second this. I like to put every component in a separate box with its associated components, and then connect them all via net labels. See attached photo for inspiration.

This approach also helps when it comes to laying out the PCB as it makes it clear which decoupling caps are for which components. This entire board had probably 20+ capacitors between 3.3V and GND, and with this schematic is it clear next to which IC they each need to be placed.

1718707034777.png
 
I don't know where the I2C is going but make sure either here or where it is attached to that it has pull up resistors. (4.7k-10k) I would also add a bypass capacitor to your clocks VDD. Is 32KHz the correct frequency?
I'm not an electrical engineer but do tinker with electronics so I'd like to know, what are "pull up resistors" and "bypass capacitors"? I have my own flight computer using a m0 feather lora prototype board and various sensors and I don't have extra resistors or capacitors like RocketJoe is depicting. I'm interested if I should be concerned about correcting something on my own hardware.
 
Last edited:
I'm not an electrical engineer but do tinker with electronics so I'd like to know, what are "pull up resistors" and "bypass capacitors"? I have my own flight computer using a m0 feather lora prototype board and various sensors and I don't have extra resistors or capacitors like RocketJoe is depicting. I'm interested if I should be concerned about correcting something on my own hardware.

I2C is an "open drain" protocol. What this means is that the lines are normally logic high and any device can pull them low. The other devices observe it being pulled low, and that's how they communicate. To hold the lines high when no device is pulling them low, so-called "pull up resistors" are put between the lines and the high voltage rail. You can often get away without them if you are using prototyping boards as they often include them, and many microcontrollers have internal pullup resistors as well.

Bypass capacitors are needed to ensure smooth power delivery to ICs. All wires have some inductance, that is they resist sudden changes in current. If an IC suddenly demands more current (perhaps because its a radio chip that began transmitting, a sensor that began to take a measurement or any number of other reasons) the inductance of the wires will cause a voltage drop. In practice the current draw of a chip will change many many times per second, resulting in a very noisy voltage which is undesirable and can damage ICs if it exceeds their safe limits.
A bypass capacitor stores some charge, so when the IC demands more current it can be drawn from the cap without causing a voltage drop until the current in the wire catches up. Likewise when the IC reduces its current draw, the excess current in the wire is stored in the cap so there isn't a voltage spike. They have to be placed as close as physically possible to the IC being protected, hence it is important to keep track in the schematic of which bypass caps are for which ICs.
As with pullup resistors, they are included in prototyping boards so you don't have to think about it if you are using them. If you are using bare ICs on a custom PCB, the datasheet will tell you which bypass capacitors you need.

Hope that helps!

Edit: bypass capacitors are also called decoupling capacitors
 
Last edited:
The RP2040 has an internal crystal oscillator. (check the datasheet 2.15.2.2. for more info) Is there some reason that you need to use an external clock?

Edit: I'm a bit confused. Are you planning on using an RP2040 chip or a development board. I was looking at the pin outs for the RP2040 chip and they don't match up with the pin outs on your schematic.
Also, I was to hasty in saying that there is an internal clock generator on the RP2040. The oscillator is there but it requires a crystal, two capacitors and a resistor to make it work as shown in 2.16. The crystal must be a 12MHz crystal.
There is a minimum design document that you should download and study.
https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf#minimal-design-example
Also download the datasheet if you haven't done so already.
https://www.mouser.com/datasheet/2/635/rp2040_datasheet-3048960.pdf
 
Last edited:
Get a copy of The TTL Cookbook by Don Lancaster. Easy read, and you'll learn a lot about how digital electronics work, and why you need those resistors and capacitors. Yes, it's an old book, and TTL isn't used a whole lot anymore, but the principles are still valid.
 
Get a copy of The TTL Cookbook by Don Lancaster. Easy read, and you'll learn a lot about how digital electronics work, and why you need those resistors and capacitors. Yes, it's an old book, and TTL isn't used a whole lot anymore, but the principles are still valid.
Great book and was one that I first learned about digital electronics way back in the day.

Another suggestion:
Check Adafruit's sensor and processor boards. They do publish the schematics and PCB layout. Study how they do those drawings and how parts are connected.
Then they also how great tutorials on connecting and code.
 
Back
Top