Hi,
I'm having a problem with my project. I try to use the IR module as a switch to my DC motor. Basically what I try to do is turning on my motor when the IR module facing an obstacle and vice versa. Components that I use in this project are:
1k Ohm Resistor
TIP122 Transistor
1N4007 Diode
IR Module
12V DC Adaptor
DC Motor
My schematic looks like this:

My problem is that in my end result my DC motor is turning on when there are no obstacles and turning off when facing obstacles. What should I do so I can achieve the opposite (turning on when facing obstacles)?
Thank you for your help
I'm having a problem with my project. I try to use the IR module as a switch to my DC motor. Basically what I try to do is turning on my motor when the IR module facing an obstacle and vice versa. Components that I use in this project are:
1k Ohm Resistor
TIP122 Transistor
1N4007 Diode
IR Module
12V DC Adaptor
DC Motor
My schematic looks like this:

My problem is that in my end result my DC motor is turning on when there are no obstacles and turning off when facing obstacles. What should I do so I can achieve the opposite (turning on when facing obstacles)?
Thank you for your help