F405 & F411 versions of the BluePill

What are you developing?
User avatar
Squonk42
Posts: 191
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Mon Oct 30, 2017 11:09 pm

This is due to the poor design of the BluePill power supply: only a single 100 nF capacitor on the VDDA pin. At 1 MHz, this will only provide ~20dB of insertion loss:
Decoupling Insertion Loss.png
Decoupling Insertion Loss.png (36.85 KiB) Viewed 164 times
Now, if you improve the circuit by using a section filter like this:
Section Filter.png
Section Filter.png (6.41 KiB) Viewed 164 times
You obtain a >60 dB insertion loss (red curve) at 1 MHz:
Combined Inductor-Capacitor Insertion Loss.png
Combined Inductor-Capacitor Insertion Loss.png (30.07 KiB) Viewed 164 times
Source: Murata's Application Manual for Power Supply Noise Suppression and Decoupling for Digital ICs (a MUST READ!).
Compare it to the average PSRR (Power Supply Rejection Ratio) for the AP2112 of 65 dB... :?

OTOH, adding a 600 ohm ferrite bead between GND and AGND may prove catastrophic if you consider ground as a low impedance path for current to return to the source instead of as an equipotential: as the STM32 12-bit ADC has an RMS value of quantization noise of 233 µVrms (e.g. 1 LSB), a 0.4µA current flowing into the 600 ohm ferrite bead will be seen as a 1 LSB variation at the ADC output. :shock:
Last edited by Squonk42 on Tue Oct 31, 2017 1:41 pm, edited 1 time in total.

lkcl
Posts: 123
Joined: Thu Sep 28, 2017 5:48 am

Re: F405 & F411 versions of the BluePill

Post by lkcl » Tue Oct 31, 2017 1:43 am

Squonk42 wrote:
Sun Oct 29, 2017 12:47 pm
Regarding the microSD socket, look at 104031-0811 from Molex. Only 11.95 mm wide, meaning that it fits between the BP rows of pins... And you can find it cheap on TaoBao from many vendors.
no. not that one. it's more expensive and not as ubiquitous in the futian district. molex is also known for being way overpriced.

use the one known as "TF Card", push-push, with the footprint below:

Untitled.jpg
Untitled.jpg (17.41 KiB) Viewed 160 times

it's a standard part in eagle's standard libraries. push-push is great because it's spring-loaded, no irritating "try desperately to get it out with your nails or maybe a pair of tweezers if you have fat thumbs".

User avatar
Squonk42
Posts: 191
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Tue Oct 31, 2017 6:10 am

I chose specifically that one as it has to fit between the 2 rows of pins that are 600 mils (15.24 mm) apart, which is not the case for common TF card holders.

I also consider it as a not mounted option with only a provision for the footprint by default.

Now if you can find a cheaper one having width < 500 mils (12.7 mm), I take it :)

EDIT: maybe this one or these simpler no push-push ones will do, difficult to tell, there are no dimensions. If someone can ask the vendors for a 2D drawing...
Last edited by Squonk42 on Tue Oct 31, 2017 6:59 am, edited 1 time in total.

racemaniac
Posts: 625
Joined: Sat Nov 07, 2015 9:09 am

Re: F405 & F411 versions of the BluePill

Post by racemaniac » Tue Oct 31, 2017 6:49 am

indeed, the standard push push micro sd slot is what i'm currently using on my own projects, but it's too big to fit on a bluepill sized board...

User avatar
Squonk42
Posts: 191
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Tue Oct 31, 2017 7:15 am

Yes, here are the dimensions for the proposed one:
104031-0811.png
104031-0811.png (20.19 KiB) Viewed 146 times
Maybe this one or these simpler ones no push-push will do, difficult to tell, there are no dimensions. If someone can ask the vendors for a 2D drawing...

racemaniac
Posts: 625
Joined: Sat Nov 07, 2015 9:09 am

Re: F405 & F411 versions of the BluePill

Post by racemaniac » Tue Oct 31, 2017 8:22 am

when i've got some time, i'll measure those.
i have most types of micro sd slots in my collection (it's cheap, and the best reference if you want to use them is actually having one to measure XD).

User avatar
Pito
Posts: 1628
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: F405 & F411 versions of the BluePill

Post by Pito » Tue Oct 31, 2017 9:59 am

a 0.4µA current flowing into the 600 ohm ferrite bead will be seen as a 1 LSB variation at the ADC output.
A 600ohm Ferrite Bead does not have 600ohm "resistance". That "600ohm" is "impedance - mostly an inductive reactance" at some frequency (ie 100MHz). Ferrite beads have got 0.0xx ohm DC resistance typically..
Even with 600ohm/100MHz impedance and the ADC's bandwidth (could be ~1MHz) the FB will not have any significant impact on the 1LSB variation (as the FB's impedance at 1MHz would be maybe 2-5ohm)..

PS: there are smd "inductors" and smd "feritte beads" available.

The inductors are rated in uH or nH, while FBs in "ohms" (an impedance at 100MHz).

Use FBs only, as the "inductors" have got large DC resistance (0.x to ~ohms) and low self-resonance (~1-100MHz) such they will ring...

