Help on faulty project.

Ive programmed and bread boarded a scoreboard i made for a game of ping pong and everything worked correctly and perfectly.

but now ive transferred it over to a perfboard and soldered everything correctly.
This was my first time making a perfboard project so maybe there's somethings i did wrong.
Ive triple checked multiple times for shorts using a muiltmeter tone setting for all the adjacent pins. and everything came out fine.
i even used a small flat head screwdriver to kind of clean and forcing a separation of the solder in case theres tiny pieces .

At start up i have it to display Ping -- Pong and play a tone. when the chip is on the arduino it plays fine, but when in the circuit, sometimes it plays, and most of the times it doesn't. some times the digits change, most of the time nothing happens even when i push my buttons. oh and another way i was able to check the digits is that when i was using that tone, if i had the black lead on the ground of the chip, and the red on any other pin, the segment would barely light up, so i used that to check each pin is correctly in its location and without shorts.

is it a problem if the capacitors are too close to each other or too close to the digits and or the clock oscillator?
could flux be a problem? because i remember reading somewhere that flux can act like a capacitor, and when i soldered the components i literately spread that flux over the whole board.

another weird issue i suspect some kind of shorting is because when the IC chips are not connected, some segments are still lit up when powered. and when chips inserted, theres more lit but are garbled.
using 74ls164 shift register to display digits. the other chips in the photos are 330's resistors.

This is how it should look. i also have a video if anyone is currious how it looks in use.

this is what it is doing

even without IC's

my soldering

I won't think regular rosin-core flux would be a problem. I've used it
on 100s of boards. Aqueous flux might be, but then you always need to
wash it off with warm distilled water after soldering. Also, capacitor
placement shouldn't be a problem.

However, the sort of construction you're using is always fraught with
possible solder-bridge problems. From the looks of your pictures, I might
take the soldering iron to every single joint and draw off all excess solder,
as a starting point, and checker very carefully for shorts using a magnifying
glass or ohmmeter.

Do you have decoupling capacitors? I can't see them, but then the photo is pretty blurry.

rafi21:
capacitors are too close to each other or too close to the digits and or the clock oscillator?

The only capacitors I see are for the oscillator. I don't see a bulk capacitor (10-47uF) for the board or any 0.1 and 0.01uF for the digital chips. Without decoupling capacitors, you won't get reliable operation.

Not too close to the ?Arduino? schematic... looks like the several .1 uF capacitors that my Uno, Clone Uno and Clone Mega have in plenty...
I count 4 of them on my R3 schematic, one across the LM358, one from the 5V source at the regulator one on the left side of of the '328 and the last one on the left side of the 16U processor,did I miss as many as he did?

Doc

