Help identifying my design flaw - Page 1
Forum section: electronics / projects

author: RarePossum
author_rank: Contributor
timestamp: July 19, 2024, 09:12:34 am
content: Hi, I'm trying to design a custom made RP2040 based keyboard for myself and have it printed by JLCPCB. I designed one portion and had it assembled and delivered but when it arrived, none of the assembled boards could be detected by either my win10 pc or my linux laptop so it almost certainly a design issue on my end.Also I forgot to mention these images are slightly outdated, I added a ground plane and moved the decoupling capacitors closer to the relevant padsAny feedback would be appreciated thanks.

author: ch_scr
author_rank: Frequent Contributor
timestamp: July 19, 2024, 09:29:49 am
content: Dual layer PCB with no Gnd plane? You seem to have disregarded all USB2.0 layout guidelines...Somereading,moreMost important here is to understand/implement the differential strip line with proper care for the high frequency signals.

author: Phil1977
author_rank: Frequent Contributor
timestamp: July 19, 2024, 10:16:39 am
content: Is USB 2.0 necessary for a keyboard?Did you check the state of the RP2040? Did you check supply voltage after connection with the PC? What bootloader is installed? What type of HID-software are you using? Is it in the right boot state or does a flash drive appear as soon as you connect it?

author: RarePossum
author_rank: Contributor
timestamp: July 19, 2024, 01:13:53 pm
content: Quote from: Phil1977 on July 19, 2024, 10:16:39 amNo, but its a bit more convenient to use in my opinionQuote from: Phil1977 on July 19, 2024, 10:16:39 amYes. Run is tied to IOVDD because I don't need a reset, TESTEN is floating, and QSPI_SS is pulled up, as stated in the data sheetQuote from: Phil1977 on July 19, 2024, 10:16:39 amYeah, theres definitely a voltage being supplied.Quote from: Phil1977 on July 19, 2024, 10:16:39 amFor these my understanding is the RP2040 doesn't require anything. The first time its plugged in, it should provide its own bootloader by acting as a flash drive, but nothing is appearing at all. Nothing is showing up in devices either

author: robzy
author_rank: Regular Contributor
timestamp: July 19, 2024, 03:19:17 pm
content: Are you pushing the BOOT1 button at the same time that you plug in the USB cable?

