Saturday, August 8, 2015

Building Longboards in High School Wood Shop Class

I've been making skateboards in preparation for the upcoming year's wood shop classes that I teach.  I've got my system down pretty well, and I'm going to show you how I do it.

Here is the final product: A horizontally laminated drop deck longboard with drop through truck mounting.
This blog post is going to focus on horizontally laminated longboards.  You can also build vertical lamination longboards, which are like big cutting boards shaped into skateboard shapes.  V-lam longboards (as they are known) are beautiful to look at, and satisfying to cruise on.  I'm going to have my students build these too, but they are pretty self-explanatory.  Joint wood, rip wood on table saw, glue wood together, send it through the planer, cut to final shape,  router edges, drill truck holes, and apply finish.  If you are currently having your students build cutting boards, you should switch to v-lam skateboard decks.  There are some great write-ups in the book The Handmade Skateboard, which I highly recommend.   Here is a video about a guy building vertical lamination longboards:

Waller's Rally - Catching a New Wave from Mike Greener on Vimeo.

The rest of this post will be about horizontal lamination longboards.  I built a few v-lam longboards at the end of the last school year, and it was pretty easy, but I thought that the h-lam boards would be a lot harder.  It turns out that the opposite is true.  Horizontal lamination is like making your own plywood, and it is how the vast majority of factory-made skateboards are built.

In the DIY skateboard movement, there are two major methods for h-lam construction.  The first is to use 1/16" maple veneer sheets, and to glue them together with a foam mold in a vacuum bag.  There is a company called Roarockit that sells everything you need to make that happen, and they are very involved in building skateboards in an educational environment.  It is apparently very easy.  The second method is to use 1/8" sheets of Baltic birch, and press them in a physical press with clamps.  This is the method I will be discussing.  Compared to the maple-in-the-vacuum-bag method, Baltic birch boards are a bit weaker, less resistant to chips and dings, and you can't shape 1/8" thick Baltic birch into as tight of bends as 1/16" maple.

There is one major advantage though, and that is that you can often buy Baltic birch from local lumber yards and specialty wood suppliers, while maple is only available in most places online through skateboard building suppliers.  1/8" Baltic birch is actually a 3-ply plywood, and you won't find it at a home improvement store like Lowes or Home Depot.  They sell plywood there with birch outer veneers (and who knows what on the insides) in a 4 x 8 foot sheet, but you need the 5 x 5 foot sheet, not for its size, but for the birch all the way through and lack of voids in every ply.  I live in Springfield, MO, and I buy mine locally from OP Hardwoods for $25 a sheet.  There is a strong possibility that the place that sells Baltic birch in your town won't have a website, so you'll need to pick up the phone book.  One 5 x 5 sheet is enough to build two big 4-ply boards (four plys of three ply plywood), which may be a bit flexy if you are heavy, or almost two big 5-ply boards, which will be stiffer.

Here's how I build my skateboards:

First, build your press.  This is nothing more than a 48" x 14" piece of low grade 3/4" thick plywood with two 48" x 3" pieces glued and screwed to the bottom, 3" in from the sides.  Try to make sure everything is square and flat.  The pieces of wood on the top are just laying there, and are not attached.  After I took this picture I drew a centerline down the middle from end to end, and also from side to side.  I also made lines in 1" increments from both centerlines all the way across, and labeled them with just even numbers, starting in the middle.  This way you can easily center your forms and plywood.  In other words, the lines on either side of the centerline are both labeled 2", the next two are labeled 4", and so on.  This way, if you have a 38" long piece of plywood that you want to center, you can place it with each end on a line that says 38" and know it is centered in the press.
I made some pieces of wood for my drops (the square ones on the ends) and for my concave (the long wedge-shaped ones).  I would suggest you round the corners of your forms more than I did mine, as mine left a few indentations in the wood on the sharp corners here and there.

Next I made my pressed forms.  The two end pieces hold the truck-mounting flats flat, the two center ones form my concave, and the two next-to-end pieces form my drops.  You will notice that one of the two drop-forming pieces is square and the other has angles.  On my first press with this form the angled one did not adequately press the edges of the Baltic birch, and there were minor gaps between my plys on that end.  For the most part, 1/8" Baltic birch wants to be flat, and all of the pieces will naturally press together when you squish it all together, but you have to watch out.

