Author Topic: First STM32 schematic, Did I mess anything up?  (Read 1178 times)

0 Members and 1 Guest are viewing this topic.

Offline warpigs330Topic starter

  • Contributor
  • Posts: 20
  • Country: us
First STM32 schematic, Did I mess anything up?
« on: May 07, 2021, 07:18:23 am »
So I am designing my first stm32 board (I know perfect timing), moving from the teensy 4.0. Before I start routing traces I was hoping someone could look over my schematic and make sure I didn't make any obvious mistakes. To give an idea of the goal for this is a modular synthesizer module. It has four outputs that come from a DAC through amplifiers to get them to 0-5v. It also has 5 gate inputs. there is also 7 buttons which have leds as well as multiple other leds. I have tested the buttons, gate inputs, leds, and dac with the teensy, I am just trying to move my project to an STM32. Ultimately my goal is to be able to program it through USB via a bootloader.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3358
  • Country: nl
Re: First STM32 schematic, Did I mess anything up?
« Reply #1 on: May 07, 2021, 10:50:37 am »
Your schematic is hard to view. Not enough pixels to make text readable.

I have a strong dislike for all those blue lines to separate circuit parts. Those lines are annoying to maintain during revisions of a schematic, and they do not add useful information. Instead I prefer to use a bigger font (at least double size) for naming the sections.

12pf is a bit smaller then usual for the crystal, but it could be right.
You have a few LC filters. It could be a good idea to add a series resistor of a few ohms to lower the Q and suppress any oscillation tendency.

You can also compare your schematics with a few of the many on Internet, Look at a few "Blue Pill" schematics or the "Maple Mini" or "Black Pill" WeAct STM32F411CEU6

You've drawn a wire right through header H1. Is this intentional? It's still bad practice though.
TL072  is not suitable for a single power rails. It needs a few volts of headroom from both power rails to work properly (Except inputs, they work from as high as the postive input rails).
« Last Edit: May 07, 2021, 10:55:44 am by Doctorandus_P »
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: First STM32 schematic, Did I mess anything up?
« Reply #2 on: May 07, 2021, 05:54:48 pm »
I would add ferrite bead, like 1k@100Mhz (i usually use BLM18RK102SN1D, but that just me). It will keep noose from uC from propagating through your power supply. Not really sure about that 39nH inductor. With 1uF cap it results in fc of about 800kHz. If you want kill noise from uC (VDDA pin powers the PLL block) probably a ferrite bead makes more sense. If you want to clean up VDDA supply, probably lower fc is in order, since  a 50...500kHz noise may theoretically interfere with PLL. That being said I've done probably like 20 STM32 designs that went to market (ie. passed EMC emissions and immunity) and I've never used anything else than 2 ferrite beads:one VDD, another one on VDDA + all capacitors required by the hardware design guideline. You can make all bigger MLCC (VCAP and bulk caps the same -4.7 or 10u). This way you reduce 3 different components to one.

I generally use 18pF for crystal load caps. This comes from formulas given in some document.
« Last Edit: May 07, 2021, 05:57:22 pm by poorchava »
I love the smell of FR4 in the morning!
 

Offline warpigs330Topic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #3 on: May 07, 2021, 06:36:59 pm »
Thanks a ton for the feedback y'all. I was mainly just wanting to make sure I didn't make any egregious errors. I have made a couple changes to the VDDA and clock based on your suggestions, but it sounds like I am on the right track. Thanks again.
 

Offline alexanderbrevig

  • Frequent Contributor
  • **
  • Posts: 700
  • Country: no
  • Musician, developer and EE hobbyist
    • alexanderbrevig.com
Re: First STM32 schematic, Did I mess anything up?
« Reply #4 on: May 07, 2021, 07:40:25 pm »
Do I spy a Eurorack module? :)
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #5 on: May 07, 2021, 08:05:12 pm »
Things mostly look right.

Since you are using USB-C, you'll want a pair of 5.1k pull-down resistors from the CC1 and CC2 pins to GND.

If you are using self-powered USB, you need a way to detect if Vbus is connected, and only enable the pull-up on D+ while Vbus is connected.

I'd normally have an an always-connected resistor for BOOT0 to GND, since you'll very rarely (if ever) need to actually pull it high, and you probably never want it floating.
 

Offline warpigs330Topic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #6 on: May 07, 2021, 08:08:53 pm »
I'm not sure I know what you mean by by self powered usb. This will be connected to a separate power supply in normal operation, though I would like to be able to program it over USB without the other power supply. The USB would only be necessary for firmware updates. I would probably program it with SWD.

And it is totally a eurorack module!
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #7 on: May 07, 2021, 08:31:35 pm »
I'm not sure I know what you mean by by self powered usb. This will be connected to a separate power supply in normal operation, though I would like to be able to program it over USB without the other power supply. The USB would only be necessary for firmware updates. I would probably program it with SWD.

USB devices are self-powered or bus-powered. Self-powered is when the MCU has an external power supply, bus-powered is when the MCU is powered from the USB bus. The schematic shows your design can be either.

The USB spec says you shouldn't apply a voltage on D+ before it detects that Vbus is connected (see this StackOverflow question). You may run into issues where USB enumeration fails if you connect the host after the MCU starts up.

Then again.... maybe it doesn't matter much. If it's only for DFU, then you could instruct the user to always connect the host before entering USB DFU mode (through button presses or setting BOOT0 HIGH and cycling power).
« Last Edit: May 07, 2021, 08:41:32 pm by pigrew »
 

Offline warpigs330Topic starter

  • Contributor
  • Posts: 20
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #8 on: May 07, 2021, 08:40:59 pm »
thanks a lot, that helps.
 

Offline pigrew

  • Frequent Contributor
  • **
  • Posts: 680
  • Country: us
Re: First STM32 schematic, Did I mess anything up?
« Reply #9 on: May 07, 2021, 09:03:27 pm »
thanks a lot, that helps.

Reading a bit more, it seems that the ROM bootloader USB DFU mode does not detect Vbus (a pin isn't assigned for it), so if your application will never use USB for normal things, maybe you don't need it.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf