- Home
- About
-
- Arduino + NXTMMX + LEGO Motors
- Jumpstart Guide to Using Enchanting with Bazaar Version Control
- Hacking On Scratch
- Create your own printable LEGO Grids
- LEGO and DUPLO printable grids
- Behaviour-Based Wall Follower in NXT-G
- Robofest 2010 in Cardston
- Obstacle Course Tips
- Line Following Tips
- SABRE Competition at the CES Science Fair
- Blog
- Contact Us
Create your own printable LEGO Grids
Here is how you can make your own LEGO (and DUPLO) printable grids. Making studded or square grids is easy, using a free online graph-paper generator.
Studded Grids
The studded grid — a grid spaced to match the studs on top of LEGO bricks or the holes in LEGO Technic beams — is the easiest one to make. You’ll need to use the circle grid graph paper generator.
The space between studs (the pitch) is just under 8 mm. It is very, very close to 0.7986 cm. The studs themselves are 3/5 (60%) of the length across a 1 × 1 brick.
Knowing this, you can fill out the circle grid generator as follows:
The grid spacing and radius multiplier are important. Feel free to change the page size, line weight and colour. You can change the margins, too; they become somewhat important if you are trying to create a combined grid, with the circles and squares, but most of the time, leaving them at 0.5 inches is fine.
Square Grids
To create the grid of squares, use the standard graph paper generator. It asks for the grid spacing in lines per inch or lines per centimeter, and we know how many centimeters apart we want lines to be. Luckily, we can take the reciprocal of our value to get the one we want.
We want lines spaced 0.7986 cm apart [which can be expressed as 0.7986 cm / line]. When we take the reciprocal, we divide the number into one. 1 / (0.7986 cm / line) = 1.252191334835963 lines / cm. You don’t really need all the digits, but you may as well copy and paste them for maximum accuracy.
This only really important number is the grid spacing. Go ahead and change all the other options. [The margin, again, may be important if you are making a combined sheet.]
DUPLO Grids
As regular LEGO pieces will actually snap and fit underneath DUPLO blocks, I am taking the DUPLO dimensions to be exactly double those of the lego dimensions.
Thus, for a circular grid, you’ll need to use a size of (2 * 0.7986 cm) or 1.5972 cm, and for a square grid, you’ll need a size of (1.252191334835963 lines / cm) / 2 or 0.626095667417982 lines / cm.
A Combined Grid
Well, now I had a circular grid and a square grid, but I really wanted a combined grid. I couldn’t see one of the graph paper generators that would do it, so, after some googling, I came across a programmatic way to overlay one .pdf file on another. There must be easier ways (and feel free to add something to the comments if you find a nice way) — try searching for adding a watermark to a .pdf — but this one was suitable for me. I’ll present how I did, but explaining in detail how you can do it is beyond the scope of this article.
This solution uses Python (Mac OS X and Linux users already have it; Windows users can download it), and an add-on called pyPdf (which Mac and Linux administrative users can install by running, from the command line, “sudo easy_install pyPdf”). The code is as follows, and needs to be tweaked for each set of images.
#!/usr/bin/env python
# Python script to combine a .pdf made of circles and one made of squares
from pyPdf import PdfFileWriter, PdfFileReader
output = PdfFileWriter()
studs = PdfFileReader(file("DUPLO_Stud_Grid_A4.pdf", "rb"))
grid = PdfFileReader(file("DUPLO_Square_Grid_A4.pdf", "rb"))
page = studs.getPage(0)
page.mergePage(grid.getPage(0))
output.addPage(page)
output.write(file("combined.pdf", "wb"))
Sure enough, that works to put the two sheets together. I found that with the A4-sizes sheets, I was able to use the same margins for both the sheet of studs and the sheet of squares (which doesn’t quite make sense to me). With the US Letter-sized pages, I found that when I overlayed them, I got circles over the places where four squares meet instead of in the center. I had to adjust the margins.
I wanted to move the circles in half of their pitch. So, 0.5 inch + 0.7986 cm / 2 * 1 inch / 2.54 cm = 0.657204724409449 inches. (For the DUPLO, I removed the divide by two, and end up with 0.814409448818898 inches.) Again, you don’t need nearly so many digits, but if you have them, you may as well use them.
LEGO and DUPLO printable grids
After seeing the creative things you could do with LEGO, paper, and a hole punch, I used an online graph-paper generator to make up some .pdf files that print out templates for hole punching nicely and exactly. [Note: when printing, make sure any option to ‘automatically scale page to fit paper’ is turned off.]
| LEGO Grids | US Letter-Size | A4-Size |
|---|---|---|
| Squares and Studs | Download | Download |
| Squares only | Download | Download |
| Studs/Holes only | Download | Download |
| DUPLO Grids | US Letter-Size | A4-Size |
|---|---|---|
| Squares and Studs | Download | Download |
| Squares only | Download | Download |
| Studs/Holes only | Download | Download |
Or, download all of the above in a .zip file.
Creating your own grids of studs and squares, with different colours and for different page sizes, is really easy. Creating the combined grid is more involved. If you are interested, read, how to create your own printable LEGO Grids.
So, what can I do with it?
- Start with a suitable construction material — paper, construction paper, felt or ribbon
- Print out the grid to use as a template
- Take a hole punch (for LEGO) or scissors (for DUPLO)
- Add some imagination and stir gently or shake wildly, as appropriate.
And make some things like these:
- Give your singing/dancing robot a costume
- Put wings on a DUPLO sea monster
- Build a tree fort, or make cardboard puppets that stand up
- Give your alligator some character
- Put some wheels on a hand-drawn car or truck
- Put a sign up on that ice cream store you’ve built
Some other ideas include:
- Colour a lego mosaic on the paper
- Draw yourself a ruler for different LEGO parts
- With an adult’s help, use a drill to cut holes through small pieces of wood (popsicle sticks) and use them with your LEGO.
Add your own ideas in the comments.
Behaviour-Based Wall Follower in NXT-G
I’ve made a 45-minute-long tutorial video showing how to program a MINDSTORMS NXT Robot in a basic behaviour-based way — a great way to start with a simple robot program and work up to a complex-yet-still-manageable one. The video shows the concepts behind behaviour-based programming, and, in a step-by-step fashion, how to program the robot to do this in NXT-G, what the robot does, and how to debug the code to make the robot exhibit the desired behaviour.
Here are a couple of diagrams from the video:
We will indue Exo-Scout (the robot) with behaviours to drive forward, hug the wall, avoid the wall, and to escape when he crashes into something. It sounds contradictory, but it all works out.
Conceptually, the behaviours are organized into triggers, actions, and something called an arbiter. It sounds scary and looks daunting, but the video explains it all so you can use it in your own robots.
Download
Here are the following choices for downloading the video. Depending upon your web browser, you may be able to click on an option and stream it, or you may want to right-click on the file and save it.
| Format | Large (820×614) | Medium (512×384) |
|---|---|---|
| Quicktime | [312 MB] | [123 MB] |
| Ogg Theora | [325 MB] | [208 MB] |
(If you aren’t sure which video format to choose, you probably want to go with the Quicktime video.)
The NXT-G source code demonstrated in the video can be downloaded here. Note that you’ll need the NXT-G 2.0 software to use them.
Share and Remix

Behaviour-Based Wall Follower in NXT-G by Clinton Blackmore is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Canada License.
Leave Some Feedback
I’d love to know what you think. I believe the video explains some powerful principles that will help breath life into robots! Feel free to add a comment or send me an email.
Article History
2010-04-06 — Reworked a lot of the text, added pictures, added the CC license to the videos, and encoded and uploaded videos in ogg theora format.
2010-03-15 — I have placed the work under a creative commons license, granting you rights to redistribute, re-mix, translate, and adjust the work, so long as you give me credit for originally creating the work. (See above for details.)
2010-03-05 — Added a lower-quality version of the video, and added a .zip file containing the source files I worked on.



