Gen7 Board 1.2

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
Crystal Clear action run.png
Generation 7 Electronics Board

Release status: working

Gen7 Board 1.1 Layout.png
Description
Generation 7 Electronics
License
GPL v2
Author
Contributors
Based-on
[[]]
Categories
CAD Models
External Link
(none)


How to get it

PCBs

Get Gen7 Board PCBs from Traumflug.

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 want one "Gen7Board" PCB and up to six "Endstop" PCBs.

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.

Components

Get Gen7 Components Kits and Gen7 Connectors Kits from Traumflug.

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 seperately.
  • 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

Name Count Designations Remarks
Resistor 180 Ohms 2 R16, R18
Resistor 560 Ohms 3 R14, R22, R23
Resistor 1 kOhms 7 R2, R6, R8, R10, R11, R12, R13
Resistor 4.7 kOhms 2 RT1, RT2
Resistor 10 kOhms 3 R1, R3, R30
Ceramic Capacitor 22 pF 2 C3, C4
Ceramic Capacitor 0.1 uF 12 C5, C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19
Electrolytic Capacitor 10 uF 2 CT1, CT2
Electrolytic Capacitor 100 uF 3 C1, C2, C6
Coil 100 uH 1 L1
Diode 1N4004 3 D1, D2, D3
LED 3 mm Green 5 LED2, LED3, LED4, LED5, LED6
Crystal 16 MHz or 20 MHz 1 U6
Reset Switch 1 RESET
Socket for the ATmega 1 U1
ATmega 644 (or 644P) 1
MOSFET IRFZ 44N 3 Q1, Q2, Q3
0.6 mm Wire 50 cm for the wire bridges of single sided PCBs

Connectors

Name Count Designations Remarks
Motor Header Molex 26-48-1045 (4 Pin) 4 X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156 This is the one also used in Gen2 and Gen3 Electronics
Cable Connector for the above 4
Crimp Contact for the above 16
Alternative Motor Header 4 X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156 working, but incompatible alternative to the Molex 26-48-1045
Cable Connector for the above 4
Crimp Contact for the above 16
Jumper Header 2 Pin Pairs 4 pair J2/J3, J5/J6, J8/J9, J11/J12 cut them into appropriate pieces
Jumper Header 2 Pin 3 J13, J14, J15 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
Misc Header 1 MISC cut them to appropriate length
Pololu Header 8 or 4 U2, U3, U4, U5 cut them to appropriate length, you want 8x 8 pins
Disk Power Header 1 CONN2
ATX20 Power Connector 1 CONN1
Molex KK100 3 Pin Header 12 HEATER1, HEATER2, FAN1, TEMP1, TEMP2, I2C, X_MIN, X_MAX, Y_MIN, Y_MAX, Z_MIN, Z_MAX Reichelt are tested to be fully compatible with Molex
Cable Connector for the above 12
Crimp Contact for the above 36
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
Heatsink for the Pololus 4
Cyanacrylate Glue 4 drops for glueing the heatsinks onto the Pololus

Miscellaneous

Generation 7 Electronics uses a TTL header for serial communications to the host. As many modern PCs lack a serial port, these need an appropriate USB to TTL cable:

USB to TTL Cable 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

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.
  • 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.

Gen7 Mainboard Front.jpeg Gen7 Mainboard Back.jpeg

The pictures show the soldered mainboard, semiconductors not yet inserted. It's a good idea to check supplied voltages before inserting them.

  • The coil 100 uH looks just like a resistor. It's a bit thicker and comes with rings brown-black-brown.
  • Start with the 10 wire bridges, then follow the table in the parts list.
  • 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.

Setup

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

Power Source Selection

Gen7 Board PSU Selection.jpeg

In the lower right corner of the board you see three jumper headers. You may jumper one, and only one of them.

  • Serial: feed 5 Volts from the serial connector. USB2TTL converter cables provide this pin. The ATmega as well as the Pololus are supplied all the time, then. You can leave the ATX20 disconnected.
  • ATX20: power 5 Volts through the big, 20 pin PSU connector. The ATmega will be supplied all the time, while other parts are supplied only on demand. This allows to turn the PSU on and off with G-Code commands. For example, Teacup firmware fires up the PSU on incoming heater or movement commands and turns it off automatically 30 seconds after the last movement or when all heaters are done. Note: You need *both* ATX and Molex 4-pin connections to your PSU, as the board does not take 12V from the ATX connector.
  • Molex 4 Pin: supply 5 Volts through the Molex connector in the upper left corner of the board. The ATmega as well as the Pololus are supplied all the time, then. You can leave the ATX20 disconnected.

Power Supply Checks

If you want to do some extra checks to confirm you soldered correctly before inserting semiconductors, insert the power source selection jumper as explained above and hook up your type of power supply.

No smoke? Great, then take a few measurements:

Gen7 Board Power Checks.jpeg
  • Red: power supply inserted. In case of an ATX20 PSU, PSU not yet activated.
  • Blue: as above, with ATX20 PSU activated (bridge between pin 14 PWR_ON and GND).
  • Green: as above, with the Molex 4 Pin also inserted.

Even those without a voltage meter can have a look wether and when one or two LEDs light up.

That done, you can solder in the MOSFETs and plug in the Pololus and the ATmega.

Prepare your Arduino IDE

Note: this description is still valid, but dated. The corresponding description for the later Gen7 boards should work as well.

If you fire up your Arduino IDE now, you should be able to select your variant of Gen7 board under Menu -> Tools -> Board. Also you should set the correct com port under Menu -> Tools -> Serial Port.

Bootloader Upload

Note: this section only applies if you have a blank, factory fresh ATmega on your board. Friendly Gen7 vendors will do these steps for you before shipping, so you don't need a programmer.

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.

