- This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › ir based stepper motor control
hi,
I’m doing a project using 8051. It has to control the steps of stepper motor based on the output of IR sensors.
there will be 4 IR sensor pairs mounted vertically which is used to find the height of the person. based on the number of sensors blocked the conroller has to drive the stepper motor.
need your help regarding circuit diagram and codes..
thank you.
first find our which IR sensor u will use.
simple photo diode or TSOP
based on this prepare proper interface circuit to connect it with micro controller
for stepper motor there are again two options
bipolar stepper motor or unipolar stepper motor
for bipolar stepper motor use L293/L298
for unipolar stepper motor use ULN2003/ULN2008
after finilasing circuit follow the tutorials for stepper motor control IR sensor interfacing on this site
thanks for the reply..
I have completed the circuit as u said..
but I dont know how to write the program, I mean if X sexsors are blocked X steps have to be rotated. if possible suggest where to find or how to proceed the progtam.
thank u…
connect the output of all four sensors with any port in sequence like D0 – D3
check for change in input for this port
find out how many sensors are blocked like for 1 sensor blocked ip is 1000, for two sensors blocked ip is 1100…. (or it can be reversed)
based on this input set a count like for 1000 ip count is 100, for 1100 ip count is 200…
give pulses to motor till count reaches to 0.
thats all