Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Sunday, 4 March 2012

Firmware

Before our brand new printer can print anything the electronics needs firmware.

There are numerous different firmwares, each with there own advantages and disadvantages. At the moment there are 2 main contenders when it comes to firmware for RAMPS; Sprinter and Marlin.

Sprinter has been out longer and is a little easier to configure and get up and running, so I'll start with Sprinter.


Step 1. Arduino Software

In order to install the firmware we need to be able to talk to the electronics.
To do this we need to use the Arduino software which can be downloaded here.

Uncompress the download and run the program.
Now the programming is running we need to make sure the settings are correct for the electronics.


The Board option needs to be set to the Arduino chip being used, for RAMPS this is Mega or Mega 2560 (2560 if you using the newer board).
The Serial Port also needs to be correct, as a rule of thumb its the last one of the list.

At this point if you want to quickly test RAMPS copy and paste the code from here into the sketch window then hit upload
All the motors should cycle (turn both directions, one after the other) and the heaters will turn on and off.


Step 2. Configuring Sprinter

Download Sprinter from here and uncompress the file.
Ignore the message in the centre,
simply click either of the links in the red box

In the Sprinter folder there is a file called Configuration.h open it using notepad or a similar program (eg notepad++).


Line 17

#define MOTHERBOARD 3

Change the number to suit your electronics, in the case of RAMPS 1.4 its 33.
#define MOTHERBOARD 33


Line 26 and 27

#define THERMISTORHEATER 1
#define THERMISTORBED 1

Change the number to suit the thermistor your using.


Line 31

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

If your using 1/8 microstepping stepper drivers half all numbers. If just one of the motors is using 1/8 microstepping just half the relevant number.


Line 51

#define SDSUPPORT

If your not using a SD attachment you can comment this line out, like so
//#define SDSUPPORT


Line 74

const bool INVERT_Y_DIR = false;

If your using the standard prusa setup with the motor at the front this line needs to be changed otherwise your prints will be mirrored.
const bool INVERT_Y_DIR = true;


Save the file and now its time to upload Sprinter.

In the Arduino software, File -> Open
Select sprinter.pde

Click upload.

Congratulations you've installed Sprinter firmware on your electronics.

Sunday, 5 February 2012

Wiring - crimps, joining and endstops

The mechanical side of the build (frame, extruder and print bed) is fairly straight forward as long as you have the correct tools and parts. As there isn't much too it and its pretty well documented I'll post that later.

I used 0.1inch crimps and connected housings from Hobbytronics, see my Connectors, crimps and wires post (link) for full details.


Crimping

To crimp the connectors I used a small nosed pair of pliers, as opposed to spending £20+ on an official tool.
Nophead outlines the method in this video.


Motor connectors

This are very straight forward, if you brought your stepper motors from Zapp you don't even have to strip the wire.

Crimp the 4 wires then insert them in order (link to wiki page about wire colour) into a 4 way housing. In the case of the SY42STH47-1684A is black, green, blue, red.


Endstops (mechanical)

Firstly you need to solder or connect (using a crimp on the wire) your 2 wires to the switch.

On the above image I've marked which legs of the switch to join the wire to.

I highly recommend you use 2 different colours or styles of wire for this. Keep the left wire one colour or style and the right wire another. In my case I used a network cable for the wire so the left was solid with the right using white striped.

Crimp the other end of the wire then insert into a 2 way housing.


Transistor

This is the trickiest bit of wiring you have to do, its tricky as solder is fairly pointless and its fiddly.

Remove a crimp (0.1 inch) from the reel then cut across the red line marked above.

