I am looking for a way to control analog signal from another system that changes between 0-1V. The user could define the over voltage value - for example 0.793V (the analog signal has resolution of 3mv) , if the input of analog signal above the user requirements,I need to open the other conrol circuit(my Boss told me to use Relay is safer). I have two options in my head : the first - sample the analog signal with A2D,and in the uC program compare it to the required user value, but I'm afraid about the safety aspect(if the software will crash?) . second - create an analog signal from D2A, and compare it to the input signal but again im depent on the software. which option is safer? maybe another solution?
EDIT : One of the capabilities of this system is to perform a scan of the eye and display a three-dimensional retinal image, the problem is that the scan is done using an external laser device, the external laser device outputs its scanning power in volts from some possible analog wire to sample it, the range is defined by us and by the standard set by us and according to the professional standard . The maximum output in any case is between 0-1 volt, if we sample a voltage that is above the desired value (the value is not yet in our hands and it is a lot of trial and error) then the card will close the device and the laser in less than 25 milliseconds so that the patient's eye will not be damaged. . My manager's recommendation is to use a RELAY to close the voltage and it is also safer, something that is mechanical and ensures full galvanic isolation. There should also be real-time samples of the voltages so that the engineer in the field can set the value to a certain threshold (it varies in each system) and then close the card and the box and that's it.