Gen7 Board 1.4.1

From RepRap
Jump to: navigation, search

This page describes something which is no longer the most recent version. For the replacement version see: Gen7 Board-AVR 1.5


Gen7 Board History   --   Gen7 Board is part of Generation 7 Electronics

This supersedes Gen7 Board 1.3.1 and Gen7 Board 1.4. On how to upgrade from v1.3.1 to v1.4, see Upgrading from v1.3.1 to v1.4. On how to upgrade from v1.4 to v1.4.1, see Gen7 Board v1.4.

Crystal Clear action run.png
Generation 7 Electronics Board

Release status: working

Gen7 Board 1.4.1.jpeg
Description
Generation 7 Electronics
License
Author
Contributors
Based-on
[[]]
Categories
CAD Models
External Link
(none)


How to get it

Preview of the layout.
Isolation milled PCB.
Etched PCB.

All these shops support Gen7 development:

They have PCBs, components and connector kits available. And thank you to these for supporting Generation 7 Electronics development.

PCBs

As Gen7 is designed to be manufactured on a RepRap, you can make PCBs yourself, of course. How to do this on a RepRap or a general milling machine is described on the Gen7 main page. You'll find links to release documents, Gerbers, PDFs and such on the main Gen7 page, too.

Yet another way is to purchase from one of the many houses specialized in manufacturing prototype PCBs. Gen7 is single sided, so this won't cost a fortune. If you want to sell excess copies, ask Traumflug for a commercial license.

Components

If you want to assemble the collection yourself, see the Parts Lists section.

Parts Lists

To assemble or verify these lists, open the layout with gEDA/PCB and export a "BOM". This will give you a list of all required components.

Special considerations:

  • The Pololu Stepper Drivers want two single rows of 8 pin female connectors soldered into the board, so get these.
  • The Pololu Stepper Drivers come with their male headers, so there's no need to purchase them separately.
  • Don't forget enough (8-9) jumpers for the jumper headers.
  • Resistors with 0.25 W are on the safe side, even if the footprint name reads "0.125".
  • The Pololus can be operated with up to 35 V, so you may want like-rated electrolytic capacitors.
  • You may want to add the cable side of the connectors, their crimp pins and some wire.

Electronic Components

This list is ordered to match the order of assembly.

Name Count Designations Remarks
0.6 mm Wire 50 cm for the wire bridges on single sided PCBs
Resistor 10 Ohms 2 R11, R12
Resistor 560 Ohms 2 R14, R22
Resistor 1 kOhms 6 R2, R6, R8, R10, R16, R18
Resistor 4.7 kOhms 2 RT1, RT2
Resistor 10 kOhms 1 R30
Diode 1N4004 2 D1, D2
Coil 100 uH 1 L1
Crystal 16 MHz or 20 MHz 1 U6
Reset Switch 1 RESET
Ceramic Capacitor 0.1 uF 12 C5, C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19
LED 3 mm Green 3 LED2, LED5, +5V
LED 3 mm Yellow 1 Standby
Ceramic Capacitor 22 pF 2 C3, C4
Electrolytic Capacitor 10 uF 2 CT1, CT2
Electrolytic Capacitor 100 uF 4 C1, C2, C6, C7
Jumper Header 2 Pin Pairs 4 pair J2/J3, J5/J6, J8/J9, J11/J12 cut them into appropriate pieces
Jumper Header 2 Pin 2 J13, J14 cut them into appropriate pieces
Jumper for the two above 9
ICSP Header 1 CONN6 alternatively, assemble this out of the remainings of the Jumper 2 Pin Headers
Pololu Header 8 or 4 U2, U3, U4, U5 cut them to appropriate length if needed, you want 8x 8 pins
Socket for the ATmega 1 U1
ATmega 1284P-PU 1
Alternative: ATmega 644-20PU (or 644P-20PU) 1
MOSFET IRFZ 44N 1 Q1
MOSFET IRLB 8743 1 Q2

Connectors

Name Count Designations Remarks
Molex KK100 2 Pin Header 2 TEMP_EXT, TEMP_BED
Cable Connector for the above 2
Crimp Contact for the above 4
Molex KK100 3 Pin Header 3 X_MIN, Y_MIN, Z_MIN Reichelt are tested to be fully compatible with Molex
Cable Connector for the above 3
Crimp Contact for the above 9 same as for TEMP_EXT, TEMP_BED above
Molex KK100 4 Pin Header 4 X_MOT, Y_MOT, Z_MOT, E_MOT
Cable Connector for the above 4
Crimp Contact for the above 16
Molex KK100 6 Pin Header 1 SERIAL alternatively, use the same as for Jumper 2 Pin
Optional: Cable Header for the above 1 only needed if you intend to solder your own USB-to-TTL cable
Optional: Crimp Contact for the above 6 only needed if you intend to solder your own USB-to-TTL cable
Heater Header Molex 26-48-1045 (2 Pin) 2 HEATER_EXT, HEATER_BED
Cable Connector for the above 2
Crimp Contact for the above 4
Alternative to Heater Header: 2 Pin Screw Terminal 2 HEATER_EXT, HEATER_BED
Disk Power Header 2 CONN2, CONN3 also see DIY 4 pin molex connector
ATX24 Power Connector 1 CONN1 Molex Mini-Fit 44206-0007. Also known as VAL-U-LOK (20 or 24 Pins).
Heatsink for the Pololus 4
Heatsink Glue 1 For the Pololu's heatsinks, cut in appropriate pieces. Loctite(-like) screw locking glue works well, too.

