Maker Pro
Maker Pro

LDR Motor Circuit

Sid723

Jan 28, 2010
57
Joined
Jan 28, 2010
Messages
57
It sounds like the output of the op amp is changing as it should.

You should really have a diode across the collector - emitter of the transistor. Usually a 1N4004 will do. Just have the cathode connected to the collector and anode connected to the emitter. This will protect the transistor from inductive voltage spikes from the motor. It doesn't matter what size the motor.

So, my guess is the voltage spike from the motor killed (shorted) the transistor. So, the motor will run all the time and the current is probably too much for the transistor, thus making it hot.

The output from the op amp should also go through a resistor (start with 5kohm) and to the base of the transistor. Otherwise, too much current will flow through the base.

Replace the transistor and add a diode and base resistor as indicated above.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Actually, the reverse biased diode should be across the motor.
 

Sid723

Jan 28, 2010
57
Joined
Jan 28, 2010
Messages
57
Actually, the reverse biased diode should be across the motor.

Both ways work. I agree with the others that the transistor is probably running in a linear region of it's operating curve. This must be causing it to overheat.

Should maybe design in a 555 to operate the motor with Pulse Width Modification (PWM). If designed right, it will keep the transistor from overheating and provide better speed control.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Both ways work.

The risk in placing the diode across the transistor is that you divert the spike onto the supply rails. If your power supply is incapable of absorbing it then you will get a spike on your supply with possible nasty effects.

The diode across the motor causes the current to flow through the motor where it will do no damage.

Granted, with an H bridge you may have no alternative, but in this case you do.
 

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
UPDATE: I replaced the old motor with one used for model cars.

I measured the current as per instruction from Dave, and I got a value of 8 @ 200m DCA setting on my multimeter.

The new motor runs slower now and the transistor no longer heats up. I think the old motor I was using was defective in a way. I'm powering the circuit up with a 9volt battery.

But the problem now is that the motor only slows down when I cover up the LDR in the dark and doesn't completely stop. Now I'm wondering if the the 5K POT that I'm using is too low.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Disconnect the LDR completely and tell me if the motor stops.
 

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
Disconnect the LDR completely and tell me if the motor stops.

Actually, when I power up the circuit with the LDR the motor runs and then when I take out the LDR during operation, it continues to run.

Now if I disconnect the LDR before operation, the motor doesn't run.

Also, if the LDR isn't in place, the transistor gets really hot.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, measure the voltage across the transistor (between ground and the collector) and at the output of the op-amp (between the op-amp output and ground) when:

1) the LDR is disconnected before operation and the motor is not running
2) when the motor is running
3) when you disconnect the LDR while the motor is running (and the motor runs more slowly)
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
I'm looking at the circuit diagram in your first post. Have you updated the circuit to have a resistor between the output and the base of the transistor? If so, what is the value you're using?
 

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
Hey Steve,

I measured the voltage between the op amp output(pin 6) and ground during operation with the LDR and motor running at the same time.

I get 5.6V while LDR and motor are running.
I get 1.5V while LDR is covered and motor is running.

1)1.5V when LDR is disconnected before operation and motor is not running.
3)1.5V when I pull out LDR during operation and motor continues to run but slower.
 
Last edited:

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
There seems to still be some voltage leakage even when the LDR is covered up.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
OK, the voltage across the transistor would be good too, but already this is indicating to me that the op-amp can't swing its output close enough to ground to turn the transistor off.

If the transistor is off, you would expect to see the full supply voltage across it. I suspect that you will see a number of volts less. I also suspect that in this condition, if the motor isn't already turning, a bit of a nudge will start it.

I've had a quick scan through the rest of this thread but I can't see where you've told us what the op-amp is. My suspicion is that it's damaged, however if you can tell me what it is I'll look up the datasheet anyway.
 

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
Sorry its an LM741 op-amp. I don't think it's damaged, I have three of them that I can test with.
 

jackorocko

Apr 4, 2010
1,284
Joined
Apr 4, 2010
Messages
1,284
I think the 15k resistor is to high. It forms a voltage divider with the 1k resistor. The lower the R2 value in a voltage divider the lower the divided voltage. You need less then .7V on the base of the transistor.

Measure the output voltage on the output of the 741. Select a base resistor to provide base current drive, then select R2 so that the divided voltage (with R1) is less then 0.7V to the base of the transistor.
 

Attachments

  • 741_op-amp_ldr.jpg
    741_op-amp_ldr.jpg
    72.4 KB · Views: 1,511
Last edited:

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
I think the 15k resistor is to high. It forms a voltage divider with the 1k resistor. The lower the R2 value in a voltage divider the lower the divided voltage. You need less then .7V on the base of the transistor.

Measure the output voltage on the output of the 741. Select a base resistor to provide base current drive, then select R2 so that the divided voltage (with R1) is less then 0.7V to the base of the transistor.

You were right, the base resistance was too high. I switched out the 15K for a 1K and that did the trick. Motor now stops when I cover the LDR now.
 

pizoman

Mar 10, 2012
51
Joined
Mar 10, 2012
Messages
51
By the way, what software are you using for the simulation?

Thanks everyone for all the help.
 
Top