Author Topic: Integrating a Chip + USB connection into PCB  (Read 5618 times)

0 Members and 1 Guest are viewing this topic.

Offline overture1928

  • Thread Starter
  • Posts: 60
Integrating a Chip + USB connection into PCB
« on: Sun, 30 December 2012, 00:56:43 »
So I was going to have a PCB made then just solder wires into some holes at the end of each row and column and connect them to my arduiono to program but I want to know how to integrate a chip and usb connection in the PCB instead of using an arduino. If anyone could add to my schematic and show me how to integrate a chip I would appreciate it.


Offline __red__

  • Posts: 194
Re: Integrating a Chip + USB connection into PCB
« Reply #1 on: Sun, 30 December 2012, 03:28:05 »
Welcome!

Before you go down that road you have to decide what type of processor you want.  Is this something you're wanting to write software for or are you wanting to use some of the fine firmwares that are available here?

Also - You might want to take a close look at where you put the diodes.  It looks like you put them inside the switches.  If that;'s the case them's EXPENSIVE switches.

Thanks,



Red

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #2 on: Sun, 30 December 2012, 12:37:43 »
Welcome!

Before you go down that road you have to decide what type of processor you want.  Is this something you're wanting to write software for or are you wanting to use some of the fine firmwares that are available here?

Also - You might want to take a close look at where you put the diodes.  It looks like you put them inside the switches.  If that;'s the case them's EXPENSIVE switches.

Thanks,

Red

Yea I was going to ask about the diodes. I did put them in the switches. I think it will probably be better to buy diodes myself and put them in. It is easier to find different switches than to find different switches with diodes. Also they looked to be about a 50 cent difference per switch which will cost me an extra $30 or so where as buying 60 diodes is like $2 (http://ca.mouser.com/Search/ProductDetail.aspx?qs=HfDODkYFUverVKi/J/e5IA==) Just gotta make sure to get them both from the same place for less shipping.

I think it would be better to use some firmware that people have already written if I can get my hands on some. Would it be as simple as just editing a template code like the following:

If Send to Row 1 and receive Row 1

         Write = Q

If Send Row 2 and receive Row 1

        Write = W

CAn you suggest a processor and show me where the leads enter into the chip and how they go into USB port?
« Last Edit: Sun, 30 December 2012, 12:39:20 by overture1928 »

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Integrating a Chip + USB connection into PCB
« Reply #3 on: Mon, 31 December 2012, 00:10:35 »
Most firmwares have been written to work with the ATmega32u4  as far as I know. You can check out the schematic for the Teensy2.0 at pjrc's site. If you want to go a tiny bit more simple the ATmega32u2 is the baby brother. That will use less extra capacitors as well. My AVR-Keyboard firmware is probably one of the easier ones to start with. It also works with the '32u2.

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #4 on: Mon, 31 December 2012, 11:48:07 »
Most firmwares have been written to work with the ATmega32u4  as far as I know. You can check out the schematic for the Teensy2.0 at pjrc's site. If you want to go a tiny bit more simple the ATmega32u2 is the baby brother. That will use less extra capacitors as well. My AVR-Keyboard firmware is probably one of the easier ones to start with. It also works with the '32u2.

Where would I find a schematic to integrate the 32U2?

Offline Soarer

  • * Moderator
  • Posts: 1918
  • Location: UK
Re: Integrating a Chip + USB connection into PCB
« Reply #5 on: Mon, 31 December 2012, 13:28:56 »
Where would I find a schematic to integrate the 32U2?

Here's one for the Micropendous '32U2 breakout board  :)

I prefer the '32U4 since it has more stuff (more timers, more USB endpoints, more RAM etc), but 32U2 is fine for many projects. I'm also lazy, and would probably tend to design a PCB to use one of the available breakout boards (indeed, I did).

One problem of course when you have a dense matrix, is where to put the chip etc!
« Last Edit: Mon, 31 December 2012, 13:35:38 by Soarer »

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #6 on: Mon, 31 December 2012, 18:30:32 »
Where would I find a schematic to integrate the 32U2?

Here's one for the Micropendous '32U2 breakout board  :)

I prefer the '32U4 since it has more stuff (more timers, more USB endpoints, more RAM etc), but 32U2 is fine for many projects. I'm also lazy, and would probably tend to design a PCB to use one of the available breakout boards (indeed, I did).

One problem of course when you have a dense matrix, is where to put the chip etc!

"here's one" link doesn't work

Offline alaricljs

  • I be WOT'ing all day...
  • ** Moderator Emeritus
  • Posts: 3715
  • Location: NE US
Re: Integrating a Chip + USB connection into PCB
« Reply #7 on: Mon, 31 December 2012, 19:12:47 »
Works for me, straight to a PDF.
Filco w/ Imsto thick PBT
Ducky 1087XM PCB+Plate, w/ Matias "Quiet Click" spring-swapped w/ XM Greens

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #8 on: Mon, 31 December 2012, 19:58:59 »
Works for me, straight to a PDF.

can u upload it as an attachment?

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #9 on: Tue, 01 January 2013, 15:33:56 »
Works for me, straight to a PDF.

can u upload it as an attachment?

NVM I opened it up on my friends computer and sent it to myself

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #10 on: Tue, 01 January 2013, 17:40:57 »
Most firmwares have been written to work with the ATmega32u4  as far as I know. You can check out the schematic for the Teensy2.0 at pjrc's site. If you want to go a tiny bit more simple the ATmega32u2 is the baby brother. That will use less extra capacitors as well. My AVR-Keyboard firmware is probably one of the easier ones to start with. It also works with the '32u2.

