I'm looking for idea's.....
I have a H bridge.... I move the H Bridge with PWM and monitor the position with a basic potentiometer...
The customer fitted a slightly different load ( in this case spotlight ).. The load is driven by an inverter circuit which rocks the Vsup of my micro!!! I have all the safety features built in for crash reset... Making sure everything works as it should, but last week the motor went mad and crashed two plates with semi dire consequences...
Out of this came the problem of "What happens when the feedback is lost" ( someone didn't engage the pot properly) and my "Safety net" failed..
Question:- How to tell if the feeback is stuck and halt all operations.... I have struggled a bit as the CCPCON is totally variable and if I detect the movement of the pot ( or lack of ) within a time period... I get too many false trips when I monitor for 1 second and crashes if I leave it for 2~3 seconds... At the moment I assume the pot would have moved several bitcounts and act if it hasn't, but one of the pots has to move quite a bit before its detected...
There must be a better way... Perhaps a simple PID algorithm???
I have a H bridge.... I move the H Bridge with PWM and monitor the position with a basic potentiometer...
The customer fitted a slightly different load ( in this case spotlight ).. The load is driven by an inverter circuit which rocks the Vsup of my micro!!! I have all the safety features built in for crash reset... Making sure everything works as it should, but last week the motor went mad and crashed two plates with semi dire consequences...
Out of this came the problem of "What happens when the feedback is lost" ( someone didn't engage the pot properly) and my "Safety net" failed..
Question:- How to tell if the feeback is stuck and halt all operations.... I have struggled a bit as the CCPCON is totally variable and if I detect the movement of the pot ( or lack of ) within a time period... I get too many false trips when I monitor for 1 second and crashes if I leave it for 2~3 seconds... At the moment I assume the pot would have moved several bitcounts and act if it hasn't, but one of the pots has to move quite a bit before its detected...
There must be a better way... Perhaps a simple PID algorithm???