Tag Archives: electronics

Final Assembly, and First Print

With the extruder completed, the only job remaining is to hook up the extruder motor and the hot end to the electronics. The new wire-stripper made that a much easier job.

Connecting up the hot-end

 Molex connector for easy removal
One the extruder and hot end was complete, I removed the hot end, so that I could do some extrusion calibration. Whilst some default values for Wade’s extruder are known, Greg hasn’t provided any starting values for his extruder. I started out by doing some 50mm extrusions, and calibrating using Prusa’s calculator. Once that was done, I reconnected up the hot end, and put everything together. The printer was complete!

  Finally complete

I started off by doing a few extrusion tests. They went well to start with, with the hot-end warming up, and spitting out a line of filament. I then tried to set the Z-value of the tip. Then the printer started acting strange. The Z-motors were going crazy, not spinning enough. Spinning up, then down. I couldn’t figure it out. I went to the IRC channel, but no-one was interested in helping today.

Not sure what else to do, I started fiddling with the Z-connector on the board. Sure enough, with some fiddling, the Z-motors would either work perfectly, or not at all. I took the connector off, to have a look, and discovered that one of the wires had broken inside its sheath. The intermittent connection of the wire was causing the erratic behaviour. I cut the last couple of centimetres of the cable, re-stripped and re-connected them.

The Z-nuts also kept falling out of the bottom of the Z-carriages whenever the printer was supposed to descend. I think that the problem is that the bushings are a bit too stiff, and the Z-carriages aren’t sliding smoothly along the track. To solve this problem, I glued the nuts in place, to make it easier for the carriages to come for the ride. Travelling upward’s isn’t as smooth as I would like, either. I think I’ll put a little bit of lithium grease on the Z-rods, to smooth out the travel there.

Once those issues were fixed, I tried doing a print, starting off with the standard Reprap minimug. However, I ran into more issues right away.

Extrusion Test

The extruder was frequently locking up. It would only turn for a few seconds before it would stop. Having a look at it, I found out what the problem was. With Wade’s design, the extruder turns so that it has the effect of loosing up the nut on the far side of the extruder. This is compensated for by using two nuts. Greg’s has the opposite problem. Because it turns in the opposite direction to Wade’s design, it tightens up the nuts. It keeps on doing this until the extruder binds up from the force of the nut.

I got around this problem by taking off the standard nuts, and replacing it with a Nylock nut that a lot less prone to movement. Hopefully, this will fix the problem. I then tried to print the minimug again. To increase the chance of success, I decided to add in a raft in the Sfact settings. The print started off badly, with the tip dragging through the kapton tape on the heatbed, due to being too low in some places, but then went to the centre of the print bed, and started printing at just the right height.

The raft went down perfectly, with sharp lines, and stacking nicely. However, after that, things starting going downhill. It started to print some of the minimug off the raft. It kept printing, but it was messy, as strands were just loosely dropped on top of each other.

At least the raft looks good

After a while the extruder stopped extruding properly, it was hardly outputting any filament at all. At this point I stopped the print, as it was failing badly. I then had a look at the extruder, to try and nail down this problem. It puzzled me for a little while until I realised that the small gear was turning freely on the motor shaft. I tightend up the grub screw. Hopefully, it’ll work for a while. I intend to file some flats on the motors, but unfortunately, our machinist at work has broken his hand, making it hard for me to use his help.

My main problem is that the heatbed just isn’t flat, and when it’s not flat, then you can’t get the tip close enough to the bed. I also don’t like trying to set the Z-stop when the tip is so close to the bed. It takes quite a few tries to get it so that it’s ‘just right’. I’m tempted to inverse the Z-stop, set it as an upper limit, then use the software to set the lower limit of travel. That would probably work particularly well with using Nophead’s idea of the magnetic calibrator.

 Minimug. Theoretically, anyway.

I was going to take the heatbed off, and just print on the upper steel bed, but my wife Cathy suggested that I could use one of her glass trivets. Given that it’s designed to be used as a trivet, it should be made of Pyrex. In any case, she wasn’t stressed if I broke it, as she doesn’t like it.

So after a lot of work, and a lot of problems encountered, I finally got the printer to print – something. Hopefully, I’m over the hump for the physical issues, and I can just tackle calibration for now. I think for tonight’s print, I put the minimug on the back-burner, and do a calibration cube, see how that turns out.

Axes Alive!

I finished wiring up the axes yesterday, so I thought I’d plug everything in and give it a test run. Just about everything worked first go!