Miscellaneous

Generation 7 Electronics uses a TTL header for serial communications to the host. Even on PCs with a serial port you need an appropriate USB to TTL cable:

USB to TTL Cable DigiKey Mouser Adafruit Industries MAKE Store MakerBot Industries Watterott

An alternative to the USB to TTL cable is the same electronics in form of a small breakout board:

USB to TTL Breakout Board Watterott Sparkfun
Cable for the above Watterott

Another alternative is the E'go USB-TTL adapter, see instructions and limitations below.

Last not least, you need four stepper drivers, of course:

Pololu stepper driver boards Pololu stepper driver boards
Open Source Alternative StepStick

Assembly Instructions

  • To find out which components to put where, have the layout on your PC screen available.
  • PCBs fabricated with Voronoi paths need more heat, so raise your soldering iron's temperature by about 20 deg Celsius.
  • Start with the flattest parts, usually wire bridges or resistors. This way, components won't fall out when you lay the PCB on it's front for soldering. Then continue with parts of raising height, connectors are usually among the last ones.
  • The parts lists are sorted with that in mind, simply start at the top and assemble towards the bottom.
  • To ease soldering jumper headers and similar components, put a small drop of cyanacrylate glue onto the component side before inserting them. As the PCB is single-sided, this won't hurt the solder point.
  • The coil 100 uH looks just like a resistor. It's a bit thicker and comes with rings brown-black-brown.
  • As 8 pin headers for the Pololus are expensive, many kits come with lower cost 10 pin headers. Cut 2 pins off of each.
  • While soldering a pair of these headers, insert a Pololu to ensure good alignment.

Caution: Don't solder MOSFETs or insert the ATmega until after the Power Supply Checks.

Assembly in Pictures

Click on the pictures to view them larger.

As you can see, neither the MOSFETs nor the ATmega are inserted yet. We'll come back to that later.

Also, there are two rows of holes above and below the ATmega which are left empty. These are for the extension board header. Soldering this header makes only sense if you want to connect an extension board, so do this as part of the extension board assembly.

Setup

These steps show how to get from a soldered mainboard to a working one.

Possible Power Sources

Generation 7 Electronics has two options to satisfy you machine's power needs.

Gen7 v1.4 Power Options.jpeg

Option 1

This is the recommended one. Take your PC power supply, plug in the ATX24, as well as both Disk Power connectors and be done. This will supply the electronics with everything needed, no modification of the supply required.

One point to take care of is, PC PSUs have two or three strings with several Disk Power connectors on each string. Each of the strings can supply about 10 Ampéres only, so make sure you plug in only one connector of each string into Gen7's headers if you use a heated bed or some other high-current device.

In this scenario, the ATmega can run and talk to the host with the PSU turned "off" (in Standby mode). So, don't be surprised if you start working with your Mendel and the PSU is still quiet. Each G-code command requiring more juice will turn the PSU on, and some time after the last command off again.

Note: the ATX24 header is backwards compatible to the older ATX20 connector, so if you have a PSU with an ATX20 connector, plug in that. There's only one position where it fits (without pushing very hard) and there is no drawback in using an older supply:

Gen7 ATX20 in ATX24.jpeg

Option 2

This is for people with a non-PC power supply. Make connectors feeding 5 V to the upper Disk Power header, as well as 12 V into both of them. The ATX24 is left empty.

No standby feature here, ATmega, Pololus, motors and heaters are supplied all the time.

Power Source Selection

After choosing an option for the power supply, you have to tell the board where to get 5 V from.

Gen7 v1.4 Power Selection.jpeg

In the lower right corner of the board you see two jumper headers.

  • ATX20/ATX24: recommended for option 1.
  • Disk Power: recommended for option 2.

You may jumper one, and only one of them.

Power Supply Checks

With the 5 V selection jumper and all power connectors inserted, you can take a few measurements to make sure your brand new ATmega won't blow up when inserted.

Gen7 v1.4 Power Checks.jpeg
  • Red: power supply inserted according to any option. In case of an Option 1, PSU not yet activated.
  • Blue: as above, with PSU activated or power supply according to Option 2.

Note: in the picture, no 5 V selection jumper is inserted, but you need the right one here.