Your next step will be to cut your Baltic birch into your lamination pieces.  The grain orientation is important here.  The sheet will bend more easily in one direction than the other.  Notice that it does not bend as well in the direction that the grain is running on the outside plys (the grain is running the other way on the inside ply).  Ideally you will want the outside ply grain running along the length of your skateboard.  I purchased an already-cut piece of plywood at a discount for my first try, and I was unable to get all five plys to run lengthwise, so I put the single sideways grain ply in the very middle of the stack of five to minimize the effect of its easy lengthwise bending.  You can cut a 60" x 60" (5' x 5') sheet into six ~10" wide x 40" long lengthwise grain pieces, and two ~10" wide x 40" long pieces with the grain running sideways.  I have not done experiments to determine the perfect placement of that sideways grain piece in a 4-ply longboard, but I'm pretty sure it should be one of the two center pieces, and probably the upper one.

A note about the number of plys vs. flex: I used 5 plys of 3-ply 1/8" Baltic birch, with the middle ply having its grain (on the outside plys) running sideways.  The centers of the truck mounting baseplates are about 32" away from each other (the wheelbase), and I have significant concave (the bending up at your heels and toes on the sides of the board, which reduces flex lengthwise).  I weigh about 165 pounds, and my board has noticeable flex.  Personally, I like this, as it makes the road feel smoother, but many downhillers going for speed do not like this.  A layer of fiberglass on the bottom of the board is the common solution to reduce flex, but that's a whole other setup in the classroom.

Now it's time for a dry-clamping.  Lots of big c-clamps are helpful here.  After I built this board (and not pictured) I drilled a series of 3/8" diameter holes 1" apart all the way down both sides of the press table.  Through this I put 7" tall 3/8" all-thread rod, which I attached to the table with nuts and washers.  Then I drilled matching holes just a bit bigger than 3/8" in the pressed forms.  Now I can use threaded rod instead of using all those c-clamps, which are needed in the other, non-skateboard-building periods while the glued deck drys.  I only put the threaded rod in the holes where they are needed for the pressed form pieces.  Threaded rod in every hole would make turning a wrench awkward.
You will notice that I did not get the right side drop form fully clamped down.  On the wet glue clamp-up I did though.  Position things so you end up with a shape you like and mark where your form pieces go.  They do not need screws or glue, but some small air-nailer brads wouldn't be a bad idea.  I just let mine sit there, and I did have to re-position them as I put my glued plys down, but not a big deal.

The next step is to apply glue to both sides of each piece of Baltic birch, except for the top of the top and bottom of the bottom pieces.  I used a lot of Titebond III and a coarse paint roller.  You could also spread it with a spreader or a stiff paintbrush.  I felt like I ended up with a lot of glue in the roller when I washed it, which is somewhat wasteful, but whatever.

 Now it is time for final clamping.  You need to be quick here, as the glue will start to dry.  I shoot for less than nine minutes between glue spread and final clamp-down.

I pulled my board out after 6 hours.  Even for my first attempt, I could not believe how well everything turned out. I had some slight delamination on the edges at the bottom of the drop (as discussed earlier), but other than that it was very solid.  I filled those spots with more wood glue and clamped them back down overnight.

OK, so I've got a 4 x 4 foot Shopbot CNC router in my wood shop, and I love it.  By trade I'm a designer and drafter, so it plays right into my strengths.  It makes life so easy at this stage of the process, which is cutting your board to shape.  Now, the whole point of the wood shop class that I'm building skateboards in is to introduce students to the CNC, so this is perfect.  If you don't have a CNC, now is the time to draw your longboard profile by hand, or from a pattern, or by tracing an already completed board, and cut it on the bandsaw or jigsaw.  For me though, now was the time to draw my board on the computer.  I used Autodesk Inventor 2015, but I would have preferred AutoCAD 2000.  It is ideal for this type of work.  If you have a CNC, you probably already know how to use it, but I will offer this one useful tip.  Set the origin of your design to the left side of the board, right on the centerline.  It is always easiest and most accurate to work from the centerline of your board as opposed to a corner.  You can see in the pictures below that I marked the centerline of my board for positioning on the CNC bed.  Make sure you mount your cutting bit deep enough to clear the curvy sections too.  Your material thickness will be the distance from the top of the highest part of the board to the table.  I cut through the air a lot before the sides got cut.

