Sunday, March 27, 2011

Gen6 Electronics connected up!

A satifying milestone was reached this past week. I connected the stepper motors and newly mounted opto endstops to the Generation 6 electronics. There were a few little snags to be overcome to get it singing but singing it is! I've no extruder built yet but I was still able to load a test .stl (beethovan.stl no less, from Thingiverse! None of your 40mm test cubes round here! :-) ) and conduct a virtual print, as a way of exercising each axis! Climbing that learning curve now!!! :-)

I checked out the basic motor movements first using the manual controls in RepSnapper.
I had to make some changes to motor directions, an opto related setting, and the z-axis steps-per-mm setting. This was all done via the Arduino software, changing the 'FiveD_Gcode_Interpreter' firmware, which I downloaded from the site.

In the Arduino software open 'FiveD_Gcode_Interperter' firmware. I'd suggest you take a copy as master back-up to save having to download it again, as you make changes to anything in it keep notes in your own version. Anything right of a '//' is a comment.

The following detail will only make sence when you are at this stage of the build. For my machine, a metric Prusa Mendel RepStrap with Gen6 electronics and 'grub pulleys', I now have the following relevant settings in my firmware.
On the 'configuration.h' tab, in the #if MOTHERBOARD == 2 section, I set 'x_endstop_inverting' to false.
               #define X_ENDSTOP_INVERTING false
               #define Y_ENDSTOP_INVERTING false
               #define Z_ENDSTOP_INVERTING false
The setting on 'z_endstop_inverting' is set to 'false' if you have opto end-stops marked 'TCST2103'. They will appear not to work correctly otherwise so worth checking if your optios don't seem to behave on first use.

I had to invert the direction of the X motor. I did this by changing the #define INVERT_X_DIR to a "1". This was under the section #ifdef GRUB_PULLEYS, again on the configuration.h tab.

Finally I had to adjust the 'STEPS_PER_MM' setting for the Z-axis. I found that when I clicked on +10(mm) on the manual controls in RepSnapper it was actually climbing about 14mm. To mind what 'steps_per_mm' I needed to set for my M8 threaded rod, I uses Prusa's handy RepRap Calculator. For my machine, with it's Nema 17 motors, 1.8dev motor steps, and microstepping of 1/8 the setting came out at 1280 steps/mm. A practical check is to put a ruler against the Z-axis, hit +10mm in RepSnapper and whatch what happens!

Once you make your changes in the configuration.h tab in the Arduino program, save, select Sketch... Verify/Compile, when that's done select File... Upload to I/O Board.

In the Arduino software, under Tools... Board... select "Sanguino", or you'll get errors if working with the Gen6 electronics.
Close 'RepSnapper' so it's not trying to talk to the board while you are uploading new firmware. Arduino will tell you when downloading is finished. The 'debug' light will flash quickly while downloading is taking place. When done, press the 'reset' button on the Gen6 board and your new settings will be loaded.

Comments and questions welcome.

Thanks for viewing!

No comments:

Post a Comment