Hi guys,
I've put together a circuit which uses a pot to control a stepper motor, the position of the pot corresponds to the position of the motor within a 54deg range, ie. 0ohm = 0deg position, 10kohm = 54deg position (as you can guess I'm using a 10kohm pot). The main problem I'm having is noise which isn't a surprise as there's loads of switch happening in the circuit. So to battle it I used sample averaging, currently adding 8 samples and dividing the total by 8 to get the final ADC value. This made things a bit better, but still not perfect, the motor moves from one end to the other, but sometimes jumps around a spot if you fiddle with the pod and make small adjustments.
I'm using 6bit resolution, ditching the last 4 bits (4 times RRF). The circuit is very simple using only a pot and 5V ref straight from the 7805 that supplies the uC (16f877a)
Can you suggest anything I can use to reduce the noise even more? I was thinking of using 16 sample averaging, a 1uF cap on between the ground and the wiper and using a separate 7805 to get 5V ref (although it will still use the same transformer that the uC 7805 is using, so I'm not sure if it's going to change anything).
Additional question I have is regarding stepper motors and 1/4 step mode. To make the circuit quiet and generate less heat I'm turning off the ports that control 2 LMD18245 chips 5ms after a step is done. Is this a good thing or do I have to keep them powered all the time to actually hold the position? Am I correct to think that the power is needed to hold the motor in between it's
natural full steps?
Regards,
dsc.
I've put together a circuit which uses a pot to control a stepper motor, the position of the pot corresponds to the position of the motor within a 54deg range, ie. 0ohm = 0deg position, 10kohm = 54deg position (as you can guess I'm using a 10kohm pot). The main problem I'm having is noise which isn't a surprise as there's loads of switch happening in the circuit. So to battle it I used sample averaging, currently adding 8 samples and dividing the total by 8 to get the final ADC value. This made things a bit better, but still not perfect, the motor moves from one end to the other, but sometimes jumps around a spot if you fiddle with the pod and make small adjustments.
I'm using 6bit resolution, ditching the last 4 bits (4 times RRF). The circuit is very simple using only a pot and 5V ref straight from the 7805 that supplies the uC (16f877a)
Can you suggest anything I can use to reduce the noise even more? I was thinking of using 16 sample averaging, a 1uF cap on between the ground and the wiper and using a separate 7805 to get 5V ref (although it will still use the same transformer that the uC 7805 is using, so I'm not sure if it's going to change anything).
Additional question I have is regarding stepper motors and 1/4 step mode. To make the circuit quiet and generate less heat I'm turning off the ports that control 2 LMD18245 chips 5ms after a step is done. Is this a good thing or do I have to keep them powered all the time to actually hold the position? Am I correct to think that the power is needed to hold the motor in between it's
natural full steps?
Regards,
dsc.