APPENDIX A ■ APPENDIX A
Things I’ve Accidentally Destroyed While Writing This Book
Sometimes after I read a good book about robots, I get a little discouraged. I think, “Wow, this guy’s a lot
smarter than I am. How can I be expected to build what he built?” The truth is that most authors only
publish their successes, so of course everything seems perfect. You’re not there to observe the junk he flung
out of an open window.
Perhaps revealing my mistakes will prevent you from repeating them. Additionally, it may offer some
explanations as to why I made a change in the robot’s circuit and also warned you to avoid certain parts.
Which Way Does a 9 V Battery Get Installed?
Let’s face it, a 9 V battery is difficult to install backwards. But, it is possible for anyone to touch the battery to
the wrong terminals of the battery snap, even briefly. That’s no tragedy, unless you’ve left the power switch on.
In my case, the reversed voltage zipped through Sandwich’s circuits. Each path with an LED was
protected by the diode (one-way) nature of the LED. The photoresistors, resistors, and trimpots were safe
because they’re non-polarized devices, meaning they don’t care in which direction current flows.
After correctly snapping the battery into place, it didn’t occur to me that anything had happened. After
all, I was looking at the bottom of the circuit board and the headlights and tube LEDs were now illuminated.
But, frankly, something started to stink. The robot really smelled bad.
Upon flipping the robot right side up, I noticed the left and right brightness indicator LEDs weren’t lit.
After wiggling wires and flipping switches to no avail, I began to suspect that something was wrong with the
comparator or transistors. Since the comparator was socketed, it was the easiest part to swap out. Indeed,
the comparator was dead (see Figure A-3).
Figure A-3. A destroyed LM393N comparator
The comparator has a direct connection to the positive and negative terminals of the battery. The
reversed battery with the power switch on was enough to fry the chip. This is why I introduced the Reverse
Battery Protection circuit in Chapter 25 as a potential improvement.
Melting Switches
The standard-size subminiature DPDT-center-off line-following switch seems a bit large for the line-
following robot. So, I experimented with smaller, micro-size switches.