3D Printing: The Stepper Conundrum

Today’s conundrum from my 3D printer has vexed me for three days now.

So, an update since the last one.

Last time, I estimated I was at 60% complete with the build and needed to finish that, install the firmware, get the filament, and begin printing. Well… that was almost what I had to do.

I’ve completed the physical build, as much as I can but more on that later. I’ve installed the firmware and tested that it works with the software on my computer. I’ve even attempted to do a test print to start calibrating the settings. Oh, and I got the filament (after ordering the wrong type of plastic the first time).

Filament, just realized that some of you might not know what that is. Filament for 3D printers is basically thread made of plastic. Really thick thread, but it comes on a spool and is fed into the 3D printer like thread into a sewing machine. It comes in two main sizes 3 mm and 1.75 mm. I am using the 1.75 mm, since it has been found to work better than the 3 mm filament. which sometimes overwhelms the heater that melts the plastic.

So anyway, that’s where the problems started.

The trouble presented itself as an inability to push the plastic out to be printed. It comes out like frosting from a cake funnel, or like toothpaste from a tube, and is supposed to be layered up, one on top of the other, until you have a completed object.

At least that’s the idea.

You see, there’s a motor that pushes the filament into the extruder (that’s the toothpaste tube). The motor is a special kind, called a stepper motor. Named that because it can take individual steps of rotation, unlike most DC motors that just spin. Because it can do this, it can push just a little, or a lot, of plastic through the hot end of the extruder in measured amounts.

Mine however, was not doing that.

What it was doing was pushing a little of plastic out, but then reversing direction and pulling the filament back, then pushing it back in or pulling it out more, depending on fate and whimsy. It wasn’t so whimsical for me though. The melted plastic cools very fast, but ends up leaving little spiderweb threads of plastic as it comes out. I went through a fair amount of plastic in the last three days troubleshooting things.

Something said at work today, along with thinking about all of the settings are available finally led me to the solution.

I had tried everything I could think of over the last few days. Switching stepper motors, switching driver circuits, changing the amount of plastic to be extruded. All of those things done one at a time to see the result of the change, and making note of how it improved or made worse the problem. At work yesterday though, one of my co-workers was wrestling with an issue and it was suggested that while he was going through the same process as I was with the 3D printer (it’s a common troubleshooting process for code), that perhaps he had more than just one problem to fix.

This was no surprise to me, having just come off another project where I was tracking down a bug that led to several other bugs being uncovered and needing fixing before I could fix what the client actually wanted fixed. It wasn’t until I got home and looked through the firmware that I realized there was a setting I missed.

Going through the calculations, I realized that the stepping code wasn’t set correctly for my printer. I adjusted that, but still had a problem. It was a bit better, but still would reverse seemingly at random. I switched stepper drivers again, and voila! a working stepper motor.

So long story short, I have a solution for my problem, and as soon as the new stepper driver arrives, I will have a working printer.

I’m keeping the bad driver board for now, to learn from and see if I can eventually fix it. Right now though, with the deck, the secret project, the 3D printer, NaNoWriMo, and HoNoToGroABeMo coming up, I have enough on my plate to last through November!

If any of you have any questions or suggestions about 3D printing, or stepper motors and their drivers specifically, feel free to drop me a line in the comments.

Machine Learning or The Robots are Coming!

Lately I’ve been working on some interesting topics at work. Right now I am gearing up for a project starting in November that will utilize machine learning, and using what some call collective intelligence.

Skynet Logo“So what the heck is machine learning? Are you finalizing Skynet or your own robot army, David?”

Well, first, let me say that my 3D printer is nearly complete, and should be before this project starts. So the answer to your question about a robot army is a solid: Maybe.

Machine learning however is both more simple and more complicated than it sounds. Machine learning takes in data, usually lots of data, and data that on the surface doesn’t always make sense, and makes sense out of it. Often finding patterns and relations in the data that help the machine/computer, to make specific decisions based on the data.

Many of the algorithms used are actually ones that humans use everyday, if they are statisticians. They are used to make choices in the stock market, suggest movies you might like based on your’s and others’ previous movie ratings, and what you should watch next on YouTube.

Nearly all of the algorithms are understandable, at the start at least, but deal with so many variables, and such large quantities of data, that the computer does what it does better than any human. It calculates. It does a lot of calculation. As I said earlier, statisticians do similar things, but when they use a computer to do it, the results are downright amazing.

So for this project, I am working on finding the right combination of variables that will lead to the best user experience. I know what is a good user experience, but I can’t sit at every user’s computer and tweak their settings to make it right. That’s where the machine learning comes in. I’ll be coding a set of algorithms to look at how fast their computer is, if they are even using a computer or using a phone or tablet, taking into account the user’s preferences, and the client’s needs as well. From those algorithms, the app will then be able to deliver the best user experience that is possible, at that moment.

At that moment is yet another data point, as are the moments in the past. See, as the user continues to use the app, the machine learning algorithm will continue to learn, and to tweak the settings it has available to make the user experience better and better, all without any downtime.

It’s a daunting task to say the least. It’s also a challenging and exciting one. I’m really jazzed to be working on it, and have been diving into white papers, books, and every article I can on algorithms related to statistical analysis and machine learning.

