I'm new to electronics and I have a problem. I want to use a LED to detect light but the voltage it provides is very small (30 mV) and I don't think it can open a transistor. How can I amplify this voltage? (I don't want to use op amp) And, I have only NPN transistors. Can you help me?
You can do what you want if you add some amplification to the output signal from the LED. A single op-amp can do this or you can use a pair of transistors configured as a differential amplifier (the "long-tailed pair" that Brian Drummond mentions above.
I'm going to show you an op-amp version because it is easy. I like using the LM358 or LM324 op-amps for these simple circuits - they are readily available and the input common-mode voltage range includes ground. That makes them easy to use with a single supply voltage.
Upon rereading your question, I see that you asked if you could do this using only NPN transistors. Probably yes but it's not either easy or obvious. The problem is that the signal provided by the LED is both low voltage and very high impedance - some of the references that I checked show the LED being loaded by a very high value resistor (30M or 100M).
Yes, you can do this with just NPN transistors. 60mV is small, but probably enough. Resistor values will depend on your voltage source, but try this:
In normal conditions, R1 and R2 set Base voltage about 0.57V - not quite enough to conduct. Adding 30mV gets you 0.6V. With no Emitter resistor, you should get a decent current through R3.
You can also look at "super alpha" designs for very high gain. One example is here
I've come up with something that might work. You will need to breadboard it and see.
Q1 & Q2 need to be identical transistors, preferably from the same batch. They should also be touching each other if possible so that they are at exactly the same temperature.
Cover D1 and adjust R1 so that the output LED (D2) goes out. Then shine light at D1 and see if D2 lights up.
No guarantees that this works but it should. I'm not anywhere near my lab bench, so I can't try it myself.
If you really want to use an LED (not good but cheap) you should probably use it as a current device and make a one op-amp current-to-voltage converter. Very simple and the output would be linear. Use a TL061 for its low cost and its low bias current which might be important depending on the amount of current the LED puts out. Do not use a TI brand TLO61 which has given me problems in years past.