#BLE Temperature & Humidity Sensor

1 messages · Page 1 of 1 (latest)

hallow yacht
#

For now I have still some issues, like the 50ohm trace for antenna should be 1-2mm wide (only .5mm here resulting an approximate 75ohm impedance -> .2 reflection coeff), also the fuel gauge eats a lot of power since it has a coulomb counter (might choose another ic just to measure voltage and with lower consumption) and adding silkscreen infos

static peak
#

can you upload schematic with better quality? PDF maybe?

hallow yacht
static peak
#

CH340K (U3) operates at 5V. Can STM32 tolerate such logic levels on UART?

hallow yacht
#

Ohhh i think you're right. I checked that 3.3V was ok for the ch340 but not the other way around! Thx for pointing that out

#

Might add a level shifter

#

or just resistor divider might be cheaper and good enough for this application

static peak
#

For U6, why is VINA / EN connected to VIN?

hallow yacht
#

Well by reading datasheet 1 is for enable

#

so I think they might have the wrong schematic bc it doesn't make sense

#

Maybe i'll just add 0R just in case

static peak
#

there is internal connection, you should not connect it on your board

hallow yacht
#

Yeah i think you're right, it might just act as a LP filter to delay the EN/PS pins

static peak
#

what is the purpose of D2 (Schottky diode) ?

hallow yacht
#

It's an artefact from previous design, totally useless here

#

It's the part of the circuit i am the least sure about but since it's only an edge case (connecting the battery while usb is connected to disable tp4054) i din't put too much thoughts into it as it may be totally useless

static peak
#

I would suggest to remove this diode. Transistor gate can be in high impedance state, sensitive to noise, and it might enable the transistor by accident.

#

and now the layout. GND connection for STM is very bad. Look at pin 32. It has very poor connection to boards GND trough the center pad. You need to put GND via glose to pin 32.

#

Pin 22 also needs GND via

hallow yacht
#

Do you think it's a good idea to fill the gnd thermal relief pad with vias ?

static peak
#

do you have capped vias? Soldering is the main concern

hallow yacht
#

I thought that .2mm vias might be small enough to not let solder flow through it

#

I should read smthg on that

static peak
#

But I think you can put some vias there. Just expect potential solder and flux contamination on opposite side. But it should be fine.

#

But personnaly I would try to also put GND vias outside the package, close to pins.

hallow yacht
#

And if it does flow it'll just increase the thermal couple between gnd plane and the stm32

#

yeah it looked nice but I should move thoses caps

static peak
#

maybe slightly, but worth it in my opinion

hallow yacht
#

The only thing where i'm concerned about this layout is the 3.3v under the rf line

static peak
#

yes this also would be nice to avoid.

hallow yacht
#

Even though it's perpendicular and might not catch so much field I should try to route it differently

static peak
#

just go on blue layer, under the IC

hallow yacht
#

You're helping me so much :D thx

static peak
#

and if you do not have capped vias, also remove vias from U4 pads, not worth the risk or soldering issues

#

and what is your via pad and hole size? it looks small

hallow yacht
#

.35/.2 (diameter/size)

#

basically near the minimum size of jlcpcb capabilities

#

which is .25/.15 I think

static peak
#

ok, sounds quite hardcore for me, but if they say they can do it then it is ok

hallow yacht
#

which size are you usually using ?

#

(I just have a pair of .6/.4 for the Vbus to handle 500mA)

static peak
#

0.2mm/0.5mm, or even 0.3mm/0.7mm. But it all depends on your manufacturer and expected quality 😄

#

can't you also rotate this filter?

hallow yacht
#

Yes but I think i'll redo all the RF bc these traces are way to thin

#

I'm calculating about 75ohms with this circuit, for 2 layers i should have 1-2mm

static peak
#

and in my opnion you should not worry too much about 50 ohm char. impedance. Your connection is very short.
Anyway, when you make the calculation, make sure to include the co-planar effect of GND fill.

hallow yacht
#

Yeah but still i'm 2-3x too thin

#

But on the other hand I only get 20% reflection which seems acceptable for this kinf of project

#

It's the first time i'm using the curve tool, i should have better curves at the pi junction also

static peak
#

for 2.4Ghz this is not critical. Just avoid 90 degrees bends. That's why I suggested to rotate this filter 45 degrees

#

how do you calculate your characteristic impedance?

hallow yacht
#

Just using kicad inbuild tools

static peak
#

so with 0.5mm you will get ~57 ohm, in my opinion (guessing) this is good enough. Your trace is very short

#

just put more GND vias closer to trace

hallow yacht
#

Here's the updated version!! Thanks again for all your tips

static peak
#

it is probably OK, but I would still add more vias to exposed pad of STM32 (e.g. 4x4 pattern). And personally I would remove vias from pads. But this is jus to be safe

cold pelican
# hallow yacht

theres a plugin for stitching vias on kicad if you want a shortcut

hallow yacht
#

I use one from an RF pluging I think

#

I just add after some of them manually