Now insert one of the transistor legs into the right side (the side with the longer wings). Using the same pliers you used for the standard crimps close the wings tightly around the wire (so it doesn't move).

Do the same with the wire on the left side (this holds easier).
The above image shows roughly what it would look like (well when its not been crimped), the blue wire going to the electronics board and the green wire doing to the transistor.

Slide over some heatshrink tubing and shrink (the air vents on a soldering iron work nicely) to add an extra layer of support (and a little safer).


Thermistor

As its a small single (note I wrapped the rest of the wire in kapton tape) wire I merely soldered it to a multicore wire, added heatshrink tubing and shrank it. I then crimped the other 2 ends and inserted it into a 2 way housing.

I'm not 100% sure this is the correct way to wire and join the thermistor so stay on the side of caution if you choose to copy me on this one.

Tuesday, 29 November 2011

StepStick - Allegro from snipermand configuring

As I mentioned in my last post I purchased a StepStick stepper driver from spinermand on eBay (link to item) and the trimpot kept turning.

I posted the a thread on the RepRap forums and promptly got the following reply.
On the 'normal' stepstick it would be the left pad and upper right. If your multimeter supports measuring resistance, you might want to use that to determine how far the trimpot is open.


Ironically enough the person how replied was (or at least seems) to be the same guy who runs RepRapWorld. Which I purposely avoided due to the questionable selection of parts in the RAMPS DIY kit.


Connections to measure highlighted


By attaching the multimeter in resistance mode to the highlighted points (see above image) on the new
StepStick then comparing it to be resistance one of my RepRapWorld StepStick I was able to match the settings.


For this reason I would avoid snipermand for StepSticks as it adds another step to the set-up and would be even more tricky if don't have a StepStick with a ended trimpot as you'd have to calculate the values.

Wednesday, 16 November 2011

It lives (RAMPS)

After finally finishing the RAMPS assembly last night I thought I'd give it a test run.

In truth I was expecting it to go pop and not even turn. I did so many things wrong or in a roundabout way it is stupid.
To quote on of my favourite songs, Do as I say not as I do.

I found the easiest way to wire RAMPS up to a computer psu was to use the pin pin 12v yellow and black connector.
Snip the end, strip the wires then attach.
For anyone reading the RAMPS 1.4 wiki entry and wondering what the heck the COM wire is on  diagram explaining how to attach the power its ground.
COM = ground
It stands for common return path.
So using the 4 pin connector wires it goes;
*top near the 6 pin screw connectors*
Yellow
Black
Yellow
Black
*bottom near the reset switch*

A quick way to start an psu is to use a paperclip (I was told this my Corsairs psu technicians) from the power-on lead to any ground.

I powered on the RAMPS board, connected the usb then booted up the Arduino software (link to download page).
Windows 7 picks up the Arduino drivers, however with XP or similar you'll have to point Windows to the drivers folder in the Arduino software folder.
After setting the coms port to com 3 (generally you have two ports com 1 and com x, use com x) and board to 1280 I uploaded the test file (link).
To my utter surprise it worked, well the LED's all flashed.
So I powered down RAMPS and installed one of the stepper drivers (I'm using StepStick) and attached one of my stepper motors.

Before I installed the stepper driver I carefully turned the dial to 25% (all the way counter clockwise then back 25% of the way), however in a complete daze I installed the stepper the wrong way around.
Install the stepper drivers so the dial away from the mosfets.
Bam Windows no longer regonised the usb device and I instantly knew what I had done wrong.

Luckily it only blew the stepper driver and not the whole RAMPS board. Replacing the stepper driver with a new one and installing it correctly resulted in my stepper motor majestically turning left then right.

Of cause this means I'm one stepper driver down, but atleast my RAMPS works.

Tuesday, 15 November 2011

Avoid RepRapWorld for electronics - UPDATE DIY kits only

I posted earlier about a few of the pins being bent on the stepper drivers and the headers.

As the assembly went on I noticed more and more issues.

After the pins I discovered the red LED's where far smaller then the green LED (I suspect 0603). This made soldering them harder and much trickier.

As I neared the final steps I noticed RepRapWorld had supplied me with 6x 8pin headers (for the stepper drivers) as opposed to 2x 24pin header. This meant I had to file the middle headers and slightly force it in, both of which are risky to do.

On top of all this the Arduino Mega 1280 (a clone..) doesn't even come with a USB cable or feet. To make matters a little more confusing (to a newbie at least) its preloaded with the blink example.

Add all this to the fact it took them 13 working days to even dispatch the order, I'm not happy with them.

To top it all off when I mentioned RepRapWorld on the IRC channel Kliment instantly said RepRapWorld had caused people no end of hassle and he was getting annoyed with RepRapWorld.

Honestly if my RAMPS board ever works I'd be surpised.

OK I'll be honest some of the trouble is down to be and my tools*, but RepRapWorld have caused way more then there fair share of issues.

*I know the common phrase a poor workman blame his tools, but in my case my soldering iron tip was fubar and it seems like my soldering iron overheats.

Thursday, 10 November 2011

Quick update - misc items

The crimps and connectors from Hobbytronics arrived yesterday.

The loupe (20x18mm) and 0805 10k resistors arrived today, pretty damn good considering I only ordered them yesterday.

The difference a loupe makes is immense. From barely being able to read the 0805 rating to being able to see the individual pixels on my phone.
This means I can be 100% sure my soldering is on spot on (well as best I can achieve).

I would highly recommend anyone who is even considering soldering ramps themselves to budget for one and I consider it an essential if you choice to assembly the ramps yourself.
Seriously the difference it makes counters the very small cost of one.

Fingers crossed my new soldering iron tips will arrive tomorrow and I can resume the soldering.

Wednesday, 9 November 2011

Arrg, damn you 0805 resistors.

On Monday when I started soldering the smd parts I had managed to drop one of the resistors on the floor which luckily I found a few minutes later.
However last night I managed to lose 2 of them.
First it was a 4.7k resistor, which like the night before, shot out of the tweezers and off the desk. I did manage to find this later.
Second and most baffling lost resistor was a 10k. I opened the package on the plastic side, I resealed it then went to tin the connections. When I went to pick up the resistor there were only 4 in the packet where there should have been...
I looked everywhere, but couldn't seem to find it.

In the end I managed to find someone on eBay selling a set of 10 for £1.30 (with 1% accuracy compared to others on eBay with 5% or higher).

On top of this I noticed my soldering irons "hotspot" no longer seems to be the tip, but about 5mm down from the tip. I had tried sanding the tip then re-tinning, but it didn't do anything.
So I ended up ordering a set of replacement tips at £3 for 3.

While I was in a buying mood I purchased a loupe so I can check the finished soldering and properly read the resistor numbering (in case I ever need to change them).

Looks like I won't be done soldering until this weekend.

Tuesday, 8 November 2011

Electronics finally arrived!!!

During my daily refresh of RepRapWorld last Thursday (3/11/11) I noticed it was finally marked as dispatched and given a tracking number.

A lot of excitement and a few days later I received the package.
So last night when I arrived home I had a spool of PLA filament with a center of electronics.

Prep and Issues

First thing I noticed was one of the Stepstick pins was a little bent so I carefully corrected that.
Second was the scary size of the 0805 resistors, I was expecting small, but they are tiny. I envisioned them being slightly smaller then a grain of rice which was way off the mark. The best example I can give (pictures don't really show the size too well) is pick up a standard staple then cut one of the small sections in half thats roughly the size of the smd 0805 parts.


The last thing I noticed and what took the longest to rectify was lack of markings on the resistor packaging.
With the hardware Thingfarm had labelled each bag and the items which weren't labelled were so different anyone would notice the difference.
RepRapWorld on the other hand only separated the main components of the full kit; Arduino MEGA 1280, Stepsticks, Stepstick heatsinks and the diy RAMPS board/parts.

As the resistors weren't marked up I had to read the numbering from the top. Remember how small the resistor is (as described above), now imagine trying to read a set of 4 digits from them.
I couldn't find my magnifiying glass anywhere was after a lot of rumaging and fumbling I found a pair of 1.5x magnification reading glasses.
Luckily the only resistors which could be confused are the 3x 10 with 3x 1.8k and the 5x 4.7k with 5x 10k.
I used this resistor calculator to work out the ratings (last time I resistor values where back in school years ago).



The soldering

Tools used

I had these lying around
Soldering iron
Solder
I brought these for this project
Flux pen
Soldering braid
Tweezers

With my freshly marked up resistors and clean working desk I began the fiddly process of soldering the smd parts.
I used the official RAMPS 1.4 guide from the wiki (link).
I fluxed each contact on the pcb just before soldering and used this guide for my soldering methodology (the actual soldering starts around the 7 minutes mark).
C2 was a little hit and miss, but that was to be expected as it was my first go at real smd soldering.
LED1 (the green one) threw up another curb ball, Place these with the end having green dots away from the + mark on the PCB, fine, but my pcb didn't have any + marks on it. Luckily the images on the wiki show the + mark and it was fairly easy to work out which way was which.
For some reason the red LED's (LED2, LED3 and LED4) seem to have half the width of the green LED which made soldering them a little more tricky.
R13, R14, R15, R12 and R23 all went in fine. I'd recommend soldering R13 after R12 as R12 is situated between R13 and LED1 making it a little fiddly.

Now I bet your wondering why I stopped at R23 and didn't do R24 and R25 at the same time.
Well the answer is I had a slight accident. During the soldering of R12 to R15 I managed to touch a hot section of the soldering iron with one of my fingers. I wasn't a big deal and it barely tingled, however for some reason while grabbing R24 my hand trembled, causing the resistor to shoot off the desk.
I kept my calm and soldered R25 (as I didn't want to lose that as well), then spent about 20 minutes on my hands and knees looking for it.

I was just about to give up then noticed it had landed on the top of my pc and not the floor itself.

I soldered R24 in then called it a night.

My poor burnt finger

Time to order a loupe and clean my soldering iron (the tip isn't heating correctly).

I'll continue the soldering tonight.

Tuesday, 1 November 2011

Still no electronics

I've not posted any updates in a while as I've not been able to make any progress.

I currently have a full frame, set of stepper motors and assembled extruder (including hot end), however I'm missing the electronics.

From my experience building computers one of the first things you learn is check everything works outside of the case. Its too easy to screw everything in and cable tie the wires in place, only to find one part doesn't work. Leading to dis-assembling the whole thing just to find the issue.

For this reason I've not fixed in any of the stepper motors or hot end.

I ordered the RAMPS Full DIY kit along with some PLA on 16th October . On the 22nd I sent an email asking for a quick update and recieved the following message:

Dear Joseph,

There was a little problem with the RAMPS board. I will shipp it Monday by priority airmail and you will receive it within a few days!

I am sorry for the inconvenience!

Martijn

Shortly followed by:

Ok! Thanks.

Your board is now fully tested!

Kind regards,

Martijn

So I was expecting the order to be shipped on the Monday (24th) and arriving within 3 to 5 days.

I kept checking the order status on RepRapWorld and it never changed.
Now 15 days after I placed my order the status is still the same as it was only a few minutes after placing my order.

Below is a screen shot of the order.
Note the order is still processing and was placed on the 16th.

Monday, 17 October 2011

Electrics and Filament

Which electronics package?

There are 2 main types of RepRap electronic packages.
  • All in one
  • Modular

All in one, does exactly as it says on the tin, everything is packaged on one board with the board being stand alone.
Modular, on the other hand is a base board to which other boards are attached to. For example the stepper drivers and usb host are separate.

On top of this each type of package has numerous variations and upgrades.

The most popular all in one packages are Gen 3, Gen 7 and Sanguinololu.
On the modular side there is only one choice RAMPS (RepRap Arduino Mega Pololu Shield), however there are numerous versions.



Which one did I pick and why?

After much research and a few questions on the offical RepRap forums I went with my gut and choice RAMPS 1.4.

I choice RAMPS for a few reasons.
  1. Its modular, if something breaks I can just replace the broken part without too much soldering or hassle.
  2. Upgrade-ability, as its modular I can reuse a lot of the parts if I ever need to upgrade to a newer package
  3. Add-ons, there are a decent amount of worthwhile add-ons which are exclusive to (or atleast easier with) RAMPS. Such as SD support, multiple extruders and heated print beds
 Cost wise they work out about the same in the UK as they have to be imported.


Assembled or DIY kit?

The next big decision once I'd decided upon RAMPS was do I solder the kit myself or buy it pre-assembled.

To help with the decision I needed to find a RAMPS 1.4 supplier which ships to the UK and doesn't cost an arm and a leg for it.
After looking at various sites I stumbled upon RepRapWorld which offers full RAMPS 1.4 kits including all the required items.

Cost of DIY Kit €100 + delivery
Cost of Assembled Kit €130 + delivery

So if I can solder the parts I save €30, seems simple enough.
That was until I read this line on the description;
In RAMPS 1.4, the resistors and capacitors are now surface mount to fit more passive components. This does add another set of steps to assembly, but we stuck with larger sizes to make it fairly painless.

Through hole soldering I'm fine wit, but I've never done any surface mount soldering with anything as small as the resistors required.

After more videos, research and a forum post I was assured it was just a little tricky.
Luckily I brought the tweezers, braid and flux (I was only expecting to through hole solder).

So I headed back over to RepRapWorld and added RAMPS 1.4 DIY Kit Full to the basket.
At the same time as I was checking RepRapWorld reviews/comments on the forums I noticed they also offered the lowest price on PLA filament so I threw in 0.5kg of blue PLA 3mm filament (to save on re-ordering later and paying for delivery again).

Cost of RAMPS kit + Filament - £108.29
Total Cost so far -  £190.29