Using IR Module as DC Motor switch

Thread Starter

andi.aditya

Joined Feb 23, 2021
5
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:
1614063155150.png
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 :D
 

ericgibbs

Joined Jan 29, 2010
11,858
hi aa,
Welcome to AAC.
Your drawing is 'confusing' in its layout, I have tried to modify the layout.
What is the output voltage of the PIR when it 'sees' an object and when it does not see an object.?
Is this a school project.?
E
1614063155150.png
 

Thread Starter

andi.aditya

Joined Feb 23, 2021
5
Hi, e,
Thank you for correcting my layout.
First I need to address that I'm not using PIR sensor, but rather an IR module that I bought in an electronic store that looks like this:
1614077513823.png
For the output, I guess it's High when it 'see' an object, since the LED indicator shine brighter when I put object in front of it. This is not a school project, I just tried to copy the tutorial about automatic water tap in internet, but I replace the solenoid valve with DC pump. It looks like this:
1614078208729.png
 

ericgibbs

Joined Jan 29, 2010
11,858
hi, aa,
When in doubt always check the the circuit with a testing device. ;)
To change the low to high, use a transistor connected as an inverter, do you know how to do that.?
E
 

Thread Starter

andi.aditya

Joined Feb 23, 2021
5
Hi, e,
Unfortunately, I don't know how to do that, this is my first time with electronics. I tried to look it up for a while, so basically I need another transistor (MOSFET, I believe?) in addition to my TIP122? Where should I place that transistor in my layout?
 

Thread Starter

andi.aditya

Joined Feb 23, 2021
5
hi aa,
Look at this option.
You could use a low power N MOSFET in place of the 2N2222 type, say a 2N7000.
EView attachment 231264
Thank you very much, E! I'll try this and give an update as soon as possible

Quick note, the TIP122 is NPN and so is the 2N2222.
Hi MrAI, I don't quite understand the NPN thing. What will happen since both TIP122 and 2N2222 are NPN transistors?
 

MrAl

Joined Jun 17, 2014
7,949
Thank you very much, E! I'll try this and give an update as soon as possible



Hi MrAI, I don't quite understand the NPN thing. What will happen since both TIP122 and 2N2222 are NPN transistors?
Hi,

It was just that the two transistors were dawn as PNP when they are really NPN, but Eric posted a new schematic after that with the correct symbols. Just wanted to try to avoid confusion for readers.
 
Quick question about this circuit. The TS stated the output is 5.4V and drops to .7V when it "sees" an object. Wouldn't the .7V continue to keep the 2N2222 in an on state?
 
Top