So there are 4 types ATMEGA32U2-AU, ATMEGA32U2-AUR, ATMEGA32U2-MU,   ATMEGA32U2-MUR. The M series are VQFN package type which would be impossible for me to solder myself. What is the difference between the AU and AUR?

Offline precarious

  • Posts: 282
  • LOOK MOM, I'M A DRAGONZORD! DOOOO DODOODODODOODOO
Re: Integrating a Chip + USB connection into PCB
« Reply #11 on: Tue, 01 January 2013, 18:56:05 »


Since I guess this is related to the topic at hand, I'm wondering what the best controller would be to replace the one in the above image.  Would I be able to simply use a Teensy or Teensy++ with pins, or would I need something else?  From what I'm getting out of this anything with the ATmega32u4 should be fine, but I'm not really sure about what is required as far as number of connections / pinout / etc.

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Integrating a Chip + USB connection into PCB
« Reply #12 on: Wed, 02 January 2013, 00:33:55 »
So there are 4 types ATMEGA32U2-AU, ATMEGA32U2-AUR, ATMEGA32U2-MU,   ATMEGA32U2-MUR. The M series are VQFN package type which would be impossible for me to solder myself. What is the difference between the AU and AUR?

I am quite sure it's just the packaging. The R is for reel AU is definitely the way to go. I think the 32u2 actually comes setup with the internal oscillator as the clock source. Then you don't even need a crystal and caps for that.

Since I guess this is related to the topic at hand, I'm wondering what the best controller would be to replace the one in the above image.  Would I be able to simply use a Teensy or Teensy++ with pins, or would I need something else?  From what I'm getting out of this anything with the ATmega32u4 should be fine, but I'm not really sure about what is required as far as number of connections / pinout / etc.

You'll need to figure out how the matrix looks like. Use a multimeter to check what is connected to what, and so on. At least figure out which lines goes to the matrix. A Teensy++ has 46 IO lines, that covers just about anything. Depending on if the matrix has diodes or not you'll need to take that into account in the firmware. But I think hasu's firmware already has this feature.

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #13 on: Wed, 02 January 2013, 01:47:49 »
Man its like 1 step forward 10 steps back.

So now that I know what you are talking about with the crystal.. not sure. One thing I think I realized now is that the Micropendous 32U2 seems to have a crystal but I don't know if they needed an extra one for some reason. I don't even know what the micropendous does.

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Integrating a Chip + USB connection into PCB
« Reply #14 on: Wed, 02 January 2013, 01:58:02 »
The chip has an internal 8 MHz oscillator which lets you run the thing with less supporting components. If you want to run any faster you need to use an external clock source up to 16 MHz, either an oscillator or a crystal (the crystal requires 2 capacitors as well), or a ceramic resonator (but I never played with them, and I don't know how fast you can run on them either). A keyboard runs just fine on 8 MHz. I think that a dedicated oscillator is supposed to be of higher accuracy though, but I haven't experienced any trouble so far using the internal oscillator. You can leave component locations for the crystal and capacitors if you'd ever want to use them. In that case you'd also need to change the fuse settings, which requires a serial programmer unit as well... (or parallel, but I don't think anyone usually uses them..)

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #15 on: Thu, 03 January 2013, 17:26:10 »
Most firmwares have been written to work with the ATmega32u4  as far as I know. You can check out the schematic for the Teensy2.0 at pjrc's site. If you want to go a tiny bit more simple the ATmega32u2 is the baby brother. That will use less extra capacitors as well. My AVR-Keyboard firmware is probably one of the easier ones to start with. It also works with the '32u2.

Where would I find a schematic to integrate the 32U2?

I just realized how damn small this chip is; 7mmx7mm according to the data sheet. When I was looking at chip soldering at http://geekhack.org/index.php?topic=37570.0 I thought the chip looked pretty big around 1"x1" but now I think it is going to be difficult solder a 32u2-au chip especially without creating solder bridges. So I am thinking of using a Atmega324P instead, also because there are some nice tutorials for this chip at http://www.newbiehack.com/MicrocontrollerIntroductionABeginnersGuidetotheAtmelAVRAtmega32.aspx

Offline bpiphany

  • Posts: 1033
  • Location: Stockholm, Sweden
  • bpiph is a special type of crazy. //mkawa
Re: Integrating a Chip + USB connection into PCB
« Reply #16 on: Fri, 04 January 2013, 01:37:13 »
Why not use a Teensy if you don't want to go small? That behemoth is 15 × 50 mm, the Teensy is 18 × 30 mm, and good luck programming for it or flashing the firmware...

Soldering a 0.8 mm pith TQFP is no problem, you just need a lot of flux. They are using some special tips in this video, but it can be done with a regular tip as well
Or why not me soldering a 32u4, it's slightly larger but the same pitch =) Not a valid vimeo URL

Offline overture1928

  • Thread Starter
  • Posts: 60
Re: Integrating a Chip + USB connection into PCB
« Reply #17 on: Fri, 04 January 2013, 02:14:49 »
Why not use a Teensy if you don't want to go small? That behemoth is 15 × 50 mm, the Teensy is 18 × 30 mm, and good luck programming for it or flashing the firmware...

Soldering a 0.8 mm pith TQFP is no problem, you just need a lot of flux. They are using some special tips in this video, but it can be done with a regular tip as well
Or why not me soldering a 32u4, it's slightly larger but the same pitch =) Not a valid vimeo URL

Cool stuff. The reason why I don't want to go with a Teensy is because I want a nice clean 1 piece board finish. Also learning to program a chip from scratch seemed like a cool and handy thing to learn.