David Cook thinking about robots David Cook
ROBOT ROOM
a robot
home | projects | contact | copyright & disclaimer | books | links


Resources for the book Intermediate Robot Building


Welcome!

This secret page is for owners of the book, Intermediate Robot Building. On this page, you'll find updates, corrections, and source files. Thank you for buying the book!


Errata
(separator)

Please email me if you discover any errors or unclear portions in the book.

Chapter 2: Page 14, Picking A Plastic (corrected in second printing)
Broken and cracked acrylic motor couplers
Broken and cracked motor couplers made of 1/2-inch diameter acrylic. They split perpendicular to the force created by the setscrew, approximately center to the shaft hole where the acrylic is at its thinnest point.

Since writing the book, every acrylic coupler I've installed has developed stress cracks and several have physically failed. Therefore, I highly discourage using acrylic for motor shaft couplers. However, the acrylic bodies and motor mounts remain in excellent shape.

Although some of the polycarbonate couplers have a slightly unattractive haze around the areas that make contact with the epoxy, the polycarbonate couplers remain strong and intact. Furthermore, I am in the process of ordering and testing clear PVC and polyester in my lab and will provide a progress report if I notice failure at some point.

If your couplers are not externally visible or if transparency is not aesthetically important to your robot, then I recommend aluminum or brass instead of plastic for physically stressed parts like motor mounts and couplers.