You may notice that I did not cut my truck holes at this point.  The reason for that is that I hadn't chosen my trucks yet (I have since purchased Independent 169s) and I wasn't sure where my wheels would contact my board, so I may need to move those around as I decide where they go, and I'll probably drill those holes by hand.  In my experience it is critical that you use a guide to drill the holes.  On my first board my bits walked (even though I used a center punch) and I had to waller them out to get everything to fit right, which was just unprofessional.  I now use a truck riser as my guide.  If I did know what I was doing, truck-wise, you can bet I would have drilled my mounting holes on the CNC.

Here is what it looks like after sanding the surfaces and corners, and a single coat of Minwax Polycrylic.  I used to use Minwax Polyurethane on my boards for the superior durability, but I have found that it yellows badly with time.  I don't have any long-term observations with the polycrylic yet.

I wanted my students to be able to add some graphics, and I researched rice paper printing and water slide decal methods, but both seemed like a hassle, didn't involve any woodworking equipment objectives, and didn't seem like they were going to look that great anyway.  I decided to make a Sharpie holder for my CNC so that we could draw or download some graphics and have the CNC draw them for us.
Shopbot sells an attachment for $40, but for about $2 I built this one with two 1/2" threaded PVC plugs, a 1/2" threaded PVC coupling, and some scrap plywood to hold it to the router.  I put a metal 3/8" cap on top of the Sharpie to put some weight on the pen.  I drilled the lower threaded plug for the diameter of the Sharpie that is normally covered by the cap (the colored plastic part) and the upper plug for the outer shaft of the Sharpie.  The shoulder of the Sharpie that the cap usually contacts sits on the inside of the lower plug hole unless the holder is low enough that the tip is contacting the wood, in which case the sharpie is ready to draw.  I have 0.65" of pen travel in the holder before the diameter of the pen in the lower hole becomes smaller at the tip, and this works out perfectly to accommodate the curvature of the bottom of the board.

I only drew the outline of the graphics on the CNC, so I had to color it in by hand.  I'm not sure what would have happened if I had made the CNC fill it in, but it probably would have taken all day.  I ended up coloring it all in with a Sharpie chisel tip.  It is important to note that you must put a coat of finish on your board before you use a Sharpie, or the ink will run with the grain and make everything blurry in one direction.  I will put the remainder of my poly coats on over the Sharpie.

Here is the final product, as of yet, between a finished vertical lamination board and a work-in-progress v-lam.  Note that the light wood on the left polyurethaned board and the light wood on the right unfinished board is maple from the same board.  I am not into that yellowing.

At this point all it needs is the grip tape and truck holes to be considered a finished deck.  You can mount your deck to your trucks in a top-mount configuration (normal style) or, like I did, in a drop through mounting style.  A drop through means you mount the base of your trucks to the TOP of the board, so you have to cut a square hole for the body of your baseplate to pass though, but just the body, and not the flat surface with the mounting holes.  This lowers your deck by the thickness of your deck plus the thickness of your truck mounting baseplate surface.  I used my CNC to cut the holes for the truck baseplate body, but hand drilled the 3/16" mounting holes using the baseplate holes as a guide.

I finished my board off with Independent 169 trucks, ABEC 11 Freeride wheels, and Bones Reds bearings.  My grip tape was not quite wide enough, so I added a stylish stripe to make it wider.

I recently purchased a longboard truck, wheel, and bearing combo package from Amazon, and the trucks were so badly constructed that they were almost unusable.  The kingpin fit very loose in the baseplate, but I have a plan to fix the kingpin in the baseplate with JB Weld to make them usable.  It's tough to beat a sub $40 wheels, trucks, and bearings package on price, but that's probably what's in my student's price range.

I gathered almost everything I know from the Longboard Building Forum at
There is a giant trove of downloadable longboard shape templates on those forums here.
Other common types of Baltic birch DIY longboard presses are the Toothless and the Dimm.

Edit 8/16/15: added picture of final product, notes about drop-through truck mounting, and 5 ply flex.

