I have a project where I have made an arduino on a breadboad and i am using it to control a motion sensor and some small 12V lights. I use a wall wart that outputs 12VDC 1500mA. On the breadboard i use a LM7812 to regulate 12V to one rail on the breadboard and then I use a LM7805 to regulate 5V to the breadboard's other rail. I need 5V for the motion sensor and 12V for the lights that i switch on with a micro SPDT 12V relay. I have attached a pic of the breadboard to help me ask my questions. I have it all working but there are some things I am thinking i want to do to save space so I need some advise.
Also, regarding the relay... I have been told that to use a relay with the arduino i need to follow this schematic... I am not really that good at reading schematics so I have some questions about this schematic as well...
Here are my specific questions...
- From what i know i have to hook up the ATmega's pin 8 and 22 to ground. I also have to hook up pins 9 and 10 to ground through a 22pf capacitor and pin 21 to ground through a 0.1uf capacitor. As you can see on the pic i currently wire the 8, 9, and 10 pins through the 5V rail's ground and this requires me to run wiring around the ATmega. Is it possible for me to hook pin 8, 9, and 10, to the ground of the 12V rail...? This would make this part much easier if so, but i'm not sure if i can mix the ground of two different Voltages and if it would harm the ATmega...???
2 Regarding the schematic… In the schematic where it says “Relay power V+” and “Relay Power Ground” is it talking about connecting it to the V+ of the 12V rail and to ground of the 12V rail…???
-
On the schematic where it has “Arduino Ground”, “Emitter” and “Relay Power Ground” all connecting into “Ground”. Can this be either the 12V rail’s ground or the 5V rail’s ground?
-
On the schematic it says use a TIP102 transistor for larger relays. Does this mean with any relay over 5V? I have a TIP 120 transistor would this work…?
-
Do I just need to make sure all grounds are connected even when there are different Voltages?
Thanks for any help…