i m using PIC 16f877 to control the dc motor. The problem tat i face is how to construct a feedback circuit by using optocoupler to gif back to the PIC 16f877. Can someone help me?
Put a disk on the motor shaft that has a slot or slots in it, read the pulses off that device as the disk spins through it. The older mouse with balls have a very similar setup.
thanks....actually i bought the optocoupler oredi. can u tell me how to construct the feedback circuit to send back the frequency to the PIC 16f877 to do comparison?
Plz have a look at the picture tat i upload. The optocoupler tat i use is a U-shape optocoupler which has transmitter and receiver together. If u still cant understand please come to tis website (http://ikalogic.com/tut_closed_loop_spd_ctrl.php). Hopefully u can provide some circuit for me. tqtq
Okay, you have a photointerrupter. Who makes it, and what is it's designation? We need to know this to determine the receiver of the device - if it is a phototransistor, or if it is some other device. Not all of these things are alike, so we need to have the part number.
Put pins 2 and 4 of the optointerrupter go circuit ground. Calculate a resistor to pass between 20 and 50 milliamps current to pin 1. It will depend on your power source voltage.
The phototransistor will need a large value pullup resistor. Something like 47K for 5 volts, and 100K for 12. Apply the signal to your Schmidt trigger input, as n the block diagram.
You don't have to. You decide on a logic family to use and get logic ic's that perform that function. I think you only need the Schmidt trigger function, as the pulses go back to your microcontroller. It has all the internal counters you might need.
thanks again. for the schmitt trigger i found tis component tis morning. so let say after the schmitt trigger i dun wan to connect directly to the PIC. wat i plan to use is binary counter. wat can i do for the hardware for tis counter?
Assuming you are going to use something like HCT TTL logic, you can apply the signal to a 74HCT161 counter, or chain several for counts greater than 16. Be lots easier to feed into the PIC, though.
I see. after pass thru the schmitt trigger n binary counter. is there any loss? or the another way to say is does the accuracy will not be so accurate? because for the feedback circuit the most important thing is the accuracy.tq