Author Topic: The Living PCB Design Thread  (Read 250817 times)

0 Members and 1 Guest are viewing this topic.

Offline bpiphany

  • Posts: 1030
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: The Living PCB Design Thread
« Reply #850 on: Mon, 23 March 2020, 05:58:24 »
And you haven't erased the bootloader when doing ISP programming? I don't remember what linux says about a atmega without anything USB on it. And I have no idea how Windows reacts to it.

Offline Zustiur

  • Posts: 212
Re: The Living PCB Design Thread
« Reply #851 on: Mon, 23 March 2020, 06:24:36 »
Not that I'm aware of no. All I did was run a command to write the hex file onto the chip.
avrdude -c usbtiny -p m32u4 -U flash:w:zusdox2.hex:i

The board I haven't flashed yet doesn't respond to USB either. Any idea what should happen detection-wise with a baseline atmega32u4-au chip? I expected it to at least show up as an unrecognized device but as I said, no indication what-so-ever that Windows detected the connection.

Could it be something to do with the fuse bits? Maybe I need to enable USB somehow? I can't see anything about that in the datasheet, but I have a very hard time understanding the datasheet, so I may have missed something important.
« Last Edit: Mon, 23 March 2020, 06:32:13 by Zustiur »

Offline bpiphany

  • Posts: 1030
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: The Living PCB Design Thread
« Reply #852 on: Mon, 23 March 2020, 06:43:58 »
The AU chips should come with bootloader, and running with crystal oscillator input as default. I think you should have the correct fuse bits unless you changed them.

It does however sound like you have something going on with the power. You get power through the ISP programmer, but not over USB. If you have a blinky program it should run when you connect USB power as well.

You probably erased the bootloader when ISP programming though. I don't think you can program the chip without erasing it.

Offline Zustiur

  • Posts: 212
Re: The Living PCB Design Thread
« Reply #853 on: Mon, 23 March 2020, 07:38:09 »
Did my schematic look ok at least? (last post page 17)

I just though to compare some readings with a teensy. I don't really know what I'm looking for, but the results could be a clue. I'm using the Diode/continuity testing option on my multimeter.
On the Teensy: Pins 1 & 5 show 457. On my board, pins 1 &5 show 641
Or in other words, when one probe is on GND and the other is on VBUS I get different readings between Teensy and my board. Whether that's meaningful or not... I don't know.



Offline bpiphany

  • Posts: 1030
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: The Living PCB Design Thread
« Reply #854 on: Mon, 23 March 2020, 08:10:04 »
If you have a very simple blinky program, that doesn't try to initiate any USB things or something at start-up, it should just kick off when you supply 5V on the rail. If it doesn't I would suspect you are not getting power from USB. What do you get if you measure VCC-GND with USB plugged in?

Offline gipetto

  • Posts: 60
Re: The Living PCB Design Thread
« Reply #855 on: Mon, 23 March 2020, 09:55:05 »
vbus is missing a 10uf decoupling cap and from what i can see you have only one one mcu pin wired up. check out other keyboard schematics, uvcc, avcc, vcc should all be connected to the usb port

Offline Zustiur

  • Posts: 212
Re: The Living PCB Design Thread
« Reply #856 on: Mon, 23 March 2020, 18:43:11 »
vbus is missing a 10uf decoupling cap and from what i can see you have only one one mcu pin wired up. check out other keyboard schematics, uvcc, avcc, vcc should all be connected to the usb port

I've been very puzzled about that 10uf decoupling cap. I thought from what I read, 10uf was the maximum total you can use, not the recommendation for a single capacitor. It's all very confusing.
All of my uvcc avcc vcc pins are connected to the VCC in the schematic. They all connect to each other one way or another and therefore ... Wait, I just checked my schematic vs the ones I was referencing. I think I see the problem you're talking about now. I'll see what I can do to resolve it with hook up wires.


==Edit==
BINGO.
Connecting Pin 1 of USB to a point on my VCC line makes the light blink. I should be able to resolve it from here!

I'd still appreciate a clear answer on the 10uf cap issue though. Is it necessary? Recommended? Max of 10uf? 10uf cap specifically needed on that line? I'm very lost on that particular issue.
« Last Edit: Mon, 23 March 2020, 18:49:11 by Zustiur »

Offline gipetto

  • Posts: 60
Re: The Living PCB Design Thread
« Reply #857 on: Mon, 23 March 2020, 19:06:08 »
I don't understand capacitor sizing tbh, like many I copy reference designs. generally in most electronics there's one big smoothing capacitor which works as a primitive voltage regulator. Usb has a limit on capacitance so that's why you won't see much larger values. Then there's a small decoupling capacitor for each pin, to keep ac away from sensitive circuits.

Offline kelvinhall05

  • Posts: 63
  • Location: London, Ontario
    • LinusTechTips
Re: The Living PCB Design Thread
« Reply #858 on: Mon, 23 March 2020, 19:26:56 »
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing

Offline bpiphany

  • Posts: 1030
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: The Living PCB Design Thread
« Reply #859 on: Tue, 24 March 2020, 02:41:16 »
I'd still appreciate a clear answer on the 10uf cap issue though. Is it necessary? Recommended? Max of 10uf? 10uf cap specifically needed on that line? I'm very lost on that particular issue.

There is some specification saying you are only guaranteed to be able to have 10F without inrush current limiting on USB. It's probably going to be ok if it is slightly more. But if you use 4.7F like in that schematic and then a bunch of 1F and 100nF caps all around for all sorts of reasons you are probably going to have enough decoupling anyway. Depending on the type of loads you circuit needs to handle in other ways. For the microcontroller it is surely going to be suffieicent.

Offline gipetto

  • Posts: 60
Re: The Living PCB Design Thread
« Reply #860 on: Tue, 24 March 2020, 06:29:48 »
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing

from what i can see only half your switch contacts are routed. I'm not familiar with alps and I don't know what is your strategy for stabilizers.

Offline Zustiur

  • Posts: 212
Re: The Living PCB Design Thread
« Reply #861 on: Tue, 24 March 2020, 07:26:26 »
I had a look too kelvinhall, I agree with gipetto. It looks like you've only connected your rows, haven't connected any columns and haven't connected any of your switches to your diodes. When I run DRC on your PCB, yes it shows 0 'Problems' but on the other tab it shows 60 Unconnected Items. Turning on the Ratsnest makes this really obvious.
Your edge cuts are fine if you want sharp corners. If you want curved corners, you have to use the 'Add graphic arc' tool when you have the Edge Cuts layer selected. For a simple rectangular board like yours, you'd need 4 straight lines and 4 90 dregree arcs. Each line segment is a separate 'object' and can be manipulated individually. You may have been tricked by the way 'Add graphic line' seems to draw connected lines.


Thanks bpiphany, that's more or less what I thought with the 10uf capacitor 'limit'. My board is appearing in USB and responding now. Currently I'm trying to figure out where I've gone wrong that's causing only the first 2 rows to function. I think I've probably missed a comma somewhere in TMK, but at least that's in the programming realm where I'm more comfortable. Thanks again to you and gipetto for assisting with the hardware diagnosis.

Offline kelvinhall05

  • Posts: 63
  • Location: London, Ontario
    • LinusTechTips
Re: The Living PCB Design Thread
« Reply #862 on: Tue, 24 March 2020, 08:27:47 »
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing

from what i can see only half your switch contacts are routed. I'm not familiar with alps and I don't know what is your strategy for stabilizers.
Alps stabs go on the plate, but I'll check my switches, thanks.