Hi there! First time posting in the forums, hope I don't break any rules. I need help with an analog problem, I only know fairly basic electronics, and mostly having to do with microcontrollers. For this project I would like to do everything without a microcontroller.
I've been thinking about building a DIY
polarimeter after the one we had at my college broke. Without going into much detail, the problem at hand is the following: There is a linear polarizer mounted on a rotating platform. Polarized light goes through it and into a phototransistor. The intensity of the light that reaches the detector, and therefore the current/voltage drop on a resistor, is related to the angle of the platform through
Malus's law. The purpose of the setup is to measure the angle that makes the signal either a maximum or a minimum. In our particular use-case, this value will change over time. A manual polarimeter is operated by a person who rotates the polarizer (which has a goniometer attached) until he/she sees a maximum or minimum light intensity. The same could be done replacing the direct observation with the phototransistor, and manually rotating the polarizer until the voltage reaches a maximum.
However, I had this idea: what if the polarizer is continuously rotated at a known frequency and we include a sync signal each time a revolution starts. Given the Malu's law, the intensity of light reaching the phototransistor will change periodically (cos^2(t)). The angle at which the intensity of light reaches a maximum is related to the phase between the sync signal and the photodetector signal. Therefore, with this setup, we could continuously measure the polarization angle, which would be helpful to study systems with variation in time.
In this scenario, the measurement of the angle is reduced to the measurement of the phase between the signals, or the time between the sync pulse and the maximum of the photocurrent. This involves a series of problems, as a quick research into peak detectors and phase detectors made me realize. Using a simple phase detector (such as a XOR-gate) is a good start: it generates a signal whose duty cycle is proportional to the phase of two signals. The catch is, it requires two square-wave signals as inputs. In our case, the sync pulse is OK, but the phototransistor current is a sine-like signal. Adding a comparator/schmitt trigger would allow to convert the photocurrent into a square wave, which turns high only when the maximum of the signal is reached... if only we knew what voltage the maximum is at! (this could vary with time/between experiments, as it has to do with optical alignment, and the nature of the substance being put in the light path). So, here is where a peak detector comes into play. A peak detector can detect and hold a maximum voltage of a signal, thus, one could first sample the maximum voltage, and then feed that as the threshold for the comparator, which in turns feeds the phase detector which measures the time passed between the sync pulse and when the maximum signal is reached.
In conclusion, my question is, does any of that make any sense? And if it does, how would one go about to putting the pieces of the puzzle together? For instance, the peak detector used to detect the maximum voltage should reset every so often in case the maximum voltage got lower (maybe allowing the capacitor to discharge slowly? the signal is periodic anyway, so when a new maximum is reached, the cap would be charged again). However, the threshold for the schmitt trigger should be a little bit lower than the peak detected, I think, so that we are sure that the maximum will trigger the output of the comparator, and then be fed into the phase comparator. And finally, the phase comparator outputs a PWM-like signal, maybe a low-pass filter could be used to transform that into a voltage that then can be measured? Once we know the timing information, using the frequency (or angular velocity), one can transform that into an angle, which is what we are after. Could this operation be also made in an analog fashion? And if so, what would be a good way of measuring the angular velocity? (essentially the frequency of the sync pulse).
Sorry for the wall of text! And thanks for your time!