I'm using a phototransistor (SFH - 3711) to detect day/night transitions with a simple circuit:
Rss = 1Meg, CL = 100nF.
The phototransistor current is 60uA for 1000lux.
This connects to an ATmega328P ADC pin.
The voltage goes from 0V: total darkness, to Vdd(3V): daylight.
The problem here is that this circuit must be placed 20 cm far from the MCU and with mains and switching power supplies near.
If the cable was only to connect to the phototransistor - Rss and CL would be next to the MCU - the situation would be more sensitive to noise.
I can admit 5% to 10% error in the measurement.
What cable (shielded, coaxial, ...) and what connection type should I use in such application?
Or I shouldn't worry about it?