Around three weeks ago I wanted to make a simple light turned on by a motion detector and in researching how to do this I came across the Arduino and I now I'm fascinated (if not obsessed) with electrical circuits and how they work.
After reading many threads this will probably sound extremely easy to most members but I have only a few weeks exposure to electronics so any help is truly appreciated. I do have an amateur knowledge of some code languages (HTML, ASP, SQL, etc) so that side is easier for me.
What I am trying to accomplish?
Run 6 very small 12v 65mA lights that kick on for around 20-30sec by a motion detector (PIR). On the same circuit I need to run two small 12v .47A fans (recycled from an old computer) and the fans are kicked on by the TMP36 temperature sensor.
My design is?
I have a 12v 1,500mA AC adapter providing power to a breadboard wired like an Arduino with an Atmega328P chip and I accomplished this from following this awesome tutorial (I will post the link in the next message I send)
I wrote a simple code to the Atmega328P chip to run the PIR and the TMP36 sensors. I can post the code if needed.
I am using a LM7805 to drop the voltage to the 5vdc needed for many of the components on one rail and the other rail is 12vdc directly from the AC converter.
The lights and the fans are switched on via 2 individual 12v 1A relays powered from the 12vdc rail with a NPN transistor, a resistor, and a diode on each.
I finally have a working project, which I am thrilled and amazed about, but I have hit a wall with my understanding of exactly "why" it works and would like to have a better understanding of the “why”. I also want to make sure I don't have any safety concerns so I won't burn my house down.
The thing I am having the most trouble understanding is if the correct current at the correct voltage is going through the circuit and to the components. I think I need 940mA at 12v to run the fans and 390mA at 12v to run the lights. It works and seems to be running at the right brightness and fans at correct speeds but is it right? The motion detector is a little sluggish but I think it's an issue with my code and a question for another thread.
The different calculations for a series vs. parallel circuits are throwing me off because I think my circuit is a mix of both. The diodes, resistors and capacitors are also a little confusing when trying to determine which one, at what ohm, and where they need to be.
It would help me feel a lot better if someone could take a look at my design to see if I have anything out of place or if I have something that could be potentially dangerous.
If anyone sees something that could be changed to work more efficiently that would be great too.
This is my first post so I was not able to post my images or any links but I will place another post as soon as I can with images of both.
Thanks so much to anyone who can help.