pin 7 acting wierd

so i got me an arduino, figured everything out to do what i wanted to do, simple RGB fade routine activated by user input. Everything works great. Decide to take it a step further and build a breadboard arduino, pop the atmega out of my uno and plug it into my breadboard, and bang everything works great. Now i;m feeling good, and i decide to compact everything onto a PCB, I used fritzing for the design(super easy to convert breadboard layout to pcb), spend a whole day bricking PCB's learning the etching process and I finally get it right, I have continuity where I need it and nowhere I don't what should be hot is hot what should be not is not, good stuff! I sit down today and start sodering my pieces on (learned what parts are easier if done first!) had a small issue with the soder not running from one side to the other on the board but I overcame. I check everything as I go for continuity and when I'm all done everything seems great, BUT whet I plug the very same atmega into my pcb i get a constant 1.2v going to (or coming from, I can't really tell) pin 13 (digital pin 7 on the UNO). Thats the pin I am using for my user input so the program runs as if the button is being held in. I cannot find continuity between it and anyother point on my PCB asccept coming from the button where it should. Also found the same voltage one pins 2,4,5,6,11,12,13, and 14. I considered that maybe I messed up my atmega somehow so i pulled it out and plugged it back into my UNO and it works fine.
Could anybody offer possible insight on where this mystery voltage is coming from???

correction: the same strage reading are present on the breadboard arduino, but not the UNO, could this be coming from some some components being to close together?

one more note, I followed this instructable ... Perfboard Hackduino ($8 Arduino-compatible Circuit) : 12 Steps (with Pictures) - Instructables not realizing that there where instructions on arduino.cc. Only difference I could find is that the 10uf caps on either side of the voltage regulators are replace with a 22uf and a 10nf. could this be the cause?

on either side of the voltage regulators are replace with a 22uf and a 10nf. could this be the cause?

No.

Thank you for your answer, could you elaborate?
Also I think from your link your implying there is something wrong with my post. I apologize for it being fractured, my brain is frazzled right now I have been hunched over my work bench for the last 10 hours trying to figure this out.

Thank you for your answer, could you elaborate?

No way that changing the decoupling capacitors could have any effect on the voltages you measure on your output pins.
I am not sure what was wrong with no.

Like the question I have a fridge, is there any chance that this affects the cooking time on my microwave?
Answer NO!

Also I think from your link your implying there is something wrong with my post

Spot on.

You say what you have done and you have done everything correctly so there is no way that you could have done anything wrong.
BUT you have because it will not work. So how about giving us suckers an even break and showing some photographs, schematics and code. We are not mind readers.

Unfortunately, I had no way to take actual photos and get them uploaded until I get home, In the mean time I have checked and rechecked the physical construction of both the perf-board and PCB and can find no defect, I am confident but will ad pictures as soon as I can. However after much thought I can present some answerable questions.

Is there a known anomaly that will cause a digital pin set to input to pass voltage ?

Is there something that should be added to my code when uploading to a standalone arduino?

IMAG1030[1].jpg

IMAG1028[1].jpg

IMAG1027[1].jpg

IMAG1026[1].jpg

Is there something that should be added to my code when uploading to a standalone arduino?

No.

Is there a known anomaly that will cause a digital pin set to input to pass voltage ?

No, only an input pin is a high impedance so measuring the voltage on it will not give you anything meaningful.

You have no decoupling on the chip itself, that is not going to help stability is it.

Can we see the underside?
Where is the pull up resistor?
Can you post your code?
You can not just leave pins unconnected.

I don't understand what you mean by "no decoupling on the chip itself". I have never delved this deep into micro-electronic before, My hardware is configured the same as the instructions I followed and besides the difference in cap. ratings mentioned earlier its the same as what is on arduino.cc, Yet it sounds to me like your saying there is some additional hardware that should be present?

