Project w/PIC16F684: Stepper Motor speed controlled and sensor

Status
Not open for further replies.

pacobenito

New Member
Project: Turn on/off a stepper motor with a light sensor and control the stepper motor speed with a potentiometer.
Work Done: I am using a PIC16F684, RC register is being used as outputs to control the stepper motor and RA register (RA4) is used as input for pot motor control. (RA4) is a analog input that is going to be used with the internal ADC to control the speed on the stepper motor.
Question: I want to add a sensor or switch that enable/disable(on/off) the stepper motor sppining.
I was thinking to use (RA3) to add the sensor/switch. Is this possible, since the RA is going to be used in the ADC process?
Please let me know how can I make this little project work.

Thanks

Francisco
 
I see no reason why you could not use any thing on port A for other purposes. Just add a switch with a pull-up to pull-down to the pin. Blueroom is right if you want to stop the motor then stop sending step commands..

It sounds like you are wanting something like a limit switch to prevent the stepper from going to far. In that case the above suggestion of using a switch and a resistor will work. You just have to be aware of weather or not you are using an ADC or a digital input.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…