Instead of dedicating his laptop to control his RepRap all night, [Walter] is using a Raspberry Pi as an Internet-enabled front end for his 3D printer.
Before [Walter] got his hands on a Raspberry Pi, he set up his laptop next to his RepRap and let the machine do its work for hours on end. Obviously, this tied up his laptop for a while so when his Raspi was delivered he was eager to offload the responsibilities of controlling a printer to his new Linux board.
Right now, [Walter] has his Raspberry Pi set up as a web interface able to control his printer similar to Pronterface. We have to note that the Raspberry Pi isn’t driving servos or feeding filament onto the bed; those responsibilities are still handled by the RepRap electronics, but the ability to use a 3D printer over the web is still pretty cool.
[Walter] is putting the finishing touches on his 3D printer web interface, after which he’ll upload everything onto the git. Planned features for future updates include uploading gcode from the web and an option to connect a webcam for visual feedback when controlling a remote printer.
Video demo after the break.
27 thoughts on “3D Printer Control For The Raspi”
So the printer is stil running off an arduino, and the Raspi is working like a network node, via web interface?
No one managed to get a 3d printer/cnc running directly off a Raspi.
don’t get me wrong i think this is cool, but can’t you do this with another arduino and an a network shield.
But isn’t cheaper, easier, less work and more powerful and expandable this way? Even a beaglebone I think would beat an Arduino + network shield in price.
So I honestly don’t understand replies that can be summed up as, “Cool, but hasn’t this been done before?”
He’s replacing a hundreds-of-dollars machine with a tens-of-dollars machine. That’s progress. Add on the Raspy Juice that got decried because the Raspberry Pi didn’t ship with its capabilities and maybe we can replace the hundreds-of-dollars machine and the tens-of-dollars controller with one tens-of-dollars machine.
Incremental progress is still noteworthy.
Ah yeah i just saw the juice. now that was what i was after that way with the juice and the hdmi out on the raspi you can make a self contained unit withought the need for a pc.
But this is not really replacing hundreds-of-dollars as you still need a laptop to issue comands to get the printer working. well from the demo above anyway. mini keyboard + Lcd and yeah it’ll be hundreds of dollars in savings.
I really do think this is cool. Its definately more than i can do with a raspi, as im more into hardware rather than software. But i really like what he’s done, it’s definatly one way of doing it.
I figure that once he gets gcode uploading over the web interface you’re all good. You build the model on your real machine then send it to the Pi for overnight printing. No intermediary computer necessary.
Can you get another Arduino and and Ethernet shield for $35?
I suppose if you are really trying to minimize then the way to go is to replace the Arduino electronics with the RasPi and some I2C pin extenders.
Would that be worth it though? If your goal is to make another option to share with the reprap community then maybe but it would be a lot of work. If you just want to network your reprap and be done then doing what he did probably makes the most sense out of all possible solutions.
This gets discussed over and over. Lots of people complaining and saying how much better it would be, but nobody has stepped up to do it. The bottom line is that these Arduino based controllers are relatively cheap and available, and eliminate the headache of having to do real-time motion control under Linux.
There are RAMPS alternatives that use an AVR running Arduino based firmwares to cut cost somewhat. The big cost in any of these electronics is the motor controllers, which would still be a problem if you went with a RasPi-only approach.
He was able to get something up and running quickly. Of course there are other ways to do it each involving trade-offs.
You want to put a ethernet shield on an arduino? You have to re-write slic3r or marlin or whatever firmware you’re using to talk over the network instead of serial/usb (is there enough space on the avr for the ethernet shield library in addition to the gcode interpreter? I don’t know). then you have to re-write the gcode sender (looks like he’s hooking into pronterface) to also talk to the controller board over the network.
You want to use the raspi to talk to the printer? You need a real-time operating system. you can’t have linux saying x-axis, you go 50mm. y-axis… I’ll get back to you in a couple of seconds, after I do this other thing with this other process.
My message to Walter is if you plan on running this thing away from home, clean up that rat’s nest on your workbench, put the electronics in a box, make sure you have a fuse on that controller board and possibly a smoke detector tied into something to cut the power if anything catches fire. (and if you’re printing with abs, you probably have a can of acetone sitting nearby for additional fuel). Does that sound unreasonable? I thought so too a couple of weeks ago before my controller board caught fire due to a wood shaving bridging a couple of pins on one of my pololu stepper boards. The house was full of smoke in minutes and the room smelled like burning electronics for at least a week. But I’d be homeless now if I wasn’t there to cut the power and put the fire out.
Summary: we ran a common linux tool on a common linux board…where’s the hackery? Where’s the news?
The part where he created a new tool to do something?
Think about it.
Devices like the Arduino, Raspberry Pi, etc. are not designed for any particular purpose, so anything you do with them is simultaneously a “hack” AND ordinary use. Thus, there is no way to objectively criticize any of these projects. Unfortunately, criticism is the only power we have (apart from making our own blogs). That’s where HaD is currently deriving it’s authority from. This site is basically a big ad aimed at the electronic hobbyist. The lazy projects people do with the products they see on here and this blog’s popularity and willingness to post them has destroyed a once innocent subculture (intentional or not). Hobbyists and youth have no competing blog to look at and, well, do you honestly think anything is on the internet just for the hell of it anymore? People’s egos and wallets are at stake these days.
This site is also now effectively best friends with all the annoying geek-culture/hipster blogs of the internet (you know which ones).
Again, I’m not saying this is a conspiracy or intentional in any way. It’s just the state of things as I see it.
Dang it– I’m working on something remarkably similar, but haven’t got as far.
right know, my rasppi will be a drop in replacement for the laptop running my printer.
Same here, though I’ll probably complete it anyway as it’s my first Python project. I think a lot of people were inspired by the new Pronterface web interface and motivated by the fact that it doesn’t run without the GUI.
I agree with several posters. The fact that a Raspi was used, instead of any other Linux box, is incidental. Given that the interface is written in JS, even Linux might not be a requirement; it could work on Windows and Mac too.
So “3D printer control over the Internet” would have been a more appropriate title.
I wonder how long it will be until someone with hostile intent starts scanning for Internet-connected 3D printers, or writes a virus that controls them. Sooner or later, people are going to wake up and find their printers have wasted all their plastic on a statue of Rick Astley.
Now that is a whole new level of Rickrolling ^_^
Thank fully it wouldn’t be able to print the sound of the song, but the virus could leave a program that after printing would move the steppers to continually play never gonna give you up.
which.. is actually kinda cool & evil at the same time.
Sounds pretty far fetched already but if you are going there why not just have it print a bust of Rick Astley? Now if you could make it do that AND play the song on the servos… I think you are done, I can’t imagine how to one up it.
Wow, I somehow missed what that was a reply to. Sure wish there was a delete in here!
Yeah I’ve been racing to get the 2 printers done. Need to clean up my garage asap ;).
Meanwhile like others saying could run on windows=>why? You buy a rasp for 35$ and connect to your reprap, makerbot or whatnot. It gives you the ability to print from windows, android or linux by just uploading the gcode file to the site and pressing the print button.
Next vid I’ll control it with my android phone (which is exactly the same and works out of the box). Think some people missed the point it’s a web interface now instead of some gui running in linux/windows/os x … So yeah it works in Internet explorer, chrome,safari,firefox or your embedded browser on the iphone, ipad, android etc…
I guess I have to state the obvious. YOU may have previously needed to move your laptop from the basement to run your printer. But some OTHER folks will already have a computer that’s always on, and close enough to the printer.
In which case nothing is simpler and cheaper than running the web interface on the computer you already have. No need to buy another computer, even if it’s a $35 one, just to run a single simple task.
Which is why I suggested one might run it on other Linux boxes, Windows, or Mac. So far as I can tell, there’s nothing at all Pi-specific about your interface; and maybe even nothing OS-specific, since it’s in JS.
@ dimitri => I wrote the web interface to control my printer from scratch in node.js myself ;). It’s not apt-get install ‘some package’. It’s vim printerface.js and hack a few hours until I had a website that sends commands over /dev/ttyUSB0 in the background ;)
We have Internet Control and protect from misuse. . I like all the comment on this blog.
In essence it’s another hackaday post (node.js for linux joysticks) that inspired me to do it with node:
@elneofilico : exactly you got the point. I wanted internet control of my printer. 35$ and a few hours of hacking time is all I needed thanks to the raspberry.
Don’t think there is a simpler or cheaper solution. Yes it would make more sense to rewrite Marlin or Sprinter firmware to run directly on raspberry and use the gpio to control my steppers. But what are you saving?
About 20$ for an arduino but you have to rewrite the firmware and hope it works (lot’s of people use arduino based firmwares and a lot of others are improving and rewriting them daily). It would take weeks not a few hours to rewrite merlin or sprinter for raspberry gpio. Also when it works the other point is true that linux is not real time and might be doing something else (like cleaning a logfile or got busy with serving webpages) and disrupt the printer stepper control process is correct. The arduino or sanguinulolu is the perfect buffer it receives a pack of gcodes and if the linux/raspberry is busy it’s got a buffer so that the print continues even if there is a few hundred milli seconds delay in sending next batch of g-codes for the print. Think of it like this: You add one more component of 35$ and you have internet control+complete autonomous printing. You can control hundreds of printers that run standalone now. The next step is adding a webcam to them (usb psp camera) to show snapshots during prints and adding some stylesheets to make it look pretty.
An arduino ethernet shield costs more than a whole raspberry pi with ethernet (+usb wifi dongle possibility is there also with the pi).
Anyway I ordered a batch of 5 pi’s now, because they taste delicious ;)
so, how long until you publish?
–I would love to replicate your work,
Was swamped with work but finally got around to adding a github repo. You can find the sources here.
Hi, what voltage and current are you using for the stepper motors?
thanks in advance
Nowadays I just use a sanguinulolu boards, it’s 12v (either a led psu or a regular old pc power supply works also) the logic is 5v or 3.3v (5v if you work of arduino or atmega’s and 3.3v if you plan on directly using gpio’s is also possible) and current is regulated using pololu stepsticks. Pololu’s are cool because they have a variable resistor pod to trim the current to just where it gives your engine enough power to not skip steps and not too much to make it overheat. It varies on every setup but basically you just attach everything put the pods to 0 and then slowly move up until it doesn’t skip steps on either axis.
Regarding the laptop + printer. Yes it might work for you A. if you have a spare laptop (some prints take over 12hrs which means you can’t really use the pc or laptop for anything else). B. once you build 2, 3 or more 3d printers the raspberry pi is the way to go: you’re not gonna buy a new laptop every time you have a new printer. And C save the planet: a raspberry only consumes 5watts during those 12+ hour long prints. A laptop will use at least 4 or 5 times more than that. Do some large prints for a year and the savings on the electricity bill alone are more than the 35$ investment and you wasted less energy too.
Btw my garage is clean and my setup looks like this now : http://walter.schreppers.com/images/20130210_022500.jpg.
I’ve got 3 pi’s and 3 3D printers pumping out parts ;). Fourth, a prusa i3 is on it’s way…
Please be kind and respectful to help make the comments section excellent. (Comment Policy)