DPRG List  

[DPRG] tutebot brain breadboard layout question

Subject: [DPRG] tutebot brain breadboard layout question
From: Dan Miner miner at centtech.com
Date: Sun May 14 23:39:19 CDT 2000

> From: olio [mailto:olio at fornet.net]
> Sent: Sunday, May 14, 2000 11:08 PM
> > > god it works.  HOW did you know to do that?  it isn't in 
> the schematic
> > > ...(is it?)
> > 
> > That is the way the schematic is.
> > A degree in Computer Engineering helps me a little sometimes.  :-)
> ok, i trust you, but can you explain exactly how i should have/could
> have understood that just from looking at the book schematic...?
> one side of the S1 connects to the Vcc branch, the other has 
> to connect
> with two diodes - if we use them, but i'm not cause i split the whole
> thing.  after that it looks like S1 would connect ... uh, oh.  
> (looking back now, after i know the answer, it seems a <little> more
> obvious...<grin>  but it appears more like it should connect only with
> the pos side of the Cap ... and not split between cap and R3(the
> resitsor from trans base)
> _that's the confusing things_  how'd it jump over the C1 connection?
> if we put the Pot back in, would it need to have a common connection
> between Cap and Middle (adjustable) leg of the pot?  


> miguel

A quick re-hash of the explaination from the book.  Actually, it's
my version of how the circuit works.

Let's look at only the top half of the schematic and say that
you have a switch for each half (like you DO have).  D2 and D3
are no longer required as you suggest.  I also don't understand 
what D1 does because I don't know what J1 (a power connector)
is there for.  I'm assuming one side of each switch is connected
directly to Vcc (+5 volts in this case).

Now, the other side of the switch connects to the + side of C1
and the R1/R2 pair.  What this does is when the switch is closed,
it will cause C1 to VERY quickly charge up to +5 volts.  This 
causes current to flow through R3 and turn on Q1 (a transistor).
(NOTE: Make *SURE* you install electrolytic caps. with the 
correct polarity.  If you do it wrong, they can literally explode
small pieces across the room!)

A quick diversion about how a transistor works:

In many (most?) circuits of this type, you can think of transistors 
as switches that are turned on or off by a control voltage applied
to the "base" of the transistor.  In this case R3 is connected to the 
base.  The other 2 pins of the transistor also have names: the top
is the "collector" and the bottom the "emiter".  I only mention this
so it's easier to connect the wires after looking at the data sheet 
for the part.  

Anyway, for this type of transistor, think of a switch.  When the
base (where R3 is) has a "high" voltage, the switch is closed and
when the base is grounded, then the switch is open.  (Note to
pureists: Yes, I know this explaination is over simplified.  I'm
trying to get the point across with as few words as possible.)

Let's return to the explaination of the circuit...

So, when SW1 is closed, C1 charges up quickly (probably 1/1000 sec.
or less) and Q1 turns on (like a switch closing).  This causes the coil
in the relay to activate, causing the internal switches to change and 
this swaps the polarity on the motor - causing it to reverse.

OK, now your robot stops, and begins to back up.  This causes SW1
to open.  What happens?  R1/R2 cause the charge on C1 to "slowly"
drain away.  How quickly this happens is adjustable with R1.

After the charge on C1 drains down to near 0 volts, then Q1 turns off
like an open switch.  This causes the magnetic field of the realy's coil
to stop and the relay switches return to their Normally Closed (N.C.)
position.  Which causes the motor to go forward again.

If we don't include R1/R2, then the charge stays on C1 and it will
for a very long time until the (unintentional) internal resistance of
the cap.
drains the charge away.  Your robot will back up for a LONG time!

Now here's something for you to think about and/or experiment with:
What difference in behavior will you get with 2 switches instead of
the single one shown in the book's schematic?

				- Dan Miner

More information about the DPRG mailing list