Hi, I've been trying to make an encoder, but I've run into some problems with the DC motor.
I built an intermediate circuit which counts the amount of times an IR sensor detects light bounced back (I use the CNY70 which is just an IR diode and a phototransitor) and displays it in binary on six LED's. This works just fine, the problem comes when I connect a DC motor to the same power source, the LED's go wild and starting flashing very fast.
This does not happen if I connect the motor to a sepparate power source or if I stop the motor with my hands even though the motor remains plugged in to the power. My guess is that it has something to do with back EMF but I'm unsure (I've already tried a few things that didn't work).
Any help would be appreciated. I've attached a diagram of the circuit I've been using.
I built an intermediate circuit which counts the amount of times an IR sensor detects light bounced back (I use the CNY70 which is just an IR diode and a phototransitor) and displays it in binary on six LED's. This works just fine, the problem comes when I connect a DC motor to the same power source, the LED's go wild and starting flashing very fast.
This does not happen if I connect the motor to a sepparate power source or if I stop the motor with my hands even though the motor remains plugged in to the power. My guess is that it has something to do with back EMF but I'm unsure (I've already tried a few things that didn't work).
Any help would be appreciated. I've attached a diagram of the circuit I've been using.
Attachments
Last edited: