Megatronics 2.0

From RepRapWiki
Jump to: navigation, search
Megatronics
Version specific info
Megatronics 1.0 Megatronics 2.0


Crystal Clear action run.png
Megatronics

Release status: Working

Megatronicsv2.jpg
Description Single board solution, Remix of Arduino mega and RAMPS
License GPL
Author brupje
Based-on Pololu Electronics
Categories Electronics, Electronics development
CAD Models none
External Link none



Contents

Summary

After using RAMPS for a long time I am still quite fond of it. There are some aspects of the board however that make it unusable for future electronics, which should be reliable and cheap. Also the wiring can we a bit fiddly. I have combined the Arduino MEGA and RAMPS boards into a single board solution. Only the stepper drivers are still modules for easy replacement.

Megatronics is based on many famous open-source products including: Arduino Mega 2560, RAMPS, SD Ramps. Therefor this product is an already proven design. It combines all major features of these board into a single board solution for more reliable 3D-printing.

Megatronics has a powerful Atmega2560 processor with 256 kB memory, running at 16Mhz. The board can be connected to a PC using a normal USB cable. It will register as FTDI FT232R device. The board is compatible with the Arduino Mega 2560 and will therefor be easily programmed from the Arduino IDE.

Megatronicsv2 connectors.png

Configuring Arduino

The board is supplied with a Marlin firmware. Because of continued development and your specific needs, you may want to upload another firmware. You can use Arduino IDE to upload firmware to the Megatronics board. Under Linux select as board 'Arduino Mega 2560 or Mega ADK'. Under other operating systems the USB will not be reset correctly and you will need to adjust the boards.txt. This file is located in <Arduino directory>/hardware/arduino/boards.txt. Add the following text to the file:

megatronics.name=Megatronics
megatronics.upload.protocol=wiring
megatronics.upload.maximum_size=258048
megatronics.upload.speed=115200
megatronics.bootloader.low_fuses=0xFF
megatronics.bootloader.high_fuses=0xDA
megatronics.bootloader.extended_fuses=0xF5
megatronics.bootloader.path=stk500v2
megatronics.bootloader.file=stk500boot_v2_mega2560.hex
megatronics.bootloader.unlock_bits=0x3F
megatronics.bootloader.lock_bits=0x0F
megatronics.build.mcu=atmega2560
megatronics.build.f_cpu=16000000L
megatronics.build.core=arduino
megatronics.build.variant=mega


Restart Arduino IDE and select Megatronics as board. You should be able to upload correctly now. While uploading the blue LED is lit and the RX/TX LEDs will blink fast.

Testing the board

To test the functionality of the board, a test firmware is available. You can download it from the files section. This firmware will help you test the board. Disconnect everything except the USB cable to your computer. Upload the the test firmware to the board with Arduino, the blue debug LED should blink every second. By using the serial monitor in Arduino the board will provide an output like: T1 1023 T2 1023 T3 1023 TC1 700 TC2 700 These values represent the resistance measured from t1 to t3 and thermo couple 1 & 2. When you connect a thermistor to the pins, the corresponding value in the serial monitor should change to about 890.

By connecting the 12V lines, the MOSFETs should have power and their LEDs will blink in order. This verifies the MOSFETs and 12V power are OK.

Also the stepper motors should turn when connected, with the 12V lines and stepper drivers in place. They will turn a short time and switch direction.

These three tests will verify the basic functionality of the board.

Basic setup

This paragraph will show you how to connect the board. This is just a basic example, your requirements may differ. There is a lot of community support available in the RepRap forums. By placing your questions there other users may benefit of the information too.

Megatronicsv2BasicSetup.png

First connect your computer with a standard USB cable. The power LED should light up and the blue debug LED should blink once. The rxd and txd LEDs near the USB connector may blink fast for a short period.

Put the stepper drivers in the slots, and connect the stepper motors. You can connect up to 7 stepper motors, 1 for each axis, except for the Z-axis, which allows two stepper motors to be connected.

The power supply should be connected to the power screw terminals. Mind the polarization, the yellow wires should be +. Connect the heated bed to HB, this terminal allows larger currents, up to 14A. The first extruder heater should be connected to E1. A second extruder can be connected to E2. Fans can be connected to the fan1 and fan2 terminals.

You can easily connect end stops to the board. There is support for 6 end stops (3 min, 3 max). For opto end stops you will need the S(ignal), - and + pins. For mechanical end stops the S(ignal) and – pins are sufficient.

The thermistors for reading heated bed and extruder temperature can be connected to the thermistor pins. Polarization is not an issue here.

Dual extruder setup

MegatronicsDualExtruderSetupv2.png

Hooking up LCD

Hooking up the LCD display is pretty easy, just follow the wiring diagram below. Note that the connector is turned 180 degrees in the image. The trimpot on the board sets the contrast of the LCD, if you don't see anything, you probably need to turn this.

Megatronicsv2 lcd.png

Hooking up keypad

The keypad connects to the keypad header on the Megatronics. The wiring should be 1-to-1, meaning pin 1 is connected to pin 1, 2 to 2 etc.

Connecting end stop

You can connect either a opto end stops or a microswitch. Refer to you firmware on how to properly configure the firmware to use the end stop. The board has six headers for end stops, one for each stepper motor (or 2 for each axis). Each header has three pins:

1. + (5v output) 2. - (ground) 3. S (signal, closest to the atmega, directly connected to the atmega pin).

The following images show on ho to connect the end stops:

Optoendstopmegatronics.png Opto end stop

Endstopmegatronics.png Microswitch end stop

Using the DRV8825

Pololu released the DRV8825 Stepper Motor Driver Carrier (http://www.pololu.com/catalog/product/2132 ) a while ago. It has high current and a resolution of 1/32th step!

Megatronics v2 has support for this board and you can use it by simply setting a jumper. Under each stepper driver there are 4 jumpers that can be set. The left three set the resolution, depending on the type of stepper driver, the forth needs to be set for the DRV8825. For other stepper drivers this jumper must be removed.

Pololu has released an updated version of the DRV8825, that doesn't need the forth jumper

Drv8825jumper.png

FAQ

How do I use the fan2?

Add the following code to Marlin.main.cpp after line 1140:

   #if FAN2_PIN > -1
     case 806: //M806 Fan2 On
       if (code_seen('S')){
       analogWrite(6, constrain(code_value(),0,255));} //D6 is fan2_pin as in pins.h
       else {
         analogWrite(6, 255);}
       break;
     case 807: //M607 Fan2 Off
       analogWrite(6, 0);
       break;
   #endif //FAN2_PIN

Sending M806 will now control fan 2.

Files

File:Megatronicsv2TestFirmware.zip

File:Megatronicsv2Sources.zip

File:Megatronicsv2PDF.zip

How to get it

geeetech ebay