All the endstops worked, and all the axes travelled, with the sole exception of the Y-axis, which travelled in the wrong direction. After flipping the connector around that axes was working correctly, too.

I noticed that the axes were running into their stops at the non-endstop end. I figured that the maximum travel distances were incorrect. So I measured them up accurately, then went into the firmware and made the following changes:

const int X_MAX_LENGTH = 170;
const int Y_MAX_LENGTH = 170;
const int Z_MAX_LENGTH = 88;

after which the printer then would correctly stop at these limits. I recorded a short video of the printer homing:

Once this test was done, I wired in the extruder and gave it a test, which was successful as well. I didn’t bother measuring the steps / mm for this extruder, since I’ll be changing it next week for a Greg’s Hinged Accessible Extruder.

There’s not much else I can do on the printing front until I can get the extruder and hot end sorted out, so I’ll have a look at the heated bed, try and get it set up as well.


Now that the hardware’s finished, it’s time to wire up the electronics. One annoying thing about my stepper motors is that they only have short wiring, which doesn’t allow them to reach all the way to the electronics from every location. I’ll have to extend a few wires, which will be annoying.

Z-motors connected together

First motor connected up
I tried putting the electronics in various locations, but it turned out that the bottom-left corner had the best combination of tidiness and short cable runs.

On a lean

I zip-tied the electronics to the frame, to stop them from wandering. Unfortunately, it’s on a bit of a lean.  Once the printer’s up and running, I’ll print up a tidier box to put the electronics in.

The endstops were then screwed on, and attached to the electronics as well. I just need to extend the wires for the extruder and the z-motor, hook them up, and then I’ll be all finished!

Spinning Motor, Take 2

Now armed with a full set of jumpers, I thought I’d try and re-create my motor-spinning test from a couple of weeks ago.

I carefully fitted all the jumpers to the shield (three jumpers per stepper motor for 1/16 stepping), then hooked up the power and started Pronterface.

Success! The motor is now spinning backwards and forwards. I’m now definitely all set to start assembling the printer over the weekend.

One of These Things is Not Like the Other

As I mentioned in a previous post, my efforts to get the stepper motors to move were stymied back a lack of jumpers on the RAMPS shield. Auzze sent up some jumpers in the post, but there were only 11 jumpers and one random bit of plastic:

It looks like it’s a tiny little test-piece that Auzze might have been using for calibration purposes. Fortunately, I’ve got a spare jumper lying around, so it won’t be a drama in getting the printer up and running.

Getting a Motor To Spin

Since I’m still waiting for the hardware to arrive, I thought I’d try and hook up one of the stepper motors to the electronics, and try and get it to spin. Easy enough little task.

So I hooked up the power supply to the board, taking extreme care to make sure I get the polarity right on the cable. I then hooked up the motor to the extruder port, and then the electronics to the computer. I then put on one of the toothed gears on the motors, so that its movement would be clear.

Motor Test Setup

I then fired up pronterface using my little script, connected to the electronics, and hit ‘extrude’.

‘hmm’ went the motor, but with no movement. That seemed a little strange. I tried extruding a larger amount. Still no luck.

I went through various alternatives, plugging in a different motor, trying a different axis, even adjusting the potentiometers on the stepper motor drivers. No luck. With nothing else I could think of, I went to the reprap IRC channel, where there where many willing helpers with suggestions. Most of them suggested ideas that I had already thought of.

One IRC-er suggested that the problem was that I was missing jumpers on the RAMPS shield board. To check, I pried up the stepper motor drivers and had a look. No jumpers! With no jumpers in place, the board was trying to do full stepping, rather than 1/16th stepping.

Cursing Auzze under my breath, I shot him a quick email, letting him know that I was short 12 jumpers. He was extremely apologetic, and promised to quickly throw some in the post.

Hopefully the jumpers will fix the problem, and the motor will spin on command.

Installing Pronterface

There are a few different software packages (aka host software) which can be used to controlled a Reprap. There is Pronterface, Repsnapper, and the creatively-named RepRap Host Software. Kliment’s pronterface (aka Printrun) is one of the most supported and popular at the moment. It had a lot of recommendations behind it, so I thought that it would be the best one to go with.

It was a little bit tricky to install, mostly because if you use a mac you also have to install wxPython as well as pyserial, which requires a command and installation from a command line.

Pronterface also needs to be run from the control line:
python pronterface.py

Running the program bought up the following screen:

First up, I tried to connect to the electronics. For some reason, the usb serial ports which I had previously used to connect Arduino to the electronics weren’t showing up, so I had to reinstall that software. It seems like it disappears every time the computer is rebooted, so I’ll have to track that problem down.

Next up, I tested the electronics, to see if they were correctly reading the thermistor on the hot-end. I set up the hotend to the electronics like so:

After a little bit of fiddling with the wires (I didn’t even strip them) I was able to get it to correctly read 22 degrees.

My next steps will be to install skeinforge inside of pronterface, and I’ll hook up a stepper motor and make it spin.

Updating Sprinter Firmware

Auzze’s RAMPS board came with Sprinter firmware already installed, but unfortunately, I’m not able to use this as-is. The thermistor’s that came with the hot end were 200k thermistors, and the pre-installed firmware was set up for the standard 100k thermistors.

I asked Auzze the best way to go about this, and he suggested the following method:

1. Download the Arduino Software
2. Download the Sprinter firmware.
3. Make changes to the firmware’s configuration.h file, then upload.

Downloading and installing the Arduino software from arduino.cc was extremely easy, as was downloading the Sprinter firmware. Once I opened up the sprinter.pde file in Arduino, the screen looked like this:

The following settings in the sprinter configuration.h file had to be changed:

#define MOTHERBOARD 33 


float axis_steps_per_unit[] = {80, 80, 3200/1.25,700}; 

const int X_MAX_LENGTH = 170;
const int Y_MAX_LENGTH = 180;
const int Z_MAX_LENGTH = 110;

I was then ready to upload. The first time I tried to upload it didn’t work; didn’t recognise the board. I then realised that I need to specify the board to load onto. In the arduino software, I had to set the board to ‘ATMega1280’, and the USB port. However, there were no USB ports to choose from on the list.

The default ports that came with the software were only Bluetooth ports, so I had to run the other piece of software that came with the Arduino package (FTDIUSBSerialDriver). This added two extra USB port options to the software, which enabled the computer to connect up to the board.

Once this was done, the new firmware loaded quickly onto the board. Of course, I’ve got no way of testing it yet, so I’ll install Pronterface next. Thanks for the great after-sales support, Auzze!

Wiring Diagram for RAMPS

In my last post, I was uncertain as to what some of the I/O plugs were for on the RAMPS. Fortunately, I was able to find it pretty quickly on the Reprap wiki:

so E0 / E1 are for the extruder motors, D10 is for the extruder heater, and D08 is for the heated bed.

I still need to find out what Aux4 is for.

update: Aux 4 is for a as-yet-unsupported LCD screen. The SFJW firmware apparently supports it, but it’s very alpha at the moment. (It doesn’t even support 200k thermistors!)

Almost There

One major part and one important tool arrived this week.

The first thing that arrived was an IR thermometer – a Fluke 561. My wife was instantly convinced as to its usefulness when I showed her how to take the kid’s temperature very quickly using it. This should come in very handy when trying to calibrate the prusa, and trying to get the temps on the heated bed and the hot-end correct.
 Temperature gun in its case
Temperature gun in action
One thing I like about this thermometer is that you can plug in a K-type temperature probe. The 561 comes with a velcro-strap thermometer that you can wrap around pipes. One major downside to this thermometer that I didn’t realise when I purchased it is that the K-probes will only work up to 100 degrees C. (For no good reason that I could determine.) The other feature that would be nice would be to be able to turn the laser off. You can do this when you you’ve got a probe plugged in, but not at other times.
The other thing that arrived this yesterday was the electronics kit. I got this from ‘Auzze’ – one of the Australian members on the Reprap forums. He sells a complete kit, including endstops, plugs and an SD card reader.
RAMPS 1.3 electronics kit
There’s a few things that I’m unsure of with this kit:
  • I can see where the voltage comes in for the shield. Does the Arduino need its own voltage supply?
  • What’s the ‘Aux 4’ input / output for? Is it for an LCD screen?
  • The ‘X’ ‘Y’ ‘Z’ outputs are pretty straight-forward. I presume the ‘E0’ and ‘E1’ are for the hot-end and heated bed respectively, but I’m not certain.
  • I’m not sure which plugs are for the temperature sensors – is it the ‘T0’, ‘T1’ and ‘T2’, or the ‘D8’, ‘D9’ and ‘D10’?
It looks like I’ll have to do a bit of research before I start plugging things in. 
That’s almost everything I need for the Prusa. The only thing left to get now is the hardware kit. I suspect that it will be a while yet – it’s coming by sea-mail. At least I should have a pretty good idea on the electronics by then.