Checks:

  1. No smoke? Great.
  2. The yellow LED in the lower right corner is lighted? Even better.
  3. If you've chosen Option 1, short the wire bridge with the top right pin of the ATmega socket like the dashed green line in the picture. This should activate the power supply.
  4. At the same time, the green LED in the lower right corner should go on as well.
  5. If you have a voltage meter, measure the voltages shown in the picture. Dots mean wire bridges, arrows mean pins.
  6. Also, check each of the pins of the ATmega socket, none of them should have more than 0.5 volts, except those marked to have 5 V. On the ATmega socket, this is pin 9, 10, 21, 30, 39 and 40 (counter-clockwise, starting at the lower left).
  7. Check the pins in the lower row of the Pololus. Neither of the unmarked ones should exceed 0.5 volts as well.

With everything within the limits, you can pretty safely assume to not blow up the expensive parts when inserting them.

Insert Semiconductors

Now, with some safety tests done, it's a good time to insert semiconductors.

Gen7 v1.4.1 Semiconductors.jpeg
  • Disconnect the power supply entirely.
  • Both MOSFETs have the same housing, still they're different types. Make sure the one marked IRFZ 44N is closer to the Pololu headers, the one marked IRLB 8743 goes closer to the board's border.
  • Solder both MOSFETs with the flat side towards the center of the board into their place. Use sufficient solder, as high currents are flowing here.
  • Insert the ATmega into it's socket. Like every integrated circuit with such a housing, there's a groove on one of the ends of the black box. This groove shows towards the MOSFET side of the board, the non-grooved end is close to the ATX24 header. Done right, you can read the text on the housing from the ATX24 header side correctly.

Prepare your Arduino IDE

  • Download and unpack or install the Arduino IDE. You need v1.0.3 or later. If you insist on v0023 or earlier for some reason, see Gen7 v1.3.1 instructions, but the avrdude coming with these earlier versions can't write to an ATmega1284P.
  • Also install Gen7 Arduino IDE Support.
  • Fire up your Arduino IDE.
  • Under Menu -> Tools -> Board, select your variant of Gen7 board from the six new entries. They differ in processor type and clock speed.
  • Under Menu -> Tools -> Serial Port, select the correct serial/com port.

Bootloader

If you bought your ATmega with one of the Gen7 kits, the bootloader should have already been uploaded. Any other bootloader, like the one used for the Sanguino, RAMPS, Sanguinololu or whatever is also fine.

If you bought an factory fresh ATmega, e.g. from a general electronics supplier, the ATmega will be without bootloader. Bootloader binaries come with the Gen7 Arduino IDE Support package, so upload instructions can also be found there.

If you're in doubt, just continue with the setup. A missing bootloader will result in a timeout error when attempting to upload a firmware.

Serial Connection

It's recommended to either use a USB to TTL cable or USB to TTL breakout board. Custom solutions and different converters are possible, see #Customisations & Others.

Here's how you connect them, GND is always the pin to the left:

Gen7 Serial Connection With USB2TTL Breakout Board.jpeg Gen7 Serial Connection With USB2TTL Cable.jpeg

Simply plug the connector in, connect USB to your PC and a new serial port should show up in your PC's operating system.

Your First Firmware Upload

After all this assembly, and with this complex firmware thing ahead, wouldn't it be a good idea to upload some test firmware to test whether basic things work? Of course!

You can find such a test firmware in Gen7's Github repository.

Note: ATmegas coming with kits from Traumflug or paoparts.com have this test already uploaded, so you can see your ATmega is working, even before connecting the serial line. It doesn't hurt to upload SetupTest a second time, though, just to get used to the firmware upload process.

Here we go:

  1. Download that file SetupText.ino. If it opens in the browser window, do a "Save as...".
  2. Prepare your Gen7 by inserting power plugs, the serial converter, the USB plug of that converter and so on.
  3. Start your Arduino IDE.
  4. With the IDE, open SetupTest.ino. You'll be asked if you want to create a folder of the same name, click "Yes".
  5. Make sure the right serial port and the right type of board is still selected in the Test menu.
  6. Hit the "Upload" button (the second from the right).

After a second or two, you should see something like

Binary sketch size: 2142 bytes (of a 63488 byte maximum)

in the black text field, and after another second of blinking on the serial connector, it should say "Done uploading." right above that text field.

Gen7 v1.3 SetupTest.png

Now you can safely assume uploading a firmware works. The test firmware has a few more features:

  1. If you open the IDE's serial monitor and listen at 9600 baud, you can read what the ATmega is doing. If you can read clear text, the serial line is working.
  2. Three or four seconds after the upload, the power supply should spring to life, blink the LED of HEATER1 a few times and turn the PSU off again. To see the LED blinking, 12V for the heaters has to be connected.
  3. The same happens after each hit of the Reset button on the board, independently from the IDE or the serial connection.

Troubleshooting Firmware Upload

Some USB-TTL adapters (the recommended ones do) don't trigger the auto-reset. Typical symptoms are messages like:

avrdude: stk500v2_ReceiveMessage(): timeout