Are you sure you made the same connections? Its very easy to forget which wire goes where when your flipping it back and forth, mirrored and not
I triple check everytime I add a connection and before you apply power you should go over every connection and compare to your shematic(hopefully on paper and not in your head,
I've done the same thing when I thing its quick and simple and don't write everything down before doing it, you end up with mistakes usually, so its always worth the extra time
definetly something somwhere is off, as if it was exactly the same as on the breadboard it would work,

Decoupling capacitors are never optional. 0.1uF ceramic next to the 328 and 1.0uF ceramic next to each LED driver chip should be sufficient - LED drivers are handling a lot of current compared to other logic chips and need more decoupling. The decoupling caps need to be right next to the chip(s) they serve on as short wires as possible. This is especially important without a ground plane.

Without the decoupling when you switch on several LEDs together the power supply may drop by several volts for a couple of nanoseconds, resetting some of the logic state in complex and random ways - result is unpredictable erroneous behaviour.

i didnt know that was nessesary since when i put everything on the breadboard with only 2 capacitors for the clock everything worked fine.
Where would i put these decoupling capacitors?
edit:nvm i saw the last post

Docedison:
Not too close to the ?Arduino? schematic... looks like the several .1 uF capacitors that my Uno, Clone Uno and Clone Mega have in plenty...
I count 4 of them on my R3 schematic, one across the LM358, one from the 5V source at the regulator one on the left side of of the '328 and the last one on the left side of the 16U processor,did I miss as many as he did?

Doc

i dont have a source regulator cause im powering it directly from a pc at the moment with exactly 5volts.
and when i do have the battery pack attached its voltage comes up to about 5-5.4v so i didnt see a need for it

winner10920:
Are you sure you made the same connections?

yes, its a very simple circuit really. clock and data pins to 74164, then those pins to resistors to the 7segment display.

MarkT:
Decoupling capacitors are never optional. 0.1uF ceramic next to the 328 and 1.0uF ceramic next to each LED driver chip should be sufficient - LED drivers are handling a lot of current compared to other logic chips and need more decoupling. The decoupling caps need to be right next to the chip(s) they serve on as short wires as possible. This is especially important without a ground plane.

Thank you verymuch for your detailed explanations but just a few questions.
so i should attach it to the ground pin of the IC's? or the VCC?
and in series or in paralell? to ground. and i do not need some on the arduino itself right.

Thank you all for your help

i didnt know that was nessesary since when i put everything on the breadboard with only 2 capacitors for the clock everything worked fine.

Breadboard is like one big capacitor. You don't even need capacitors with the crystal when working on breadboard - the board itself provides enough.

People often forget that a capacitor is just two metal plates separated by a non-conducting material. And that is exactly what every single strip in a breadboard is - plates of metal separated by non-conducting material.

My breadboard measures around 14pF for a single 6-hole run. The power rails measure 22pf.

The most prominent problem is that you have segments on without any IC placed and, to me, that indicates shorts and/or miswirings.
That solid-core wire doesn't take to heat - the insulation on it creeps back big-time. (It's untinned copper, too.)

