All finished! It took a bit longer than expected (I’ve been tinkering around with some final upgrades and fine tuning for the past few days), but now, at last, it’s working! Check out this video I shot of PriNXT (clever name, I know) yesterday when it was drawing the epically awesome WilsonTech1:
Since this is a pretty long post, I’ve split it up into a few sections for you: Hardware/ Design, Image Processing, Programming, and Conclusion. How considerate of me.
Hardware/ Design – Motors
PriNXT has three motors: two control the X and Y motion, and the third lifts the pen.
The first motor, the one in the middle, is very straight forward – it has two long axes coming out of it that connect to two tiny gears that can drive around on a series of gear racks, moving the contraption about the Y axis. The second and third motor are a bit more complex, since they both point inward and have to move their power around a lot.
The left one, which controls motion on the X axis, basically just gears its power to a really long row of worm wheels, which, when spun, slowly move the part that holds the pen from left to right. The third motor similarly transfers its power to the outside, after which it moves a long rod up and down, pulling the pen along with it no matter where it is. For more details, see PriNXT’s very own Hardware Post.
Hardware/ Design – Sensors
The robot has a total of four sensors: two touch, one light, and one color.
The touch sensors serve the simple purpose to calibrate the robot – it blindly drives towards them until it registers that they’re pressed, which tells PriNXT where to start drawing. The color sensor is used as a signal light to show that the robot has finished calibrating.
The light sensor, only added two days ago, is used for moving the pen, which has actually been one of the hardest parts of this project. Because the beam that moves the pen up and down is slightly flexible, it had to be slightly higher or lower depending on how far to the right the pen was. When the pen would move, this would cause conflicts, so now, instead of being static, the pen now continuously moves up and down a bit to compensate for this movement. The light sensor guides it in this, reading its position and telling it to either go higher or lower.
For the design part, I mostly kept this project in my usual red/ white/ shades of gray color scheme, which I’m actually starting to enjoy using more and more.
Image Processing
A big part of PriNXT was to get it to draw complex shapes and pictures like the one in the picture below.
So this is how it works: first, I import the image into Paint.NET, where I make it black and white, and then edit it a bit to get a better looking result. Then, I export it as a .PBM file, which basically turns the whole picture into a bunch of 1′s and 0′s. Then, I import those 1′s and 0′s into NotePad++, where I reformat them to something my program will understand. Finally, I copy the results into a pre-made array in RobotC, fill in the height and width of gthe image, and I’m done!
For a more detailed description on how to do this, and on how to use this method to display detailed images on your NXT, see this post here: How To: Display Images on Your NXT using RobotC (JPEG, PNG, etc.)
Programming
Mostly, the code for PriNXT consists of the following (in order):
- Calibration functions for the X and Y motors, which basically drive them both backwards until they hit their respective touch sensors, and then reset their encoders
- A “moveLinear” function, which very niftily calculates the amount of degrees needed to get to the user specified position, and then calculates speeds for both that allow it to go there in a straight line (if one motor has to move a lot more than the other motor, the other motor slows itself down to help it keep up)
- A “movePen” function, which.. moves the pen up and down
- A “drawBinaryImage” function, which draws the image according to the 1′s and 0′s I copy into its 2D “imageToDraw” array using two for loops, one inside the other
- A “controlPen” task, which keeps the pen at the right height even when the “movePen” function is not called
- The main task, which controls the rest
Conclusion
So yeah, I really enjoyed doing this project, even if it was challenging at times. For even moar pictures and other stuff my robot printed, check out my Google Plus profile (heck, you could even circle me)
And yes, it also drew the text in the header. Go ahead, scroll up and take a look at it :)



