Automatic Night Light Circuit

Below is a schematic of two circuits that uses a photocell sensor to detect light and NPN transistor (2n2222) to turn on and off the LED. Its an automatic night light.

night light circuit transistor schematic

DSC02226 copy

Both LED are on because the location the light is dimmed.

 

I search for so long on how to make the transistor work as a switch and after long search I found two links that showed correct and simple schematics.

http://www.youtube.com/watch?v=_dcjzJfQZHk

http://www.youtube.com/watch?v=GDbzCal0NCQ

Arduino on Breadboard troubleshoot, the importance of Capacitors

I have an Arduino on a breadboard and having an issue with the voltage on the digital pin 13 outputing an low voltage when connect to a volt regulator.  Why is this happening? because when the breadboard is connected to an Arduino UNO power that is connected to the same power supply it works perfectly fine.  See images and descriptions below.  Thank you for the help.

Notes:
Power wires are connected at the bottom of the breadboard
Components:

Arduino on breadboard
Power Jack
9v – 300mA Power
L7805CV 5voltage regulator

Arduino Code:
Set to output LIGHT ON on digital pin 13

DSC02219
The voltage on the rails when breadboard is connected to power is 5 volts

DSC02221
The voltage on digital pin 13 when connected to power is 0.370 volts (why?)

 

DSC02222
The voltage on the rails when connected to arduino power is 5 volts

 

DSC02223
The voltage on digital pin 13 when connected to arduino power is 4.74 volts

Why is the voltage on digital pin 13 not the same when connected to an Arduino Uno Power to an Power supply using a voltage regulator?

 

Answer:
Its very important to add a electrolytic capacitor to the input and output caps of the voltage regulator because this will help SMOOTH out the ripple the battery pack/regulator is putting out.

I only added a 22uF electrolytic capacitor to the rails and it worked.  See picture below.

DSC02224 copy

Reference

CadSoft Eagle Cad Notes

Copy and paste between two schematics:
In Eagle 6.3.0 I could not located the cut tool icon so I selected the component I wanted with the group tool and typed cut into the command line of the program and hit the green light icon on the top toolbar. Then open the new schematic and clicked the paste tool icon.

Why eagle cad not making connections, can’t hook up wires?
I assume you mean JP1?
use the LAYERS command to turn on pins to see the actual connection point for the nets (wires) … also you can use the JUNCTION tool to force connections where eagle thought you just overlapped

I designed a board with the silk screen on top rather than on the bottom, how do I change them all at the same time?
Click on the wrench icon (change) and select a layer->layer you want to change to. Use the select tool and select what you want to change, right click and select->”change group” from the drop down

Scripts for silk screen and gerber output CAM
http://www.rpc-electronics.com/eagle.htm

Using viewpoint to view gerber but receiving error “can not load drill file …”?
Make sure you only have you have the correct files selected. Do not select .dri as the “drill tool file”. Be sure to specify the drill file type as 2.4 leading.