This doesn't stop you from having fun, it's more an inconvenience. You have to reset manually for each upload:

  • Click the "Verify" button in Arduino IDE's toolbar to get an idea how long it takes until the "Binary sketch size"-message appears.
  • The trick is now to press and release the reset button on the board just before this message appears. After a reset, the bootloader waits 3 seconds for an incoming firmware upload and the Arduino IDE attempts the upload just after showing this message. You get the idea.
  • On failed attempts, Arduino IDE usually can't stop the avrdude process. On Linux or Mac OS X, type a killall avrdude in a terminal to help out. On Windows, use the task manager to kill the avrdude process.

Other troubleshooting:

  • Sometimes, the driver of the USB-TTL adapter simply messes up. If nothing works as expected, it's a good idea to unplug the adapter from the PC and insert it again after a few seconds. Unplugging the USB side from the PC is different from unplugging the serial side from the Gen7.
  • USB hubs between the adapter and the PC can mess up, too. Same procedure to fix it.

Microstepping

Last not least, you probably want to set up microstepping to something other than the default. The default is halfstepping. Smaller microsteps make the motors run smoother, but also raise the computing load for the ATmega. The smallest steps possible are 1/16 microstepping.

Feel free to select different settings for each of the motors, e.g. 1/8 microstepping for threaded rod axes (Z) and 1/16 microstepping for belt driven axes (X, Y).

Selecting microstepping is done with the jumpers in front of each of the Pololus, they refer to MS2 and MS3. Allegro documents also know about MS1, which is hard wired to High in Gen7. Plugging a jumper sets High, while leaving the header free sets Low. Here's a detail picture of a Gen7, with MS2 set to High, MS3 set to Low:

Gen7 Microstepping Jumpers.jpeg

The following table shows what you get with each combination:

MS2 MS3 Microstep Resolution
Open Open Half step
Open Plugged Not allowed!
Plugged Open Eighth step
Plugged Plugged Sixteenth step

You can change microstepping at any time, even while a motor is running. This will obviously change the resolution so only useful while setting up to see how the drivers and motors work together.

Firmware

In principle, you can run any of the ATmega compatible RepRap Firmwares on this board. Adjust the I/O pin layout, adjust compile time options for no secondary board/no RS485 and proceed. Just like Gen2, RAMPS, Sanguinololu or similar electronics.

There's also no Gen7-specific choice for the slicer or the G-code sending application. Use what you prefer or what owners of other electronics use.

Teacup Firmware

Teacup's Simple Installation instructions show nicely how to do this. Some details for Gen7:

  • Have your Arduino IDE prepared for Gen7, as explained above.
  • Use the config.gen7-v1.4.h and ThermistorTable.double.h you find there. - eg, duplicate config.gen7-v1.4.h file then rename to config.h

With config.h left untouched, at least something should move. This is fine for first tests, but not sufficient to have everything right for your machine. Edit your config.h further to match your machine and your setup. Config.h has a lot of comments inside the file, helping on the details. For example, STEPS_PER_MM_X should be set according to your choice of microstepping. Also, default maximum speeds are very slow, you likely want to raise MAXIMUM_FEEDRATE_....

Reprap software is in constant flux, so try to use recent software both for host software and slicing, or you may run into compatibility problems. For example, the original reprap host software may not report the temperature correctly (if at all). Using Pronterface for host software solved this problem for one user. Using Slic3r rather than Skeinforge solved another problem where the Teacup firmware would be stuck forever 'waiting for target temp'.

Repetier Firmware

Tested on 644 @ 20Mhz. See this post for sample config and pins files. Should be integrated into the default firmware soon.

Here is the github download page, and documentation is on the github wiki

The pin layout has changed between v1.3.1 and v1.4, so you have to adjust this. For hints, see section Other Configurations.

FiveD Firmware

Earlier versions of Gen7 had a working configuration for FiveD. As the pin layout has changed since then, you have to adjust this. For hints, see section Other Configurations.

Sprinter, Marlin

It took really long until Sprinter and Marlin started to be compatible with non-16-MHz electronics. As of this writing, Marlin as well as Sprinter Experimental should generally work.

The pin layout has changed between v1.3.1 and v1.4, so you may have to adjust this on Sprinter. For hints, see section Other Configurations.

Experimented with Marlin, Sprinter too?: to avoid continuous brown out resets we need to replace 100µH L1 coil by a 10µH one as in Gen7 1.5.
English Forum thread: http://forums.reprap.org/read.php?181,175191,175191
German Forum thread: http://forums.reprap.org/read.php?247,170384,171365

Alternatively, 100µH L1 coil can be replaced by a strap, with a 100µF cap added in parallel with C19.

Other Configurations

The following should help to configure other firmwares.

Pinout

                 +--------\/--------+                   
