Gen7 Board 1.4.1/zh cn

From RepRap
Revision as of 03:39, 20 August 2012 by Unioasis (talk | contribs)
Jump to: navigation, search


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

译者备注:此文本正在处于翻译当中。有任何不便敬请见谅。This document is under translation. I'm sorry for any inconvenience.

本文用于替代Gen7 Board 1.3.1Gen7 Board 1.4。关于如何从v1.3.1升级到v.4,请参阅 从v1.3.1升级到v1.4。关于如何从v1.4升级到v1.4.1,请参阅 Gen7 Board v1.4

注意:本页面很多图片依然使用带有巨大散热片的Gen7 v1.4版本。这些图片将被最终替换掉。在图片替换前,请忽略这些散热片:-)

Crystal Clear action run.png
Generation 7 Electronics Board

Release status: working

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


如何获取

PCB

布局预览
蚀刻好的PCB板

您可以从Traumflug获取Gen7 PCB板。

Gen7用于RepRap项目的加工,您自然可以自己制作PCB板。关于如何在RepRap或者其他通用铣床上制作,已经在 Gen7主页中描述。您也可以在 Gen7主页上找到发布文档,Gerbers文件,PDF文件等。

另一个途径是从PCB原型制作商处购买打样。Gen7是单层板,制作起来花费不大。如果您想卖出多余的板子,请向Traumflug申请商业许可。

元件

您可以从Traumflug获取Gen7元件套装以及Gen7连接件套装。

如果您希望自己组装,请参考#原件列表一节。

原件列表

要组装或者验证此列表,可用gEDA/PCB打开布局(layout),并且导出物料清单“BOM”。这可以给您列出全部需要的元件。

规格考虑:

  • Pololu步进电机驱动器(The Pololu Stepper Drivers)需要两个单行八针阴头连接座焊在主板上。
  • Pololu步进电机驱动器带有阳头接口,因此不需要单独购买。
  • 别忘记准备充足的跳线帽(8-9个)。
  • 即使脚印(footprint)标称了“0.125”,电阻器也需要0.25瓦的安全功率。
  • Pololu工作电压最大到35伏,因此电解电容也需要相应的电压(译者注:至少)。
  • 您可能还需要连接件的一些电缆,插头和压线。

电子元件

下列列表是按照组装顺序排序的。

名称 数量 标识 供货商 备注
0.6毫米导线 50厘米 Völkner Digi-Key Mouser 用于单面PCB板飞线用
电阻 10欧 2 R11, R12 Reichelt RS
电阻 560欧 2 R14, R22 Reichelt Völkner Farnell RS Digi-Key Mouser
电阻 1K欧 6 R2, R6, R8, R10, R16, R18 Reichelt Völkner Farnell RS Digi-Key Mouser
电阻 4.7K欧 2 RT1, RT2 Reichelt Völkner Farnell RS Digi-Key Mouser
电阻 10K欧 1 R30 Reichelt Völkner Farnell RS Digi-Key Mouser
二极管 1N4004 2 D1, D2 Reichelt Völkner Farnell Digi-Key Mouser
电感(Coil) 100 uH 1 L1 Reichelt Völkner Farnell Digi-Key Mouser
晶振 16 MHz 或者 20 MHz 1 U6 Reichelt Völkner Farnell Digi-Key Mouser
复位按钮 1 RESET Reichelt Völkner Farnell Digi-Key Mouser
陶瓷电容 0.1 uF 12 C5, C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19 Reichelt Völkner Farnell RS Digi-Key Mouser
LED 3毫米绿色 3 LED2, LED5, +5V Reichelt Völkner Farnell Digi-Key Mouser
LED 3毫米黄色 1 Standby Reichelt Völkner Farnell Digi-key Mouser
陶瓷电容 22 pF 2 C3, C4 Reichelt Völkner Farnell RS Digi-Key Mouser
电解电容 10 uF 2 CT1, CT2 Reichelt Völkner Farnell Digi-key Mouser
电解电容 100 uF 4 C1, C2, C6, C7 Reichelt Völkner Farnell Digi-Key Mouser
跳线座双针一排 4 对 J2/J3, J5/J6, J8/J9, J11/J12 Reichelt RS Digi-Key Mouser 裁切到合适长度
跳线座单针一排 2 J13, J14 Reichelt Völkner RS Digi-Key Mouser 裁切到合适长度
为上述跳线座准备的跳线帽 9 Reichelt RS Digi-Key Mouser
ICSP插头 1 CONN6 Reichelt RS Digi-Key Mouser alternatively, assemble this out of the remainings of the Jumper 2 Pin Headers
Pololu插头 8或4 U2, U3, U4, U5 Reichelt Völkner Digi-Key Mouser 如果可以将它们裁切到合适的长度。你需要 8 x 8 针的
ATmega插座 1 U1 Reichelt Völkner Farnell Digi-Key Mouser
ATmega 1284P-PU 1 Reichelt RS Mouser
替代:ATmega 644-20PU(或者644P-20PU) 1 Reichelt Farnell Digi-Key Mouser
场效应管 MOSFET IRFZ 44N 1 Q1 Reichelt Völkner Farnell RS Digi-Key Mouser
场效应管 MOSFET IRLB 8743 1 Q2 RS Mouser