Sunday, May 25, 2014

Adventures in BIOS Password Hacking on an IBM Thinkpad Laptop

I work at a science museum as an educator, and this summer I am using a whole bunch of IBM Thinkpad T40 laptops to teach computer programming on MIT's Scratch platform.  The Thinkpad laptops were left over from when we had this thing called Immersion Cinema, by Immersion Studios.  They are out of business now, and since they stopped supporting their product we stopped using it, which was before I started working here.  Anyway, the folks at Immersion Studios put a BIOS password on these computers, and when the little CR2032 cell dies in them you can't reset the time, because you can't enter the BIOS, and they won't run if the time is not set.  UGH!  Not awesome.  What IS awesome though, is the internet.  I used a couple of websites to learn how to scan the eeprom chip on the motherboard for the password, and after about 4 tries it worked!  If you need to scan your IBM Thinkpad BIOS password eeprom, the websites I used are here and here.  The downloaded software that is required will often show that contains a virus, but I think it is a false positive.  Anyway, if you have a computer left over from Immersion Cinema that you want to use for other projects, the BIOS password is probably SUPPORT.

Here's the chip you solder to

Mobile electronics workspace in use!

Password is SUPPORT
I won't lie to you; this took me about 12 hours to do, between research on how to solve this problem, buying the parts, building a serial cable, breadboarding the circuit, and troubleshooting.  I first tried to use a serial cable and just crammed wires in the end of it on the circuit side, but it turns out that some serial cables are not straight through cables.  I ended up building my own with a part from Radio Shack.  Also you can use Radio Shack Zener diode IN47338 aka 276-0565 diodes in place of the C5V1 diodes the above links call for.  You're looking for a Zener voltage of 5.1v or so.

This is the best thing about the internet.  People figuring out problems and sharing the information with the world.  What did we do before the internet?  We kludged things together, and badly, is what.  Thank you to anybody who has ever figured something out and posted it to the internet.  We need a national holiday for those people.

Friday, March 7, 2014

Mobile Electronics Workbench

Back in the old days I used to drag all of my electronics project parts out of the garage in boxes, set them up on the dining room table, and get to work.  This worked out great until dinner time, at which point I would shove everything back into boxes and scatter it around the room until after dinner was over.  There were extension cords, power strips, soldering irons, power supplies, and components.  Components everywhere.  It got to the point that it was more of a hassle to clean up than the projects were worth, and I sort of went on a hiatus from electronics projects.  I looked around the web at solutions other people had come up with, and I decided I needed a mobile electronics workbench.  A portable lab.

I wanted something with a built-in power supply, a spot for a breadboard, some soldering space that nobody would get bothered about if it got burnt spots on it, component and tool storage, a built-in extension cord, and good lighting.  Here is my solution:

The final product

Light and tool hanger folded in
The back side, with power cord cleats
 I built it out of 3/8" plywood mostly, with 1/4" plywood on the back for light weight.  The wood is glued together and reinforced with small nails.  The tool door holds various strippers and tweezers, and folds in neatly.  My eyes are not what they once were, and so I bought a magnified light on Craigslist for $30, cut it down to fit, and mounted it so that it can move up and down and still fold into the box.  The dimensions of this light dictated the overall dimensions of my box, and it just barely fits, which means it fits perfectly.  The front opening folds down to make a nice soldering and prototyping area.  There is a little shelf for holding craft boxes of components.  My light and soldering station plug into a 4-plug outlet on the inside, so I've got 2 spare plugs for other things that need AC at the table.  All told it weighs about 35 pounds with everything in it.  Not too bad.  It has helped me complete many more projects, both big and small, than I would have without it.  I can just bust out a project, fold it up for dinner, and pull it back out after the kids have gone to bed.  Easy.

Awesome as it is, I have some future upgrades planned for it.  I would love a little vise to hold my circuit boards while I work on them.  Currently I am using an old Dell ATX power supply, and it makes a high pitch hum that bothers everybody in my house.  A good cheap lab supply would be ideal, especially if it was smaller too.  I have had this in service for a year now, and space on the inside is valuable.  I use the Sparkfun soldering station, which I absolutely love, but the iron holder is horrible.  I would like to build my own iron holder into my mobile bench, especially since I have to take the iron out of the stock holder to get everything to fit inside after the doors are folded up.

