Author Topic: Building a board  (Read 3085 times)

0 Members and 1 Guest are viewing this topic.

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Building a board
« on: May 04, 2008, 01:12:05 PM »
I am building a board for the ATmega168 chip. I am trying to do it in a way that I can fully utilize all of the features of the chip if I ever have the need.

Question 1) As I read it, all of the pins except for VCC, GND, GND again, AREF and AVCC can be configured to I/O Pins, correct?

2) I know that PC0 thru PC5 have 10 bit A to D converters. AVRfreaks say that there is also 2 8-bit A to D converters. I am green enough that the datasheet is pretty much gibberish to me, and I cant figure out what other pins have the A to D.

3) I am taking into account all the posts Ive read about the chip. I am going to include a pullup resistor with a reset PB switch and filtering caps. I am going to include pads for an external chrystal oscillator @ pins 9 & 10. I am going to have a bunch of LEDs to be able to jumper to, and a battery monitor circuit I can jumper to also. I want to have every I/O pin run to a 3 pin header w/ 5v regulated power and a number also run to headers with unregulated power. I am also thinking about a diode going to the input of the regulator to prevent any OOPS moments. If there is any other useful things I should do, please let me know.

Thanks,
Buk
« Last Edit: June 15, 2008, 09:42:06 PM by bukowski »

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: ATMega I/O question
« Reply #1 on: May 04, 2008, 02:30:07 PM »
Oh, and to let you know, I did read the post http://www.societyofrobots.com/robotforum/index.php?topic=2228.0.
I am planning on putting in the 4 pin header on the Rx and Tx lines for AVRcam, etc.. I am not going to mess around with i2c just yet because it is a bit above my head.

Offline izua

  • Supreme Robot
  • *****
  • Posts: 682
  • Helpful? 0
Re: ATMega I/O question
« Reply #2 on: May 04, 2008, 03:49:34 PM »
remember the PEN pin, which enables/disables programming.
a MAX232 would be useful.
You don't need anything for i2c special for i2c, just make sure the i2c pins (if you plan to use them later) aren't pulled low by something.
Check out my homepage for in depth tutorials on microcontrollers and electronics.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,702
  • Helpful? 173
    • Society of Robots
Re: ATMega I/O question
« Reply #3 on: May 15, 2008, 05:24:22 AM »
Quote
Question 1) As I read it, all of the pins except for VCC, GND, GND again, AREF and AVCC can be configured to I/O Pins, correct?
Yeap. If you look at the pinout, it says everything that each pin can be configured to. There are also pin configuation tables throughout the datasheet for more specific info.

Quote
2) I know that PC0 thru PC5 have 10 bit A to D converters. AVRfreaks say that there is also 2 8-bit A to D converters. I am green enough that the datasheet is pretty much gibberish to me, and I cant figure out what other pins have the A to D.
There are 8 ADC. Typically 10 bit ADC has too much noise in the last 2 bits unless you use a really clean voltage into AREF. Sensors like the sharp IR are accurate only to like 6 bit, so 10 bit would be pointless . . .

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Building a board
« Reply #4 on: June 15, 2008, 10:15:30 PM »
OK, here's the schematic, finally.
Anyone that is even curious about it should download Eagle, it is awesome.
I should be posting the board next weekend, and getting quotes for a protoboard. Can anyone recommend some decent boardhouses that are resonably priced? I dont even know, how much does a pretty simple one-off board cost?? Also, is there any specs I dont know about that I need besides everything that is on the .brd file?

edit:
cant seem to post the .png right now. guess ill try again later.
« Last Edit: June 15, 2008, 10:19:33 PM by bukowski »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,702
  • Helpful? 173
    • Society of Robots
Re: Building a board
« Reply #5 on: June 16, 2008, 07:08:04 AM »
The forum allows png attachments . . .

Quote
Can anyone recommend some decent boardhouses that are resonably priced? I dont even know, how much does a pretty simple one-off board cost?? Also, is there any specs I dont know about that I need besides everything that is on the .brd file?
Try sparkfun, they are like ~$60-ish with a 2-3 week wait. Curiousinventor.com costs about $20 more, but the wait time is more like ~1.5 weeks. You will need excellon and gerber files, each Eagle can do.

Offline krich

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 0
Re: Building a board
« Reply #6 on: June 16, 2008, 01:54:56 PM »
I did a similar thing, but in a much more minimalist fashion.