连接件

名称 数量 标识 供货商 备注
Molex KK100 2针插座 2 TEMP_EXT, TEMP_BED Reichelt RS DigiKey Mouser
为上述准备的电缆连接头 2 Reichelt RS DigiKey Mouser
为上述准备的压接接触件(Crimp Contact) 4 Reichelt RS DigiKey Mouser
Molex KK100 3针插座 3 X_MIN, Y_MIN, Z_MIN Reichelt RS DigiKey Mouser Reichelt已经被验证可以与Molex完全兼容
为上述准备的电缆接头 3 Reichelt RS DigiKey Mouser
为上述准备的压接接触件 9 Reichelt RS DigiKey Mouser same as for TEMP_EXT, TEMP_BED above
Molex KK100 4针插座 4 X_MOT, Y_MOT, Z_MOT, E_MOT Reichelt RS
为上述准备的电缆接头 4 Reichelt RS
为上述准备的压接接触件 16 Reichelt RS DigiKey Mouser
Molex KK100 6针插座 1 SERIAL RS DigiKey Mouser 可用此替换用作2针跳线座
可选:为上述准备的电缆接头 1 RS DigiKey Mouser 只有您打算焊接自己的USN到TTL电缆才需要
可选:为上述准备的压接接触件 6 RS DigiKey Mouser 只有您打算焊接自己的USN到TTL电缆才需要
加热器插座 Molex 26-48-1045(2针) 2 HEATER_EXT, HEATER_BED RS DigiKey Mouser
为上述准备的电缆接头 2 RS DigiKey Mouser
为上述准备的压接接触件 4 RS DigiKey Mouser
加热器插座替换元件:2针螺丝接线端 2 HEATER_EXT, HEATER_BED Reichelt DigiKey Mouser
磁盘驱动器电源插座 2 CONN2, CONN3 Reichelt RS DigiKey Mouser 请参阅DIY 4 pin molex connector
ATX24电源插座 1 CONN1 RS DigiKey Mouser Molex Mini-Fit 44206-0007. Also known as VAL-U-LOK (20 or 24 Pins).
Pololus用散热器 4 Reichelt Völkner RS
散热器胶(Heatsink Glue) 1 Reichelt Völkner 为Pololu散热。将其切成合适的大小。Loctite(之类的)螺旋形胶也很好用。

其它杂项

Generation 7 Electronics 使用TTL串行与主机通信。由于很多现代PC机缺乏串行通讯口,可能需要一个合适的USB到TTL电缆:

USB到TTL电缆 DigiKey Mouser Adafruit Industries MAKE Store MakerBot Industries Watterott

USB到TTL线缆的替代方案是使用具有相同电路的一小块电路板:

USB到TTL电路板 Watterott Sparkfun
为上述准备的线缆 Watterott

另一个替代方案是:E'go USB-TTL适配器, 参见下面的说明和限制

最后,当然你需要四个步进驱动:

Pololu stepper driver boards Pololu stepper driver boards
开源替代品 StepStick

组装指导

  • 为了确定各元件的安放位置,将布局图放到PC屏幕上。
  • PCB的焊接使用泰森多边形法路径(Voronoi paths),需要温度更高。因此将你的电烙铁温度调高20摄氏度。
  • 从最平坦的元件开始。通常是飞线或者电阻器。这样当你用PCB板正面位置放置焊接的时候元件不至于被碰落。然后再焊接更高的元件。通常接插件最后焊接。
  • 元件列表正是按照这个顺序排列的。您可以按照此顺序依次组装(焊接)。
  • 为了能够更容易的焊接跳线接头,可以在插入元件前涂一点万能胶(cyanacrylate glue,译者注:原文表述的物质氰基丙烯酸酯可能有毒,请注意防护。)。由于PCB板是单面的,胶水不会伤害到焊接点。
  • 100uH 电感(coil)看上去就像一个电阻,只是比电阻粗一点,带有综-黑-综的色环。
  • 由于8针的Pololus插座比较贵,不少套装会选择价格更低的10针插座,然后切掉两个针脚。
  • 当焊接这些插座的时候,插入一个Pololu来确保对齐。

小心:仅有在 电源检查后才可以焊接MOSFET管或插入ATmega芯片。

组装图示

点击图片来看放大图。

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.

设置

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

选项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.

注意: 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

选项2

This is for people with a non-PC power supply. Make connectors feeding 5 V to the upper 磁盘驱动器电源插座, 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.

电源选择

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: 建议选项1。
  • Disk Power: 建议选项2。

You may jumper one, and only one of them.

电源检查

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 选项1, PSU not yet activated.
  • Blue: as above, with PSU activated or power supply according to 选项2.

注意: 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 选项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.3 Semiconductors.jpeg

(the picture still shows heatsinks and is about to be replaced, v1.4.1 needs no heatsinks)

  • 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 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.
  • Download and unpack the Gen7 Arduino IDE Support 2.0 package.
  • Find the folder Gen7 in this package and move it into the hardware folder inside the Arduino package. There are also install instructions inside the Gen7 Arduino IDE Support package.
  • 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.

注意: for Linux/Unix users, if you install using your package manager it may be difficult to find your arduino/hardware folder, and even after you find it you might not be able to copy into it. Just make a "hardware" folder in the "sketchbook" folder of your home directory and put the Gen7 support folder in there. The "sketchbook" folder appears when you run the IDE the first time.

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. To solve this, see the Bootloader Upload section below.

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

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 固件 Upload

After all this assembling, and with this complex 固件 thing ahead, whouldn't it be a good idea to upload some test 固件 to test wether basic things work? Of course!

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

注意: 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 固件 upload process.

Here we go:

  1. Download that file SetupText.pde. 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.pde. 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

现在您可以确信上传固件可以工作。下面测试更多功能:

  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.

固件上传的故障排除

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 固件 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, type a killall avrdude in a terminal to help out.

其他故障排除:

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

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

下面的表格告诉你每种组合的含义:

MS2 MS3 Microstep分辨率
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.

固件

In principle, you can run any of the ATmega compatible RepRap 固件s 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 固件

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

  • Have your Arduino IDE prepared for Gen7, as explained above.
  • Download the Gen7 branch instead of the standard download.
  • Use the config.gen7-v1.4.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.

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 固件 would be stuck forever 'waiting for target temp'.

Repetier 固件

Tested on 644 @ 20Mhz. See this post for sample config and pins files. Should be integrated into the default 固件 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 固件

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 have to adjust this. For hints, see section Other Configurations.

其它配置

下面的信息可以帮助您配置其它固件。

引脚分配

                 +--------\/--------+                   
