Gen7 Board 1.4.1/fr

From RepRap
Revision as of 16:35, 2 July 2012 by Paoparts (talk | contribs) (Serial Connection)
Jump to: navigation, search


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

This supersedes Gen7 Board 1.3.1.

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)


Acheter les circuits et les composants

Circuits imprimés

Vous pouvez acheter les circuits imprimés directement auprès de Traumflug ou chez Paoparts.

Gen7 est conçu pour être fabriqué sur une RepRap, vous pouvez faire vous-même le circuit imprimé. La fabrication sur une RepRap ou une fraiseuse à commande numérique est décrite sur la page principale Gen7. Vous devez construire un circuit "Gen7Board" et jusqu’à 6 circuits "Endstop"

Une autre façon est d'acheter les circuits dans de nombreuses maisons spécialisées dans la fabrication des circuits imprimés. Gen7 est simple face, et donc cela ne coûtera pas une fortune. Si vous voulez vendre des copies, demandez une licence commerciale à Traumflug.

Composants

Vous pouvez obtenir un kit de composants Gen7 et un kit de connecteurs Gen7 auprès de Traumflug ou chez Paoparts.

Si vous souhaitez acheter vous même les composants et connecteurs, consultez la section Listes des pièces #Liste des pièces.

Liste des pièces

Pour assembler ou vérifier ces listes, ouvrez la mise en page avec gEDA / PCB et de l'exportation une «nomenclature». Cela vous donnera une liste de tous les composants nécessaires.

Considérations particulières:

  • Chaque carte Pololu de contrôle de moteur s'insère sur 2 rangées de 8 connecteurs femelles soudées sur la carte, si vous voulez prendre d'autres cartes de contrôle de moteur faites attention au format.
  • Les drivers de moteur pas à pas de marque Pololu sont vendus avec les connecteurs males, il n'y a donc pas besoin de les acheter séparément.
  • N'oubliez pas les 8 à 9 jumpers.
  • Les résistances ont toutes une puissance de 0,25 W , même si le nom sur le circuit précise «0,125».
  • Les cartes Pololu peuvent délivrer jusqu'à 35 V, donc vous you "may want like-rated" condensateurs electrolytiques.
  • Vous pouvez ajouter dans la liste quelques câble pour les connecteurs, des broches supplémentaires à sertir et quelques fils.

Composants électroniques

La liste est donnée en suivant l'ordre des étapes d'assemblage.

Nom Quantité Désignations Vendors Remarques
Fil de 0.6 mm 50 cm Völkner Digi-Key Mouser pour faire les ponts sur la carte PCB simple face
Résistance 560 Ohms 2 R14, R22 Reichelt Völkner Farnell RS Digi-Key Mouser
Résistance 1 kOhms 6 R2, R6, R8, R10, R16, R18 Reichelt Völkner Farnell RS Digi-Key Mouser
Résistance 10 Ohms 2 R11, R12 RS
Résistance 4.7 kOhms 2 RT1, RT2 Reichelt Völkner Farnell RS Digi-Key Mouser
Résistance 10 kOhms 1 R30 Reichelt Völkner Farnell RS Digi-Key Mouser
Diode 1N4004 2 D1, D2 Reichelt Völkner Farnell Digi-Key Mouser
Inductance 100 uH 1 L1 Reichelt Völkner Farnell Digi-Key Mouser
Crystal 16 MHz or 20 MHz 1 U6 Reichelt Völkner Farnell Digi-Key Mouser
Bouton Reset 1 RESET Reichelt Völkner Farnell Digi-Key Mouser
Condensateur Céramique 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 mm Verte 3 LED2, LED5, +5V Reichelt Völkner Farnell Digi-Key Mouser
LED 3 mm Jaune 1 Standby Reichelt Völkner Farnell Digi-key Mouser
Condensateur Céramique 22 pF 2 C3, C4 Reichelt Völkner Farnell RS Digi-Key Mouser
Condensateur Electrochimique 10 uF 2 CT1, CT2 Reichelt Völkner Farnell Digi-key Mouser
Condensateur Electrochimique 100 uF 4 C1, C2, C6, C7 Reichelt Völkner Farnell Digi-Key Mouser
Jumper Header 2 Pin Pairs 4 pair J2/J3, J5/J6, J8/J9, J11/J12 Reichelt RS Digi-Key Mouser cut them into appropriate pieces
Jumper Embase 2 Pin 3 J13, J14, J15 Reichelt Völkner RS Digi-Key Mouser les découper au bon format
Jumper for the two above 9 Reichelt RS Digi-Key Mouser
ICSP Header 1 CONN6 Reichelt RS Digi-Key Mouser alternatively, assemble this out of the remainings of the Jumper 2 Pin Headers
Embase Pololu 8 or 4 U2, U3, U4, U5 Reichelt Völkner Digi-Key Mouser Les découper à la longueur voulue pour obtenir 8 barres de 8 pins
Misc Header 1 MISC Reichelt Völkner Digi-Key Mouser Couper à la longueur voulue
Socket pour la ATmega 1 U1 Reichelt Völkner Farnell Digi-Key Mouser
ATmega 644 (or 644P) 1 Reichelt Farnell Digi-Key Mouser
MOSFET IRFZ 44N 2 Q1, Q2 Reichelt Völkner Farnell RS Digi-Key Mouser