I created a atmega168 base board with minimal components (reset button, caps, holes for resonator) and broke out the pins into four 9-pin female headers, effectively separating the board into quadrants.  Unregulated power, regulated power, and ground is connected on all four headers.  With this setup, I can develop a "module" that simply plugs in to the appropriate quadrant or quadrants, as necessary.  The only requirement is for the modules to "pass through" all 9 pins to its own 9-pin female header.  This allows multiple modules to stack.  Also, it allows me to "remake" only the modules that I screwed up rather than having to repopulate an entire development board.  It also allows the footprint to remain fairly small (2"x3") while growing upward as you stack modules.

(Incidentally, this is why I posted a while back looking for a "bus" type connector...still looking...)

Here's a few pics  (not sure how they turned out...cell phone cam...yuk)

The last one is my current full configuration.  Atmega baseboard, serial module, RTC module, 5V power module, L298 motor controller, and ISP module.  Whew.  In spite of my horrible, but improving, soldering skills, it works pretty darned good.  I'm limited to ~2-3A on the female headers, so I'm not sure how well that L298 module will work out.  I may have to feed unregulated power through a separate path.

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Building a board
« Reply #7 on: June 16, 2008, 09:26:44 PM »
Wow, krich, nice design!
I was just planning on being able to jumper the pins to another board with wire if I ever wanted to expand... But now you've got me thinking.
Haha, if i tell my girlfriend that the project ive been working on for the past few weeks needs to be trashed and redesigned I may not live to post it.  :-\

Anyways, lets try this again:

Darn it, every time I try to post the .png it routes me to an "IE cannot connect to this page". If I try it again it says I already submitted that post.

Ill email it to myself and try it at work tomarrow

Offline krich

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 0
Re: Building a board
« Reply #8 on: June 16, 2008, 10:25:08 PM »
Hey, thanks bukowski.    :D

As I implied earlier, the Achilles heel of this design is the "passthrough" connectors.  I have yet to find something that is  more elegant than soldering a female header on top of a male header sticking through the board.  What you don't see is how it doesn't exactly stack up to the same level everywhere, etc.

Also, notice my PCBs are SUPER thin.  Makes the female on male thing work well.   :o  Not sure what the heck I bought off Ebay, but this stuff is so thin I can cut it with regular scissors and bend it a crazy amount after its been etched.  I cursed myself for being a dimwit when I got it in the mail, now I actually kinda like the stuff and I have a supply to last me well into the next century.  I worry about the affects of unintentional bending on my soldering though.

What you see in the last picture, minus the ISP and Serial module, will form the basis for a "ratbot" I'm building for my daughter for Halloween this year.  I work slow, so I had to give myself a year to get it done.   :-\

I'll share my Eagle schematics and boards with you if you want.  I can't guarantee they'll actually work, much less be production quality, but I have no problem sharing.   I was thinking about tutorializing this and distributing the schematics/boards, but I really want to solve that board connector problem first.  Its really a pain to do it the way I'm doing it now.



HINT:  Try clicking "Additional Options" down below the message box, and attaching your picture.

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Building a board
« Reply #9 on: June 17, 2008, 10:58:04 AM »
Quote
HINT:  Try clicking "Additional Options" down below the message box, and attaching your picture.
cmon, im not a complete j/o.  :)

edit: hey, it worked from my office puter. huh. must have a setting off at home or something.
« Last Edit: June 17, 2008, 10:59:45 AM by bukowski »

Offline krich

  • Robot Overlord
  • ****
  • Posts: 165
  • Helpful? 0
Re: Building a board
« Reply #10 on: June 17, 2008, 11:46:13 AM »
Hehe, sorry.   ;)  I just know I miss the obvious more than I would like to admit, so...

Nice schematic.  Mine are here, there, everywhere, kinda organized, but not terribly so.  I need to figure out that thing you did with the blue line (oh, I see, it's a bus!).  Nice.  I also need to figure out how to flood fill a ground plane.

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Building a board
« Reply #11 on: June 23, 2008, 10:24:07 PM »
and the board...

OK, so I know the png didnt turn out that well. the clearance for the fill is set at 15 thou, should be enough I think. Anyways, if anyone sees anything obvously wrong, slag away.

Quote
I also need to figure out how to flood fill a ground plane.

click or type polygon, type the signal name (GND, or whatever you named it) select which layer, draw the boarder, then ratsnest.
« Last Edit: June 23, 2008, 10:49:07 PM by bukowski »

Offline bukowskiTopic starter

  • Robot Overlord
  • ****
  • Posts: 219
  • Helpful? 0
Re: Building a board
« Reply #12 on: June 23, 2008, 10:45:52 PM »
and one without the fill:

I plan on doing some minor editting (getting rid of all those pesky 90-deg angles) and getting it quoted. Ill post the results (lowest price, highest, etc.) for those interested.

 


Get Your Ad Here

data_list