INT8 (D 0) PB0  1|> Xmin  Temp_Bed {|40 PINA0 (AI 8 / D31)   (PINA0 for analog, PA0 for digital)
INT1 (D 1) PB1  2|> Ymin  Temp_Ext {|39 PINA1 (AI 1 / D30)   (PINA1 for analog, PA1 for digital)
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  
                 +------------------+                   
功能 ATmega 名称 Teacup FiveD 固件中的方向
X 步进 PA2 DIO29 29 数字输出
X 方向 PA3 DIO28 28 数字输出
X Min PB0 DIO0 0 数字输入
Y 步进 PA4 DIO27 27 数字输出
Y 方向 PA5 DIO26 26 数字输出
Y Min PB1 DIO1 1 数字输入
Z 步进 PC7 DIO23 23 数字输出
Z 方向 PC6 DIO22 22 数字输出
Z Min PB2 DIO2 2 数字输入
挤出步进 PC3 DIO19 19 数字输出
挤出方向 PC2 DIO18 18 数字输出
电源使能 PD7 DIO15 15 漏极开路输出, active low
电机使能 PA6 DIO25 25 数字输出
加热器 1 PB4 DIO4 4 数字输出
加热器 2 PB3 DIO3 3 数字输出
温度 1 PA0 PINA0 0 模拟输入
温度 2 PA1 PINA1 1 模拟输入

版本变化,从v1.3:

  • 最大行程终端被取消。
  • 最小行程终端现在为 PB0 / PB1 / PB2。
  • 步进电机顺序反转(由原来的E Z Y X 变为 X Y Z E)。
  • All pins on the analog port one to the left (pin number - 1).

本次提交的 Teacup 固件易可帮助升级其他固件。

连接设备

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

光电终端检测

Start with this, as it's simple and some 固件s depend on a working endstop to move the 步进电机. 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 M200. 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 M200 repeatedly while interrupting the light barrier with a piece of cardboard or not.
  8. If M200 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 固件.
  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 光电终端检测

If your 固件 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 固件 is at fault, typically due to a misconfigured pin mapping in config.h/configure.h/configuration.h.

步进电机

Stepper Wiring

description forthcoming

Adjusting the Pololus/StepSticks

The Sanguinololu wiki page has a nice writeup on how to adjust stepper drivers by measuring voltages.

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 固件 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 步进电机

注意: 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 固件, 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 固件'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 固件 configuration, of course. Both methods work equally well.
  • If there is no sign of movement at all, 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, each of which lasts about half a second, 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. 步进电机 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.

热敏电阻

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

注意: Make sure there is no electrical connection between 热敏电阻 and heater wires. Heaters typically run at 12 V, even when turned off, which would blow the ATmega input pin. Usually, neither wire of the 热敏电阻 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 of both 热敏电阻 connector you use you use for what, as long as it matches your 固件 configuration. The circuitry for both 热敏电阻s 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 bei either swapping the pin mapping, or by swapping the connectors.

To test the 热敏电阻, 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

注意: 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 热敏电阻

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

Heaters

This one is simple, too. The heater is a 电阻 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.

注意: 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 热敏电阻, the 固件 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.

注意: 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 or even melting the connector.

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 固件s 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 固件 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 Ω 电阻 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.

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 RTS. This triggers a reset each time you start a connection to the ATmega and is very convenient when uploading 固件 - 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.

使用E'go USB-TTL适配器

This converter is cheap, uses the Silicon Labs CP2102 chip 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 固件.

Suppliers of this adapter

Boot loader Upload

注意: 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.

This section describes how to program the boot loader using a programmer. These programmers usually cost some $20 to $30. An even cheaper option is to build a bit banging parallel port adapter. Another alternative is to use an Arduino or other prepared AVR board as a programmer.

注意: This process can be done on a partially populated board. Only the power, ocillator, reset and programming connections need to be ready.

How to proceed:

  • Disconnect all connectors, including the power supply.
  • Insert the ATmega644 into its socket. Make sure you orient it correctly, the small notch on the package is inserted at the heater connector side of the PCB, and the part markings can be read when viewed from the ATX20 connector side.
  • Connect your programmer. Verify it is plugged in correctly.
  • Plug in the PC side of the programmer.
  • Re-connect one power supply, do not turn it on yet.

注意: The pins used for the programmer are shared and can conflict with an extension board, so if you have one, unplug it while using the programmer or be sure there is no conflict.

Now you should see something like this - the red LED indicates the Board is still without power:

Gen7 Programmer Setup.jpeg

Programming the bootloader using the command line

  • Have your Arduino IDE prepared for Gen7, as explained above.
  • Switch on your power supply, at least one of the power source indicators should illuminate.
  • Open a terminal and change directory into Arduino IDE's folder. All required tools are there, even if you haven't installed them system-wide.
Linux

The following sequence was done on Linux and should apply similarly on other OSs.

cd hardware/tools
./avrdude -C ./avrdude.conf -c ?  # find your programmer, e.g. "avrispv2"

### For the ATmega644:
# write fuses
./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644 -P /dev/ttyACM0 \
    -B 5 -U lfuse:w:0xF7:m -U hfuse:w:0xDC:m -U efuse:w:0xFC:m
# upload bootloader
./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644 -P /dev/ttyACM0 \
    -B 1 -U flash:w:../Gen7/bootloaders/Gen7/bootloader-<your variant>.hex
# lock the bootloader
# this gives an expected "verification error 0xcf != 0x0f"
./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644 -P /dev/ttyACM0 \
    -B 1 -U lock:w:0xCF:m

### For the ATmega644P:
# like above, but swap "-p atmega644" with "-p atmega644p"

### For the ATmega1284P:
# like above, but swap "-p atmega644" with "-p atmega1284p"

### For an USB programmer:
# like above, but swap "-P /dev/ttyACM0" with "-P usb" 


Watch your programmer blinking for a few seconds and you're done. Note that if you're using an Arduino board as a programmer, you may need to add the flag "-b 19200" for it to work correctly.

Windows

On Windows, you'll have to find out which COM port your board is connected to. Or simply try COM1 ... COM8 until it works. Similarly to the above, the commands on Windows are:

cd hardware\tools\avr\bin
avrdude -C ..\..\etc\avrdude.conf -c ?  # find your programmer, e.g. "avrispv2"

### For the ATmega644:
# write fuses
avrdude -C ..\..\etc\avrdude.conf -c <your programmer> -p atmega644 -P COM1 \
   -B 5 -U lfuse:w:0xF7:m -U hfuse:w:0xDC:m -U efuse:w:0xFC:m
# upload bootloader
avrdude -C ..\..\etc\avrdude.conf -c <your programmer> -p atmega644 -P COM1 \
    -B 1 -U flash:w:..\..\..\Gen7\bootloaders\Gen7\bootloader-<your variant>.hex
# lock the bootloader
# this gives an expected "verification error 0xcf != 0x0f"
avrdude -C ..\..\etc\avrdude.conf -c <your programmer> -p atmega644 -P COM1 \
    -B 1 -U lock:w:0xCF:m 

### For the ATmega644P:
# like above, but swap "-p atmega644" with "-p atmega644p"

### For the ATmega1284P:
# like above, but swap "-p atmega644" with "-p atmega1284p"

Watch your programmer blinking for a few seconds and you're done.

Programming the bootloader using the Arduino IDE

Many programmers don't use the USB protocol directly, but an internal USB-TTL converter. So far there was no luck uploading the bootloader with these from Arduino IDE's graphical user interface.

Debugging hint: Arduino obviously doesn't attempt to use the "-B 5" flag when writing fuses onto a factory fresh chip. This is needed if the programmer was set to a higher speed earlier, as an ATmega running at 1 MHz (factory default) can't keep up with 115200 baud.

Arduino IDE and a USBtinyISP
  • Disconnect all connectors, including the power supply.
  • Remove jumper No.3 from the USBtinyISP programmer.
  • Plug in the USB cable to the USBtinyISP.
  • Plug the 6 pin cable from the USBtinyISP into your Gen 7 Electronics. Again, watch out for insertion of the plug the right way.
  • Re-connect the power supply and turn on.
  • Start up Arduino IDE.
  • Select the correct ATmega chip you are using in the Tools->Board menu.
  • Do not select a COM/Serial port.
  • Select Tools->Burn Bootloader->w/USBtinyISP

The USBtinyISP red LED should light up. It will take a minute or two to program the chip When it is done, the IDE will tell you it has completed and the red LED will turn off.

Specials

One user had a power supply delivering just 4.5 volts in standby. That's tight, because at 4.3 V the brown-out detector jumps in and resets the board.

To deal with this, you can change the extended fuse from 0xFC to 0xFD. This sets the brown-out detector's trigger level lower, to 2.7 V. While the ATmega will run out of specification for short periods of time, then, this is obviously better than random brownout resets or no brown-out detector at all.

References

./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644p -P /dev/ttyACM0 -n -v