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.