Arduino Forum

Forum 2005-2010 (read only) => Hardware => Development => Topic started by: HighSeraphim on Apr 11, 2010, 11:36 pm

Title: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 11, 2010, 11:36 pm
I am trying to implement my arduino on a breadboard. I have tested my setup on the dev board that I used to program it and it worked.

Now I have used this as a guide:
http://cdn.shopify.com/s/files/1/0038/9582/files/RBBB_Instructions_06.pdf?1260749296
to put my atmega328 on a breadboard. I don't have any of the caps or the indication diodes. I'm wondering if the caps are critical? They don't seem like they should be.

I have power to the correct pins and my chip is behaving erratically.

I have a 16Mhz oscillator and I'm reading 4.98VDC to VCC and AVCC. I have my grounds connected on the chip.
Title: Re: Breadboard Arduino Problems
Post by: Coding Badly on Apr 11, 2010, 11:48 pm

Do you have the two capacitors for the oscillator?
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 11, 2010, 11:55 pm
It is an ceramic package with internal caps. It's a three pin device.
Title: Re: Breadboard Arduino Problems
Post by: AlphaZeta on Apr 12, 2010, 12:01 am
If you are using ceramic resonator then you don't need the caps on pin 9 and 10.  
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 12, 2010, 12:09 am
Aye I am using a ceramic resonator and I'm not using any of the caps. :)
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 12, 2010, 03:12 am
I should just plug the outer two pins of the resonator into pins 9 and 10. Then the middle pin goes to ground correct?
Title: Re: Breadboard Arduino Problems
Post by: Coding Badly on Apr 12, 2010, 04:04 am

Are you working with just the processor or do you have other electronics (LEDs, servos) involved?
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 12, 2010, 04:19 am
I have some other electronics involved.
HOWEVER; I have tested them with the Duemilanove development board  and they worked fine.
Everything falls apart when I try to put the ATMega328 on the breadboard instead.
Title: Re: Breadboard Arduino Problems
Post by: estranged on Apr 12, 2010, 05:54 am
I've had very good results from following the breadboard writeup at the following site:

http://www.imagearts.ryerson.ca/sdaniels/physcomp/tutorials/Arduino_standalone/ard_hack.html

Its always good to start with the basic blinking LED sketch too, just to make sure the breadboard setup works before getting too ambitious with additional components.
Title: Re: Breadboard Arduino Problems
Post by: MarkT on Apr 12, 2010, 10:41 pm
Quote
I don't have any of the caps or the indication diodes. I'm wondering if the caps are critical? They don't seem like they should be.

I have power to the correct pins and my chip is behaving erratically.


Decoupling capacitors are a must for any, repeat any digital circuitry.
Title: Re: Breadboard Arduino Problems
Post by: MarkT on Apr 12, 2010, 10:44 pm
Oh and the voltage regulator may well need its decoupling capacitors to prevent oscillation.  You've probably made a low power radio transmitter ;)
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 14, 2010, 05:28 pm
This is of note and should be made into a sticky: the 328 has internal caps on the clock inputs.
It works with a a 16mhz crystal installed between the two pins. There is no need for caps and a ceramic oscillator doesn't work.
Title: Re: Breadboard Arduino Problems
Post by: Grumpy_Mike on Apr 14, 2010, 05:58 pm
Quote
the 328 has internal caps on the clock inputs.


Why do you say this? the data sheet shows external capacitors (page 29)
and on the same page give start up data for ceramic resonators.

I use capacitors on 328 stand alone systems without problems.

Am I missing something?
Title: Re: Breadboard Arduino Problems
Post by: retrolefty on Apr 14, 2010, 09:51 pm
Quote
This is of note and should be made into a sticky: the 328 has internal caps on the clock inputs.
It works with a a 16mhz crystal installed between the two pins. There is no need for caps and a ceramic oscillator doesn't work.


While you may have got yours to work, we shouldn't let this statement stand for others to use in the future, let alone make it a sticky.

1. While the 328 AVR pins 9 & 10 each do exhibit some amount of capacitance to ground, it is not generally enough to let crystals work accurately at their specified frequency, and may cause fail to start up or sluggish starting. Even if a crystal will oscillate without using external padding caps, accuracy will suffer somewhat without the use of external padding caps such that the total capacitance (internal + external) are what the crystal was specified to work with.

2. Three pin ceramic resonators do work with the 328 processor, and yes they have internal padding capacitors wired from the outside pins to the middle pins, just be sure to ground the middle pin. I have at least two 328 processors using ceramic resonators and they work just fine, they just don't quite have the accuracy of a crystal resonator, but in most cases that is not an important issue.

Lefty
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 14, 2010, 10:33 pm
I have 4x 328s here.
I can't get ANY of them to work with a three pin resonator or a crystal with two caps.

They only work when I have the two pin crystal plugged in.

If other people have other results, I can't explain the phenomena
Title: Re: Breadboard Arduino Problems
Post by: retrolefty on Apr 15, 2010, 12:12 am
Quote
I have 4x 328s here.
I can't get ANY of them to work with a three pin resonator or a crystal with two caps.

They only work when I have the two pin crystal plugged in.

If other people have other results, I can't explain the phenomena


It's possible the fuse settings for your 328  chips are set such as not to be proper for the standard oscillator settings. Check out an AVR datasheet for the fuse options offered for oscillator function and if you have the means to read your fuse settings, see if it is set up correctly.

The standard fuse setting for an Aduino 328 are:

low_fuses=0xFF
high_fuses=0xDA
extended_fuses=0x05

Lefty
Title: Re: Breadboard Arduino Problems
Post by: Senso on Apr 16, 2010, 02:02 am
If you are mounting then in a breadboard, the board itself may have enought capacitance to let the cristal work properly, but when you add the caps it as too much and can't work, using high clock signals in a breadboard is always asking for troubles.
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 16, 2010, 03:32 am
I moved the chip to a PCB and had the same effect.
I mean... It's not a problem for me because it's working just fine. I just wish I new why. :)
Title: Re: Breadboard Arduino Problems
Post by: estranged on Apr 16, 2010, 05:20 am
Quote
I have tested my setup on the dev board that I used to program it and it worked.


What dev board did you use to program it?

Are the 4 328's you tried from a regular Arduino board, or did you just buy them as parts?  Maybe the chips don't have the Arduino bootloader / fuses set and instead is operating off the internal 1MHz oscillator?
Title: Re: Breadboard Arduino Problems
Post by: HighSeraphim on Apr 16, 2010, 08:21 am
No i used the standard arduino dev board to program them. IF they were programmed to run off of the internal clock, adding an external ceramic oscillator wouldn't make them malfunction anyways right?

It really seems to be an odd situation as right now I feel like my reality is not congruent with everyone else's...