Strange PCB Problem

Hi all,

I'm getting an odd problem that I'm having a hard time tracking down. I've been building a bomb prop for a while, and since getting it working on my Uno have started making the move to it's own board. The problem is it seems to lock up and act strangely, but only when the chip is on the board and running my sketch - if I put the chip in my Uno and connect the pins up it almost works perfectly (which I'll get to shortly).

The set up for the board contains jumpers for a matrix keypad, a LCD screen (with the backlight on 13), 2 switches, a LED and a Piezo buzzer. In the code I'm using a basic FSM to control the states

At first I thought it was a problem with the board - and wouldn't be shocked if it is - as I haven't printed it, but etched it by hand with a Dremel (I have young kinds that get into everything, even when it's presumably away safe :S). I've also checked the connections and there doesn't seem to be any shorts anywhere.

Going with the assumption that it's my quick hack board that's the problem I started debugging with the following:

  • Loaded the blink sketch and got the LCD backlight blinking properly on the board (board powered by battery)
  • Loaded the HelloKeypad sketch and got it working with the chip in the Uno linked to the board (board powered by Uno)
  • Loaded my sketch and got it almost working - one of the switches always returns HIGH regardless of switch position
  • If I take the chip out of the Uno and place it into my board I get completely different behaviour
  • States aren't updating as they should
  • Input doesn't seem to work at all
  • Seems as if the program locks up internally

Now I've been trying to link the chip up externally to the Uno so I can do some serial debugging on the board, but to no avail. Is this possible?

The board is powered by 12v so I can use a loud buzzer - would I be right in thinking that I just need to link the Uno with my 5v output and GND? Will that conflict with the USB power? Or will it know not to bother so I can do some good ol' fashion console debugging?

Thanks for the help

PS - Please note the board pics are a bit out of date, as the resistors for the keypad are now hooked up to the 5V line as shown in the schematic. Will upload a better picture later as I don't currently have one

Can't see any decoupling capacitors... They are never optional.

Thanks for the quick reply

I have a 10uF on either side of the voltage reg on the final board - just didn't have any pictures of it at the moment as I'm at work. Been wondering if I need more as I saw a breadboard tutorial with one between VCC and GND.

EDIT: On the Uno as Serial front, seems I needed to have the pins hooked up backwards as well (link)

You need some 0.1mfd caps close to the Arduino chip and from every + to gnd. Not Optional.

Yes, you need a 0.1uF ceramic capacitor between Vcc and Gnd. I suggest you put it on the back of the board, directly acrossthe Vcc and Gnd pins of the atmega328.