uC doesn't boot on stripboard, no idea why

Hello everyone!

I have an Atmega168 with the Arduino bootloader, which I am trying to put on a stripboard. I am sure it works - I have taken it off the stripboard and onto the Arduino board to test it - and I have made it work on breadboards before, but I can't for the life of me make it turn on in my current circuit.

Attached are pictures of the stripboard, front and back, as well as ugly hand-drawn stripboard plans and a schematic. I have made a couple of changes from the stripboard plans to the board, but the only one relevant to the microcontroller is the led-resistor series that goes from arduino digital pin 13 to 12 (physical pin 19 to 18).

As the controller is currently loaded with the blink program, the LED should blink. It does not.

Measurements:

(I am using this as pin number reference in the measurements.)

I have measured pin 1 (reset) to be at exactly 5 volts.
Pin 7 (VCC) is at 5.04v.
pin 8 (GND) is at 0v with little resistance between the pin and the ground rail (meaning that it is connected to ground).
Pins 20 (AVCC) and 21 (AREF) are at 5.04v.
Pin 22 (GND) is at 0v, again with little resistance between it and the ground rail.

Lastly, pin 19 (Arduino digital pin 13) is at 0v.

I am at a loss as to why this does not work. Any help would be greatly appreciated.

Photo on 2011-02-25 at 22.42.jpg

Photo on 2011-02-25 at 22.42 #2.jpg

Photo on 2011-02-25 at 22.43.jpg

What is that black-and-silver thing between the crystal and the processor?

The pin 13 LED has a series resistor?

The black-and-silver thing is a jumper - I have attached a picture of the stripboard plan with it circled in red.

Yes, there is a 470 ohm resistor in series with the LED.

Photo on 2011-02-25 at 22.43 copy.jpg

  1. Since uC is clocked from internal oscillation scheme with external quartz, it needs some start impulse after power on. Try to add 1uF capacitor between nRESET pin and ground to provide delay between power on and reset rising edge. Better solution is to use system supervisor chip.

  2. What do you mean "resistance between ground and GND pin"? Try to solder it better. Less resistance, bigger current required.

  1. I tried adding a capacitor, but nothing seemed to change.

  2. There is practically no resistance. The reason I said it like that is that I would rather state the facts ("there is little resistance between the GND pin and the ground rail") rather than my conclusions drawn from that fact ("the GND pin is connected to the ground rail"). I am sorry if it was unclear.

cyntrox:

  1. I tried adding a capacitor, but nothing seemed to change.

Remove capacitor, power on scheme. If it won't start, try to touch quartz. If it won't start, try to reset uC, connecting RESET pin to ground for short time. If it won't start, try to solder GND pin better.

cyntrox:
2. There is practically no resistance. The reason I said it like that is that I would rather state the facts ("there is little resistance between the GND pin and the ground rail") rather than my conclusions drawn from that fact ("the GND pin is connected to the ground rail"). I am sorry if it was unclear.

Zero resistance should be.

Vanyamba:
Remove capacitor, power on scheme. If it won't start, try to touch quartz. If it won't start, try to reset uC, connecting RESET pin to ground for short time. If it won't start, try to solder GND pin better.

I am unsure of what you mean by scheme. Obviously I restarted the uC after adding the capacitor.

Vanyamba:
Zero resistance should be.

Surely 0.6 ohms does not matter? If it does, I will resolder it tomorrow. I expected about that much resistance to come from the wires, though.

cyntrox:
I am unsure of what you mean by scheme.

The board.

cyntrox:
Surely 0.6 ohms does not matter? If it does, I will resolder it tomorrow. I expected about that much resistance to come from the wires, though.

Ohm law. I=U/R
5V/0.6Ohm=8.33A
You need a computer power supply to start your uC.

Don't you need the Enable line High on the L293 to before the outputs will drive?

but the only one relevant to the microcontroller is the led-resistor series that goes from arduino digital pin 13 to 12 (physical pin 19 to 18).

To blink a led/resistor string with the blink program it should wire from arduino digital pin 13 (physical pin 19) and ground. Why would you wire the other end to arduino pin 12? And of course the led must be wired in the correct direction.

Lefty

Vanyamba:
Ohm law. I=U/R
5V/0.6Ohm=8.33A
You need a computer power supply to start your uC.

We are talking about the ground connections here, though. Since everything connected to the ground rail is at the same voltage, won't the voltage difference be 0v - giving this:

0V/0.6?=0A

As I understand the equation, if 5v were to be applied on one end of the 0.6 ? wires while ground was on the other end, the resulting current would be 8.33A. Am I wrong in thinking that?

CrossRoads:
Don't you need the Enable line High on the L293 to before the outputs will drive?

You are absolutely right. I just forgot to put that in the plan, it is on the board though :stuck_out_tongue: Anyways, I am testing with the blink program, not even sending anything to the L293.

retrolefty:
To blink a led/resistor string with the blink program it should wire from arduino digital pin 13 (physical pin 19) and ground. Why would you wire the other end to arduino pin 12? And of course the led must be wired in the correct direction.

Lefty

The whole thing LED is a hack, and I did it that way because I was out of space.

I have measured pin 13 with a multimeter, though, so I know that the pin is low without relying on the LED.

So post your code then - maybe you are not writing it high? If you, something is dragging it low, or the pin is bad.
Pics are kind of blurry to identify anything.

cyntrox:
0V/0.6?=0A

0V is 0A. Everything's correct.

CrossRoads:
So post your code then - maybe you are not writing it high? If you, something is dragging it low, or the pin is bad.
Pics are kind of blurry to identify anything.

I am using the blink example:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

I know that the pin is not bad, because I have tried removing the Atmega and inserting it into an Arduino board where everything worked.

I have tried pins 3, 5, 6 and 11 as well, so if something is dragging down pin 13 it must be dragging those down as well. I can't think of anything that would do that, but if anyone has any ideas I'm listening.

If you have a scope or can borrow the use of one, the next thing I would do is see if the crystal is actually oscillation by putting the scope probe on chip pin # 10. If you have a bad crystal or using the wrong size caps chip won't do a thing.

Lefty

You need a 0.1uF cap from pin 21 to ground.
You also need to connect both pins 7 and 20 to +5 and put a 0.1uF cap to ground on those pins.