Tue Mar 08, 2016 3:15 pm
So you seem to be trying to make one Pi use a LED to send to the other Pi, which picks up the signal by using a photodiode. I think you need to wire up the photodiode with the usual transconductance amplifier and put the output of that into a comparator to discriminate between background and LED signal. Often you can get good circuit ideas from application notes published by the company that makes the photodiode. If you don't have to overcome too much background light and the distance isn't too great you can use the PWM output of the transmitting Pi, with a current-amplifying transistor, to drive the LED, and not require any more power on that end. On the receiver side there's not much power required at all but you need to put some careful thought into designing the detection circuit. When you get it that far along, you are dealing with a high-rate logic signal that the Pi needs to handle somehow. Can you make it behave like a normal UART connection and use that feature of the peripheral block?
I seem to remember forum posts on doing IR communication with Pi. Try searching the forum for that sort of thing. In fact, there's a post today by evilkitty in this forum section that looks extremely relevant, with lots of links to follow.