author: RarePossum
author_rank: Contributor
timestamp: July 19, 2024, 10:53:00 pm
content: Quote from: robzy on July 19, 2024, 03:19:17 pmYep.My current thoughts are if its not an issue with the way I set up the PCB, then its going to be the oscillator being wack (unlikely across 5 boards but I can check in a few days) or I should remove R5 (hardware guideline has it as DNF but said placing it is fine too but I've seen a few posts saying that might be the issue)

author: wraper
author_rank: Unknown
timestamp: July 19, 2024, 11:00:21 pm
content: AMS1117 is not stable with MLCC, so it may be oscillating. You need either tantalum or electrolytic capacitor on its output or use modern MLCC stable LDO.

author: floobydust
author_rank: Super Contributor
timestamp: July 19, 2024, 11:29:13 pm
content: Where is pin 10? Where is pin 22? Where is pin 33? Where is pin 42? Where is pin 50 it goes to pin 45? Where is pin 49 to 3.3V?Crystal loading cap seem big at 33pF for X322512MSB4SI is edit:25MHz12MHz 20pF check that value.edit:Another mention, I have seen it possible to eliminate the keyscan diodes. What you do is only ever turn on one row output at a time, the others are configured as inputs.It's like the row is either a logic "1" or floating/tri-stated like all others. To prevent ghosting.For your design, I would have ESD protection diodes on the row and column lines, keyboards get nailed if the buttons are small. Also the audio jack RX, TX. You might want pin 26 to a reset pushbutton for dev. work.R8,R9 seem really low value 33R, I'm not sure how much current that GPIO pin puts out but consider using a transistor if you need a lot of LED current there.

author: RarePossum
author_rank: Contributor
timestamp: July 20, 2024, 02:30:06 am
content: Quote from: wraper on July 19, 2024, 11:00:21 pmI'll put in an order for a NCP1117 to see if that works with this setup. Oscilliscope is saying the Vpp is only 80mV though with an average of 3.27V and can't tell frequency.I am noticing that I can't detect anything on the crystal with nothing showing up at all, though that might just be me not knowing how.Quote from: floobydust on July 19, 2024, 11:29:13 pmThe default Kicad RP2040 schematic folds all the IOVDD into pin 1, but they are all connected. As for the capcitors, my math was along the lines of assume 3pf parasitic capacitance, so need ~17pf capacitance, which I get from 2 33pf in series. I've seen others say it this oscillator works with 30pf and it is 12MHz as demanded by the chipQuote from: floobydust on July 19, 2024, 11:29:13 pmI'll take these into consideration if I have to redesign it.

author: uer166
author_rank: Super Contributor
timestamp: July 20, 2024, 03:42:04 am
content: Quote from: RarePossum on July 20, 2024, 02:30:06 am

author: floobydust
author_rank: Super Contributor
timestamp: July 20, 2024, 05:56:01 am
content: Be happy you pounded out a design and got a board built. That's an accomplishment regardless if there is an omission.It's hard to sound positive while being critical about someone's work. I don't want you to take it wrong.Pins absent on a schematic symbol is bad practice, it's never done professionally for obvious reasons. Nobody likes secret pins. Six are missing!I don't know KiCAD but would not expect it to magically run traces on a component footprint. Can you show a close up of the copper at the RP2040. If the sch symbol and footprint have an issue then I would sound the alarm, let someone know- but not sure who, if anyone looks after library integrity.Or it's a PCB CAD learning experience and time to do a Rev. B"IOVDD 1, 10, 22, 33, 42, 49 Power supply for digital GPIOs, nominal voltage 1.8V to 3.3V""DVDD 23, 50 Digital core power supply, nominal voltage 1.1V. Can be connected to VREG_VOUT, or to some other board-level power supply."RP2040 pinout pic taken fromhttps://www.circuitstate.com/pinouts/raspberry-pi-pico-rp2040-microcontroller-board-pinout-diagrams/Is the crystal oscillator working? XOUT have any signal? Where is its pin 1 dot, it's not flipped?Can you confirm the crystal p/n and frequency. Sometimes that gets messed up, or the xtal physically damaged somebody dropped it and it's dead.YXC Crystal Oscillators X322512MSB4SI12MHz 20pF is usually 15pF caps on quite a few RP2040 designs. You can try remove them too if the osc is dead as a last guess.

author: RarePossum
author_rank: Contributor
timestamp: July 20, 2024, 07:17:33 am
content: I'm not bothered at all and appreciate all the feedback actually. I've attached the footprint below, and yeah the missing pins on the schematic really confused me at first.The chip is facing upwards based on text and the dot so I don't think that's the issue. I couldn't pick up a signal on the oscillator when I poked at it with an oscilloscope but I've never measured an oscillator before so I could be doing it wrong but nothing was showing up at all.

author: xvr
author_rank: Frequent Contributor
timestamp: July 20, 2024, 12:21:03 pm
content: It makes sense to connect all VDDIO pins directly below the chip. You have enough space around the bottom pad pin to do this.

author: floobydust
author_rank: Super Contributor
timestamp: July 20, 2024, 05:40:45 pm
content: It's the crystal pin 1, I see a dot (or via?) wrong corner. Is the footprint correct?

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 20, 2024, 10:13:20 pm
content: I don't like hidden pins either. It's a real trap. Unfortunately, KiCad libraries maintainers seem to like hiding pins quite a bit, so that's what you get with many symbols of the provided KiCad libraries.One thing I'll have to check back, but that I'm wary about, is the RUN pin tied to the 3.3V rail. Not sure it's functional this way. Not saying it's not, but I'll check.

author: RarePossum
author_rank: Contributor
timestamp: July 20, 2024, 11:47:54 pm
content: Quote from: floobydust on July 20, 2024, 05:40:45 pmThat should be a via and its an SMD-3225 4P, which is what the store page and data sheet listed too.Quote from: SiliconWizard on July 20, 2024, 10:13:20 pmThe docs say if no external reset is required, it can be directly tied to IOVDD and because I thought I shouldn't need to reset except for dev work, I connected it. Not the best idea but it should be fine