Hi, Im designing a battery powered transmitter that detects the position of a valve. The valve will remain in the same position for the majority of the time, therefore I wish to sleep the device in this state, and only wake should the valve begin moving, i.e. change in analogue input voltage. Im using a PIC18F, but find my self scratching my head a little with regards how I detect this change in voltage to the ADC to trigger an interrupt and hence wake the device.
My logic has brought me to the practical solution where if I could constinously sample at a set rate and store the AI voltage and continuously compare it to a live AI voltage value. I wondered if a sample and hold IC would be good enough to facilitate this then use the PIC18F comparator to trigger an interrupt when a differential is detected. I had considered using the DAC to provide a dynamic Vref to the comparator, but its only 5-bit on this PIC and isn’t good enough for my application.
Any thoughts on my proposal, and or any better ideas??
Thanks
My logic has brought me to the practical solution where if I could constinously sample at a set rate and store the AI voltage and continuously compare it to a live AI voltage value. I wondered if a sample and hold IC would be good enough to facilitate this then use the PIC18F comparator to trigger an interrupt when a differential is detected. I had considered using the DAC to provide a dynamic Vref to the comparator, but its only 5-bit on this PIC and isn’t good enough for my application.
Any thoughts on my proposal, and or any better ideas??
Thanks
Last edited: