ATmega328 digital IO pin constant signal issue

All,

I am new to the world of arduino/microcontrollers but I believe that i have learned a lot in the short time ive been working with them. Bare with me, as i can not seem to find the issue with my circuit. Any help would be greatly appreciated.

I am currently using the ATmega328 microcontroller to transfer a project i created on a breadboard with an arduino to a solderable breadboard for some permanency. The circuit uses an IR receiver to check if the correct buttons have been pressed in a certain order on a remote which will then control a 5V relay going to a mag lock.

Everything works great on the breadboard/arduino, and my circuit mimics that on the solderable breadboard. However, when i plug my power source into the PCB the relay immediately switches on. My code has the digital pin connected to the signal of the relay set to LOW in the setup, and should not be doing this theoretically. I rebuilt the breadboard version, and transferred the ATmega328 chip to the breadboard just to check the code (without the arduino), and that seems to work fine.

Checking the voltage across the ground and signal pin of the relay, as well as ground and the digital pin on the ATmega328 for the PCB version shows a constant 5V being sent to the relay. Im not sure why this is. I am assuming that this is an issue with my circuit wiring, soldering etc.. however I am at a loss for figuring it out. Please let me know if there are any common issues that i could check.

Thanks

*I attached the fritzing breadboard diagram if you want to reference it, yes i know it is ugly.



Then your solderable breadboard version does not match the version on the solderless breadboard.

I'd wager that either you have the relay connected to the wrong pin (one that's driven HIGH), or the pin it's connected to is shorted to the 5v rail - you can verify by (with the '328p removed), checking continuity between that pin and the 5v rail with your multimeter. Upon confirming that, locate the solder bridge and fix it (if the solder is acting badly and smearing out instead of beading up like it should, either add a touch of "no clean gel flux" (from amazon or ebay - it comes in a syringe and is cheap), or a bit of fresh solder (since solder has a rosin-flux core - you're adding fresh solder for the action of the rosin core flux)

Thank you for the reply.. Im not sure what exactly the issue was, but when I tried testing the chip with the breadboard i actually used a different relay (as the one in my circuit was soldered in). I decided to remove the original relay to test that with the breadboard, and it behaved the same way (constant 5v in). Thus i determined that the issue was with the relay itself.

Im not sure what could have been the issue with the relay that could cause this to happen. Any thoughts so that i could prevent it from happening in the future?

My best guess is when soldering pins to solder to the circuit i somehow burned the circuitry inside the relay?