Connecteurs

Nom Quantité Désignations Vendeurs Remarques
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 RS Digi-Key Mouser Aussi utilisés dans l'électronique des cartes Gen2 et Gen3;
Cable Connector for the above 4 RS DigiKey Mouser
Crimp Contact for the above 16 RS DigiKey Mouser
Alternative to Motor Header: 4 Pin Screw Terminal 4 X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156 Reichelt DigiKey Mouser
Heater Header Molex 26-48-1045 (2 Pin) 2 HEATER1, HEATER2 RS DigiKey Mouser
Cable Connector for the above 2 RS DigiKey Mouser
Crimp Contact for the above 4 RS DigiKey Mouser same as the one for the motor headers
Alternative to Heater Header: 2 Pin Screw Terminal 2 HEATER_1, HEATER2 Reichelt DigiKey Mouser
Disk Power Header 2 CONN2, CONN3 Reichelt RS DigiKey Mouser also see DIY 4 pin molex connector
ATX24 Power Connector 1 CONN1 RS DigiKey Mouser Molex Mini-Fit 44206-0007
Molex KK100 2 Pin Header 2 TEMP1, TEMP2 Reichelt RS DigiKey Mouser
Cable Connector for the above 2 Reichelt RS DigiKey Mouser
Crimp Contact for the above 4 Reichelt RS DigiKey Mouser
Molex KK100 3 Pin Header 6 X_MIN, X_MAX, Y_MIN, Y_MAX, Z_MIN, Z_MAX Reichelt RS DigiKey Mouser Reichelt are tested to be fully compatible with Molex
Cable Connector for the above 6 Reichelt RS DigiKey Mouser
Crimp Contact for the above 18 Reichelt RS DigiKey Mouser same as for TEMP1, TEMP2 above
Molex KK100 6 Pin Header 1 SERIAL RS DigiKey Mouser alternatively, use the same as for Jumper 2 Pin
Optional: Cable Header for the above 1 RS DigiKey Mouser only needed if you intend to solder your own USB-to-TTL cable
Option: Crimp Contact for the above 6 RS DigiKey Mouser only needed if you intend to solder your own USB-to-TTL cable
Radiateurs pour les MOSFETs 1 ou 2 Reichelt RS DigiKey Mouser Please note that Reichelt ones are quite wide (26mm). Two of them won't fit on 1.3
Vis Chc M3 x 8 mm pour le montage des radiateurs sur les MOSFET 1 ou 2
Rondelle M3 pour le montage des radiateurs sur les MOSFET 1 ou 2
Ecrous M3 pour le montage des radiateurs sur les MOSFET 1 ou 2
Radiateur pour les polulus 4 Völkner RS
Ruban double face conducteur de la chaleur 1 Völkner couper à la bonne dimension le double face qui permet de coller les radiateurs sur les polulu. Vous pouvez aussi coller le radiateur sur le polulu avec de la cyano ou du ciment colle haute température