Hi, am I right in assuming that no where on the board you can measure 5V?
Have you tried at the regulator on the board, also pull the IC out, I hope you used an IC socket for it.
What voltage do you have on the input side of the regulator and on the output side of the regulator.
Check the voltages on all the IC pins without the IC and with power applied, and check against your circuit.
Hope to see one soon

Tom... :slight_smile:

I am using a 9v DC adapter to power the board, before the regulator I read 9v, after the regulator I read 5v. As part of my troubleshooting process I plugged the atmega back into my UNO board and checked the voltage on every pin, then put it back into my proto-board and checked them again, they where all the same accept i read 1.2v on the digital pins mentioned earlier. I also checked for voltage with the atmega pulled out (yes, I used a socket) and the readings came back zero.

The project I am working on is relatively simple compared to the capabilities of the chip, I have a strip of RGB LED's they are lit up white, when the button is pressed they fade to pink, press again fade to red. The code and hardware works perfectly on when connected to the UNO but when connected to the protoboard or the PCB it runs as though the button is being held down.

I've been reading for the last few hours and according to what I have found out, the 1.2v i am reading should not be enough to return a result of HIGH to the digital read statement, but it apparently does. I was wondering if a pull-down resistor on my input pin might be the soultion I need. Problem there is I don't know what size resistor or quite where to connect it.

I don't understand what you mean by "no decoupling on the chip itself".

http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

My hardware is configured the same as the instructions I followed

Instructable circuits in general are crap and the authors morons, not always but normally. They have absolutely no quality control on that site.

What part of:-

You can not just leave pins unconnected.

Do you not understand.
Read this:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html

what part of:-

Can you post your code?

Do you not like.

I am trying to help you, but it makes it difficult if you do not cooperate.
Use INPUT_PULLUP in the pinMode instruction and connect a push button between your input and ground.

Hi, if you are going to use an external pullup or pulldown resistor , 10K is the value to use.

Also place a 10uF between pin 7 and 8, Vcc and gnd, also a 0.1uF in the same place, this is bypassing.

Tom...... :slight_smile:

Awaiting a pic of the underside of the board.

Mike, I did not see you last reply before I replied to Tom's comment.

I am trying to help you, but it makes it difficult if you do not cooperate.

I am trying to cooperate but your coming off as a bit arrogant. The little mark next to my name that says newbie is there because, well, I am a newbie!
Also if the code works perfectly fine on one board but not another it would stand to reason that the code is inconsequential to the situation.

Tom, I want to make sure that I understand correctly, your saying I need 3 capacitors( 2 - 10uf and 1 - .1uf)? And the underside of the board has nothing on it, it is an Perma-proto board from adafruit, basically a bradboard that you soder instead of pressfit. And when you say between pin 7 and 8 is that 7 & 8 of the atmega or what would be 7& 8 on the UNO?

** just checked my paperwork and pins 7 and 8 on the atmega are vcc and ground respectivly **

Okay, so following what i have learned in the last several hours from both google and this forum, I redesigned my PCB and tweaked my code and I think this should work, I will need to return some parts and order some others but tell what you think…

//variables
const int RedPin = 10;
const int BluePin = 11;
const int GreenPin = 9;
const int Button = 7;
int Fade = 0;
int RedLevel = 255;
int BlueGreen = 255;
int loopCount = 0;
int intro = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(Button, INPUT_PULLUP);
  pinMode(RedPin, OUTPUT);
  pinMode(BluePin, OUTPUT);
  pinMode(GreenPin, OUTPUT);
  analogWrite(RedPin, 0);
  analogWrite(BluePin, 0);
  analogWrite(GreenPin, 0);
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(RedPin, intro);
    delay(5);
  }
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(RedPin, 255-intro);
    delay(5);
  }
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(BluePin, intro);
    delay(5);
  }
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(BluePin, 255-intro);
    delay(5);
  }
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(GreenPin, intro);
    delay(5);
  }
  for(intro=0; intro < 255; intro++)
  {
    analogWrite(GreenPin, 255-intro);
    delay(5);
  }
  for(intro=0; intro <255; intro++)
  { 
    analogWrite(RedPin, intro);
    analogWrite(BluePin, intro);
    analogWrite(GreenPin, intro);
    delay(5);
  }
}