[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA PriNXT. PriNXT has three motors: two control the X and Y motion, and the third lifts the [...]
[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA PriNXT. PriNXT has three motors: two control the X and Y motion, and the third lifts the [...]
[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA PriNXT. PriNXT has three motors: two control the X and Y motion, and the third lifts the [...]
[...] genius, Leon Overwheel, has used his skills to construct his very own LEGO printer! Dubbed the LEGO Mindstorms NXT printer (or PriNXT), the machine uses three motors to control an attached pen, which draws [...]
[...] genius, Leon Overwheel, has used his skills to construct his very own LEGO printer! Dubbed the LEGO Mindstorms NXT printer (or PriNXT), the machine uses three motors to control an attached pen, which draws [...]
[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA [...]
[...] genius, Leon Overwheel, has used his skills to construct his very own LEGO printer! Dubbed the LEGO Mindstorms NXT printer (or PriNXT), the machine uses three motors to control an attached pen, which draws [...]
[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA PriNXT. PriNXT has three motors: two control the X and Y motion, and the third lifts the [...]
[...] Sensoren, um die Tinte korrekt aufs Papier zu bringen. In Sachen LEGO ist er allerdings kein unbeschriebenes Blatt. Irgendwie sahen meine Modelle damals anders aus [...]
[...] Source: World of Mindstorms __spr_config = { pid: '4e991d2b396cef0e4500030d', title: '14-Year Old Kid Creates PriNXT – A Printer Out of LEGO', ckw: 'PriNXT', chan: '', no_slide: '', slide_logo: false, pub: '2012-03-03 15:17:37', url: 'http%3A%2F%2Fwindowsera.com%2F14-year-old-kid-creates-prinxt-a-printer-out-of-lego', header: 'RECOMMENDED FOR YOU' }; var content = document.getElementById('simplereach-slide-tag').parentNode, loc; if (content.className){ loc = '.' + content.className; } if (content.id){ loc = '#' + content.id; } __spr_config.loc = loc || content; (function(){ var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = document.location.protocol + '//d8rk54i4mohrb.cloudfront.net/js/slide.js'; __spr_config.css = 'document.location.protocol + '//d8rk54i4mohrb.cloudfront.net/css/p/4e991d2b396cef0e4500030d.css'; var tg = document.getElementsByTagName('head')[0]; if (!tg) {tg = document.getElementsByTagName('body')[0];} if (tg) {tg.appendChild(s);} })(); Tags: PriNXT Related Posts [...]
[...] Fuente: World of MindStorms [...]
[...] Fuente: World of MindStorms [...]
[...] via World of MindStorms [...]
[...] genius, Leon Overwheel, has used his skills to construct his very own LEGO printer! Dubbed the LEGO Mindstorms NXT printer (or PriNXT), the machine uses three motors to control an attached pen, which draws [...]
[...] impresora PriNXT, tiene un par de motivos que la hace atractiva y particular. La primera que salta a la vista es que [...]
[...] auriez pu comme chez Worldofmindstorms en faire une imprimante papier en état de marche ! L’imprimante PriNXT a trois moteurs, [...]
hello what’s the music on that youtube video please?
[...] printen met een resolutie van 120 bij 140 pixels. Hoe Leon de printer gebouwd heeft kun je op z’n weblog lezen en hoe de printer werkt zie je hier [...]
[...] Lego hacker Leon Overwheel built this impressive Lego Mindstorms NXT printer, AKA [...]
[...] genius, Leon Overwheel, has used his skills to construct his very own LEGO printer! Dubbed the LEGO Mindstorms NXT printer (or PriNXT), the machine uses three motors to control an attached pen, which draws [...]
[...] /via/ Share this:TwitterFacebookLike this:LikeBe the first to like this post. Tags: control, geek part, lego, mindstorm, printer, robot, sensor Comments RSS feed [...]
[...] more at World of Mindstorms, [...]
[...] article: World of MINDSTORMS. Share this:EmailTwitterFacebookLike this:LikeBe the first to like this post. This entry was [...]
[...] Worldofmindstorms, [...]
14-jähriger baut einen Drucker aus Lego…
Man sollte den Youngstern mehr zutrauen, als man auf den ersten Blick denkt. Einem Jugendlichen ist es gelungen, aus banalen LEGO-Bausteinen und einer Reihe von Motoren einen funktionierenden Drucker zu bauen! Der junge Mann heißt Leon Overweel u…
[...] PriNXT (Fonte da imagem: Reprodução/World of MindStorms) [...]
[...] PriNXT – ein Drucker, entwickelt von einem 14-jährigen [...]
[...] PriNXT - ein Drucker, entwickelt von einem 14-jährigen [...]
Nice project. I wish I was as clever. It’s as much as I can do to make something drive round and detect collisions.
You might like to check out “X bitmap” format. It would do all your work for you except re-compiling RobotC.