Chapter 1 and Chapter 3
Dave Hylands sent a nice note with some relevant machining comments:
  • Be careful when buying aluminum from hardware stores for machining purposes, because it might not be the most appropriate alloy (And they usually don't label it). 6061 is probably the most popular for machining. Dave finds the hardware-store-bought aluminum alloys to be a bit gummy.
  • HDPE (high-density polyethylene) is an inexpensive plastic that is easy to machine. I agree. In fact, you can get some pretty cool colors (in the form of cutting boards) from US Plastic Corp. Note that polyethylene is fairly slippery (so be careful when machining) and is fairly soft (so it will wear and scratch).
  • Dave prefers a horizontal/vertical metal bandsaw over a hacksaw. They aren't all that expensive (starting around $150) and you can cut much larger size materials more accurately and quickly.

Chapter 5: Page 65, Figure 5-18 (corrected in second printing)
What happened? In the book, Figure 5-18 is an oversize repeat of Figure 5-19. Oh well, here's the real 5-18.

Milling a wheel as described in Intermediate Robot Building
Figure 5-18. Creating depth by milling away some disc material while mounted on the rotary table (left). Partially drilling three holes from the opposite side resulted in the plastic melting and deforming to match the contour of the drill point (right).

Chapter 7
Ethan asks “Why isn't the Maxim MAX603 covered as a choice for low-dropout regulators?”

The greatest advantage of the MAX603 is the very low quiescent current (power used for the regulator itself). The disadvantages of the MAX603 (vs. the LM2940) are maximum current (500 mA vs 1000 mA), maximum voltage (11.5 V vs 26 V), and price ($1.54 vs $2.58).

However, the critical issue is availability. The MAX603 only seems to be in stock and orderable from Maxim themselves and Newark. It was on this basis that I decided not to cover the MAX603 in detail. Had it been in stock at DigiKey, Mouser Electronics, or Jameco Electronics, I would have recommended the MAX603 as an example for when low power usage is critical.

That being said, if you have a MAX603 and you decide to use it in a robot requiring less than 500 mA and being powered from a 5.25 V to 11.5 V battery pack, you'll be quite happy with the results.

Chapter 7: Page 97, Figure 7-1 (corrected in second printing)
The 78L05 regulator in the TO-92 package (right side of picture) should have the names of the first and third pins swapped. That is, looking at the label, left to right: +5V out, ground, +7V to 20V in

I don't know why they made the 78L05 part have the opposite order of pins than the standard 7805 pins. Regardless, you can just insert the 78L05 with the label facing away from you to make it “pin compatible”.

Thanks so much to Marc Vercruysse of Belgium who pointed out this correction to me!

Chapter 7: Page 102
Electronix Express part #N17SLDH251 is now #17SLDH251 (dropped the 'N' prefix).

Thanks to Chuck Rice for pointing this out!

Chapter 10: Figures 10-1, 10-4, 10-5, 10-6, 10-10, 10-11, 10-13, 10-15, 10-16 (corrected Figure 10-11 in second printing)
The symbol used for n-channel MOSFETs has a line in the wrong place. In all cases, the arrow inside the circle should connect to the source side of the symbol.

The correct symbol for an n-channel MOSFET has an internal connection to the source, not the drain.

This isn't a huge deal, as the pin names and body diode direction is correct. However, it is technically annoying.

Thanks so much to John Lammertyn, also of Belgium, who pointed out this correction to me!

Chapter 10: Page 186, Figure 10-13
I've received a lot of questions about adding PWM (pulse-width modulation) to the 4427-Interfaced Power MOSFET H-bridge (Figure 10-13 on page 186). The section titled “Exposing a Flaw: Shoot-Through” describes the serious problem with that circuit, especially when pulsed.
Schematic of a pulse-width modulation (PWM) compatible power-MOSFET H-bridge

Above is an improved version of the circuit, which is now PWM compatible. PWM, coast mode, and the capability to avoid shoot-through are provided by adding a fifth MOSFET (labeled Q5) to the source/ground connections of Q1 and Q3.

  • By default at power-up, the circuit is in coast mode.
  • To brake, set IN A to 0 V, IN B to 0 V, and Q5 to 5 V.
  • To spin clockwise, set IN A to 5 V, IN B to 0 V, and Q5 to 5 V.
  • To spin counterclockwise, set IN A to 0 V, IN B to 5 V, and Q5 to 5 V.
  • At any time you can return to coast by applying 0 V to Q5.
  • Or, you can apply pulses of 0 V/5 V/0 V/5 V (and so on) to control the speed. The more time spent at 5 V, the faster the motor will spin.
  • Whenever you change modes, if you set Q5 to 0 V before making changes to IN A and IN B (and then set Q5 back to 5 V or pulsing) there will be no shoot-through.

The downsides of this circuit are:
  1. Increased resistance as power has to travel through three MOSFETs (added Q5) instead of two.
  2. Increased cost of adding Q5.

In the schematic above, I made a couple of other changes from the original Figure 10-13 circuit:
  1. Switched IC1 from a 4427 to an IXDN404 for increased performance and higher voltage rating.
  2. Switched Q1 and Q3 from an IRLU024N to an IRFU3704 for higher voltage rating and lower resistance (thus this circuit actually performs better than the original Figure 10-13, even with the added resistance of Q5). Also, IRFU3704 turns on at a lower voltage, meaning it performs better than the IRLU024N when driven from a logic-level (5 V) output.
Additional notes:
  • Because Q5 is driven from a logic chip or microcontroller, it won't be turned on and off as quickly as it could if it were driven by an IXDN404 chip. That's because logic chips and microcontrollers can't provide a lot of current. So, the MOSFET gate will be in-between on and off for longer periods during gate charge/discharge with every pulse. If you really want to PWM this circuit above a few kHz, I highly recommend driving Q5 via an IXDN404 chip instead.

  • For a performance improvement, you can add Schottky diodes. See page 185.

  • The above circuit is limited by the maximum gate-source voltage of the power MOSFETs. In fact, 20 V is their absolute maximum. As long as you use plenty of capacitors and the current load isn't extreme, this circuit should work towards that limit. However, I've seen about 20% overshoot from the MOSFET drivers, so it would seem safer to derate to 16 V maximum.

  • When pulsed, this circuit switches between coast and spin. Some people prefer to PWM between brake and spin. To accomplish that, you'll need the full control that Figure 10-15 (page 188) offers. To avoid shoot-through in that circuit, be sure to turn off MOSFETs before turning on MOSFETs when changing modes.


Chapter 13, pages 256 and 269 (corrected in second printing)
Thank you, Claus, for reporting to me that I am missing pi (π=about 3.1416) in the diameter-based formula for calculating linear speed:
linear speed in cm/s = wheel diameter in cm x π x (RPM / 60 seconds in a minute)
linear speed in cm/s = 3 cm x π x (25 RPM / 60)
linear speed in cm/s = 3.927 cm/s

Which means page 269 should read:
The linear speed changes from 3.927 cm/s to the hectic pace of almost 11.8 cm/s. Okay, that's still pretty slow.

This mistake occurred because I usually use the circumference-based formula as presented on page 340 of Robot Building For Beginners.

Nonetheless, this is one of those mistakes that makes me cringe! I carefully proofread each chapter four or five times throughout various stages (multiple times in the word processor and then two passes of PDFs). My technical editor does the same. So, I don't know how we missed this elementary error. Oh, well.

Appendix: Page 421 (corrected in second printing)
The “Errata, updates, resources for this book” link should be ”http://www.robotroom.com/IRBGoodies.html” but somehow you still managed to find your way here! (The correct links appear elsewhere on that page and on page xxii.)



Source Files
(separator)

Roundabout Parts List
Excel file of Roundabout electronics parts and prices

Here's a list of parts and prices for the electronics for Roundabout, along with example supplier(s) for most items. This doesn't include the price of the robot's body, mechanical parts (motors), tools, or experiments from the book.


Circular Body and Motor Mounting Template
Microsoft Visio file of Roundabout body and motor mounting template

Here's the body template and motor mounting hole layouts for Roundabout. The file is in Microsoft Visio format.


Roundabout Printed Circuit Boards
PCB layout file for Roundabout primary circuit board (motherboard) PCB layout file for Roundabout optional microcontroller circuit board (daughterboard) PCB layout file for Roundabout optional floor sensor board (floorboard)

Here are the printed circuit board layouts for Roundabout. This allows you to order boards from a professional manufacturer.

You can save a lot of money by buying 1 of each board (RNDMPCB, RNDDPCB, RNDFPCB, for a total $36 plus shipping) from Solarbotics. Additionally, the boards at Solarbotics have silk-screened part numbers and part outlines, as well as a solder mask, making soldering easier.

Alternatively, you can etch and drill your own PCBs at home.


Roundabout Daughterboard Schematic


The daughterboard schematic is presented as modules in the book. Here is the complete connected schematic of the daughterboard.

Note that IC1 and IC62 have slightly different pin descriptions from the book. These changes allow the LEDs to be driven somewhat independently from the motors.


Roundabout Source Code
Microcontroller source code for Roundabout

This link contains the complete MC68HC908KX8 assembly language source code for Roundabout. The project was built using P&E Microsystems ics08kxz v1.17 free assembler. (Open Roundabout.asm in the WIN IDE and click the assemble/compile button.) If you have the KX8 programming board and a chip, you can FLASH the microcontroller yourself.

If you don't have a KX8 programming board, you can obtain the pre-programmed microcontroller (KX8) from Solarbotics for $12 (plus shipping). An added benefit is that each pre-programmed chip has already been hand-tuned (by me) for its unique internal oscillator frequency.


Musical Notes - Pitch Lookup Table
Pitch lookup table for Roundabout

Based on a base PWM frequency, this spreadsheet calculates the values to be stored in the KX8 PWM register to generate a particular musical note. The spreadsheet is arranged so that it can be copied and pasted into the source code.


Power Resistor Pulse Rating
Power resistor pulse load rating spreadsheet

In this spreadsheet, select a row and modify any yellow-highlighted values as desired. Theoretically, the formulas will indicate if the power resistor can handle the one-time peak pulse.


home | projects | contact | copyright & disclaimer | books | links
David Cook thinking about robots David Cook
ROBOT ROOM
a robot