Author Topic: Help identifying my design flaw  (Read 760 times)

0 Members and 1 Guest are viewing this topic.

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Help identifying my design flaw
« on: July 19, 2024, 09:12:34 am »
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 pads

Any feedback would be appreciated thanks.

« Last Edit: July 20, 2024, 11:55:04 am by RarePossum »
 

Offline ch_scr

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: de
Re: Help identifying my design failure
« Reply #1 on: July 19, 2024, 09:29:49 am »
Dual layer PCB with no Gnd plane? You seem to have disregarded all USB2.0 layout guidelines...
Some reading, more Most important here is to understand/implement the differential strip line with proper care for the high frequency signals.
 

Online Phil1977

  • Frequent Contributor
  • **
  • Posts: 252
  • Country: de
Re: Help identifying my design failure
« Reply #2 on: July 19, 2024, 10:16:39 am »
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?
 

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Help identifying my design failure
« Reply #3 on: July 19, 2024, 01:13:53 pm »
Is USB 2.0 necessary for a keyboard?

No, but its a bit more convenient to use in my opinion

Did you check the state of the RP2040?

Yes. 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 sheet

Did you check supply voltage after connection with the PC?

Yeah, theres definitely a voltage being supplied.

What bootloader is installed? Is it in the right boot state or does a flash drive appear as soon as you connect it?

For 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
 

Offline robzy

  • Regular Contributor
  • *
  • Posts: 127
  • Country: au
Re: Help identifying my design failure
« Reply #4 on: July 19, 2024, 03:19:17 pm »
Are you pushing the BOOT1 button at the same time that you plug in the USB cable?
 

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Help identifying my design failure
« Reply #5 on: July 19, 2024, 10:53:00 pm »
Are you pushing the BOOT1 button at the same time that you plug in the USB cable?

Yep.

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)
 

Online wraper

  • Supporter
  • ****
  • Posts: 17318
  • Country: lv
Re: Help identifying my design failure
« Reply #6 on: July 19, 2024, 11:00:21 pm »
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.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7213
  • Country: ca
Re: Help identifying my design failure
« Reply #7 on: July 19, 2024, 11:29:13 pm »
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: 25MHz 12MHz 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.
« Last Edit: July 20, 2024, 05:56:49 am by floobydust »
 

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Help identifying my design failure
« Reply #8 on: July 20, 2024, 02:30:06 am »
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.

I'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.

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 25MHz 20pF check that value.

The 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 chip


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.

I'll take these into consideration if I have to redesign it.

 

Offline uer166

  • Frequent Contributor
  • **
  • Posts: 929
  • Country: us
Re: Help identifying my design failure
« Reply #9 on: July 20, 2024, 03:42:04 am »
The default Kicad RP2040 schematic folds all the IOVDD into pin 1, but they are all connected.

 :palm: :palm: :palm: :palm:
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7213
  • Country: ca
Re: Help identifying my design failure
« Reply #10 on: July 20, 2024, 05:56:01 am »
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 from https://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 X322512MSB4SI 12MHz 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.
 

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Help identifying my design failure
« Reply #11 on: July 20, 2024, 07:17:33 am »
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.
 

Offline xvr

  • Frequent Contributor
  • **
  • Posts: 374
  • Country: ie
    • LinkedIn
Re: Help identifying my design flaw
« Reply #12 on: July 20, 2024, 12:21:03 pm »
It makes sense to connect all VDDIO pins directly below the chip. You have enough space around the bottom pad pin to do this.
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 7213
  • Country: ca
Re: Help identifying my design flaw
« Reply #13 on: July 20, 2024, 05:40:45 pm »
It's the crystal pin 1, I see a dot (or via?) wrong corner. Is the footprint correct?
« Last Edit: July 20, 2024, 05:45:20 pm by floobydust »
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14907
  • Country: fr
Re: Help identifying my design flaw
« Reply #14 on: July 20, 2024, 10:13:20 pm »
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.
 

Offline RarePossumTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Help identifying my design flaw
« Reply #15 on: July 20, 2024, 11:47:54 pm »
It's the crystal pin 1, I see a dot (or via?) wrong corner. Is the footprint correct?

That should be a via and its an SMD-3225 4P, which is what the store page and data sheet listed too.

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.

The 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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf