Gen7 Board-AVR 1.5

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-ARM 2.0


Gen7 Board History   --   Gen7 Board is part of Generation 7 Electronics
Crystal Clear action run.png
Generation 7 Electronics Board

Release status: working

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

This is the central part of Generation 7 Electronics. A single board with all the features required to run a printer and also including a header to plug in extension boards for future expansion.

How to get it

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

Currently no shops selling parts known. There is now Gen7-ARM v2.0.

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. Gerbers, PDFs and such are in Gen7's Github repository.

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 come with their male headers, so there's no need to purchase them separately.
  • 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.
  • Pololus require heatsinks, so make sure you get them with the Pololus or get separate ones.

Electronic Components

This list is ordered to match the order of assembly.

Name Count Designations Remarks
MCP2200 I/SO 1 U2 This is the USB-TTL adapter
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 8 R1, R2, R4, R6, R8, R10, R16, R18
Resistor 4.7 kOhms 2 RT1, RT2
Resistor 10 kOhms 2 R3, R30
Diode 1N4004 2 D1, D2
Coil 10 uH 1 L1
Crystal 12 MHz 1 U7 Same housing as the one below, the number on the part reads the frequency.
Crystal 16 MHz or 20 MHz 1 U6
Reset Switch 1 RESET
Ceramic Capacitor 0.1 uF 13 C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19, C20, C21
LED 3 mm Green 5 RxLED, TxLED, LED2, LED5, +5V
LED 3 mm Yellow 1 Standby
Ceramic Capacitor 22 pF 4 C3, C4, C5, C15
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 See #Microcontroller Choice for details.
Alternative: ATmega 644-20PU (or 644P-20PU) 1
MOSFET IRLB 8743 2 Q1, Q2

Microcontroller Choice

Gen7 Board can be populated with several versions of the ATmega***4 microcontroller. All types of this family have same pinout and features, the only difference between them is size of memory. There are variants with additional characters in the name, like A, P or PA. These have no differences significant for usage on a Gen7. For Details, see Atmel application notes like AVR536 (differences between ATmega644 and ATmega644A), AVR508 (ATmega644 to ATmega644P) and AVR527 (ATmega644P to ATmega644PA).

This table shows all possible MCUs and firmwares you can use with a Gen7 board. If firmware is marked as maybe it means, that firmware should work but it was not tested, yet.

MCU Firmware Notes
Type Flash EEPROM RAM Teacup Repetier Sprinter Marlin
ATmega1284/A/P/PA 128K 4K 16K Yes Yes Yes Yes 1284 not supported by avrdude, prefer 1284P.
ATmega644/A/P/PA 64K 2K 4K Yes Yes Maybe Yes Marlin/Repetier: without SD/LCD support
ATmega324/A/P/PA 32K 1K 2K Yes  ?  ?  ?
ATmega164/A/P/PA 16K 512 1K Maybe No No No

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
USB-B Connector 1 CONN1
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).

Miscellaneous

As of v1.5, Generation 7 Electronics has an USB-TTL adapter on board. To connect your Gen7 with a PC, you need just a generic USB device cable.

Last not least, you need stepper drivers. Four each of one of the following types:

Famous "Pololus" Pololu stepper driver boards
Open Source Alternative StepStick
DRV8825 based Pololu item #2132 These require a bridge between the left side of R4/R6/R8/R10 and the respective Reset pin. This is doable with a solder blob.
DRV8825 based Pololu item #2133 Both DRV8825-based Pololus do 1/32 microstepping instead of 1/16 with both jumpers set.

Assembly Instructions

Everything lying around, in bags or single parts? Fine. Let's heat up the soldering iron.

General Notes on Assembly

  • 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.
  • 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.
  • When soldering parts with many pins, like the ATmega socket, it's good practice to start with the four corner pins, recheck the fit, then soldering every other pin first, before completing the remaining ones. This keeps heat and strain to a minimum.
  • 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.

Assembly in Detail

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

Click on the pictures to view them larger.


  • Start with the 9 wire bridges. The layout shows them as matte green tracks. The tracks inside the reset switch are not wire bridges, this connection is established by the switch its self.
Resistor Color Codes
10 Ω 560 Ω 1 kΩ 4.7 kΩ 10 kΩ
brown-black-black green-blue-brown brown-black-red yellow-violet-red brown-black-orange
  • D1 and D2 are diodes, so you have to take care of polarity. Diodes have a white ring on the housing, which must end up closer to the boards boundary.
  • L1 looks like a thick resistor, but is actually a coil.
  • As LEDs are diodes, too, direction matters. The longer of their legs is plus (+), which should go into the hole marked + in the layout.
  • Electrolytic capacitors have a polarity as well. The white stripe on the housing indicates minus (-), the longer leg again indicates plus (+).
  • It's a good idea to insert a Pololu while soldering the Pololu headers to assure a nice fit.
  • Don't forget to take care of the polarity of the disk power connectors. The chamfered edges show which way to insert them.
  • The snap ramp of the ATX24 points towards the center of the board.

After some time, you should have something like this:

Gen7 v1.5 Preassembled.jpeg

As you can see, this builder has choosen to use Molex KK156 headers for both, extruder and heated bed heaters. Others may choose a screw terminal for the heated bed, or for both.

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

Connected according to power selection 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

The picture shows a Gen7 v1.4. In addition to the shown voltages, you'll recognize 5 V on pin 14 and up to 1 V on pin 15. These are RxD and TxD of the already running MCP2200.

  • 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

Note: the picture shows the Gen7_v1.4.1 board, the Gen7 AVR 1.5 board has the same MOSFET's IRLB 8743

  • Disconnect the power supply entirely.
  • Both MOSFETs are marked with IRLB 8743
  • 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.

Wiring to your Reprap Printer

Here is a nice diagram indicating one wiring solution.

Objectives

  1. Depict how to wire a RepRap 3D Printer (eg. Printrbot) to a Gen7 Board
  2. Diagram to be fairly simple and intuitive yet a thorough explanation
  3. Objective was not to create a PCB schematic but just a simple to understand diagram

Disclaimer

  1. Agree that your mileage might vary in how you implement the wiring,
  2. Connectors and wire color, type, gauge and any other aspects of wiring might differ for your case
  3. This is merely an attempt at documenting how to wire up a RepRap to a Gen7 1.4.1. It should work as a guide for Gen7 1.5 too.
  4. If something blows up, you stay responsible (:

The Diagram

The below diagram explains how to wire a RepRap 3D Printer to a Gen7 Board 1.4.1. Should also work as a guide for Gen7 1.5.

It is imperative that you view or download the original file as it is 7.5 MegaPixels and the diagram was designed with some fine detail and possible zoom and pan in mind.

Printrbot_Original_Wired_To_Gen7_1.4.1_revision2

Diagram was created using xfig (free and open source vector graphics editor) and is licensed under the GNU Free Documentation License (www.gnu.org/licenses/fdl.html) - Philip Booysen - House4Hack.

Serial connection on Mac OS X

First of all, if you run OS X v10.7 or later, you shouldn't have issues. Plugging the Gen7 into an USB port should cause a new device showing up in /dev, which provides the required serial port. Just like in Linux.

For earlier Macs, there's the mcp2200-forwarder tool. A binary for PowerPC Macs is in the release documents folder on Github. Download and place it in /usr/bin, then run it like this:

mcp2200-forwarder-macosx-ppc -b 115200 -l /tmp/ACM0

The -b flag must match the baud rate of your Gen7. Keeping this tool running you can fire up Pronterface and connect to /tmp/ACM0. That's it! You can plug and unplug the Gen7 while the tool is running, put the Mac to sleep and wake it, no need to ever restart it. If you think it messed up, pressing reset on the Gen7 should be sufficient.

In case you have an early i386-Mac, you have to compile the tool. Pretty simple with Xcode installed. For this, and more details, see its README.

Programming the MCP2200

While the MCP2200 will work without any configuration, the Rx/Tx pins that control the LEDs are disabled by default. There's a MCP2200 Configuration Utility which allows advanced configuration, including enabling the blinking of the Rx/Tx indicators (see also these two forum postings). This tool also allows changing the general purpose I/O (GPIO) pins of the chip. An available library can be used to write custom windows applications using this. Not very helpful in the Linux world, the tool doesn't run using Wine.

Additionally, while configuring the MCP2200 ensure the "Enable CTS/RTS Pins" option remains unchecked. This option enables control of these pins internally by the chip and disables control by the OS. Enabling it will cause the arduino software to be unable to reset the chip properly while programming and may cause unexpected resets if the receive buffer manages to fill up.

An attempt to hack the chip using open source tools is usbio. If you want to dive in even further, the MCP2200 is a custom-programmed PIC18F14k50 and can be reprogrammed. :-)

Troubleshooting the MCP2200

Starting at this post in the forum it's described how the MCP2200 doesn't work on some Windows 64-bit versions. So far no known solution.

Additional info from Rezer, he runs this chip successfully with Win7 64-bit:

Oh, and I checked the mcp2200 driver version on my windows 7 64 bit machine...it was 1.2 (5.1.2600.3), and I uninstalled it and plugged the board back in. It automagically pulled 1.3 (5.1.2600.7) from windows update and still works fine *shrug*. I have UAC turned off on my machine, unsure if that would make a difference.

A first test is to check wether the MCP2200 appears as serial device in the OS of the host PC. If this doesn't happen, either the MCP2200 its self or the cabling to it desn't work or the OS has no driver to serve it. This should work with no ATmega inserted, too.

A second test for the MCP2200 is to take out the ATmega (or do this test before inserting it), then plug a bridge (bent piece of wire) between pin 14 and 15 (RxD and TxD of UART0) into the ATmega socket. Then connect with a serial terminal and type something. Even without local echo enabled in the serial terminal, you should see what you type. With local echo enabled you'd see every character echo'd twice. This means, characters are sent out to the ATmega, into the bridge and immediately back. All the wiring up to the ATmega socket works!

If you are Linux user, the MCP2200's driver is include in kernel. On some distributions it may need activation. To do so, enter

sudo modprobe cdc-acm

You can insert this command without "sudo" in /etc/modules to activate it on boot.

If you are using an older version of Pronterface, sometimes the board won't connect to it. You need to modify the file named printcore.py line 157: time.sleep(0.25) must be time.sleep(5).

Thank you to Andol for figuring the latter two fixes.

Bootloader

If you bought your ATmega with one of the Gen7 kits, the bootloader should have already been uploaded and you can skip this section. 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. How to change that is described in the Bootloader Upload section of the Gen7 Arduino IDE Support package. You'll find the required binaries there, too.

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.

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.

Pinout

The pinout of ATMega644/ATMega1284 hasn't changed since version 1.4, so if you have your firmware configured for this version, no changes are needed. For example, if you are using Teacup firmware, you can use config.gen7-v1.4.h configuration file.

The following should help to configure other firmwares:

                 +--------\/--------+                   
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  
                 +------------------+                   

Modifications

Here are modification which fix things which either customize something or are a peek into the next version of Gen7.

Compatibility with early DRV8825 based Pololus

These early DRV8825-based "Pololus" lack a pullup on the Sleep pin. This can be fixed with an additional track like this:

Track for early DRV8825 Pololus.png

This light blue line is an additional track which can be done with a simple solder blob on the real board. It pulls Reset & Sleep always up, a feature missing on these stepper drivers. This modification is required for each of the four stepper drivers and has no drawbacks when using A4983 or A4988 based Pololus. It'll go into the next Gen7 release.

That said, Pololu has replaced these early ones already with a version which fixes exactly that: http://www.pololu.com/catalog/product/2133



Page creation in progress. For now, see Gen7_ExtensionBoard_USB_B_1.0 for the new USB adapter and Gen7 Board 1.4.1 for the remaining.


User:TV productions assembly pictures

File:Gen7 Board 1.5 Assembly 22.jpeg

File:Gen7 Board 1.5 Assembly 23.jpeg

File:Gen7 Board 1.5 Assembly 24.jpeg

File:Gen7 Board 1.5 Assembly 25.jpeg

File:Gen7 Board 1.5 Assembly 26.jpeg

File:Gen7 Board 1.5 Assembly 27.jpeg

File:Gen7 Board 1.5 Assembly 28.jpeg

File:Gen7 Board 1.5 Assembly 29.jpeg

File:Gen7 Board 1.5 Assembly 30.jpeg

File:Gen7 Board 1.5 Assembly 31.jpeg

File:Gen7 Board 1.5 Assembly 32.jpeg

File:Gen7 Board 1.5 Assembly 33.jpeg