Overall it has been great.  Now I just need to find a way to store my etching supplies, my laminator, my electric skillet, and my oscilloscope in there.  I guess they'll stay in the garage on an as-needed basis for now.

Wednesday, January 8, 2014

LEGO 2.4 GHz Power Functions Radio Control DIY Circuit

Update: The H Bridge chip this circuit uses has a voltage drop that makes devices that use it operate more slowly than they should.  An updated version 2 is in the works that uses the DRV8833.

When LEGO came out with the infrared controlled Power Functions system I was super excited.  I have dreamed of being able to build remote controlled LEGO cars and racing them with my friends since I was a little kid.  The actual system left a lot to be desired though.  If you want a nimble car, you have to use the LEGO 8885 infrared transmitter, but it only offers full speed forward and reverse, and if you are using it for steering it gives full left or right.  There is no proportional control.  You can’t go at half speed or steer just a little to the left.  You can use the other LEGO transmitter, the 8879, which gives you seven incremental speeds forward and reverse, or seven positions on the servo for steering.  That sounds perfect, but in reality it will only send a few commands per second, and if you try to give it more commands per second than that it will ignore them.  This means that it can take 3-5 seconds to steer from a full left to a full right, and your transmitter dial will be out of whack with where you expect it to be when you try to go straight again.  Suboptimal for sure.

I love the options the variety of Power Functions motors provide, but the control system needs improvement, so that is what I decided to do.  I am documenting it here so you can do it too.

My circuit uses a cheap 2.4 GHz radio transmitter to quickly control two Power Functions devices.  You can control two motors, or two servos, or one motor and one servo.  The 2.4 GHz receiver sends out servo control signals that are typically used to position a hobby servo or control an electronic speed controller.  Our LEGO motors and servos cannot use this signal though, so we are going to use a programmable microcontroller to translate the hobby servo signals into a pulsing signal that can be used to power our LEGO motors and servos.  The microcontroller we are going to use is the Picaxe 14M2.  I chose this microcontroller because it is small, cheap ($4), is easy to program in the BASIC programming language, and the only thing you need to buy to program it is a $6 cable if you have a serial port on your computer.  If you don’t have a serial port, you will need a USB programming cable, which is more expensive, at $26.  The Picaxe chip can’t output enough power to power our motors and servos, so we are going to feed the Picaxe output signals into an H-bridge motor driver chip, the SN754410.  I chose it because it is easy to use, tough, and cheap, at less than $3.  It can supply 1 amp of power to two different motors, which is enough for most Power Function situations, but I have not tested it with a L or XL motor yet.  I think it will handle the L motor ok, but I know the stall current of the XL is closer to 2 amps, and that’s way too much for the SN754410.  The SN754410 does have overcurrent protection though, so it will shut down before it does any damage to itself.  You can stack two SN754410s on top of each other, and solder their legs together to double the power it can handle, so if you are planning on running an XL hard, you should consider that.  The other part of the circuit is the 7805 5 volt voltage regulator, which takes the 9 volts from the battery pack and converts it to 5 volts, which is required to power the 2.4 GHz receiver, the Picaxe, and the logic functions of the SN754410.  The SN754410 also needs the full 9 volts to power the motors.  For the record, I am not using any external protection diodes on the SN754410, with no ill effects.  There is some debate about this on the internet.

Here's a video of the results:

And of the first road test:

Functional Concept:

The concept here is that the radio controlled receiver sends out a pulse of somewhere between 1 and 2 milliseconds every 20 milliseconds on each of the two channels we are using.  1 millisecond tells a servo to go full left, 2 milliseconds tells the servo to go full right, and 1.5 milliseconds tells the servo to go to its center position.  We are using the Picaxe PULSIN command to measure the length of that signal on each of the two receiver pins.  We then have the Picaxe perform some math on that data to end up with an output signal that we send to the SN754410.  Here is a link to a great page on what the pulse width modulation signal looks like coming out of the Picaxe and into the SN754410.

