I had a production pump control and I fed out rs232 serial information through the pilot light LED. The test fixture for the product had a photo transistor in a cup that was placed over the LED to get pressure data out.
Yes, it is a good idea to make the circuit communication through LED!
Overall the detector is working fine. I'am off from work now again, and slowly recovering and regaining my ability to think accuretely and invent something
At the moment I'am working on some other projects, but the little thing about the detector is ticking in the back of my head, the thing that the detector should tell the difference between gold and iron.
But really when designing some tricky thing with those 8 pin PIC-s it is wise to make the thing (and tune it) with some larger pin count PIC and finally port it back to the little one. I'did not do that, but now I'am forced anyway if I want it to begin to tell the difference between iron and gold.