How to use a magnifying glass or any lens to enhance small light power? I am currently trying  to amplify a tiny amount of light so that a photodiode will recognize it.
In order to amplify the light I thought about using a magnifying glass since I got to know that such convex glasses might help to spread light. I was positively surprised as I saw the result as the light really got amplified using a magnifying glass (see drawing). However  the issue is that the magnifying glass requires a distance of 9-10 cm between the light source and the glass in order to spread the light in the required strong way.
I was wondering whether there is any way to get the same light amount spread without having a gap between the lens / glass and the light source (or having a small gap)?

 A: A lens with more curvature will have a focus point closer to the lens. Unfortunately, they are more difficult to make. Since these lenses need good precision, they are made with glass and poor quality lenses are usually discarded.  
On the up side, LEDs and sensors are designed to work as a pair and may be used up to (about) one meter, so lenses are not needed.
A: What you want is a lens with a shorter focal length. As a rough number, you can work with a LED to lens distance of twice the focal length of the lens. Note that that is what you are doing with your magnifying glass. It's possible to get lenses with focal lengths less than 10 mm, so you can operate at less than 2 cm separation. Since I assume you don't want to spend much money on this, I recommend an optical surplus site. Surplusshed.com is a good place to start, and they have some very low-cost items.
And you seem to misunderstand how a lens works in this case. What you are trying to do is focus the LED on the photodiode. Depending on the size of the LED vs the diode, for best results you may have to get a photodiode with a bigger active area.
And finally, the simplest way to do what you seem to want to do is simply butt the LED against the front of the photodiode.
