#help-with-hw-design

1 messages · Page 44 of 1

light ermine
#

What is the purpose of a 0ohm resistor?

distant raven
#

SPI flash line filtering

#

Espressif highly recommends

supple pollen
#

0Ω resistors as filters? That seems odd. Small inductors (especially the lossy "ferrite bead" style) would make sense, but I normally only use 0Ω resistors as option selectors or jumpers.

light ermine
#

TIL 🙂

distant raven
#

high frequency cutoff I believe is what they are aiming for

supple pollen
#

I'll often see low-value (22-33Ω) series resistors to reduce reflections and the like, and in some designs they turn out not to be needed and are replaced with cheaper 0Ω resistors. However, I don't know if that's what happened here.

distant raven
#

I'm pretty sure that's what it is

silent niche
#

Hey all! I'm new to the server, but I have a PCB design that I'd love to have someone look over. It's for an LED art project - I have a previous design and schematic that worked great, but the new manufacturer has redesigned slightly and I'm no good with reading schematics (software guy). It's an ESP32 PCB with APA102 LEDs. Happy to pay for the time 🙂

silent niche
distant raven
#

Post a high res of the schematic and board file and most of us would be happy to look

silent niche
#

Here's the design I got back today! I don't see anything obviously wrong with it, but I don't know what I'm looking for. It's supposed to be USB-C (says Micro, but I suspect the pins are interchangeable). We haven't used the Audio interface from the previous iteration, so it's more of a nice-to-have / future-proofing thing. It's going in a cool hexagonal LED lamp

distant raven
#

It seems okay, but I need to take a better look on my computer

heavy jasper
#

Re: series resistors, I think here they are putting them in as an option. Depending on your exact routing, you may need to tweak the value, or may not need them at all, but these data lines are fast enough that it'd be bad to not have the option to tweak the series termination, at least for an early rev of board. If you release a board with 0 ohms, do the design validation probing, and find that you're not seeing any issues, then you can make the decision about whether or not to remove them.

tough matrix
#

@silent niche welcome! I think you followed my link to this discord (I post on FB under my real name, Alexander K).
I tried looking at the schematics but got complaints about missing font and the wires are shown as yellow on white, which makes it almsot impossible to see 😦

silent niche
#

Thanks, yes I did! I don’t know if I can do anything about the font or the wire lines. I thought it was a strange choice. Maybe I can get the gerber files when the layout’s done

tough matrix
#

what EDA software do you use? doesn't look like Eagle - was it KiCad? Altium?

silent niche
#

I don't know, I'm afraid - I didn't produce this schematic. A supplier in China did, through our manufacturer

heavy jasper
#

Unless they have a very specialized USB-C header, the micro-B and C will not be directly interchangeable.

#

You need the pull-down resistors on the CC1/CC2 lines to properly indicate to a type-C host that you are a power-sinking device.

#

(This would unfortunately work with an A-to-C cable, but then not with a C-to-C cable with a compliant host)

cerulean crest
#

Or if using some active USB-C cables which shouldnt be an issue much but comes up every now and again

#

Sorry, hold on

#

correction, the resistors just wont work at all, I dont know what I said it like that

#

Just something to be aware of

heavy jasper
#

The resistors alone should be enough for a compliant host; the cable has its own active ID chip for identifying that they can carry more current.

cerulean crest
#

Im referring to something separate, reading the problem I think this is a unnecessary side note I added that I probably shouldnt have thrown in the ring

heavy jasper
#

Ah, OK.

#

(It would not surprise me at all if there were weird corner-case gremlins in the various options of negotiation for power delivery/active cables and the like)

#

And it would also not surprise me at all if people are not good at following the spec in a way that causes even more gremlins than the spec itself allows

cerulean crest
#

Yes, there are and is exactly what I was talking about 😜

heavy jasper
#