If we have a servo signal less than 1.5ms, then we need to send out a PWM signal to the SN754410 on its 1A pin, while sending out a constant 0v signal to its 2A pin.  As the servo signal becomes closer to 1ms, we need to increase the “on” time of the PWM signal to 1A.  If the servo signal becomes larger than 1.5ms, then we need to send 0v to the 1A pin, and start sending a PWM signal to 2A.  The math I used to do this is in my Picaxe code.  I made sure that there was a dead zone around 1.5ms so that the motors are sure to be stopped, and I also made sure with my code that the output signal could not be such that my PWM signal has a larger than 100% duty cycle. 

Here is what you will need to buy:

HobbyKing HK-GT2B 3CH 2.4GHz Transmitter and Receiver        $23
For $23 you can’t beat that deal.  If you already have a transmitter, you can use any receiver that works with your transmitter, but the pins may not match what I have on the etched board.

14M2 Picaxe chip                                 $4          
Picaxe Serial Programming Cable          $6          
SN754410 H-Bridge Motor Driver            $2.35      
7805 5v Voltage Regulator                     $1.25      
0.1 uF Capacitors (qty. 2)                      $0.25 ea.
Female Header                                     $1.50      
3.5mm audio jack                                 $1.50      
This is to connect the programming cable to a solderless breadboard to program your Picaxe.

Two 10k ohm and one 22k ohm resistors
You can buy these at Radio Shack in 5 packs, or in a big assortment.

Copper Clad and etchant
I love Electronic Goldmine’s scissor-cut copper clad.  Easy to drill and cut, and nearly clear, but you can use Radio Shack's too.  We only need single sided, so grind off the unused side if your copper clad is stiff.  I use Radio Shack PCB Etchant to etch my printed circuit boards.

LEGO Power Functions extension wire (qty. 2) short 8886           $3

Harbor Freight has an assortment of tiny drill bits that I use to drill my PCB holes.  I use the 0.8mm bit for most of my components, and just a bit bigger for the voltage regulator.  I file down the legs of the voltage regulator so they are nearly as skinny as the other components, so it sits flush against the PCB.

I’m going to assume you have some electronics, PCB etching, and soldering experience.  If not, here are some links to get you the background you need to get started on this project:

Toner Transfer PCB building:
I don’t use tape, but rather fold the paper over and push the copper clad into the crease.  Also, I have found that ironing for 3 or 4 minutes works well.  Don’t forget to rough up the surface and wash the board before you iron on the toner.  Sharpies work well for touching up before you etch.

Through Hole Soldering:
I absolutely LOVE my Sparkfun 937b soldering iron (part number TOL-10707).  My joints have improved drastically since I moved up from cheap irons.

Everything you could want to know about Picaxe:

Here are some pictures of the process:
Prototyping.  Note the HobbyKing receiver not yet de-cased.  Is that the top of a free-with-any-purchase Harbor Freight multimeter?
This is the best toner transfer etch I've ever done.  This is the first board I used AutoCAD to do my art.  For my previous PCBs I used Microsoft Paint, which works, but is not awesome. 
The HobbyKing receiver just plugs right into that socket I built out of 3 four pin headers side by side.

Here is the BASIC code that you need to program the Picaxe chip with. 

symbol bforward = B.2              ;the pin that outputs not 0 when motor B goes forward
symbol breverse = B.4              ;the pin that outputs not 0 when motor B goes reverse
symbol aforward = C.2              ;the pin that outputs not 0 when motor A goes forward
symbol areverse = C.0               ;the pin that outputs not 0 when motor A goes reverse

symbol cha = C.4                      ;the pin that receives the channel A pulsin
symbol chb = C.3                      ;the pin that receives the channel B pulsin

symbol chainput = w0                ;variable that channel A pulsin uses
symbol arevout = w2                 ;variable that gets output to motor A when in reverse (areverse pin)
symbol aforout = w3                 ;variable that gets output to motor A when in forward (aforward pin)

symbol chbinput = w4               ;variable that channel B pulsin uses
symbol brevout = w6                 ;variable that gets output to motor B when in reverse (breverse pin)
symbol bforout = w7                 ;variable that gets output to motor B when in forward (bforward pin)

output bforward                                    ;make pin bforward an output pin
output breverse                         ;make pin breverse an output pin
output aforward                         ;make pin aforward an output pin
output areverse                         ;make pin areverse an output pin


