P
PeterMacKenzie
- Jan 1, 1970
- 0
I'm working on the circutry for a fairly simple robot, and I think I've
figured out most of it, but there's one bit that I can't figure out how
to impliment. I've made a .gif of the circuit plan below with the area
I'm having problems with marked off (sorry for it being a bit crappy; I
was using openoffice draw, which isn't great for circuits).
http://i5.photobucket.com/albums/y165/PeterMackenzie/Robot0002.gif
The issue is that I need to (I think) be able to use a signal from an
OR gate to switch between ground and vcc to select between only NPN
transistors passing current and only PNP transistors passing current.
I'm stumped at how to impliment a 2-way switch without resorting to a
relay (I don't have a relay, it would consume more power than I'd be
happy with and I'm sure there's a solution without one).
Also, I'd be grateful if anyone could look over the circuit and point
out any other problems with it; I pretty much doubled my understanding
of transistors (and burned out a few LED's) while designing it (the
book said the base passed a *little* current, nothing about it only
doing that with a big resistor in the way) and I'm pretty fuzzy when it
comes to logic components, so there's probably something glaring wrong
with it that I haven't noticed. There's no resistors drawn in yet, but
there will be when it's finished, in case you're wondering if that's
one of the glaring errors.
--------------------------
Overview of robot:
The robot is to have 2 motors with wheels for locomotion and 2 feelers
which detect collisions with objects and either cut power to one motor
and reverse the other to turn the robot away from the object if only
one feeler is affected, or reverse both motors to back up the robot if
both feelers are affected together.
Overview of circuit:
The feelers are functionally push-to-make switches. They quickly
charge a capacitor when closed and send a signal to the motor-control
part of the
circuit. After the push-to-make switches open again,
the capacitor discharges, thus maintaining the signal for an arbitrary
duration (1-3 seconds probably would be most desirable).
In the motor-control section, this signal has three destinations. The
first is a transistor which opens the connection for the motor nearest
that feeler to vcc, turning it off.
The second is an OR gate which is connected to both feeler units.
When either unit gives a signal, the gate switches between grounding
or supplying vcc (via a mechanism I haven't figured out yet) to an
array of 4 transistors, 2 being PNP, 2 being
NPN, the function of which is to reroute the direction of current in
the opposite direction through the motors. When vcc is connected, the
NPN transistors are active (and the PNP inactive) and current
direction is normal, but when ground is connected, the PNP transistors
are active (and NPN inactive) and the direction of current is
reversed.
The third destination is an AND gate, which is likewise connected to
both feeler units. If it's active, it overrides the transistor in the
first step by providing an alternative route through a secondary
transistor for each motor to keep them active (though also in reverse,
since the direction of current has been reversed in step 2).
figured out most of it, but there's one bit that I can't figure out how
to impliment. I've made a .gif of the circuit plan below with the area
I'm having problems with marked off (sorry for it being a bit crappy; I
was using openoffice draw, which isn't great for circuits).
http://i5.photobucket.com/albums/y165/PeterMackenzie/Robot0002.gif
The issue is that I need to (I think) be able to use a signal from an
OR gate to switch between ground and vcc to select between only NPN
transistors passing current and only PNP transistors passing current.
I'm stumped at how to impliment a 2-way switch without resorting to a
relay (I don't have a relay, it would consume more power than I'd be
happy with and I'm sure there's a solution without one).
Also, I'd be grateful if anyone could look over the circuit and point
out any other problems with it; I pretty much doubled my understanding
of transistors (and burned out a few LED's) while designing it (the
book said the base passed a *little* current, nothing about it only
doing that with a big resistor in the way) and I'm pretty fuzzy when it
comes to logic components, so there's probably something glaring wrong
with it that I haven't noticed. There's no resistors drawn in yet, but
there will be when it's finished, in case you're wondering if that's
one of the glaring errors.
--------------------------
Overview of robot:
The robot is to have 2 motors with wheels for locomotion and 2 feelers
which detect collisions with objects and either cut power to one motor
and reverse the other to turn the robot away from the object if only
one feeler is affected, or reverse both motors to back up the robot if
both feelers are affected together.
Overview of circuit:
The feelers are functionally push-to-make switches. They quickly
charge a capacitor when closed and send a signal to the motor-control
part of the
circuit. After the push-to-make switches open again,
the capacitor discharges, thus maintaining the signal for an arbitrary
duration (1-3 seconds probably would be most desirable).
In the motor-control section, this signal has three destinations. The
first is a transistor which opens the connection for the motor nearest
that feeler to vcc, turning it off.
The second is an OR gate which is connected to both feeler units.
When either unit gives a signal, the gate switches between grounding
or supplying vcc (via a mechanism I haven't figured out yet) to an
array of 4 transistors, 2 being PNP, 2 being
NPN, the function of which is to reroute the direction of current in
the opposite direction through the motors. When vcc is connected, the
NPN transistors are active (and the PNP inactive) and current
direction is normal, but when ground is connected, the PNP transistors
are active (and NPN inactive) and the direction of current is
reversed.
The third destination is an AND gate, which is likewise connected to
both feeler units. If it's active, it overrides the transistor in the
first step by providing an alternative route through a secondary
transistor for each motor to keep them active (though also in reverse,
since the direction of current has been reversed in step 2).