(see Benson's cable reviews early in the type-C days)

cerulean crest
#

Some cables will only work with PD digital interface if using a compliant charging brick

#

But if you get the shotty brick too it works just fine

#

So 👌

heavy jasper
#

I think e.g. the Nintendo Switch chose a somewhat obscure PD profile

#

so that not many chargers work with it except their first-party one

#

Except for some very high-end chargers that support fully variable PD profiles (instead of the cheap controllers that have a fixed number)

pearl tapir
#

Looking at the schematic, I didn't think his circuit was actually using a USB-C, so no programming resistors were needed.
I guessed his problem with flashing the board would be in the transistor circuit but I'm not familiar enough with the details to have a valid opinion.

heavy jasper
#

Only reason I mention type-C is that Elliott seemed to be under the impression it was.

cerulean crest
heavy jasper
#

The transistor circuit is definitely.... a tad strange, but also without fonts rendering or more context, it's hard to tell.

pearl tapir
heavy jasper
#

But it definitely triggers my "please just use real logic gates for this" senses.

cerulean crest
heavy jasper
#

There does seem to be one note from Espressif on this: "(Some third party ESP32 development boards use an automatic reset circuit for EN & GPIO pins, but don't add a capacitor on the EN pin. This results in unreliable automatic reset, especially on Windows. Adding a 1uF (or higher) value capacitor between EN pin and GND may make automatic reset more reliable..)"

#

And seems like no such cap here, so that's at least worth adding.

#

(at least pads for it)

cerulean crest
#

If you dont have that cap, its probably not going to work, some silicon revs are better than others but the cap needs to be there

pearl tapir
#

Pretty easy to test.

heavy jasper
#

It also looks like the audio amp is missing its own supply bypass cap.

#

(As best as I can puzzle out by only looking at the manufacturing information in the properties of the components)

pearl tapir
#

I didn't look at the data sheet and I agree that a bypass would be a good idea but if the output is differential as a lot of voltage boosting audio amps are, that tends to null out power noise.

heavy jasper
#

I don't see how it's differential, it's just a single output signal. Datasheet recommends a 100nF cap, which probably means "you'd possibly be fine without it, but may as well put it on the early rev and see if you need it later, you can always de-stuff"

#

I also can't tell where the 3.3V is actually coming from on this board.

#

I thought it was that big regulator, but the parameters seem to suggest it's a 5V regulator? Those may just be wrong

#

Yeah, the parameters I think are just wrong, when I click on the input of it, it directs to the +5V net

pearl tapir
#

Agreed. More bypass capacitors that you don't need and don't populate is far better than tacking them on later.

heavy jasper
#

Ah, I think this is an Orcad library organization thing.

#

The "Part Number" is the overall series one (which they made the 5V one probably because they added that one first) but then "Value" is HT7533, which is the 3.3V version

#

That's also a lot of LEDs (49; at a quick search they seem to be 50mA max per) to be running off just a micro-B, especially if the intention is to connect this to a computer to control. But that depends on the usage profile and how bright the LEDs are planned to be run.

#

It’ll also mean a bunch of cap on that 5V rail (which I see on page 2, though I don’t know what values/voltages they are) which can be a bit risky for working with a proper USB controller on the other end.

#

(e.g. you plug it in, the inrush current trips the over current limit, and the port turns off)

silent niche
#

This is a ton of info, thank you all so much! I’m working my way through it

#

We found that the EN capacitor was required for one PCB we did but not for the original version of this PCB. I don’t know why, it may be the specific ESP32 module that was used. But better to include it. I remember reading about it on that link that was posted

silent niche
#

The enclosure uses a USB-C jack, with a USB-C wall wart. The previous iteration had a Micro USB jack. I would’ve guessed it’d just default to 5V and be happy, but thought it’s important enough to be sure of

heavy jasper
#

So, I believe a well-behaving USB-C host actually provides no power on VBUS at all, until it sees proper termination of the CC1/CC2 (and potentially after that a PD negotiation partner).

silent niche
#

So if I’m reading this right, as long as I only use D+/D- I’m basically at USB 2.0/1.1, using a USB-C connector

heavy jasper
#

In terms of data, yes.

#

You can just no-connect the high speed pairs

silent niche
#

That works for me. I really just want the C form-factor, of course

heavy jasper
#

You do need to wire both D+/D- pairs

silent niche
#

However, to connect a USB 2.0/1.1 device to a USB-C host, use of Rd[54] on the CC pins is required, as the source (host) will not supply VBUS until a connection is detected through the CC pins.

heavy jasper
#

Sounds right. Not sure where you found that specific quote; but I seem to remember looking this up in the type-C spec in the past

silent niche
#

Wikipedia

heavy jasper
#

I mean technically I think to connect any speed device you need the pull-down resistors

#

It's not like a USB3.0 device magically works without them

#

but I'm nit-picking there

heavy jasper
#

sweet beautiful rendered text

#

To confirm because of the block of text at the bottom: You are nanode LLC?

#

(you may want to also censor the address if you care)

silent niche
#

No no, they designed it for us a couple years ago

heavy jasper
#

Ah OK

#

but your IP

silent niche
#

Yup!

heavy jasper
#

cool

#

just checking

silent niche
#

No sweat. Good due diligence

heavy jasper
#

What type of machine do you use for development with this, and do you happen to have a macbook available to try?

#

Apple tends to be very scrupulous in their design of USB ports

#

such that you can't get away with as much inrush/overcurrent tricks with them as you can with most PCs

silent niche
#

I’m on a mac, never had any trouble in the past though

heavy jasper
#

(at least back in the USB-A days)

#

OK

silent niche
#

You have to install a SILabs driver for it

heavy jasper
#

For reference I've heard of even just a 10uF ceramic directly on VBUS being enough to trip it out sometimes.

silent niche
#

For my other projects I use the M5 Atom Lite which doesn’t require a driver

heavy jasper
#

But they may have moved to the middle a bit

silent niche
#

I’ve definitely tripped the power and disabled the port before, as well as other dumb things with the USB ports

#

So I know what you’re talking about. But once the drivers are set up there’s no problem

heavy jasper
#

OK. Is the intent that this is reprogrammable? Or is the CP2102 just for initial programming to get a wireless-capable image on?

silent niche
#

That’s the hope, yeah

#

My software can flash OTA, but it’s reassuring to have the USB connection just in case

heavy jasper
#

(I ask just because if you don't need it to program after first run, could also just chuck some testpoints down on JTAG, flash it using a pogo pin manufacturing fixture, then call it a day, enabling you to save the chip)

silent niche
#

They’re actually having the chip suppliers program them for us, which is going to be great

heavy jasper
#

Ah yes, that is the other option

silent niche
#

I think the number of people who’ll be reprogramming it themselves will be the vast minority. But important to keep it hackable

heavy jasper
#

Yeah if that's an intentional feature of the product, well worth the cost.

silent niche
#

I’ll try re-exporting the PDF as an image tomorrow, that might help with legibility

#

So far this is very encouraging, thank you for all your help. I’ve got some good notes, main one being the EN pin capacitor I’d had in mind, as well as supply bypass for the audio. I haven’t used the audio yet, that’s more there as a nice-to-have. Very hard to make it look right. The USB-C, I’ll confirm with them. Sounds like it needs pull-down resistors on CC1/CC@

sweet rampart
#

Is there a basic featherwing part for Fusion 360 I can use? I downloaded the adafruit library but nothing turns up searching for "feather"

#

Something like a connector with a PCB footprint that matches the feather positioning.

sweet rampart
#

I'm just getting started with Fusion 360 pcb design. Is there a way to get the center of a PTH that's part of a 1x16 header? It'll show me the center of the header's position, and I can do math to figure out where a given PTH is, but I'd like to just select that PTH. (Is this a good place to ask questions like this?)

carmine scarab
#

Hey @sweet rampart - There appears to be some of that information on the "Introducing Adafruit Feather" learn guide
https://learn.adafruit.com/adafruit-feather/overview

There's a "Feather specification" section, which has measurements and other guidelines. Also, in the "Community Feathers and Wings" section, there's a link to the GitHub repositories for Adafruit Feather and Wings PCB designs (https://github.com/adafruit?utf8=✓&q=Feather PCB&type=&language=) in EagleCAD format. If Fusion 360 can import those (I believe I've seen that it can), you can use as those jumping-off points.

Adafruit Learning System

Boards of a Feather flock together!

GitHub

Adafruit Industries has 1382 repositories available. Follow their code on GitHub.

last bison
#

I'm trying to connect the backlight of a LCD display.

I got 4 pins to the LCD for the backlight, pin 2-5.

pin |
2 | led anode
3 | led anode
4 | led cathode
5 | led cathode

#

I guess something like this

12V -> pin 2
12V -> pin 3
GND -> R1 -> pin 4
GND -> R2 -> pin 5

How do I calculate the values for R1and R2?

round stump
#

@last bison Do you have a link to the part?

distant raven
#

If you had the possibility for 8 different i2c address, how might you set up your circuit that a person could select the address easily? I'm thinking DIP switches, but maybe that is too much freedom and I should just select one, maybe two (cut jumper)

elder peak
#

I would add the two footprints and default to the 0x10 address

distant raven
supple pollen
#

I didn't know Eagle added an after dark view, that's cute

elder peak
#

They had to, otherwise it was a black mark on their record

distant raven
#

Actually you just set solder mask color to hex 000000

#

Alpha value to 66

#

Then set the substrate color to black

round stump
#

Why does everyone else's pcbs look so much fancier than mine

distant raven
#

honestly, perfectionism

#

lol

round stump
#

lol am I just a bad perfectionist?

heavy jasper
#

If this isn't 4 layers, you might specifically try to run the blue tracks further down

distant raven
#

continuous plane

#

I'm working on reworking that part

round stump
#

^ That's what my ocd gets me

distant raven
#

might be the colors

#

It might also be that I use ground pours

heavy jasper
#

How are C1 and C2 not violating DRC?

#

Am I massively off on scale?

tough matrix
#

indeed, they seem too close

distant raven
#

keep out doesn't overlap

supple pollen
#

If you're going to really be a perfectionist, you could rotate it 45 degrees

distant raven
#

I dislike 45° rotations now for whatever reason

#

When I made my first Nano board, it was 45° offset like they originally were

#

But then I tried it on other boards and it just didn’t stick

supple pollen
#

Fair enough: art is a reflection of the artist

distant raven
#

Indeed 🙂

distant raven
#

darn savages developing ULP scripts for Eagle on Windows only. how could they 🙂

elder peak
#

If you move the QFP and R2, R3, and C2 over a bit, you could make it look like a Cheshire cat grin.

supple pollen
#

I didn't think ULP would be system specific, how disappointing

unreal flax
#

I didn't think so either. I haven't ever had trouble running them on Linux.

tough matrix
distant raven
rain remnant
#

nice logic boards way to teach logic chips

supple pollen
#

It seems like modifying those bits of the script wouldn't be too difficult.

tough matrix
distant raven
#

SapWings

tough matrix
#

we now have winged oaks!

#

or winged acorns

distant raven
#

Those little helicopter seeds

#

Maples I believe

silk lark
#

there was a board called maple

#

the blue pill killed it

#

one of the first stm32 boards

distant raven
#

No idea how successful the SapWing will be

#

There’s a lot of ESP32-s2 boards

tired bobcat
#

im designing my first pcb for use with an ESP32, I was wondering if it's ok to use the entire bottom plane as ground and top plane as 3.3v? or is that bad for some reason?

ember laurel
#

you specifically need a 2 layer board?

pearl tapir
#

@tired bobcat Are you planning on 4 layers? If so, I'd recommend putting power and ground on inner layers close together as they will act like a very low impedance albeit small capacitor.
If 2 layers, pour power and ground anywhere you can is fine.

tired bobcat
#

@pearl tapir im doing a portable game console and it has alot of buttons

#

so theres a ton of gnd and 3v3 connections

#

its only 2 layers

#

can i just flood the top side with GND

#

and bottom layer with 3.3?

tawdry yoke
#

isn't that a gameboy sp pcb? I'm planning on making one too but out of a pi4, I have no idea on how to even start with pcb design

tired bobcat
#

lol

#

yea it is

tawdry yoke
#

thought I recognised it

tired bobcat
#

how are u gonna power the pi4 lol

tawdry yoke
#

with a nintendo switch battery

tired bobcat
#

the pi zero only gets like 2 hours battery life out of 1000mah

#

id imagine a pi4 ud get like 30 mins lol

tawdry yoke
#

Hmm true, what would you suggest? I have the zero but it's a bit laggy I'm in the process of gathering parts for he SPW project

tired bobcat
#

i have 3 of the spw

#

and while they are pretty cool to show off

#

its kinda useless with how short the battery life is

tawdry yoke
#

yeah. I read up on something like that.

tired bobcat
#

also the boot times are terrible

#

im working on a esp32 version of that

#

im planning on only playing NES and SMS on it so it's good enough

#

but atleast it'll instant boot and save

#

and i dont have to worry about shutting it down

tawdry yoke
#

Esp32? Is that different than the pi zero? I don't know much of pcb and circuitry but I'm trying to learn it, my plan was to make a retro pi portable to play atari 2600 up to the ps1 but now I don't think that possible

supple pollen
#

Yes, they're fairly different. The Pi zero has a powerful CPU, but runs a time sharing operating system, so needs to take time to boot and shut down, offers multi-user capability, compilers, graphics, and demanding computation, but isn't as good at real time things.

tired bobcat
#

im basicly making this but in the GBA SP form factor

supple pollen
#

The ESP32 is a microcontroller, so boots fast, doesn't need to do anything special before removing power, and just runs one or two simple tasks quickly.

silk lark
#

while the microcontroller itself boots fast, the emulator may still need some time to initialize and load the data

distant raven
#

Ugh DRC/ERC missed like three things on this SapWing

#

Nothing jumper wire couldn’t fix but still ughhhh

distant raven
#

also found a via that I must have accidentally moved and made a connection where one shouldn't exist lol

heavy jasper
#

What do you mean "DRC/ERC missed?" Was it a true miss, or is it just not fully-featured enough (at least without other scripting) to catch the errors? A check I've come to use very commonly is single-pin net check. I'm not sure if EAGLE has something like that built in; if not then there's almost certainly a script for it.

#

Very useful for discovering typos on net names leading to missed connectivity.

#

(since generally, if you're naming a net, you're running it more than one place, except for e.g. testpoints defined on the PCB only)

distant raven
#

Mostly that it didn’t see that a few connections were not complete

#

Grounds connecting to a ground plane but not to the other ground connections

#

A 3.3V cutoff

heavy jasper
#

Isn't the Eagle DRC a bit weird in that it never reports unrouted connections?

#

Or is that a very old thing?

#

(I remember always having to run rats and see if there were any unrouted nets reported, but it's also been ~8 years since I used EAGLE seriously)

distant raven
#

I use autoroute to check for missed nets

#

I guess I didn’t do that one last time before ordering

#

Oh well, ya live and ya learn

#

This is really tight clearance for OshPark

#

But continuity is good on this traces

#

I think I did 4mil

tough matrix
#

@heavy jasper eagle DRC does report airwires, unless you specifically instructed it not to and then forgot about it...

#

@distant raven 4 mil traces... wow.
No, I understand that it is far from being record thin, but still, I never went below 8 yet.

supple pollen
#

I went with the iExtruder, but that one might work better

tough matrix
#

quick and very basic question on logic ICs
I am reading a datasheet on a CMS logic gate (MC74VHC1G32) and it has 2 electrical characteristics:

  • output diode current
  • output sink current
    What is the difference - and which of them really tells me what is the maximal current that can be sourced from the output pin when it is high?
distant raven
#

@tough matrix did you ever get a chance to try those adjustable load switch?

#

I found one on my desk and remembered that you ordered some 😂

heavy jasper
#

"output diode current" note is rated for vout < gnd, and is the abs-max current that the low-side output body diode can sink if the output is externaly driven below GND

#

"source/sink current" is I believe the abs-max number that you're looking for, but even then on the maximum ratings are not the most useful (that's just what doesn't damage the part)

#

What you really want to look at are the high-level and low-level output voltages

#

for different output currents

pearl tapir
#

@tough matrix You may have copied those wrong but neither one is intended to tell what current can be sourced from the output. That's actually a function of what output voltage is acceptable. If you are not interfacing with a logic input, you may not care about noise margin.

#

At a Vcc of 4.5V, it looks like 8mA to me but I may not be looking at the same data sheet as you.

heavy jasper
#

Yeah, I would normally want to see curves here

#

but I guess not, they just spec in terms of "8mA max for a given droop that still meets ViH requirements of similar-series chips for 4.5V VCC specifically"

pearl tapir
#

I like to see the internal circuit.

#

At Vcc = 4.5V, 8mA output, high temp it can drop output voltage to 3.66V on the Mot part.

tough matrix
#

Thanks!

last bison
#

I trying to create a feather wing for a 480x480 screen. I was looking at RA8875 but my LCD have 18 bit RGB and the RA8875 only have 16 bit RGB to the screen. Should I switch to RA8876? I liked that the RA8875 has built in SDRAM. My board have some space constraints and I might not be able to fit a external SDRAM module for the RA8876. What is my alternatives? Any other chip with 18bit RGB+spi and built in SDRAM?

tough matrix
#

8mA is a little too low for me - I want to runs a couple of LEDs from it - but hopefully it will work

#

@distant raven I did test it - and it works great.
I just need to find a project where this switch could be used...

distant raven
#

Very nice, thanks! Let me know if you need anything else. Willing to send samples of any current and future boards (just to make sure inventory doesn’t go stale)

#

And that’s an open offer for anyone 🙂

distant raven
#

I'm going to be completely revamping my CP Sapling boards to get this to be even smaller

#

going 2 sided, but carefully two sided.

#

And I also need to finish my SAM E51 board at some point too. Polish the Icy Tree M0 + FPGA board too

#

lots to do this weekend

silk lark
#

I'm not sure how good this idea is, but it kind of happened last night. A super-flat version of PewPew, with bi-color LEDs and touch pads.

#

still need to finish routing the leds

tropic crane
#

Hello Chat,I come to you for the advice.
Does anyone know any Chinese assembly service?Im looking for some through hole assembly witch will not break my wallet.I order my boards from JLC but they only offer SMD assembly. I'm designing HDMI splitter/adapter board for Odroid and stuck using HDMI male connector like this( i coudnt find any SMD style).I have to jam PCB between the pin rows.
So preferably I'm looking for the service which will produce PCB,source the parts and assemble them.

distant raven
#

Through hole assembly is usually pricier

#

Might check Makerfab (not sure if I’ve got the name right)

tough matrix
#

you can also check pcbway, seeed studio fusion, and elecrow

distant raven
#

And of course, Sparkfun’s new service

tropic crane
#

Thank you ! I will check them out.

sweet rampart
#

Is this a good place for help with Fusion 360 electronics? I'm just learning how to use it (haven't really used Eagle before, either), and I'd like to copy the board outline from an Adafruit Eagle PCB to my PCB. Is there an easy way to do that?

unreal flax
#

Fairly easy, yeah. Fusion 360 should be able to open Eagle board files, and you can just copy/paste from the dimension layer to get the board outline.

sweet rampart
#

If I click on the edge of it, the property inspector talks about a line

unreal flax
#

That's correct. The board outline is just a set of lines drawn on the dimension layer.

#

That lets you create arbitrary shapes if you want, too.

sweet rampart
#

Putting aside the fact that it's virtually impossble to select all the lines and not something else, once I do that, how do I copy it? Command-C just boops

#

Hmm contextual-click->Copy copied something, but when I go to paste it into my design, it was a couple of the lines, and it doesn't preserve the position of the lines in the original (it lets me place them whereever)

unreal flax
#

Easiest method here would be to turn off all the other layers and just drag-select the whole board outlines. Then you want the "copy group" command.

sweet rampart
#

If I turn off all layers except 20 Dimension, I see what appears to be the board outline (with an extra line), but I can't drag-select it; it just boops at me

#

Says "Group is Empty!"

unreal flax
#

The drag-select needs to include the line endpoints, not just a section in the middle... could that be it?

sweet rampart
unreal flax
#

(I am assuming some equivalence between how Fusion 360 works and Eagle works, but I've only used the latter.)

unreal flax
#

Sorry, at this point I'm not sure what to suggest.

sweet rampart
#

ok

unreal flax
#

Possibly you can do a multiple selection in the item filter?

sweet rampart
#

Possible, but I don't know how. Like I said, I'm new, and it's exceptionally difficult to google for answers.

distant raven
#

only thing i'm concerned about is potential conflicts with the SPI lines. (I have two separate CS pins)

#

the SPI flash + SPI programming for the FPGA

silk lark
#

those are really thin traces

distant raven
#

6mil

#

so not terribly

#

well, depending on the net class

#

power traces for other than 3.3V (power plane) and GND (plane) are larger

tough matrix
#

@distant raven the connector on the left is the microUSB?
the trace connecting to Vbus seems to go outside the pad, coming dangerously close tot he next pad...

distant raven
#

it meets DRC

#

6mil clearance

tough matrix
#

ok. But why not have it go straight form the pad?

distant raven
#

can you circle what you're talking about?

tough matrix
distant raven
#

oh yeah, i just fixed that

#

😛

#

i dislike when it shifts like that when drawing traces

#

found another too

tough matrix
#

yep! nice to catch it before sending to fabrication

#

and you have areally tiny NeoPixel there... is it 2mm?

distant raven
#

so it's just a standard RGB LED

#

and then a 5050 neopixel

#

lol

#

or it might be a 3535

#

3535

tough matrix
#

oh... the RGB one is not a neopixel, but a dumb one?

distant raven
#

yeah

#

there's connections for it on the FPGA that are specified for it so i figured it won't hurt to use it

#

the LED is tiny too

nova pollen
#

@distant raven love the rendering, what CAD software are you using?

distant raven
#

Eagle

restive vale
#

Hello, total noob here. It's scary to ask because very likely I'm all wrong but anyway, I'm trying to learn about pcb design and I am trying to make a breakout board for an stm32 microcontroller. I am starting with the electric schematic using KiCad and I have a couple of doubts. So far I have this:

#

and one of my questions is if the part of my power filtering looks reasonable according to the datasheet of the microcontroller:

#

and my second question is about the reset switch I put there with the label NRST on my diagram, does it look correct?

unreal flax
#

I can't comment on the analog-supply inductor, but the caps look good.

#

The reset switch I think is backwards, though. The NRST is active low, so you want a pullup to 3.3V and the switch connected to ground, so it'll pull the pin low when pressed.

restive vale
heavy jasper
#

The filtering there somewhat depends on what the actual inductor is

#

(e.g. is it an inductor, or a ferrite bead, and if inductor, what type)

#

In short, for most people, the juice isn't worth the squeeze on that filtering. Doubly true if your upstream supply for this is an LDO.

#

ST also generally recommends a 100nF cap from NRST to ground, and I've generally found that a good thing to add.

restive vale
#

@heavy jasper Great! thanks, I will update my schematic

heavy jasper
#

(I've had some bad experiences with ESD coupling into the board and causing spurious resets that were nicely solved by that cap)

#

For now, you might just make that L1 a 0-ohm resistor

#

And then if you want more filtering later, you can tune it with chip-size inductors.

restive vale
#

@heavy jasper Perfect 👍

heavy jasper
#

Any other chunks of schematic you want to check, feel free to keep posting. A bunch of folks here have done STM32 designs before as well.

restive vale
#

oh that's great, I will surely come back with another question tomorrow. What a nice group, I didn't expect such quick and good replies

#

thank you guys

heavy jasper
#

Thanks! We try to be helpful folk.

silk lark
#

the filtering caps are tricky, because the schematic doesn't show their physical locations, which is in this case important

distant raven
#

Just watched an insightful video about separating analog and digital ground planes

#

Turns out, it’s not necessary in a majority of cases

round stump
#

Does #help-with-hw-design #repairing-a-pcb-you-got-via-a-kickstarter-where-the-founder-grabbed-the-cash-and-ran? 😄

#

Since the founder hasn't replied to anything since October and every comment is yelling for refunds, I decided to investigate and it turns out the whole product is one giant PCB with a battery in a tube.

#

My first hunch is that the charger stopped working. The lights still turn on but the power indicator does a blinking sequence which I assume is low power and then it shuts off. I've shared some photos below, any thoughts on what I might look at/try?

signal topaz
round stump
#

I believe you're referring to the IR receiver that's been bent over?

distant raven
#

at first glance it's like, "wow cool"

#

but the more I look at it, the worse it gets.

supple pollen
#

Wow that's a lot of power supplies. The brains of it looks like an ordinary ESP WiFi module.

distant raven
#

Yeah

round stump
#

but the more I look at it, the worse it gets.
lol does this feel like a cheap circuit for a price tag of like $120?

#

:rip: my wallet

distant raven
#

Perhaps. I’d have to have my hands on it to know

restive vale
#

Hello folks. I've updated my electric schematic according to what you recommended last night, swapped the weird inductor for a 0 ohm resistor in the filter part and fixed (hopefully right?) the active low reset. I also added an 8MHz crystal according to what I saw on a video and left the boot pin pointing to ground

#

I also added these gpio headers but not sure if these are the correct ones used in breakout boards:

unreal flax
#

The push-button is problematic, unfortunately. For one you have a capacitor blocking the current path to ground. And a pulldown resistor won't be strong enough to change the 3.3V direct power-rail connection.

#

Instead you want to have a pull-up to 3.3V, and connect the push-button to ground. The capacitor should be between the reset line and ground, so it acts as a filter similar to the other decoupling caps you have.

#

The crystal looks okay, though you may need to double-check the capacitor values versus the specific crystal part you're using. ST actually has a pretty good application note about picking a crystal and calculating those values, if you haven't seen it: AN2867.

restive vale
unreal flax
#

Almost. The push-button should have a direct connection to ground, and the capacitor should be hanging on the reset line.

restive vale
#

ohhh I saw a component in the kicad library that is like a push-open switch

#

I will try that

unreal flax
#

You don't have to switch parts. Just connect the left side of the switch to ground instead of to the cap.

#

That way it'll make the reset line go low when the button is pushed.

restive vale
unreal flax
#

Aaaalmost. One side of the capacitor should be on the reset line, and the other side should be on ground, instead of interrupting the current flow to the reset pin.

#

(Remember, capacitors are open circuits at DC: they don't let current flow through them, so they will block a signal in the configuration you have.)

restive vale
unreal flax
#

There you go! 👍

restive vale
#

jesus christ, I'm sorry for all the annoyance 😅 I will study all this more thoroughly

unreal flax
#

This is a good circuit to understand and internalize, so if you're not sure why it's this way, please ask about it.

restive vale
#

Wow, thank you so much

distant raven
#

@unreal flax there are instances where a capacitor between ground and the button terminal is necessary for graceful resets. It’s rare but there are a few MCUs that need it.

unreal flax
#

@distant raven Not sure what you mean... I think that's what we ended up with above. Or do you mean the earlier AC-coupling series capacitor arrangement when you say "between ground"?

distant raven
#

no

#

on the Nano, they have the capacitor between the terminating side of the button and ground.

#

or the old nano schematics did

#

they don't in the new ones

#

i think it's an old practice that probably isn't used anymore

unreal flax
#

I must not quite be woken up yet, as I don't understand what you mean. The terminating side of the button should also be connected to ground, so it sounds like you're describing a capacitor between ground and ground.

distant raven
#

let me find an example

unreal flax
#

Or maybe in combination will a pulldown resistor on that side, to control the fall time of the signal?

distant raven
#

nevermind, I don't have an example

#

I might be thinking of something else

unreal flax
#

No worries. Coffee time for both of us... ☕

ivory jasper
#

I've got an OR gate that selects between PC USB power and external power that prefers external power. It works great except for one problem: After connecting then disconnecting external power the PC USB +5V flows backwards through the gate. This would not normally be a big deal except I need to detect when external power is connected/disconnected at the microcontroller and it basically always thinks external power is connected after it gets plugged then unplugged. This is the schematic... Any ideas how to fix it?

distant raven
#

probably add a schottky diode

supple pollen
#

I'm not entirely clear why you have three transistors there, you could use two diode-connected MOSFETs. You can sample the external power on the upstream side of the MOSFET. I'm not sure what you mean by "flows backwards through the gate", as the gates are isolated.

ivory jasper
#

@supple pollen If I disconnect external power I get continuity from the PC USB VBUS line at the barrel jack (and can detect it at the pin I've setup for detecting external power)

#

Also, with just two diode-connected MOSFETs what determines which power supply gets priority? I chose this design based on the fact that it will always use external power if present

heavy jasper
#

It seems like Q2/Q3 forms a latch?

#

e.g. once external 5V is applied, it turns on Q3, which makes Q2 fully on (not just a diode) so now power can also flow back through Q2, keeping Q3 on even when the original source is removed

distant raven
#

4 new pins, small QFN for SAMD21

#

all on 2 layers

#

it took some magic and finagling

#

also, I just spotted a horrible right angle

#

also found another mistake

ivory jasper
#

@heavy jasper Yeah that's how it seems to work

#

I'm thinking a diode in the following position will fix it but I'm not sure. Nor am I positive it won't have a significant impact on forward voltage.

distant raven
heavy jasper
#

Depending on your budget, would you consider a packaged solution (e.g. TPS21123A)

ivory jasper
#

Your search, "TPS21123A" did not come up with any results (Google) which is actually impressive!

ivory jasper
#

Ooh it's like a dollar at JLCPCB

#

Any cheaper ones? Clones?

heavy jasper
#

Probably yes, somewhere

#

Now that you have a sense of that being a product that exists you can probably do some more digging

#

(I just picked a reasonable-looking one that was near top of search from a vendor I knew carried them)

ivory jasper
#

I'd rather avoid a non-basic part for this if I can though

#

I know there's commercial products using the schema I posted because that's where I got it from 😄

heavy jasper
#

On the other hand, odds of needing to rev to fix glitches tend to go down with designed-for-purpose parts.

#

(to present the other side of that story)

#

I don't think a diode where you're showing it would help your core problem (as soon as external power is applied, Q2/Q3 latch).

#

Because that latching can happen with just the body diode voltage through Q1

fervent lance
distant raven
#

That’s one way, yeah

ember laurel
#

I've got an LED that's rated for 3.2V Vf. How bad is it to run this one on 3.3V, but PWM'ed to max 97% ?

#

(I'm PWM'ing this LED no matter what, but I'd like to avoid a current limiting resistor if possible)

#

I guess diode's don't really like being hit with more than their rated voltage, regardless of how short the over voltage period is

silk lark
#

I think all they care about is the average energy you pump through them, as long as the voltage isn't something ridiculous

#

as long as they don't hit the thermal runaway, when they get so hot that their forward voltage drops, it should be fine

ember laurel
#

I guess running a PWM of 3000V at 0.1% duty cycle wouldn't be great

light ermine
#

Why do you want to avoid the resistor?

ember laurel
#

I've got an existing design, and products in field, that turn out to run the LED a bit too hot, I think

#

(I got new specs for the LED after assembling the units)

#

I can push an OTA firmware update to limit the PWM though

vivid roost
#

The spec is probably a "typical" forward voltage drop but it wouldn't be surprising if some were only 3 vfd. It is advisable to always include some current limiting in an LED circuit to protect both the LED and the pin driving it. Since rework isn't possible in your case lowering the PWM duty cycle is your next best bet.

ember laurel
#

I have a regulator for this LED alone

#

and drive it through some mosfets

#

some mosfets, because it is a special led - two leads, but two colors

#

change color by switching polarity

vivid roost
#

the V forward drop is an inherent property of the LED, regardless of supply voltage

ember laurel
#

sure, it stays reasonably fixed

#

it varies a bit with heat of course

vivid roost
#

you may get away with it in your case, just saying 🙂

ember laurel
#

(especially when pushing it hard with current....)

#

Yeah I'm just wondering in general, if hitting it with more current than it is rated for, with lower duty cycle, is even remotely considered reasonable practice.

vivid roost
#

best practice is to include a resistor. at minimum place pads for one and "select at test" a value to limit current when full on to 10 mA or so

#

even if only 33 ohms or so

ember laurel
#

10mA?

#

this LED is rated for 312mA

vivid roost
#

most modern LEDs glow nicely at 10 mA, can you link yours, 312 mA seems an odd maximum current spec

ember laurel
#

I'm currently looking at adding a resistor for the next design, it will be small enough to also allow me to put a current sense opamp on it

#

not exactly - but almost

#

I don't have the exact datasheet for the LED in question, unfortunately

vivid roost
#

OK I thought it was an indicator, not illuminator type. No wonder it runs a bit hot.

#

how are you PWMing it?

#

oh, mosfets

unreal flax
#

I'd tend to recommend a current-limiting resistor myself. An ideal LED with a forward voltage of 3.2V will suck down an infinite amount of current if you give it 3.21V. The only thing you're relying on is the small amount of V-I curve and whatever thermal effects change the forward voltage.

#

LEDs are fundamentally current-driven devices rather than voltage-driven.

ember laurel
#

either that or a constant current drive I guess

unreal flax
#

Yep, that's a great option is it's available.

ember laurel
#

I think I'll put a resistor on the next board revision

#

and branch for it in the firmware

#

(same firmware will run on new revision board)

pearl tapir
#

@ember laurel I've shipped millions of LED circuits. The LEDs lifetime is primarily limited by die heating, so the PWM frequency needs to be high enough to average the heat, at least 1 kHz, imho. Some LEDs have suffered from current density where the immediate part of the die below the wire bond was worn out. That's not common and only at the upper edge.
Then make sure the Vf is going to be withing reason. Typical 3.3V could easily be run at, say, 3.8V with the right PWM based on your data sheet. But it's risky as you have no monitoring of the solder point temperature. You can estimate the die temperature in a test circuit by measuring the solder point temperature and calculating using thermal resistances. Be sure to include the maximum ambient temperature.
But best practice is to have some current limiting. But it also can be limited by the driver circuit. A feed back loop around the mosfet can work very well to form a constant current source.

ember laurel
#

I'm running this at 30kHz

pearl tapir
#

That's fine. But as an FYI, I try to run everything below 9kHz as that is the upper limit for FCC testing requirements. You don't escape FCC requirements as I suspect that you have a clock somewhere that exceeds 9kHz but it's still not a bad idea to keep the unintentional radiators at a low frequency.

ember laurel
#

I need the 30kHz for my motor driver anyway

#

(LED is built into the motor)

#

motor driver runs FOC at 30kHz

#

but that's a good tip about 9kHz, thanks.

#

I'll need EMI testing for this thing according to IEC-60601 no matter what though

distant raven
#

ugh, I realized i bought an 0201 inductor rather than a 0402 lol

#

good thing the boards they are going on are bust and need to be reordered lol

solemn raptor
#

this resistor to ground causes some current to leak from the vbus right?

#

but i'm guessing the DMG341 gate needs to to see gnd?

distant raven
#

Resistor prevents the short to ground while pulling down the transistor when vusb is not present

#

The transistor in this case is used as a body diode to prevent flow back to the battery directly from usb

#

It’s really interesting to read about LOL

solemn raptor
#

thanks! i assumed when the vbus was powered vbat would be turned off?

#

but i guess if vbus is powered some current will go to ground so you don't get the maximum usb current but how much less...or am i wrong?

#

thanks Skerr

distant raven
#

It’s kind of that way too

#

It does turn off the transistor when vusb is on

#

Drives gate to 0 when vusb is off. But definitely the body diode is a big factor in this case too

heavy jasper
#

And a bit of further clarification: This could be done with just a pair of diodes, but there's so little headroom on VBAT that the diode drop could have a significant impact.

#

So here, when VBUS is 0V, the FET is fully turned on (it starts with just the body diode, but then Vgs == Vbus - (Vbat-Vbody_diode) == 0V-(3.7V - ~0.7V) == ~3V, which is enough to fully saturate the FET, turning it into just a small-value resistor instead of a diode.

#

But when VBUS is applied, Vgs == Vbus-Vbat == 5V-3.7V==1.3V, which does not turn on the FET, so it remains just a diode, which is reverse-biased and doesn't conduct backwards to overcharge the battery.

distant raven
#

Yeah, that’s the nuance I couldn’t explain clearly on the fly

heavy jasper
#

Where here, "s" is the source, which is the "IN" net of U2, and "g' is the gate of the FET which here is just VBUS.

#

(and for complete clarity and to finish my train of thought, P-FETs turn on with sufficiently negative Vgs, or (Vgate-Vsource)

#

A side note: this is one of the many reasons why it's pretty much always a good idea to draw body diodes on MOSFET symbols, at least for discrete parts.

inland quest
#

Its here!

vivid roost
#

That's beautiful, good luck with it! (How many amps will it draw 😉 )

inland quest
#

750mA

vivid roost
#

i remember 1970's 4K memory boards that drew almost an amp by themselves. It really looks nice.

inland quest
#

WHAT

#

1amp...

#

Oh my

#

Also thanks!

vivid roost
#

WATT indeed 🙂

inland quest
#

Heh

supple pollen
#

The 4k memory boards on my first computer had four 7805 regulators apiece, I think they drew more than an amp (that 16k of add-on memory draws some serious current)

inland quest
#

oh wow

#

was it DRAM?

fervent lance
#

The ADXL375 vs a KX134, for a rocket, I wanna know which is better in terms of
a) Libraries (Arduino)
b) Communication
c) Basic wiring ease

#

I know that adafruit has a wonderful board made for ADXL

twilit mango
#

I don't know who else works on rockets, but the one person I do know does isn't around at the moment. Which is disappointing, because I'm certain they'd have a good answer. I don't know the second chip, I only know the first, and since Adafruit makes a board for it, the library support should be solid, and wiring it up quite simple. That doesn't fully answer your question though.

supple pollen
#

No, that's SRAM. That's one of the reasons it eats so much power.

twilit mango
#

Maybe this is a good place for this question. Do you think this PCB could be cut to make it shorter? https://www.adafruit.com/product/3776 There's a NeoPixel side-light rigid PCB bar too, which seems obvious that it can be shortened, but the DotStar one less so.

pearl tapir
#

@twilit mango The text for the connection names could be screened on the backside and the wires and pads moved all the way against the LEDs more or less. Does that help?

twilit mango
#

I'm not sure. Basically it won't fit where I am considering putting it, and I wanted to know if it could be cut. I don't intend to do anything crazy, simply slice the PCB if possible. (Not even sure I want to do this project, but figured I would ask at least.)

heavy jasper
#

It seems like yes, as long as you're quite careful. I would probably desolder one of the LEDs, then cut through the middle of where the LED was, then clean up.

#

And then probe everything to the aluminum to make sure that you didn't introduce a short.

twilit mango
#

That makes sense. I hadn't considered removing an LED, but that and the rest makes a lot of sense.

#

Thanks, folks!

carmine scarab
#

Seriously though, it's a marvel how much we can do today with so little (relative) power

supple pollen
#

SRAM is still used these days, and it's still bulky and power hungry, but considerably less so than it used to be.

inland quest
#

yeah

#

my cpu uses 2k of SRAM (6116)

supple pollen
#

The computer pictured above was originally just the front board, maxed out with all six 6810 128-byte SRAM chips. That's the first computer I learned to program. Page 0 was data, page 1 was stack, and page 2 was for my program. With only 768B to play with, I didn't have the option of using an assembler, so I'd write my programs in assembler, then hand-assemble them into machine code, translate that into Motorola S-records, then key them into the computer (the Mikbug ROM lets me talk to it via asynchronous serial).

#

It used 1/4" stereo jacks for serial connectors, I've built an adapter from that, via an FTDI cable, to USB, so I can use a ridiculously more powerful computer as a serial terminal to talk to it.

fervent lance
#

does adafruit make any other high g boards

unreal flax
fervent lance
#

something above 64g

#

is what I'm lookin at

#

I've looked at ADXL's

unreal flax
#

That one I linked may suit, then, as it's 100g/200g/400g selectable.

fervent lance
#

Can I get the eagle library of the H3LIS331

fervent lance
tough matrix
fervent lance
#

alight I'll doenload it from there

#

but is it right?

#

like the pad placement and all that

tough matrix
#

seems to be right; in general, snapeda is usually reliable.
But I'd verify that each pad is tied to correct signal by double-checking with datasheet

heavy jasper
#

C2 doesn’t look right

#

(You want it next to/parallel to C26, right now C2 has GND on both sides)

ember laurel
#

it's a ground decoupling capacitor

#

it decouples ground from itself

heavy jasper
#

It eliminates ground bounce.

ember laurel
#

or it is being used as an inefficient antenna, to pick up alien communications and put it to ground

heavy jasper
#

(But in all seriousness: the original ST reference design is not exactly setting the reader up for success either)

fervent lance
distant raven
fervent lance
#

I have general i2c pullups btw

#

for all devices

distant raven
#

I didn’t see them on the schematic so I wasn’t sure if you added them or not 🙂

fervent lance
#

but does everything else look right?

distant raven
#

Seems to be

fervent lance
#

thanks

restive vale
#

Hello folks, I believe I found an error in my electric diagram for stm32 and wanted to confirm

#

I found in an application notes doc from ST some of the advises @heavy jasper accurately gave to me! And also I think I spotted an error I made

#

this is related to the NRST switch

#

according to that doc I believe I should remove a connection to 3.3V in my diagram

#

like so

#

what do you think?

heavy jasper
#

This is roughly where you ended up. I think you have an extra 10K ohm pull-up to 3.3V, which isn't needed, but also isn't going to massively cause problems.

#

in fact as I scrolled back down you pasted it.

restive vale
#

exactly!

heavy jasper
#

It would be a problem if you had a very strong pull-up there (if it was strong enough that the internal low-side switch couldn't cause the pin to go low)

#

I have run designs both with that resistor and without, and both have worked. If you want to save some space and BOM, feel free to remove it.

restive vale
#

Excellent 👍

#

Thanks again

distant raven
earnest plover
#

What's the model of the tactile switch on the QtPy and Feathers?

#

The board design shows a KMR2 footprint, but the KMR2 switch has an oval-ish acutator, while the QtPy one is round

#

(yes, this might sound like a foolish question, but it's bugging me I can't seem to find the switch anywhere)

distant raven
#

it's likely the same footprint

earnest plover
#

yeah, what i figured, but none of the parts catalogs are suggesting footprint-similar alternates

keen elbow
#

Hi all 🙂
I want a PCB where i can Plugin Ethernet and Power (24v - 48v) to USB OTG to charge a Android Tablet and also provide Network
Usb could 4 or 8 Pins
I would pay for a custom PCB Design. I want to order it at jlcPCB. Does someone have the time to make this for money?

Best,
Daniel

heavy jasper
#

Hey, I’m not sure if this is an acceptable place to post consulting job requests ( <@&327289013561982976> to confirm). You might have better luck on the Adafruit Jobs Board.

fast tundra
proper wasp
#

@keen elbow ^^^

distant raven
#

2 layers of goodness

#

Single side assembly too

#

Might add a SPI Flash footprint on the bottom

distant raven
#

probably a power LED too

distant raven
#

i'm not 100% sure the headers are wide enough to fit on a breadboard lol

#

better check

round stump
#

Curious - why no mounting hole on the right side?

#

(I might have missed this convo)

distant raven
#

spacing

#

I wanted the battery connector and power inputs + the other stemma connector on that side

carmine scarab
# distant raven CAN Tree SAM E51 board

Not sure how, but somehow, for a split second, I thought I'd read something like "TRANS AM" or some word play/pun on that. I think the yellow board threw off my brain!

distant raven
#

Lol

vapid grove
#

Also you can add a soda can drawing near the can bus port

#

I hope you understand why)))

tough matrix
#

Id much prefer cancan girls 🙂

ember laurel
#

how much current would you normally expect to draw from an MCU when charging a mosfet gate?

#

15mA sounds reasonable?

ember laurel
#

1mA it is

brisk spire
#

Anyone have a KiCad guide or template for having mounts for the casetlated and through hole pins on the Pi Pico or similar? The Pi docs and all my Googz seem to be fruitless for some reason (I got tha dumb likely)

#

or anywhere...

distant raven
#

Hmm

#

I’m planning on knocking out my RP2040 board tomorrow

brisk spire
#

Im still hunting but no luck yet. Will be interested to see how you make out with your board

rain remnant
#

are you planning your own RP2040 board skerr?

distant raven
#

Yup!

#

Gotta build a good catalog of boards for my shop

quasi gust
#

I'd love to see a Pi CM4 and RP2040 on a single board with the USB connected

distant raven
#

That would be interesting

quasi gust
#

Yeah, you'd get all the general compute power of the Pi with the PIO of the RP2040 etc. You could tie the reset etc pins to the Pi GPIO so everything is controllable and programmable from the Pi

distant raven
#

It’d be like having a PRU on a RPi

quasi gust
#

Exactly! Combined with the awesome community of the Raspberry Pi. Honestly I'm hoping to see the foundation create a board like that in the future

distant raven
#

I’ll take up the task, mostly because it’s highly relevant to some research I’m doing

heavy jasper
#

There's specifically a separate datasheet for the pico module, which includes on page 9 the SMT footprint.

brisk spire
#

Yep I had seen that and the other diagram but seems odd to have to trace it out manually when they are trying to get people to use them as modules. Thought it would be in a repo somewhere 🙂 Im not good in KiCad yet but I guess I will have to learn and just make it from scratch

heavy jasper
#

I suspect that if they’re not doing it themselves, someone will soon have it added to the main-line KiCAD libraries. That someone could be you if it’s not already done! But worth checking the pull requests in progress.

brisk spire
#

Good call on the PRs!

heavy jasper
#

Was there one already going?

unreal flax
heavy jasper
#

I think chips are coming sometime Q2

ember laurel
#

Could I ask for some opinion on this circuit, to drive a back-to-back LED?

#

it drives LED's that are connected like this

#

only one LED at a time will be active, but they will be PWMed.

#

so when driving the upper LED, UL1a and UL2b are on.

#

Only UL1a is PWMed, UL2b stays open.

#

it is a pretty powerful LED, drawing about 312mA

#

I'd perhaps like to charge these mosfet gates a bit quicker than the 10k pullup allows for

#

and also, I'm wondering if I shouldn't put an inline gate resistor there as well, to slow down the shutdown

#

LED1_H will be pulled low to turn off the upper mosfet

#

since it is a bit of current here, I don't want to turn on/off faster than I need to, to avoid unnecessary EM issues - the LED is attached to a 1.5m long cable

#

Qg for this mosfet is 7nC, but only requires 1nC to reach the threshold voltage

#

@heavy jasper I know you made a point of perhaps switching the upper mosfets to pmos

heavy jasper
#

or alternatively, a separate 5V buffer chip off that rail

#

(where you don't necessarily need a gate driver here, just some logic buffer with 5V power)

ember laurel
#

I'll still want the upper mosfets off upon powerup though - before the MCU has booted

#

hmmm yeah I guess

#

what's a good rule of thumb for the charge time vs frequency here?

#

I'm running this at 1kHz PWM

#

trying to keep the logic driving pin around 1mA seems reasonable to me

#

it will have to sink 0.5mA for the upper - current from the pullup there

heavy jasper
#

Sims are your friend here, and keep in mind that any shoot-through will likely be much worse from an EMI perspective (and a "survivability of your board" perspective).

ember laurel
#

yeah - I've been simulating this in LTspice

#

I just want to keep it as slow as I can, really

#

just wondering about a reasonable practice when it comes to timing vs frequency

#

the pullups will ensure 0.5mA charge current for the upper mosfets

#

with 1nC required to reach Vt for the mosfet, that gives 2us charge time

#

so, 250kHz

#

pulling it down to ground will be a ton quicker though, only limited by impedance and resistance of the MCU's current sink

#

(25 ohm-ish I guess)

#

My thought is to add a 2.2k gate resistor on the mosfets

#

gives me this in sim

#

without the gate resistor shutdown gets pretty darn fast, but sim doesn't look too bad anyway

heavy jasper
#

A note: You can also do FFTs from ltspice

#

so you can look at e.g. the frequency content of the output voltage/current running out to the LEDs

ember laurel
#

definitely quite a bit jerkier though...

#

that's a good point yeah

heavy jasper
#

That non-monotonic crunch near the beginning is a tad worrying

ember laurel
#

without gate resistor:

heavy jasper
#

(either your sim is going non-physical there, or there's some weirdness in the circuit that's probably worth investigating)

ember laurel
#

with the gate resistor:

heavy jasper
#

You can also sweep the value of gate resistor by parameterizing it

#

and then see plots across different values.

#

(but this is getting a bit into the weeds)

ember laurel
#

🙂

heavy jasper
#

But it can be a helpful way of doing some initial tuning

fervent lance
#

Would this led need a resistor

#

I"m using a mk20

ember laurel
#

@fervent lance your Vf is 2V

#

so it really depends how you are driving it. If you drive it with 3.3V, you'll definitely need a current limiting resistor

fervent lance
#

yeah I'm gonna be using 3.3V

#

would a 220ohm resistor be enough?

ember laurel
#

how much current do you need through it

#

30mA?

#

then you'd need a 43.3 ohm resistor, to reach the max sustained current - 30mA

heavy jasper
#

30mA on that LED is going to be blinding

fervent lance
#

15mA?

ember laurel
#

I was kind of expecting a PWM on that...

#

datasheet says 35mcd for 20mA

#

but yeah, if you don't do any PWM, I'd probably tune that resistor value by hand

#

to find an intensity you're comfortable with

#

I don't know the purpose of the LED right now, is it an indicator light, or are you lighting up a football stadium?

fervent lance
#

an indicator led

ember laurel
#

put 200 ohms there

#

then change it if you want it brighter or softer

fervent lance
ember laurel
#

That does the trick yeah.

#

how do you drive it though?

#

with a transistor, or mosfet?

#

@fervent lance

fervent lance
#

my microcontroller, the mk20

ember laurel
#

how much current can it source on the GPIOs?

#

looks like 25mA

#

25mA source or sink

#

with 200R, you should thus be able to drive it straight from the MCU

#

200R will only give 6.5mA

fervent lance
distant raven
ember laurel
#

What’s special about the 2040?

fervent lance
#

2MB of flash

crude ocean
#

It is four bucks and has cute coprocessor units that Shenzhen I/O or TIS-100 may have already prepared you to use.

brisk spire
ember laurel
#

2MB flash is nice, but I think not so much ram

distant raven
#

The RP Sapling will use LDO power but I’m thinking i'm going to use a boost/buck or maybe just a buck on a larger module that I’ll mount the compute module

fervent lance
ember laurel
#

I have no idea how to fit this.

distant raven
distant raven
#

lol

#

what clearances are you using?

#

(5mil) 0.127mm?

#

or (6mil) 0.15mm?

fervent lance
distant raven
#

wait, dang it doesn't show all the traces I routed. darn

ember laurel
#

That’s enough. Wireless.

fervent lance
distant raven
#

RP2040

#

lots and lots of decoupling caps

#

doing my first design with USB-C and RP2040

#

kind of exciting 🙂

fervent lance
#

cool

unreal flax
fervent lance
#

I stand corrected

ember laurel
#

I try to keep my tracks to .3mm for most things though

distant raven
#

dang 3mil spacing is pretty tight

ember laurel
#

I got most things in though

#

texts not in order yet 🙂

distant raven
#

i organize text at the end 🙂

ember laurel
#

yeah

distant raven
ember laurel
#

is that via not a bit too close to the USB-C?

#

@distant raven

distant raven
#

which one?

ember laurel
#

middle pin

distant raven
#

it's for bridging another pin on USB-C

ember laurel
#

I just know that this would trigger a design rule violation with me

distant raven
#

falls within 5mil clearance rules

#

pushed it a little bit

ember laurel
#

it just looks half-tented

#

yeah that's better

#

via to track clearance is usually lots higher than track clearance

distant raven
#

some end up being half tented because of clearance

ember laurel
#

do you have any solder mask between those USB-C pins?

distant raven
#

it's the sparkfun

ember laurel
#

not sure what your fab can do - but those pins are usually mighty close to eachother

#

if they have capability for mask between those pins, go for it

#

especially the GND/VCC pins on the sides are easy to bridge

distant raven
#

it's OSHPark

ember laurel
#

I've ended up usually changing the footprint a bit because of that

#

(a bit less than datasheet)

#

you could also add some stitching vias in the areas left of the MCU

#

to get a bit of ground fill there

distant raven
#

Traces go under that area

ember laurel
#

ah ok

distant raven
#

Dang I forgot Stemma connector

#

The one thing I’m anticipating is it taking a few months for the Raspberry Pi Foundation to start selling bare ICs

supple pollen
#

@ember laurel I like that you moved the LED and tucked the components behind it: LEDs can be more visible if they're near the edge and stuff is covering a board.

ember laurel
#

the LED has a light guide over it as well, extending outside of the enclosure

#

works pretty nicely that way

supple pollen
#

Wait, what? How did you get the board fabbed and assembled in 3 hours?

ember laurel
#

3d pcb printer

#

you just press a button, and it prints silicon and all

#

that's actually the old revision.... squeezing even more stuff in :/

supple pollen
#

Silly me, I was gonna buy a Wazer but now I want that instead.

tough matrix
ember laurel
#

it's a big LED driver

#

all it does is to light up that LED

#

unfortunately you cannot buy it yet, still have a bit to go before market

#

I think sometime in summer it should be ready

#

funny enough, people seem to think 3d printers can print anything

#

my kids were asking if I could print them a new ipad

tough matrix
#

I was asking about buying a 3d PCB printer.. that I'd love to buy 🙂
But I can well imagine that some years in the future, there will be desktop 3d silicon printers for making custom chips ...

ember laurel
#

and they'll be as reliable as inkjets

supple pollen
#

Inkjets don't work for me because I don't do color printing often. However a PCB+silicon printer is something I'd use pretty frequently, if it were obtainable.

ember laurel
#

totally with you there 🙂

#

I've made the decision to abstain from inkjets

#

only having black and white laser

#

if you need color prints, order them online

supple pollen
#

As have I. I have a dye sublimation printer that prints from ribbons. It's ready to print whenever I like, even if I haven't printed something for a couple of months. Yes, the supplies are a little expensive, but with my usage pattern, it's much cheaper than an inkjet is.

#

During the recent unpleasantness, I've been using it to print up custom postcards. The prints are durable enough to mail and don't get ruined if they get wet (unlike inkjet prints).

ember laurel
#

aha that is nice

#

that 15 minute wait for a print when you haven't printed anything for 2 weeks is pretty darn frustrating with an inkjet

#

I had that once when I really, really needed to print some documents just before a travel.

#

being late to the airport...

distant raven
ember laurel
#

what does that thing do?

distant raven
#

It’s price point is steep, but it would be super convenient for 2 layer designs

tough matrix
#

pcb mill?

distant raven
#

PCB printer

#

It lays traces via a silver resin

ember laurel
#

that's awesome

#

didn't see that before

distant raven
#

Cures the resin, then you can use it to apply paste as small as 0402

#

And then also cook the boards

ember laurel
#

I bet the capabilities aren't stellar though...

distant raven
#

6mil/6mil I believe

tough matrix
#

most likely, it is just for prototyping, not for mass production... ut still very nice
How expensive is it?

distant raven
#

Sorry, 8/8mil

#

$4200

#

It’s steep

#

I’d probably buy a PNP before this

unreal flax
#

@distant raven Does your RP board have any flash on it? I don't immediately see a footprint for a chip that screams "memory".

distant raven
#

It’s on the bottom

unreal flax
#

Gotcha. 👍

distant raven
#

Hey @heavy jasper question about USB

#

Someone mentioned on Twitter that I should put 5.1K pull-ups resistors on the data lines

#

But the raspberry pi rp2040 data sheet only suggests 27.4ohm series resistor for usb data lines

#

Which is the “more right” way to approach it?

heavy jasper
#

Were they asking for 5.1K or 1.5K?

#

I think 1.5K was the traditional resistor for D+ to indicate full-speed, but also almost all PHYs have that built in now.

#

And in fact, from that datasheet, specifically: "The USB_DP and USB_DM pins on RP2040 do not require
any additional pull-ups or pull-downs (required to indicate speed, FS or LS, or whether it is a Host or Device)"

#

Which to me says that any pull-up/pull-down that are needed are in fact built into the silicon.

#

5.1K is the standard resistor for the CC1/CC2 lines of USB-C, which is a separate thing (used to indicate that this is a power-sinking device taking standard 5V,3A)

supple pollen
#

The ways USB chargers signal various things adds another dimension, but that probably doesn't apply here.

distant raven
#

Nvm

ember laurel
#

this is a pretty good reference for usbc CC setups

#

@distant raven

#

are you supplying or pulling current in this case?

distant raven
#

Pulling

#

Someone suggested 5.1k like adafruit does on their type c

ember laurel
#

how much current do you need?

distant raven
#

My Shottky diode has a max current support for 500mA

#

So 500mA

ember laurel
#

normally what you would do in the UFP is to add the 5.1k pulldown, then measure the CC voltages with ADC

distant raven
#

That chart says 56K for 500/900mA max

ember laurel
#

500mA should always be possible though, regardless

#

see this pdf as well

#

in your case you can happily use 5.1k pulldowns and just draw the current you need

distant raven
#

Makes sense

ember laurel
#

3.6 in that pdf, shows which measured voltages would correspond to which current capability

#

if you need to power an induction stove or something from your board

distant raven
#

Lol hopefully mine doesn’t become an induction stove

digital moat
#

going out on a limb here, but would any of you kind souls happen to know what sort of connector this is? 5mm x 2mm 10 position. believe it is a programming header for an stm32f103

ember laurel
#

@distant raven secondary, unintended use

tough matrix
#

I got this request on instructables:

Sorry for disturb, thanks for sharing those amazing projects on Instructable.
PCBWay is a large circuit manufacturer. We could provide free PCB for your further forthcoming projects. Would you mind posting an introduction about PCBWay and some detailed product reviews in the Instructable blog?

#

This is the first time I am approached with a request like that, so I am a little unsure how to proceed. I would be OK posting any kind of reviews (except that so far I haven't used PCBWay, but I am willing to try), as long as I am free to write in my review what I really feel. Or is there an implicit expectation that I should only write positive reviews? (Clearly, they do not say so explicitly - that would violate all kinds of ethical norms, and if they did, I would toss in trash right away - but do they really expect that?)

vivid roost
#

First, congratulations on the Hackaday article, it popped up on my news feed this morning and I said to myself "That looks familiar..." 🙂

#

If their service pleases you, no issue. If it does not you are no worse off than now.

fervent lance
#

@tough matrix I would see about developing a telephone relationship with them, and even then proceed with great caution.

#

Or just treat them as any other vendor, place an order and see if you like what you get.

#

If you find yourself in the position of wanting to praise what they do, and on top of that, they want to pay you to want to praise them, that's probably okay. ;)

fervent lance
#

yeah just make sure you're not restrained by anything regarding like what you can and cant say

#

but like ive bought from pcbway and its pretty chill

tough matrix
#

thanks everyone
I've written to them, let's see what happens

brisk spire
#

I've been working with PCBWay for some years now and can vouch- they are great. Good product at a great price. All sponsorships start with them asking for as much as they can get- just lay out your own rules and all will be great.

#

You get good boards and/or $$$ and they get targeted advertising while actually supporting makers. Good deal

distant raven
distant raven
unreal pollen
#

I have 0 experience with PCB design but I just wanted to play with the Feather ProtoBoard and make a custom one. The problem I have with the proto board is that the individual holes makes things more flexible, but I'd rather have some lines of connected holes. I think what I need to do is add some sort of component to the schematic so that I can add connections to the holes that I want connected, but I have no idea where those components come from. I can see that it looks like it's coming from some adafruit library but the basic library that is available to download doesn't seem to have the right stuff. Anyone have any advice for how I might go about doing this or if I'm missing something? I can't imagine I need a custom component just to trace some holes together vs making them all individual, right?

distant raven
#

are you talking about the protowing?

unreal pollen
distant raven
#

ah okay, do you have in mind what you want to make?

unreal pollen
#

yeah basically this but picture the individual holes in the middle as individual lines of holes, not individual holes. So basically the holes in the middle would be 14 vertical rows of 5 connected holes.

#

Then you could do the same thing with all the holes on the left, connecting them in the opposite direction though, and having 5 rows of 4 holes

#

slightly more breadboard esque if you will

distant raven
#

well, it would in that case be as simple as dropping 10x 14pin header pins onto a schematic, and wiring those together. then on the board side of the CAD drawing you'd just make the actual trace connection.

unreal pollen
#

Ok, so I was assuming if I wanted say 4 of the holes connected, I needed like a 4 pin header added to the schematic

#

But it sounds like that is not correct

#

Or rather you're saying it doesn't have to work that way

distant raven
#

you'd use a similar process for any number of connected headers

unreal pollen
#

Are there libraries for n pin headers?

distant raven
#

usually sparkfun or adafruit have libraries for Eagle. KiCAD has pretty extensive built in libraries

unreal pollen
#

I already pay for Fusion so was using Eagle, is KiCAD easier or better?

distant raven
#

though, it isn't entirely difficult to make simple through hole custom part libraries in eagle

#

unzip that to the "libraries" folder for eagle

unreal pollen
#

Thanks 👍

distant raven
#

I used that tutorial to learn how to make custom parts and libraries for eagle as well

unreal pollen
#

So making custom stuff is pretty normal? Seems odd.

#

I would think anyone making components would want to have up to date libraries so you can place their stuff in your design

#

Or is it more that there are lots of custom ways to mount the same part?

distant raven
#

umm, it's more that not all parts you want have part libraries available

#

especially newer parts

#

I had to make a custom footprint for the RP2040

#

but it was easy thanks to the datasheet

unreal pollen
#

I would think Nordic might have a good library?

distant raven
#

they might, a lot of prebuilt libraries are found on either SnapEDA or UltraLibrarian

#

it's always good to check the footprint based on the data sheet though.

#

you'd be surprised that a lot of people make their own parts simply because it's the best way to know the part is properly translated from the data sheet to your board.

unreal pollen
#

Ah, interesting. Thanks for the perspective!

#

I appreciate you taking the time

distant raven
#

it's what we're here for 🙂

#

now if you ever run into issues designing your board, there are many others with great knowledge to help out 🙂

#

they pop in a different times throughout the day, so there's usually at least someone to help you even if you have to wait an hour or two

distant raven
#

goal for this weekend is the RealTime Pi, Computer Module 4 + RP2040

#

plus a few other peripheral

tough matrix
#

You got a lot of plans 🙂

tough matrix
#

meanwhile, I found a great brushed motor driver IC, Toshiba TB67H451FNG. 4.5-50v, 3A continuous, easy to solder HSOP8, and costs under $1.50. It will replace my previous favorite, TI DRV8871

heavy jasper
#

They'll be a ton of software work, but having a sense of your application, you could be a good candidate for some Qorvo parts

#

(ARM MCU, drivers, and FETs integrated together, most commonly these days for BLDC motor control for industrial and hand tool use)

#

Along with integrated charge-pump or inductor-based switching converter for the core rails to be powered directly from supply Vin

#

Though many of the super-cute integrated solutions these days will be targeting brushless motors. (if anything they're meant to enable brush motor replacement with brushless by building in some local brains)

tough matrix
#

thanks! took a look at it... it does seem interesting, but will indeed be a lot of work. maybe a little later

heavy jasper
#

@digital moat Congratulations, you would have done very well on Car Talk's 'stump the chumps.' I believe I have searched through the active catalog of all major mezzanine connector manufacturers (Samtec, Hirose, Amphenol, Molex, and then more generally on Digikey and Google Images) and have not managed to find this part, or its product series. If you have a set of calipers, it'd be super helpful to measure from center-to-center of the pins of each side, and from one side to the other.

#

And/or some more info about the product that this was found in

#

But in short: if you need debug access, you might be best off soldering some small jumper wires to the pads instead.

digital moat
#

@heavy jasper thank you so much for your time. I too did lots of digging, but to no avail. My guess at the moment is that it is indeed some sort of stacking header - having tried to interact with Devlin who makes the actual device I'm guessing they use this as the basis for lots of their designs. that unfortunately leaves me back trying to use what should be a serial interface via the external db9, but without it responding at all. i'll have to see what the pins actually connect to - it is entirely possible that, given these were connected to larger 'integrated trading systems' they are carrying power in some weird way via the db9. thanks again for your help - and it made me smile to remember Car Talk!

heavy jasper
#

Given it's a leaded package, if your soldering is sufficiently good you might just solder JTAG/SWD directly to those pins

#

Given at least those pins are very clearly documented (if they left them enabled)

ember laurel
#

it somehow looks a bit like an old gameboy cable connector

#

just with more pins

distant raven
digital moat
unreal pollen
#

One thing I've noticed about the through holes in the feather proto, is that the header pin holes are a smaller diameter from the rest of the board. I can't find any references though of where the larger through hole came from. I'm assuming the only way I could get a strip of those larger through holes connected is to create my own component and have it match the size of holes that adafruit is using there?

#

The larger through holes do have trace lines to connect some of them but they are not preset in the schematic, nor are there any parts listed for them, which is why I'm confused as to where they came from.

tough matrix
#

The larger holes in proto-shield are done as vias
Vias can be added to the board in any place , connected to any signal, and they do not correspond to any component in the schematics

#

and yes, they are larger than necessary, in my opinion

unreal pollen
#

I was also wondering about that. I think it's because they are individual, so you could maybe chuck two wires in there if you needed to? I kind of prefer the smaller ones tbh.

tough matrix
#

for standard breakaway headers, I used holes with drill diameter 1.016 mm

#

which is same as 40mils

#

this is also waht SparkFun uses in their library

#

for most through-hole components (resistors, capacitors, etc) you can use even smaller holes

unreal pollen
#

I have not been able to get two Vias to route together, it doesn't accept that as valid.

#

Thats why I thought I had to have them on the schematic, to allow for the connection to be valid.

tough matrix
#

what software are you using?

unreal pollen
#

Eagle

tough matrix
#

then it is easy. In board editor, click on "Info" tool ("i")

#

then click on a via

#

you will get a dialog like this

unreal pollen
#

yeah that's how I was editing the size

tough matrix
#

now find there SIgnal->name and edit

#

make the name of the signal the same for two vias

unreal pollen
#

dude

tough matrix
#

then Eagle will allow you to connect them by a trace

unreal pollen
#

That's amazing, I've been futzing with that for so long.

tough matrix
#

Been there 🙂

unreal pollen
#

Thank you so much

tough matrix
#

no problem

unreal pollen
#

I really appreciate you taking the time

#

🙌

#

Such a great community

tough matrix
#

yeah, I benefited a lot from advice I got here from others - now I am passing it on

unreal pollen
#

baby steps

#

this was my first goal though for working with Eagle and making something that I wanted, which needed to be an easy target.

distant raven
#

Not bad 😃

elder peak
#

So, I guess you are learning via vias.

heavy jasper
#

Or learning through vias, perhaps. (Blind no longer)

pale current
#

I'd like to get more into PCB design and have a slightly above beginners knowledge of electronics. Any thoughts on a good project to work on as a "first real project", even if it is almost just copying another project out there, just for the practice?

distant raven
#

@pale current you can start by designing simple breakout boards

#

I’ve learned a ton just by making i2c breakouts

#

Like for the at42qt1070 capacitive touch sensor, or an ADC board I should be getting soon in the mail

#

Or you can do what I did and make your own Arduino Nano

pale current
distant raven
#

Yeah, some chips have better application notes than others

pale current
#

I had thought of just almost copying some open design even though its "a waste" but just sometimes doing it myself really helps

distant raven
#

Texas Instruments is usually great in terms of electrical applications

pale current
distant raven
#

Arduino publishes their Nano schematic

#

It’s very well detailed and easy to understand, and provides a great jumping point for learning to design microcontroller boards

pale current
#

Oh thanks. yeah that's the type of thing I was thinking of. Something complicated enough that there is some challenge but also where there is sorta a reference to refer to

distant raven
#

Yeah, next thing ya know you’re launching an electronics company

#

😆

pale current