Also you want to use an FB with rather lower impedance (ie 30-100ohm) as the larger values will peak as well (they do self-resonate at >=200MHz)..
Pukao Hats Cleaning Services Ltd.

racemaniac
Posts: 625
Joined: Sat Nov 07, 2015 9:09 am

Re: F405 & F411 versions of the BluePill

Post by racemaniac » Tue Oct 31, 2017 5:00 pm

So, current things we haven't fully figured out yet if i'm following the thread correctly (must admit i currently am not reading every post in the greatest detail ^^'):
- try to make the pcb with all components on 1 side (even though i haven't got confirmation yet that it will make a worthwhile price difference. Since there are many cheap boards with caps & small components on the bottom) -> anyone got some hard facts about the price difference (not just reasons why it *should* be more expensive, but an example of actual quotes that show this?).
- if possible, make room for an sd slot (need to find one that is small enough). is going to be hard though (the routing of this & the above will be very complex)
- 2 voltage regulators, or just 1 with ferrite beads & caps connecting digital & analog lines? -> i assume the original maple mini did the effort of 2 voltage regulators for a reason?
- trying to break out as many pins as possible (probably as SMD pads then, even if that is less sturdy. 2mm/1.27mm spaced trough hole pads is also an option to save some space)
- trying to make the board 5cm long (even though the pads on the end are then too close to the edge. the manufacturer will have to ignore that)
- which resistors to include on the usb port? (make room for 1k5 pullup in case of an 103 chip? is it worth putting the 22R resistors on the dp & dm lines?
- go with a midmount usb connector? (-> would be more robust, but means we have less space for routing the usb lines...)

User avatar
RogerClark
Posts: 7489
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: F405 & F411 versions of the BluePill

Post by RogerClark » Tue Oct 31, 2017 8:17 pm

Re: USB pullup

The consensus, was this is not needed on the F4

Re: USB 22ohm resistors.

i think this is best practice, but optional, depending on space on the PCB

Re: Regulator for analog Vcc

I presume that Leaflabs had a good reason for using the second regulator. I suspect, its potentially cheaper and takes less space on the PCB than the passive components you would need instead


Re: 50 mm long board and components in bottom of board

I think with too many constraints, the board is going to take months to design and may never get produced.

Perhaps move as many as possible to the top without wasting hours of time and potentially adding conflicts to the PCB

User avatar
Squonk42
Posts: 191
Joined: Thu Dec 29, 2016 9:25 am
Location: Bordeaux, France

Re: F405 & F411 versions of the BluePill

Post by Squonk42 » Tue Oct 31, 2017 10:32 pm

RogerClark wrote:
Tue Oct 31, 2017 8:17 pm
Re: USB pullup

The consensus, was this is not needed on the F4
Yes, but if you make a provision for it, along with replacing the 2x VCAP capacitors by 0R shunts, the board is then compatible with all LQFP64 STM32s, including L4s, and including the SD Card connector through SPI... I think it is really worth the pain!
RogerClark wrote:
Tue Oct 31, 2017 8:17 pm
Re: USB 22ohm resistors.

i think this is best practice, but optional, depending on space on the PCB
Agreed, this is usually a provision for CEM certification by replacing with a CMC or adapting the values to get a better eye-diagram for USB certification. Not needed, but we may keep it if we have enough real estate on the board.
RogerClark wrote:
Tue Oct 31, 2017 8:17 pm
Re: Regulator for analog Vcc

I presume that Leaflabs had a good reason for using the second regulator. I suspect, its potentially cheaper and takes less space on the PCB than the passive components you would need instead
Not sure, as the regulator will need at least 2x caps anyway (1x at the input, 1x at the output), and you still need at least a decoupling cap near STM32's AVDD pin, so it is necessarily more expensive, takes more space, and dissipates more power than a passive solution. Probably Leaflabs did not think much when doing this, and just used a bazooka to kill a fly. BTW, the Mapple is the only small dev board I have seen that used a second LDO for analog supply :)
RogerClark wrote:
Tue Oct 31, 2017 8:17 pm
Re: 50 mm long board and components in bottom of board

I think with too many constraints, the board is going to take months to design and may never get produced.

Perhaps move as many as possible to the top without wasting hours of time and potentially adding conflicts to the PCB
If the 50 mm constraint only applies to small PCB prototypes and not to the intended manufacturer, then we should get rid of it, as well as using only 0603 passive components and move down to 0402 alltogether, as this won't be more expensive and save us some space on the board.

As for double-sided component load, it will be more expensive than single-sided, but the question is how much for the intended manufacturer again. If not too much, then we should only try to make room on the bottom side for the optional SD Card connector. This connector may be too big to be soldered economically on the bottom side, though...

Maybe we should ask the manufacturer for the price difference? If honest, they will tell us, otherwise, they will just take the max price and tell us it is the same price :D

As for additional pins to break out, a clever solution is to use a second row of 2.54mm holes offset by 1.27mm, like the LicheePi Zero (btw, look at their TF Card connector! It is a Molex 47309-2851, it fits between the 2 header rows):
Image
Image

Post Reply