INT8 (D 0) PB0  1|> Xmin  Temp_Bed {|40 PA0 (AI 0 / D31)
INT1 (D 1) PB1  2|> Ymin  Temp_Ext {|39 PA1 (AI 1 / D30)
INT2 (D 2) PB2  3|> Zmin     Xstep >|38 PA2 (AI 2 / D29)
 PWM (D 3) PB3  4|< Heat_Bed Xdir  >|37 PA3 (AI 3 / D28)
 PWM (D 4) PB4  5|< Heat_Ext Ystep >|36 PA4 (AI 4 / D27)
MOSI (D 5) PB5  6|           Ydir  >|35 PA5 (AI 5 / D26)
MIS0 (D 6) PB6  7|           MotEn >|34 PA6 (AI 6 / D25)
 SCK (D 7) PB7  8|                  |33 PA7 (AI 7 / D24)
           RST  9|                  |32 AREF            
           VCC 10|                  |31 GND            
           GND 11|                  |30 AVCC            
         XTAL2 12|           Zstep >|29 PC7 (D 23)      
         XTAL1 13|           Zdir  >|28 PC6 (D 22)      
RX0 (D 8)  PD0 14|                  |27 PC5 (D 21) TDI  
TX0 (D 9)  PD1 15|                  |26 PC4 (D 20) TDO  
RX1 (D 10) PD2 16|           Estep >|25 PC3 (D 19) TMS  
TX1 (D 11) PD3 17|           Edir  >|24 PC2 (D 18) TCK  
PWM (D 12) PD4 18|                  |23 PC1 (D 17) SDA  
PWM (D 13) PD5 19|                  |22 PC0 (D 16) SCL  
PWM (D 14) PD6 20|           PwrEn >|21 PD7 (D 15) PWM  
                 +------------------+                   
Function ATmega Name Teacup FiveD Direction in firmware
X Step PA2 DIO29 29 Digital Output
X Direction PA3 DIO28 28 Digital Output
X Min PB0 DIO0 0 Digital Input
Y Step PA4 DIO27 27 Digital Output
Y Direction PA5 DIO26 26 Digital Output
Y Min PB1 DIO1 1 Digital Input
Z Step PC7 DIO23 23 Digital Output
Z Direction PC6 DIO22 22 Digital Output
Z Min PB2 DIO2 2 Digital Input
Extruder Step PC3 DIO19 19 Digital Output
Extruder Direction PC2 DIO18 18 Digital Output
Power Enable PD7 DIO15 15 Open Drain Output, active low
Motors Enable PA6 DIO25 25 Digital Output
Heater 1 PB4 DIO4 4 Digital Output
Heater 2 PB3 DIO3 3 Digital Output
Temp 1 PA0 AIO0 0 Analog Input
Temp 2 PA1 AIO1 1 Analog Input

Changes from v1.3:

  • Max endstops are gone.
  • Min endstops are now PB0 / PB1 / PB2.
  • Order of steppers is inverted (X Y Z E instead of E Z Y X).
  • All pins on the analog port one to the left (pin number - 1).

This commit to Teacup Firmware should also help for upgrading other firmwares.

Connecting Devices

At this point, you should have the firmware uploading process in place. To simplify the descriptions here, usage of the Teacup firmware is assumed.

You could also have a look at http://wiki.openhardware.co.za/index.php/Wire_a_RepRap_3D_Printer_to_a_Gen7_Electronics_Board for some graphical information

Opto Endstops

Start with this, as it's simple and some firmwares depend on a working endstop to move the stepper motors. Gen7 accepts all endstops delivering a 5 V signal, not only Gen7 Endstops, as long as you get the wiring right.

  1. Make a 3-wire cable, long enough to reach from the Gen7 board to the X endstop place and solder a connector onto one end.
  2. Plug this into the Gen7 at the X endstop connector. This is the 3-pin connector closest to the MOSFETs.
  3. Connect to your Teacup and send a M119. This will turn on your power supply and tell the current status of the endstops.
  4. While the power supply is running, use a voltage meter to find the 5 V wire. Measure against GND, the center wire.
  5. The third wire is the signal.
  6. Make the other connector according to the requirements of your endstop.
  7. Plug both connectors in and test the endstop by sending M119 repeatedly while interrupting the light barrier with a piece of cardboard or not.
  8. If M119 reports "1" while there is no cardboard in the barrier, you have to invert the endstop signal. In Teacup, this is done by toggling the comment in the line containing X_INVERT_MIN in config.h. After each change, you have to re-upload the firmware.
  9. You're done for the X endstop, repeat for Y and Z.
Gen7 v1.4 Endstop Connection.jpeg

The picture shows a Gen7 Endstop connected to a Gen7 Board. Holding the endstop this way, the left pin is the signal, the center pin is GND and the right pin is 5 V on both connectors. The screw driver is there for fixing the picture arrangement, only.

Troubleshooting Opto Endstops

If your firmware doesn't report what you expect, you can measure the signal with a voltage meter. If the power supply is turned on, the signal pin on the connector as well as the corresponding ATmega pin should change between 0 V and 5 V if you put something into the light barrier or not. If this is the case, your firmware is at fault, typically due to a misconfigured pin mapping in config.h/configure.h/configuration.h.

Mechanical Endstops

They're an alternative to Opto Endstops. It's nicely described on the Mechanical Endstop page on how to wire them. The easiest way is to use ATmegas internal pullup resistors.

If neccessary, troubleshoot them the same way as Opto Endstops (by measuring signal voltage).

Stepper Drivers

Not strictly a device on it's own, Pololus/StepSticks require some attention when inserting them, too. Inserting them the wrong way and powering up usually results in the death of these tiny beasts.

One Pololu inserted, another one on its back.

Different flavours of Pololu-compatible stepper drivers have different layouts on the PCB, so orientation by the components soldered onto it is tricky. Especially, DRV8825-based ones are, compared to the A4983/A4988 based ones, known to have the trimpot on the opposite side.

All of them have pin names printed onto them, though, so you can use these for orientation. As you can see in the picture, the row with MS1, MS2, MS3 in it goes into the row towards the ATmega, the row with 1A, 1B, 2A, 2B in it points towards the motor header. Same orientation for all four stepper drivers.

Stepper Motors

Stepper Wiring

First of all, the colours of your motor's wires are unreliable. Manufacturers sometimes change them without notice.

For finding out which pairs of wires are connected to each of the two coils in your motor, there's a nice description in the Stepper Wiring page. For the more rare cases, like 6- or 8-wire motors, look up and down on that page.

Your motor connector has four pins. The left two of these pins shall be connected to the wires of one coil, the other two to the wires of the other coil. It doesn't matter which of the two wires of one coil goes to which pin; at worst your motor will run the wrong direction. It also doesn't matter which coil is on which pair of pins.

It's a good idea to solder the crimp pins to the wires. A reliable contact is crucial.

That done, motors should start moving when you send movement commands to the firmware.

Double Steppers

Many RepRap printer designs use two stepper motors to drive one axis. For example the Z axis on the Prusa Mendel. In this case, both motors are connected to the same stepper driver.

In principle, two motors can be connected in a parallel or in a serial fashion. Both works. As we need more torque than high RPM speeds on this axis, a serial connection is the better choice. It goes like this:

stepper driver pin 1 ---
    --- motor 1 coil 1 in --- motor 1 coil 1 out ---
    --- motor 2 coil 1 in --- motor 2 coil 1 out ---
--- stepper driver pin 2

Repeat the same for the other coils and pin 3/4 of the stepper driver.

When moving such a setup for the first time, try with small moves, first. There's a chance the motors rotate the opposite direction. In this case, swap the wires of one coil on one of the motors.

Adjusting the Pololus/StepSticks

With the motor currents required to move a RepRap printer, Pololus/StepSticks usually require a heatsink on the chip, sometimes additionally a fan directed to them. Gladly, they have a pretty reliable thermal protection built in, so overloading them doesn't cause permanent harm.

The Sanguinololu wiki page has a nice writeup on how to adjust stepper drivers by measuring voltages. Adjusting by reference voltage (Vref) misses an important point, though: adjusting current means adjusting torque and the torque requirement differs from printer to printer.

Here's another way:

  1. Work on only one axis at a time.
  2. Make sure the axis can be moved by hand easily with motors powered off. No kind of current helps if your axis blocks mechanically.
  3. Turn the trimpot full counter-clockwise.
  4. Turn the trimpot clockwise 1/8 turn.
  5. Send commands to your firmware to make this motor move. Slow speeds (G1 F50) first, then faster.
  6. If the motor just beeps, but shows no movement, or if you get missing steps, turn the trimpot clockwise another 1/8 turn. Things should get better.
  7. When you've reached a position where everything moves without step losses, you can turn another 1/8 clockwise as safety margin.
  8. That's it, repeat for each of the other axes.

Troubleshooting Stepper Motors

Note: before disconnecting a motor or a stepper driver, always power off at least the 12 V power supply. On a Gen7 powered via the ATX20/24 connector and running Teacup firmware, this is done by pressing the reset button.

  • If something doesn't work on one axis, but works fine on another, change motors or stepper drivers with a working axis and try again. This helps finding defective parts. All axes are electronically the same, so you can swap stuff to your heart's content.
  • If a motor moves in one direction only, either the endstop part of your firmware's configuration doesn't match hardware or the DIR pin doesn't get a signal. The DIR pin is the rightmost in the lower row of the stepper driver header and can be measured with a voltage meter. It should change between 0 V and 5 V when changing direction.
  • If a stepper moves the wrong direction, you can change the direction by swapping both pins of one motor coil in the connector. For example, ABCD becomes ABDC. Another way is to invert the direction in your firmware configuration, of course. Both methods work equally well.
  • If your motor just hums or beeps, there are several possible reasons:
    • Mechanical overload. To avoid that for sure, remove the belt from the motor's pulley.
    • Commanded speed too high. Try with a lower feedrate, like F50 (or 0.5 mm/s in Pronterface).
    • Your motor is miswired. Check #Stepper Wiring again.
  • If there is no sign of movement at all, not even humming or beeping, check wether the ENABLE pin goes low when attempting a movement. 0 V = steppers enabled, 5 V = steppers disabled. It's the leftmost pin in the lower row of the stepper driver header.
  • If a motor starts to move, but has repeated dropouts or starts stuttering, the stepper driver chip apparently overheats and runs into it's thermal protection. Add a heatsink, attach a fan or reduce motor current, depending on your situation.
  • If your stepper drivers and/or motors warm up while there is no movement ongoing: that's normal. Stepper motors suck the most energy while powered up, but at stillstand.

Extruder, Heated Bed

An extruder and a heated bed are pretty much the same from the electronics point of view. Both have a temperature sensor as well as a heating element, which are -- in the electronics view -- independent from each other. So please read on in the following two sections.

Thermistor

This one is simple, too. The thermistor has only two wires and it doesn't matter which way you connect them. As of Gen7 v1.4 the thermistor runs on standby power, so you can see the current temperature at any time.

Note: Make sure there is no electrical connection between thermistor and heater wires. Heaters typically run at 12 V, and remain at that potential even when turned off, which would blow the ATmega input pin. Usually, neither wire of the thermistor nor one of the heater wires are connected to the metal housing of an extruder, so you have double safety.

It doesn't matter which thermistor connector you use for what, as long as it matches your firmware configuration. The circuitry for both thermistors is the same, just the label in the PCB layout and the ATmega pin is different. So, if your extruder temperature is reported as bed temperature, you can solve this by either swapping the pin mapping in your firmware configuration, or by swapping the connectors physically.

To test the thermistor, connect it. Then send M105 repeatedly while warming up the thing with your fingers. Likely it isn't exactly accurate at room temperature, but it should react to the warming.

Gen7 v1.4 Thermistor Connection.jpeg

Note: In the picture it might look like both wires of the thermistor touch each other. Be assured, they don't. :-)

The white thermistor wire insulation shown in the picture is PTFE tape plumbers use for sealing threaded hose connections. It's very thin. Insulate each wire seperately, then both together. If you can find shrink tube thin enough to fit between those two wires or you've bought a hotend which already came with an insulated thermistor, that's fine as well.

Note: Gen7 can do quite accurate temperature measurements, if you make your own temperature table. On how to do this and on why this might be not neccessary, see the long comment in Teacup's ThermistorTable.double.h.

Troubleshooting the Thermistor

  • If the temperature readout is zero, you likely have configured the wrong pin in your firmware or a broken thermistor wiring.
  • Unplug the thermistor and measure it's resistance at the connector. At room temperature (25 °C), it should have about it's nominal value (10 kΩ / 100 kΩ / 200 kΩ).
  • A short in the thermistor wiring results in a very high temperature readout, like 800 °C.

Heaters

This one is simple, too. The heater is a resistor without polarity, so connect both wires to the two connector pins. To get it working, you also have to have the corresponding MOSFET soldered in.

Note: If you start heating for the first time, make sure the corresponding temperature readout raises, too. In case you map your heater to the wrong thermistor, the firmware won't notice the temperature raise and won't stop heating when the desired temperature is reached, eventually leading to destruction. To stop a run-away heater, press the reset button.

Note: Especially heated beds run with a lot of current, so make sure your connectors are clean. Dirt here means a poor electrical connection, heating up, eventually melting the connector. Even in dry rooms, contacts can oxidize. Battery terminal grease was used successfully to prevent and even revert oxidisation.

Testing the heater:

  • Send M104 S50 to command the extruder heater to reach 50 °C.
  • Watch the corresponding MOSFET's LED lighting up. It's brightness gives a hint to the current PWM value used.
  • Send M105 repeatedly to watch the temperature raising.
  • As the temperature reaches about 50 °C, the LED should go darker and the temperature raise should stop.
  • Send M104 S0 to stop the heater. The LED should go dim or off, the extruder should cool down.
  • Do the same for the heated bed, if you have one. Heated bed temperature is set with M140.
Gen7 v1.4 Heater Connection.jpeg

Troubleshooting a Heater

  • Does your temperature readout work, i.e. does it initially read something like room temperature instead of some unreasonable value? Most firmwares have a protection built in to heat only if they have reasonable confidence temperature measurement is working.
  • Can you measure 12 V on the lower connector pin when the power supply is turned on? If not, the lower Molex 4-pin connector delivers no juice on the 12 V rail.
  • Does the LED light up, at least dimly? If not, the MOSFET is either blown, gets no signal from the ATmega or there is no 12 V supply.
  • An entirely disconnected signal pin, i.e. due to a firmware misconfiguration, usually results in a dimly lighted LED, too. MOSFETs are sensitive enough to turn on partly by picking up random electromagnetic noise.
  • The signal can be measured with a voltage meter on the 10 Ω resistor right next to the MOSFET. The higher the PWM value, the closer the (average) signal should be to 5 V.

Customisations & Others

This part describes possible modifcations for advanced users only.

Non-12-V-Voltages

While it's very practical to use 12 volts as they come out of the power supply, Gen7 is prepared for other voltages, too. Even better, you can supply different voltages for motors and heaters.

Possible usages:

  • 12 V for the heaters, 24  for the motors. This will still allow to use standard Reprap heating elements for the extruder and heated bed, while the motors can now run faster. Motor supply voltage is only limited by the Pololus and can go up to 35 volts.
  • 12 V for the motors, 5 V for the heaters. This whould wear your power supply more evenly.
  • 12 V for the motors, 3.3 V for something like EDM or inductive heated nozzles. Remember, the IRFZ44N can switch pretty fast, and the ATmega has frequency/PWM generators on board.
  • ...

On where to supply what, see the picture above. Simply rewire the disk power connectors to your needs and make sure all power sources contact at least one GND pin, to give them a common ground.

The 5 volts on the upper disk power connector is not needed if you use the ATX20/24 connector, but don't supply there a different voltage, or a voltage from a different power supply, either.

Hooking up a Fan

Using a SevenSwitch, you can connect a fan/blower, too. Either by connecting it to two of the extension board pins (one for signal, one for GND), or by fetching these two pins from the ICSP header. Paoparts did the latter and documented it here (french with pictures and code snippets): Ventilateur pour l’extrudeur, commandé par la GEN7 avec Teacup.

On how to define fans and other devices in Teacup firmware, see there.

Serial Connection

If you want a custom solution, you can create one, of course. Just connecting an RS-232 port to the serial connector won't work, however, even if you ignored the different voltage levels. ATmega's serial signal is inverted (Logical 0 = 5V, Logical 1 = 0V). Here's the serial connector's pinout:

Gen7 Serial Pinout.png

 

1 2 3 4 5 6
GND CTS (set to GND) (+5 Volts) RxD TxD Reset

RxD is ATmega's pin 14 (data to the chip); TxD is ATmega's pin 15 (data from the chip).

Pin 3 has 5 V on most USB-TTL adapters, but is unconnected on the board. Feeding in 5 V here would conflict with the (slightly different) 5 V from the ATX power supply.

Pin 6 is usually connected to the serial line's DTR. This triggers a reset each time you start a connection to the ATmega and is very convenient when uploading firmware - no pressing of the reset button needed, then. Arduinos have this hardwired. If you keep pin 6 free, press the reset button each time your IDE (avrdude) attempts an upload.

Using an E'go USB-TTL adapter

This converter is cheap, uses the Silicon Labs CP2102 chip install drivers from the link, and basically works:

E'go USB-TTL Converter on Gen7.jpeg

 

Gen7 GND (Pin 1) +5 Volts (Pin 3) RxD (Pin 4) TxD (Pin 5)
USB-TTL adapter GND (Pin 5) +5 Volts (Pin 6) TxD (Pin 3) RxD (Pin 4)

Important here is to not connect both Reset pins.

What you can't get is auto-reset. So you have to press the reset button when uploading a firmware, shortly before the 'Binary sketch size is...' message appears.

Note: for advanced hackers it's possible to add auto reset functionality to any adapter using this chipset by connecting the DTR "pin" of the chip itself directly to the RST pin on the adapter.

Suppliers of this adapter

Fortified Heater Traces

Gen7Board 1.4 soldered traces.jpg

There is evidence that adding solder to a PCB trace can lower its resistance by as much as half and increase its electrical and thermal conductance. Both are beneficial in the areas on the board where the highest current flows. Since there is no solder mask in the isolation milled version of this board, it is relatively easy to add additional solder to the 12 volt and ground traces that serve the extruder nozzle and optional heated build platform (HBP).

There are disadvantages to adding large amounts of solder.

First, this cannot be done easily without a powerful soldering station with 50 watts or more. A disposable 15 watt soldering pencil would take an extremely long time to melt this much solder, if it could at all. The wide voronoi traces radiate the heat outwards rapidly making a powerful heat source more than a luxury.

Second, lingering heat on components is a bad practice, especially at the high temperatures required by RoHS lead-free solders. The bulk of the solder addition process should be done in the absence of the LEDs, resistors, diodes, MOSFETs and plastic header connectors. Once the solder is added up to--yet not over--the holes drilled for those components, they can be carefully added. Here again, a low powered heat source may have all of its energy dissipated before it can bring the junction up to temperature. (note the MOSFETs have not yet been added to the board pictured here)

The advantages are a cooler board, a cooler MOSFET and heater pins, and faster nozzle and HBP warm-ups. Yes, solder isn’t free, but if it can increase the reliability and performance of the heater section of your board then it’s probably better on the traces then on a spool in the workbench drawer.