Electrical – Photoresistor Transistor Circuit

ledphotoresistortransistors

I am teaching myself electronics. I designed this circuit to use a photoresistor to trigger a transistor when I hit the photoresistor with a laser pointer. On the Arduino side, I want it to look like a push button. That worked so I wanted to add an led as visual feed back that the laser is hitting the target.

The only way I could figure how to do this was to add a 2nd transistor. It works, but is this the correct way? I don't want to use another pin on the Arduino.

In the pic, pin 11 is supplying the 5V and pin 8 is reading the port.

enter image description here

Best Answer

In this circuit, the centre voltage divider is creating a voltage between 5 to almost 0, where the amount of light shown on the photoresistor determines this. This voltage changes the amount of current going through the transistors, which switches them on or off. The LED will turn on when light is shown but it will also set the arduino pin to low, which is inverted to whether light is shown or not. So you may need to change your program a bit. You can omit that 10k resistor if you set your pinmode to INPUT_PULLUP. This circuits only uses one IO pin which is that unconnected node on the right. enter image description here Although I rather prefer MOSFETs, you don't need to use them.