This is a question about servos but if anybody should have any relevant comments that aren't related to servos, I would be interested.
Very briefly, I have an Uno board that uses sensors to track the movement of an object. These are very basic reed switches which are connected to GND and an analog pin set to digital pull-up mode (active low) - there are 5 of these.
There are also 2 servos (both SG-90) set to move at certain triggers about 90 degrees with a very small load. At no point should both of these move together - the operation is correct in this sense.
There is also an additional motor which is driven by an external power source. When this motor is driven is controlled from the Uno using a relay to set the power source as ON or OFF - just a simple switch.
The incorrect behaviour is that sometimes these sensors appear to just be triggering as and when they want to. Obviously I have checked the power on both sides of the switches and at the point I measure them the voltages are correct for all switches (V=0 on 1 side and V->5 on the other side). I have also checked for shorts but found none.
I recently found that the servos are both being driven from the 5V pin rather than an external power source. I thought I had changed this and will probably do so anyway because I am aware that running servos from an arduino can cause problems.
Being unaware of what any specific issues might be, I just want to ask if running Servos off the 5V pin could cause incorrect behaviour from the delay function or incorrect reading of digital inputs?
Thanks in advance
P.S. I haven't included code, sketches or schematics because I don't think it is relevant to the questions, however, I can add these if necessary.
Also, it isn't a constant problem. At times, like as I write this, the system works perfectly, however, the issues still exist.