Divers

L'électronique de la Génération 7 utilise un port série pour les communications avec le PC. Les PC modernes n'ont plus cette connexion, il faudra utiliser un adaptateur USB / TTL. Vous pouvez trouver ce composant ici:

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

Une alternative au cable l'USB/TTL câble est une petite carte électronique:

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

Une autre alternative E'go USB-TTL adapter, voir instructions et limitations.


Enfin et surtout, vous aurez besoin de quatre drivers de moteurs pas à pas :

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

Instructions pour le montage

  • Pour savoir quand et où mettre les composants, vous pouvez afficher sur votre PC les photos ci-dessous qui illustrent au fur et à mesure toutes les étapes du montage.
  • Les circuits imprimés fabriqués selon les diagrammes de Voronoi (comme celui des photos ci-dessous) ont besoin de plus de chaleur, augmenter la température de votre fer à souder d'environ 20 degrés Celsius.
  • Commencez par les composants les plus plats, généralement les ponts de fil et les résistances. De cette manière, les composants ne tombent pas quand vous retournez le circuit imprimé face soudure vers vous pour la soudure. Ensuite, continuer avec des pièces de plus en plus haute, vous finirez par les connecteurs.
  • La liste des pièces est triée dans cet esprit, il suffit de commencer par les composants du haut et de suivre vers le bas.
  • Pour faciliter le maintien des cavaliers et des composants similaires, mettre une petite goutte de colle cyanolite sur le côté composant avant de les insérer. Comme la carte est recto seul, cela ne nuira pas au fonctionnement.
  • La bobine 100 uH ressemble à une résistance. Elle est un peu plus épaisse et contient des anneaux brun-noir-brun.
  • Comme les supports à huit pins pour le Pololus sont chers, les kits sont livrés avec des supports à moindre coût ayant 10 broches. Couper les 2 broches en trop sur chacun.
  • Pour bien souder une paire de ces supports, insérer une carte Pololu pour vérifier le bon alignement.

Attention : Ne pas souder les MOSFETs et n’insérez pas encore le ATmega avant de faire les vérifications d'alimentations.

Assemblage en photos

Note: These pictures still show v1.3 assembly. Assembling v1.4 is similar. Please refer to the (already updated) parts lists above until the new pictures are uploaded.

Cliquez sur les photos pour voir en plus grand.

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


Mise en route

Ces étapes montrent comment passer d'une carte mère soudée à un statut opérationnel.

Alimentation possible

Vous pouvez alimenter la carte de plusieurs manières.

Gen7 v1.4 Power Options.jpeg


Option 1

C'est celle qui est recommandée. Prenez une alimentation de PC et branchez le connecteur ATX24, ainsi que les deux connecteurs d'alimentation MOLEX pour les disques internes.

Les alimentations de PC ont deux câbles avec plusieurs connecteurs d'alimentation. Chacun de ces câbles peut fournir environ 10 ampères, assurez-vous de brancher un seul connecteur de chaque câble sur la Gen7.

Dans cette configuration, l'ATmega peut fonctionner et communiquer avec le PC en mode "off" (en mode veille). Donc, ne soyez pas surpris si vous commencez à travailler avec votre Mendel et que l'alimentation est encore éteinte. Chaque commande G-code nécessitant plus de courant enclenchera immédiatement l’alimentation.