let aforout = 0                           ;set these variables to 0
let arevout = 0
let bforout = 0
let brevout = 0

pwmout aforward,249,aforout    ;all 4 pins start at 0v all the time
pwmout areverse,249,arevout
pwmout bforward,249,bforout
pwmout breverse,249,brevout

pulsin cha,1,chainput                 ;check the length of the pulse coming from channel A

if chainput < 102 then let chainput = 102 endif    ;you don’t want this less than 102 ever
w1 = chainput-102*22                                         ;intermediate math
if w1 > 1000 then                                               ;this all checks to see if it should be forward or reverse
arevout = 0
arevout = 1000-w1

if chainput < 152 then
aforout = 0
aforout = chainput-152*22

if arevout > 1000 then let arevout = 1000 endif    ;this makes sure that it doesn’t get more than 100%
if aforout > 1000 then let aforout = 1000 endif    ;duty cycle which locks things up at full throttle

pwmduty areverse,arevout                     ;output the reverse pwm signal for motor A
pwmduty aforward,aforout                     ;output the forward pwm signal for motor A

pulsin chb,1,chbinput                            ;this is pretty much the same thing as Amain but for B motor

if chbinput < 102 then let chbinput = 102 endif

w5 = chbinput-102*22
if w5 > 1000 then
brevout = 0
brevout = 1000-w5

if chbinput < 152 then
bforout = 0
bforout = chbinput-152*22

if brevout > 1000 then let brevout = 1000 endif
if bforout > 1000 then let bforout = 1000 endif

pwmduty breverse,brevout
pwmduty bforward,bforout

sertxd ("chA",#chainput," AF",#aforout," AR",#arevout,"  chB",#chbinput," BF",#bforout," BR",#brevout,13,10)  ;for tuning on the computer screen

goto Amain

You can copy and past all of the above into the free Picaxe programming editor, then upload it to the chip.  Read the Picaxe manual #1 to get an idea of how to do it.

Below is a link to the pdf of the etch artwork.  You will use this to print with a laser printer onto thinish glossy paper, then iron it onto your blank copper clad.  I also have several component placement guides on that page.  I put 4 copies of the art on one page so you can have 4 tries with a single print.  Sometimes it takes that many.  Also, save this file and print it with your own pdf viewer.  The whiteish lines you see on the black areas are ok on your screen, but not on your paper.  Google Doc's print puts the lines on the print, but Acrobat reader does not seem to.

The Future:
What does the future hold?  I have a few upgrades planned, and here they are:
1) I'm going to find a smaller voltage regulator, as that is currently the tallest part.  Replacing it with a shorter one will enable this whole thing to be under two bricks tall.  Currently I have to use 3.  Also, as long as I'm replacing the voltage regulator, I'm going to find a low-drop-out one to replace it with so my batteries can go even lower before replacing them.  EDIT: I cut the heat sink of the regulator off through the middle of the hole, and now it fits in a 2 brick high space, with no ill effects.  Also, my batteries will get so low that they will only barely drive the motors before the dropout voltage comes into play.
2)  I want to make a 6 channel board, since a 6 channel HobbyKing transmitter and receiver is hardly any more money than the 3 channel I'm using now.
3) I would love to make an 11.1v battery pack out of hobby lithium batteries.  Smaller, lighter, cheaper, more powerful than alkaline.  
4) Maybe someday I will gut a servo motor and replace the 7 increments with a true resistor strip circuit like every other hobby servo on the planet, and have full proportional steering.  Why didn't LEGO do this in the first place?  EDIT:  In practice the 7 segments feel very much like full proportional steering on a LEGO car.  I'm not going to worry about modifying their servos for this anymore.
5)  I want to build this circuit again with surface mount components.  I can buy a SMT voltage regulator, capacitors, and resistors easily.  The Picaxe 14M2 is offered in a hand-solderable SMT package (but shipped from the UK).  Now all I need to find is a hand-solderable SMT version of the SN754410 motor driver chip.  The ship LEGO uses on the new V2 of the infrared receiver is the TI  DRV8833 but it is difficult to solder (and etch a board for) and the maximum voltage is 10.8v, and I eventually want to use a 3S LiPo at 11.1v.