I see so many uses for it, it’s pretty amazing.

As they say in that movie: “Would you like to know more?”

A 3D printer is coming!

Nearly a year ago, I Kickstarted a project called Eventorbot. It seemed a good project, an open source plan by a young man who had come up with a good design for a stable and easy to build 3D printer. It had some good rewards, and after hearing about some Kickstarter horror stories, they didn’t seem overreaching. The creator also had built a machine, and claimed he also owned an import business. Overall, it seemed to be a good deal, so I put my money in.

Well…

It’s been a few months since anyone has heard from the creator, and even Kickstarter can’t get hold of him. His last few posts were telling us that he needed to order some more parts, and then, nothing. The circumstantial evidence points to some bad parts from China, mainly the frames not being square as they should be. A rigid and square frame is essential for precise printing. If that’s the actual case, we don’t know for certain, but it’s the predominant opinion. We’d all be more forgiving if the creator were more communicative, but he’s most likely terrified of the things that he has promised and can’t deliver.

That’s the past, and a lesson about Kickstarter. Take from it what you will.

When I ordered the parts for the Eventorbot, I didn’t get a full printer. I knew I had some of the parts already, and could source some of the rest for less than the full kit price. So for nearly a year I have had rods, stepper motors, a control board, linear bearings, skate bearings, bolts and nuts, just sitting in a box in my basement.

Until a few days ago.

That is when I discovered the Printrbot Simple. I’ve known about Printrbot for a while now. They did a Kickstarter too, but obviously that one went better on deliveries than the one I was in on. They’ve put out several printers from their first, and the Printrbot Simple is their most recent one.

It’s small, a starter printer at an economy size. The print area is 100mm x 100mm x 100mm, about a 4″ cube for those that still prefer the English units. It prints PLA instead of ABS, and doesn’t have a heated bed. That’s actually good in this case, since cost is a factor in the economy printer. For the fully assembled printer, it is only $399. As a kit, $299! It is the cheapest printer I have seen in a while, unless you happen to have access to a laser cutter or someone who can print plastic parts for you already. I don’t, but I do have all those parts laying in a box.

That’s when I saw they offered just the laser cut wood frame for $40! (Total of about $50 with shipping.)

So sometime next week, I will be getting a package of wooden parts in the mail, and hopefully another package from Ebay for the hot ends that I ordered to complete the build. I’m enthusiastic, you would not believe how much. It helps out with my secret project, it lets me actually use the couple hundred dollars in parts that I had ordered, and I’ll have a 3D printer when it’s all done.

So, anyone want anything printed?

One project down. On to the next!

So yesterday, I talked about all of the projects I have been doing this year, and how I’ve finished a few. Today I can chalk up another one done.

The laser engraver that I have been reworking is finally running smoothly. The small one I had posted about before has been up-sized to be useful for what I wanted it for in the first place, that being cutting vinyl templates for etching glass. It’s cutting second template right now. Well, not now as you read it of course, but as I write this. There are still some kinks to work out by dialing in the settings, and the electronics all need to go into an enclosure, but the bulk of the work is complete.

Pictures? You want pictures?!? *sigh* Ok, here’s pictures. The original, next to the new version:

IMG_20131006_200858

As you can see, the new one is quite a bit bigger than the original. I haven’t used the whole bed yet, and I may not, since the part you can see in the picture is actually all I need for what I had originally planned. Perhaps larger templates are in my future.

I just looked at the image again, wow, what a mess! That’s boxes from the office, my dog’s feet, an old QuickCam from my Quadra 660AV days, and some plaster molds. As you can see, I still have a lot of cleaning to do in the basement.

What next?

Well, I have the deck still, though I got in all of the posts for the main portion this weekend. Given all the delays with getting holes dug, and family emergencies, I am going to have to get an extension on the building permit. Hopefully they actually give extensions. It’s coming along though, and the octagon’s posts should go in tomorrow, weather permitting. After that are the beams and inspection, before moving on to the joists and decking.┬áThat will be my main focus over this next week while daylight permitting.

Work is research right now. I’ve reached out to a friend, Jim Van Verth, to help me with some of the higher order math involved. At least it’s higher order enough to me that I don’t know what the symbols mean. I am sure Jim can shed some light on them for me. Thanks in advance Jim!

I’m also working on AngularJS, since it’s something I’ve been seeing worked on more and more. I have a nice little test project for learning it. It’s an interface to a home kegging system for beer. The original project Kegerface, was php and a flat file with beer information. I’m using it for inspiration, but will be completely rewriting it in AngularJS and running on a NodeJS server. More on that in the future, and links to my Github repo when I’m ready for people to hack on it with me.

Don't forget to wear these. Your safety glasses.
Don’t forget to wear these. Your safety glasses.

Work on the secret project also got done this weekend, and it’s running even smoother now. If I can dial in the base rotation system, I will be just about done with the prototype. I’ll keep teasing you with the details until I can talk about it.

I could keep going, but I have more to get done!

A final note. When working with lasers, don’t forget these, your safety glasses. (With thanks to Norm Abrams.)