Note: le connecteur ATX24 est rétrocompatible avec les anciens connecteurs ATX20, donc si vous avez un bloc d'alimentation avec un ancien connecteur ATX20, vous pouvez l'utiliser. Il n'y a qu'une seule position d'insertion, et donc il n'y a pas d'inconvénient à utiliser une alimentation plus ancienne.

Gen7 ATX20 in ATX24.jpeg

Option 2

C'est pour les utilisateurs qui utilisent une alimentation non-PC. Vous utiliserez uniquement les 2 connecteurs MOLEX qui fournissent du 5V et du 12V. Le connecteur ATX24 est laissé vide.

Aucune fonction de veille ici. l'ATmega, les Pololus, les moteurs et les chauffages sont alimentés tout le temps.

Power Source Selection

Après avoir choisi une option pour l'alimentation, vous devez spécifier au système où il peut obtenir le 5 V.

Gen7 v1.4 Power Selection.jpeg

Dans le coin inférieur droit de la carte, vous verrez deux cavaliers.

   ATX24: pour l'option 1.
   Disk Power: pour l'option 2.

Vous devez installer un cavalier, et un seul !!!

Contrôle d'alimentation

Utiliser le cavalier correspondant au choix d'alimentation. Vous devez prendre quelques mesures pour vous assurer que votre nouveau ATmega ne va pas griller lors de son insertion.

Gen7 v1.4 Power Checks.jpeg
  • Rouge: alimentation insérés en fonction de n'importe quelle option. En cas d'option 1, l’alimentation n'est pas encore activé.
  • Bleu: comme ci-dessus, avec alimentation activée ou alimentation en fonction de l'option 2. Non applicable à l'option 3.

Note: dans l'image ci dessus, il n'y a pas de cavalier 5 V, mais vous devez avoir mis un cavalier qui précise l'option que vous désirez utiliser.

Vérifications:

  1. Pas de fumée ? Super
  2. Le voyant jaune dans le coin inférieur droit est allumé ? Encore Super.
  3. Si vous avez choisi l'option 1, court-circuitez les deux ponts de fil, comme sur la ligne en pointillés verts dans l'image. Ceci devrait activer l'alimentation.
  4. Dans le même temps, la LED verte dans le coin inférieur droit devrait être allumée.
  5. Si vous avez un voltmètre, mesurez les tensions aux endroits montrées sur la photo.
  6. En outre, vérifiez chacune des broches de la prise ATmega, aucune d'entre elles ne devraient avoir plus de 0,5 volts, à l'exception de ceux marqués 5 V. Sur la prise ATmega, c'est la broche 9, 10, 21, 30, 39 et 40 (sens anti-horaire, en commençant en bas à gauche).
  7. Vérifiez les broches de la rangée inférieure des Pololus. Celles non marquées 5V ne devraient pas dépasser 0,5 volts.

Si vous avez respecté toutes ces recommandations, vous pouvez sans risque passer à la suite.

Insertion des Semiconducteurs

Maintenant c'est le bon moment pour insérer les semi-conducteurs, si toutes les étapes précédentes ont bien été respectées.

Gen7 v1.3 Semiconductors.jpeg
  • Débranchez l'alimentation électrique entièrement.
  • Soudez les MOSFET à leur place avec le côté plat vers le centre du circuit. Utilisez suffisamment de soudure car ici les courants sont élevés.
  • Montez les radiateurs. La photo montre le placement recommandé.
  • Insérez le ATmega dans son socket. Il y a une encoche sur l'une des extrémités du boitier noir du processeur (groove). Cette rainure doit être du côté des transistors MOSFET, l'autre partie sans l'encoche est proche du connecteur ATX24.

Si vous voulez économiser un peu vous pouvez ne mettre qu'un radiateur sur le MOSFET du plan de travail chauffé ( mais un grand, ca chauffe) et laisser libre celui du nozzle


Gen7 v1.3 Single Heatsink.jpeg