void loop()
{
 Serial.println(loopCount);
 loopCount ++;
 if (loopCount <= 3000);
 {
  if ((digitalRead(Button) == HIGH) && (Fade == 0))
  {
    loopCount = 0;
    for(int count=0; count <170; count ++)
    {
     analogWrite(RedPin, RedLevel);
     analogWrite(BluePin, BlueGreen);
     analogWrite(GreenPin, BlueGreen);
     BlueGreen --;
     delay(5);
    }
    Fade ++;
  }
  if ((digitalRead(Button) == HIGH) && (Fade == 1))
  {
   loopCount = 0;
   for(int count=0; count <85; count ++)
   {
    analogWrite(RedPin, RedLevel);
    analogWrite(BluePin, BlueGreen);
    analogWrite(GreenPin, BlueGreen);
    BlueGreen --;
    delay(10);
   }
   Fade ++;
  }
  if (BlueGreen == 0)
   {
    BlueGreen = 255;
    delay(10000);   
   }
  if (Fade == 2)
  {
   for(int fadeout = 0; fadeout < 255; fadeout ++)
   {
     analogWrite(BluePin, fadeout);
     analogWrite(GreenPin, fadeout);
     delay(10);
   }
   Fade = 0;
  }
 }
 
 if (loopCount > 3000)
 {
  loopCount = 0;
  Fade = 0;
  for(BlueGreen; BlueGreen <255; BlueGreen ++)
   {
    analogWrite(RedPin, RedLevel);
    analogWrite(BluePin, BlueGreen);
    analogWrite(GreenPin, BlueGreen);
    delay(10);
   }
 }
}

Hi, check the value of the reset resistor on pin 1, it should be 22K.

Tom… :slight_smile:

I have a 10k resistor as speced by arduino, why do you say 22k?

I am trying to cooperate but your coming off as a bit arrogant. The little mark next to my name that says newbie is there because, well, I am a newbie!

Yes that is why I am asking you for things.

Also if the code works perfectly fine on one board but not another it would stand to reason that the code is inconsequential to the situation.

You are by your own admission that you are a newbie so what makes you think you know what is relevant or not? In my book that is none cooperation.

And the underside of the board has nothing on it, it is an Perma-proto board from adafruit, basically a bradboard that you soder instead of pressfit.

It has soldered joints on it that we would like to see.
Well I would have liked to help you and maybe I can when you grow up.

Grow up? this is what I meant by arrogant. I simply stated a fact, your posts read (to me) as arrogant. Maybe this was not your intent or maybe your the kind of guy who only likes to help just enough to show off what he knows or make himself seem smarter then whoever hes dealing with. Either way your style of "helping" or "teaching" is not compatible with my style of "being helped" or "learning".

The solder joints on the underside where of no concern, I checked every single one of them and nothing makes contact where it shouldn't and everything makes contact where it should.

Newbie or not, you yourself said there was nothing extra needed in the code when working with a standalone or breadboard arduino, so logically (much like the fridge and the microwave) if the code works on one board and not another, the problem is with the board. (By the way- setting your fridge colder will make things take longer in the nuke!)

Lastly a big giant thank you I am for ever grateful to TomGeorge you gave me just what I needed to look in the right direction, I installed the .01uf cap. between vcc and ground and the everything worked, however it would still occasionally go "wonky". I then tweaked my code to take advantage of the built-in pull up resistor and bingo! everything is working the way intended and with consistency. I realize there may still be issues with other projects on my standalone arduino but I now know a good place to start looking. Thanks Tom and if your ever in Philadelphia look me up...I owe you cold one!