2020-11-24 02:30 AM
Hello,
I made a circuit design for a college project and this is my first hardware design. Could I have a review of it before I send it out for getting PCBs.
The microcontroller used is STM32F730R8T6. I am particularly interested in knowing if the USB device connections are right, any other remarks are also welcome.
The schematic PDF is attached below.
Any suggestions are very much appreciated.
Thanks,
Naveen.
2020-11-24 05:00 AM
I see you have put 22 ohm resistors in series with the USB leads. Where did the idea for those come from? I don't see them in data sheets for stm32
I would put a capacitor, perhaps 10 nF or 100 nF, from nRst to Gnd. This holds the processor in reset for a short time as power is coming up.
I would add a diode across J7 Pump in case the pump (or does it have a relay) or the wiring to it is at all inductive.
I am surprised that the capacitors for both crystals are the same value (12 pF).
There might be other issues but those are enough to get on with, and maybe my activity will get others to have a look!
Regards, Danish
2020-11-24 08:48 AM
Is there only one VCAP in your CPU. In your post you talk about PCB, but you show only schematics of your design. It matters what does PCB look like around USB and crystal. I would place ground and VDD first especially around CPU.
This kind of schematic diagrams are hard to read if you have a large design. It is hard to know if have you found for intance all ground connections and so on.
2020-11-24 11:55 AM
Hi Danish,
Thanks for taking a look at it. I found a few schematics in posts around the internet which had the 22 ohm resistors in series (one such: https://community.st.com/s/question/0D50X00009XkhTX/stm32f103c8-usb-unknown-device-problem). I thought that if it is not necessary I can short it later.
About the capacitors at the crystals, I calculated and found out that 12pF was needed for the 16 MHz crystal and around 20pF at the 32KHz crystal, but 12pF was the closest available with me, so I used it. But I will change it.
I will add a capacitor between NRST and GND. Yes, it is an inductive load, so I will also add a diode in between 5V and J7 Pump.
Thanks,
Naveen.
2020-11-25 02:08 AM
Hi Naveen,
stm32f103 is a very ancient processor (in computer years). As far as I know more modern ones (such as yours) don't need the resistors.
Have a look at the User Manual for a discovery or nucleo board for a processor from your series.
2020-11-25 04:19 PM
R4 should not be there. The MCU has a integrated pullup for USB.
2020-11-28 07:06 AM
R5 also should not be there because NRST also has integrated pull-up. Read the AN4661.
D9A functionality is not clear/suspicious.
2020-11-29 04:53 AM
Thanks for pointing out that application note. I will revisit this design after going through it.
STM32F730 indeed has a pullup resistor for NRST. I will remove the external one.
It is an inductive load at the diode D9 (the schematic has a wrong part number). Another community member suggested it in order to prevent reverse voltage
2020-12-29 09:38 AM
Hi,
Apologies for the late reply, I was making the PCB design and attached it to the post.
You are absolutely right. The placement of components for USB matters.
If you still have some time, please do take a look at it.