geekhack
geekhack Projects => Making Stuff Together! => Topic started by: kahdeg on Sun, 22 May 2022, 04:06:41
-
Hi, i'm just starting to learn about designing and making custom keyboard.
What i was making is a mechanical numpad with per-key led.
Here is my diagram:
(https://i.imgur.com/hb2i3Ch.jpg)
Attached is the pdf export of the pcb layout.
When i ordered the board from jlcpcb, i plugged the board in and windows reported unknown device.
After that, i scouted several post on avrfreak and stackexchange and tried to use another arduino (pro micro) as isp to try to upload the bootloader using arduino ide.
but avrdude reported signature = 0xffffff.
I checked the crystal and it seem similar with other schematic online but idk that much about electronic component.
Please help me check the diagram.
D:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CD:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega32u4 -carduino -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xcb:m -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "D:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"
Using Port : COM5
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATmega32U4
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 9000 9000 0x00 0x00
flash 65 6 128 0 yes 32768 128 256 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
here is my arduino ide settings
(https://i.imgur.com/2r0OFA3.jpg)
the atmega chip:
(https://i.imgur.com/WOWXeoV.jpg)
the crystal:
(https://i.imgur.com/V4bppVF.jpg)
the android isp wiring:
(https://i.imgur.com/Q4aBdB3.jpg)
-
Have you tried to flip the USB-C connector? You have only connected one of the USB-C pairs of the connector. Both need to be connected (DN2 and DP2 is not connected). Also, is the GND pins on the MCU not connected to GND?
-
:-[
yes i have missed the gnd pin of the mcu, i will try to fix this manually.
for the data pin, tks for noticing that :-[
-
We all make mistakes ;D For future boards, I'd recommend to also include a ESD protection IC, like the SRV05 for example.
-
Do you have any resources on this component?
After some google search, i understand that this component should sit between the input signal line like the data from usb-c and the d+ d- from the atmega chip.
-
Best is to check the datasheet, there is an example implementation there. Note that the IC can be used to protect four I/Os, but you only need to connect two (DP and DN). This IC should be connected in parallel to the data-traces. There are plenty of other ESD protection IC's, just check the datasheet for the component you want to use and you'll likely have an example.
-
I referenced the data sheet of the srv05 on jlcpcb and this is my result :D
Could anyone please double check this schematic again. I have learned to respect the check net warning this time.
(https://i.imgur.com/64zYKg1.jpg)
-
This should work from what I can tell, but I don't follow why you have split up your VCC net like this. Why connect some of the VCC nets before fuse and some after to the MCU? You can use VCC, it does not matter that it's after the fuse. Generally, one 0.1uF (100nF) decoupling cap is recommended per VCC pin.
-
I just refactor the whole circuit so that everything that use vcc is behind fuse now.
mcu, power, usb and header
(https://i.imgur.com/C4HX9s5.jpg)
the key and led matrix
(https://i.imgur.com/YxQAAMr.jpg)
-
Looks like pin 34 is not connected to VCC? You don't need to place the decoupling caps next to each pin in schematic, just make sure to place them correctly when doing the layout.