Nov '11
**It looks like your **
It looks like your transistors/LDRs are wired wrong. The LDRs should have one end to V+, the other end to the transistor base.
You should also attach a diode across the motor leads (or any other inductive load) to keep from zapping the 3904.
Nov '11
The LDRs are connected
The LDRs are connected between base and collector now… that isn’t right. they have to be at the middle pin of the transistor and the + which I assume is the most top red wire between the 2 motors in the picture.
* I think the mistake is made by connecting the ldr to the wrong side of the motor.
1 reply
Nov '11
▶ dannyv
It was noted his V+ was
It was noted his V+ was actually coming out of the bottom wire as seen in the picture. I pointed out that was backwards, so hopefully that is amended as well.
1 reply
Nov '11
▶ jax
Ah… ok. I didnt see the
Ah… ok. I didnt see the shoutbox until now. Botfin should change this indeed.
@ Botfin:I do not want to complicate things, if so then ignore this following:
Maybe handy to know that a diode (also the one inside a transistor) in the schematic looks like an arrow, thats the direction the current will flow. in the opposite direction it blocks. And current always flows from positive into negative in a circuit. The protection diode over the motor must always be placed backwards (so it doesn’t passage when motor should be on and fry the transistor!) as seen in the schematic.
I still can remember that I was new into electronics and this kind of basic circuits, and it took a long time, and lots of fried components
and hours of thinking and frustration why it doesn’t work as it should. But eventually you succeed and you’re the proud owner of your robot that completely drives by itself. So just keep trying.
1 reply
Nov '11
▶ dannyv
Trying…
I try to fix this today, unless i don’t have diodes ;(
Nov '11
cheers!
i have nothing to do to fix this, can’t clearly see or understand the circuit of this robot. but hope that this woll be fixed!
Nov '11
none of this makes sense to
none of this makes sense to me.
mogul in your diagram what is the diode doing? cuz it looks like a short to me.
+ coming out of the motor going back to vcc?
also why is the motor before the transistor? that seems wrong to me. (edit: i looked it up and i guess its just me :S)
heres my attempt:

the motor comes between the emitter and ground, and if needed a diode can be placed between them in series t make sure nothing from the motor gets back into the transistor.
also i would put a resistor between LDR/Base and ground.
this way the LDR and resistor work as a voltage divider and as long as the values are equal the output in the middle should be half
of vcc. if the LDR becomes a lower value the volts in the middle go up.
my theory on what is wrong atm, going off of mogul's drawing:
i think the ldr and motor are working as a sort of quasi voltage divider there, and as soon as the motor gets some action
it drops its resistance and leeches the input power away from the LDR, and so the transistor goes low again, the motor is cut off and there you are stuck in a loop.
EDIT:
i mistook moguls drawing for representing the original non working circuit :S.
it turns out i was wrong and mogul's circuit could work, though there is a chance there might not be enuff current
going to the base (i'm not sure why but i ran into that in similar circuits), in which case my solution should work.
1 reply
Nov '11
▶ daveyjones
As fas as I know to switch a
As fas as I know to switch a dc motor it’s better to make an emmiter-follower, however I can’t remember exactly why… lets stick us to the original circuit.
about the diode: it will only cause short circuit if placed in the wrong direction.
Imagine: the motor is in fact a coil, and when you put some volt on it it gets a charge. When you turn off the motor the electric charge can come back into the transistor and that can blow up the transistor.
however in this case of a little robot I think Botfin can do it without the diodes. It’s already difficult enough to get this to work for him. He can always add them later.
Dec '11
Awesome
Use photo resistors instead of the sensors your using now.
1 reply
Dec '11
▶ simplebotics
Their both the same thing!
LDRs = Photoresistors
3 replies