Serial Connection

It's recommended to either use a USB to TTL cable or USB to TTL breakout board. Custom solutions are possible, see Customisations.

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.

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

Firmware

In principle, you can run any of the 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 or similar electronics.

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.1-v1.3.h and ThermistorTable.double.h you find there.

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_....

FiveD Firmware

FiveD has been run succssfully on Gen7. Snuggles has kindly contributed his sources:

File:FiveD 20100610 for Gen7 v1.2.zip

This should get you started, but don't forget to adjust STEPS_PER_MM to match your mechanics.

To upload the Firmware do the following:

- prepare your arduino as described above

- open FiveD_GCode_Interpreter.pde file

- choose Verify/Compile

- if there is no error press the upload button

Other Configurations

The following should help to configure other firmwares.

Pinout

In bold changes from board v1.0

Sanguino pin bindings
Function ATMega Name Teacup Original firmware Direction in firmware
X Step PC3 DIO19 19 Digital Output
X Direction PC2 DIO18 18 Digital Output
X Min PB7 DIO7 7 Digital Output
X Max PB6 DIO6 6 Digital Output
Y Step PC7 DIO23 23 Digital Output
Y Direction PC6 DIO22 22 Digital Output
Y Min PB5 DIO5 5 Digital Output
Y Max PB2 DIO2 2 Digital Output
Z Step PA5 DIO26 26 Digital Output
Z Direction PA6 DIO25 25 Digital Output
Z Min PB1 DIO1 1 Digital Output
Z Max PB0 DIO0 0 Digital Output
Extruder Step PA3 DIO28 28 Digital Output
Extruder Direction PA4 DIO27 27 Digital Output
Power Enable PD7 DIO15 15 Open Drain Output, active low
Motors Enable PA7 DIO24 24 Digital Output
Heater 1 PB4 DIO4 4 Digital Output
Heater 2 PB3 DIO3 3 Digital Output
Heater 3 PA0 DIO31 30 Digital Output
Temp 1 PA1 AIO1 1 Analog Input
Temp 2 PA2 AIO2 2 Analog Input

Customisations

This part describes possible modifcations for advanced users only.

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).

With pin 3 you can feed the ATmega, if you have no other current source. If you have another current source, e.g. your power supply, you might have slightly different potentials of 5V though, so you better keep this pin unconnected. As of version 1.1, the board comes with a jumper to make sure no bad things can happen.

Pin 6 is usually connected to the serial line's RTS. 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.

Improving Heated Bed Tolerance

When Gen7 v1.2 was designed, the usual standard was to either print without heated bed or to connect a heated bed with an external power source. These days (February 2012), heated beds driven directly from the main board are common, so many people try this. Without modification, this almost always fails on a v1.2 (v1.3 and later are much better in this regard).

One shortcoming is, the single 4-pin Molex connector isn't really sufficient for 15+ amps. The connector gets hot, sometimes even melts, as do the wires between connector and PSU. Here the fix is obvious: cut off the connector of the other strand of your PC-power supply (PC-PSU) and solder the 12V and GND wires directly onto the appropriate tracks on the board. As close to the MOSFETs as possible.

But there is another one, which I describe more in detail, as it's a nice learning example.

Symptoms

As soon as the heated bed switches noticeable currents, the PC-PSU is turned off and the ATmega is hit by a reset. Looking at the serial connection with a serial terminal, this looks like this:

<previous G-code>
M104 S120
start
ok

The "start" appears on it's own, without hitting the reset button on the board.

Diagnosis

  • The PSU being turned off is a result of the CPU being reset.
  • The ATmega can report the reason of the last reset: It's the Brown-Out-Detector kicking in. This means, when the bed is switched, the voltage on the CPU gets to low ( < 4.3 volts).
  • Putting big capacitors on either the 5V or 12V rail doesn't help.
  • Using a second power supply for just the ATmega doesn't help either.

Summing this up, even if it looks like a short voltage drop, it obviously has different reasons. Let's have a look at the layout and its Ground tracks:

Gen7 v1.2 Heated Bed Fix 1.png

All light blue tracks are Ground. I've overdrawn some of them with green to show where the ATmega gets his Ground connection (2), where this Ground reaches the power supply (3) and where the current is switched (1).

Once you see it, it's obvious: as high currents are switched at (1), current and thus voltage bumps happen there. Where does the ATmega get his operation voltage from? Right: from a track carrying these bumps and from nowhere else. So, each voltage spike created by the MOSFETs goes directly into the ATmega and as positive spikes on Ground pretty much equal negative spikes on +5V, the ATmega detects low voltage.

Fixing the Board

Caution: this fix works if you use the ATX20 connector, only.

The fix is to re-wire some tracks for seperating Ground for the ATmega and Ground for the MOSFETs better. See it once on the layout (viewed from the component side ! ) and once on a real board, my ugly development prototype:

Gen7 v1.2 Heated Bed Fix 2.png Gen7 v1.2 Heated Bed Fix 3.jpeg

  1. Cut the track here, but make sure GND for the thermistors and GND for the ATmega is kept connected. To cut a track, cut with a sharp knife twice, 0.5 mm apart, then peel off the copper between these cuts.
  2. Also cut here and make sure the endstop's GND is kept connected.
  3. Lay a not-too-thin wire from the middle of the Molex 4-pin to the Ground pin(s) of the MOSFET(s). All current going to the heated bed will got through this cable as well. Take care to not destroy the isolation at one of these many spikes there.
  4. Lay a wire from ATmega's Ground to one of the GND pins of the ATX20 connector.

Once this is done you can reconnect all the plugs, re-insert the ATmega and the board should work as before. Just without the unwanted reset.