Im looking to implement a comparator with interrupt to sense a increased level on my sensor which is just a voltage analogue input and then trigger an interrupt to wake my pic. What I plan to do is use a standalone DAC to provide a dynamic voltage ref for my inverting input of my comparator. Just before my PIC is sent to sleep, I will write to the DAC and which will serve as a method of saving the last value sensor state before the sleep. Then from there on In should the sensor increase its position the comparator will detect the differential and trigger an interrupt. Eventually I will use two comparators to detect an increase AND a decrease in position. I need to detect an increase of 0.036V before I care to wake the PIC. This needs to be constant regardless of what the ref voltage is. My plan was to use a voltage divider circuit to bias my inverting input, but as the voltage is dynamic, im not sure this is a viable solution.
Anyone got any ideas to configure a static voltage value deviation (i.e. 0.036v) on my inverting input?
If Vsens > Vref+0.036V then output high, else output low. pleaser fer to attacged image too
thanks
Anyone got any ideas to configure a static voltage value deviation (i.e. 0.036v) on my inverting input?
If Vsens > Vref+0.036V then output high, else output low. pleaser fer to attacged image too
thanks
Attachments
-
306.1 KB Views: 42