Majenko, Regardless of Stray capacitance (the classic definition of your measurements) they WILL NOT SUBSTITUTE FOR PROPER BYPASSING.
What I Fail to understand is that the PCB (Design) being copied works... Why not Copy it EXACTLY... at least all of the components used on the WORKING device being copied...
Unless you feel that you know more than the designer...? and yes the crystal will oscillate if you lift the pins (removing the strays) in the air and solder the crystal directly to the pins... The capacitors are loads for the crystal, necessary to cause it to oscillate at the right frequency... Hint: [it's the numbers marked on the top of the case]...
The Other issue here regarding 'strays' is that they are rather democratic in nature as they (the strays) couple to everything and because of that they are not decoupling but more closely defined as 'Re-Coupling'... to everything. The board NEEDS BOTH 47uF caps and ALL 4 100nF caps as well in the places I described, Adjacent to the power to EACH chip including the regulator.
Those capacitors are not placed where they are for any other reason except that location is where they are most effective in 'De-coupling' noise from the Vcc line. The capacitor on the input is required for the long and very technical reason I stated. I apologize for long and technical posts but those are generally things I have found to be NECESSARY... The hard way, by leaving them out and having less than stellar success with the design I was working on. The only reason I CONTINUALLY HARP on them is that I learned the hard way that they (The By-Pass capacitors) are really necessary.

Doc

they WILL NOT SUBSTITUTE FOR PROPER BYPASSING.

Oh hell no. What I am saying is that people do forget the bypassing on breadboard, and it works. Then they transfer to some other medium and spend days scratching their heads. The capacitance of the breadboard compensates for their incompetence :wink:

I buy 100nF caps literally by the thousand (reels of 4,000 at a time), and have a box full of through-hole ones for prototyping.

My rule of thumb: 1x100nF on every Vdd/Vss combination, on every chip, plus 1µF to every three chips. >100µF + 100nF + 10nF at board entry, plus others where I feel they are needed (high current chips, etc).

You should see my 8x12 ADC prototype shield... 470µF+100nF+10nF at board entry, 2x100nF + 2x100µF on the ADC chip itself, 10nF+2x1µF tantalum on the Vref regulator (data sheet recommended values), plus 2x470µF on the +5V and ground connections on the headers for external sensors. There's only clamping diodes that outnumber the caps :wink:

I have found that the differences aren't due to strays, more to topology, that is the layout and the wiring involved changes drastically (leaving out mistakes) when transitioning from Breadboard to PCB. For as short (as I can) explanation... wires at digital switching rates are actually inductors... Very small ones but inductors nevertheless and inductors have reactance which is AC resistance related to frequency, where this becomes an issue is where the most current flows (The ic) and remember that both ground and power wires conduct the power equally... When a wire carries current there is a voltage drop... noise is a voltage too, one that increases on the leading edge of every change in state from low to high, much less from high to low. By-passing at the device (ic) literally shorts the noise created in the device by the capacitors smoothing function thus preventing it from flowing on the Vcc or ground wires (or pcb traces). Because of the combined wires it is a good idea to place a few extra capacitors on the supply lines (Led's switch at digital rates (off and on) and create noise of their own which must be dealt with in the same manner as the ic's... and then there is the proper care and feeding of voltage regulators too. Inside of every linear regulator is a high gain amplifier. It is (the amplifier) internally compensated but there can only be so much compensation internally (no room, the compensatory parts are too big) so the devices NEED compensation (By-Passing) externally and because of the wire effect the by-passing must be close to the input and output leads. To further complicate an already very complicated issue we have batteries whose internal resistance increases as the battery becomes used up... so with a higher internal resistance more noise can (and Will) develop across the battery, this noise is conducted through the regulator causing it to not work properly... so the whole dern thing goes south... fast and the first thought is I have an error in my code... and thus many hours are spent in fixing the by-pass condition in code... Possibly do-able... but not the usual result or a suggested remedy for a bad design. or so my teachers taught me in school or at work. There is nothing quite like calling the senior engineer over for help on a malfunctioning circuit and having the engineer plug in a 10uF cap on the Vcc rail and seeing the 'Problem' go away... Very enlightening and one not likely to recommend a raise in pay or position either...

Doc

There is nothing quite like calling the senior engineer over for help on a malfunctioning circuit and having the engineer plug in a 10uF cap on the Vcc rail and seeing the 'Problem' go away.

Sounds familiar... I have been that senior engineer before now for people. How do you tactfully tell them that they forgot their caps...? I wonder... can you get huge foam electrolytic capacitors to thwap people round the head with?

I think sir, that that question is one of life's great unfathomable questions... would make the lab a much more enjoyable place to play though. My immediate superior was a graduate of every college available (or so he claimed) and I could never figure out why my official title was Principle Design Engineer... unless he thought that prestige was more valuable than money... Never did any good to use the title though except with the sales engineers and I really think he gave me that title (on my Door) to keep the salesmen (engineers) from knocking on his door first. Gawd, I am GLAD I'm Retired... especially when I participate in these forums, I'd hate to do this for a living... Again.

Doc

rafi21:
so i should attach it to the ground pin of the IC's? or the VCC?
and in series or in paralell? to ground. and i do not need some on the arduino itself right.

Between VCC and GND, on both sides of the chip. (ie. VCC and GND, and AVCC and GND).

Required because even though Vcc and AVcc are connected to the 5V source, they are different pins. and ANY Vcc supply pin of any kind Must have it's own bypass capacitor, Not for the board, for the chip internal connections.

Doc

thank you so much for your thorough explanation.
i don't remember whether we have ceramic 1uF's or electrolytic caps at school, but i could use either one, as long i follow the pos to neg on the electrolytic ones.

sry for my poor understanding but one more question i didn't quiet catch:
when you say bypass, you mean by putting the cap in parralel to ground?
kinda like this?

thank you again for help

0.1 uF, not 1 uF.

I said before "Between VCC and GND". How else can you interpret that? One leg goes to Vcc, the other leg goes to Gnd.

Some people need to see something to understand fully, nothing wrong with that
and don't forget there is actually significance in using a ceramic. 1uf cap, it works better for the high frequency noise that a electrolytic would miss