Prepare your Arduino IDE

  • Téléchargez, décompressez et installez IDE.
  • Téléchargez et décompressez Gen7 Arduino IDE Support package.
  • Trouvez les dossiers Gen7 dans ce paquet et les déplacer dans le dossier hardware situé à l’intérieur du dossier Arduino. Il ya aussi des instructions d'installation à l'intérieur du package Gen7 Arduino support IDE.
  • Lancez votre Arduino IDE.
  • Sous Menu -> Tools -> board , sélectionnez votre variante de carte Gen7 (il devrait y avoir quatre nouvelles entrées). Ils diffèrent selon le type de processeur et la vitesse d'horloge.
  • Sous Menu -> Tools -> Port série, sélectionnez le bon serial / port COM.

Note 1: pour les utilisateurs Linux / Unix, si vous installez à l'aide de votre gestionnaire de paquet, il peut être difficile de trouver votre dossier Arduino/hardware, et même après, si vous le trouvez vous pourriez ne pas être capable de copier dans ce répertoire pour des raisons de droits d'accès. Il vous suffit de créer un dossier "hardware" dans le dossier "sketch" de votre répertoire /home et d'y mettre le dossier Gen7 dedans. Le dossier "sketch" est créé lorsque vous exécutez l'IDE Arduino pour la première fois.

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

Serial Connection

Il est recommandé d'utiliser une carte USB-TTL ou un cable USB-TTL . D'autres solutions sont possible voir #Customisations & Others.

Voici comment vous devez les connecter, la Masse est toujours à gauche:

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

Il suffit de brancher le cable USB au PC et un nouveau port série devrait apparaître dans le système d'exploitation de votre PC ( COM1, ou COM2, ... ). Si cela n'est aps le cas il faut installer le driver associé à la minicarte ou cable USB/TTL. driver ftdi par exemple

Your First Firmware Upload

After all this assembling, and with this complex firmware thing ahead, whouldn't it be a good idea to upload some test firmware to test wether 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.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

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.

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

Other Configurations

The following should help to configure other firmwares.

Pinout

Sanguino pin bindings
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 Output
Y Step PA4 DIO27 27 Digital Output
Y Direction PA5 DIO26 26 Digital Output
Y Min PB1 DIO1 1 Digital Output
Z Step PC7 DIO23 23 Digital Output
Z Direction PC6 DIO22 22 Digital Output
Z Min PB2 DIO2 2 Digital Output
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 PINA0 0 Analog Input
Temp 2 PA1 PINA1 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.

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 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 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. On both connectors, the left pin is the signal, the center pin GND and the right pin 5 V.

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.

Stepper Motors

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, 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 of both thermistor connector you use 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 bei either swapping the pin mapping, or by swapping the connectors.

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: 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, it should have 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 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 100 °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

  • 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 or gets no signal from the ATmega. 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.

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.

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.

Using an E'go USB-TTL adapter

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

Suppliers of this adapter

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.

This section describes how to program the bootloader using a programmer. These programmers usually cost some $20 to $30. Even cheaper is to build a bit banging parallel port adapter. Another alternative is to use an Arduino or second electronics as a programmer.

How to go:

  • Disconnect all connectors, including the power supply.
  • Insert the ATmega644 into it's socket. Make sure you do it the right way, the small nut on the housing goes towards the heater connectors, the numbers on the housing can be read looking from the ATX20 connector side.
  • Re-connect the power supply.

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

  • Connect your programmer. Again, watch out for insertion of the plug the right way.

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

Gen7 Programmer Setup.jpeg

Programming the bootloader using the command line

  • Have your Arduino IDE prepared for Gen7, as explained above.
  • Connect your power supply, at least one of the power connector indicators should be lighted.
  • 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 a few seconds blinking and you're done. Note that if you're using the Arduino as 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 a few seconds blinking and you're done.

Programming the bootloader using 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 be 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 no brown-out detector at all.

References

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