Gen7 Board 1.0
- 1 How to get it
- 2 Parts Lists
- 3 Assembly Instructions
- 4 Setup
- 5 Firmware
- 6 Customisations
How to get it
Get Gen7 Board PCBs from Traumflug.
As Gen7 is designed to be manufactured on a RepRap, you can make PCBs yourself, of course. How to do this on a RepRap or a general milling machine is described on the Gen7 main page. You want one "Gen7Board" PCB and up to six "Endstop" PCBs.
Yet another way is to purchase from one of the many houses specialized in manufacturing prototype PCBs. Gen7 is single sided, so this won't cost a fortune.
Get Gen7 Components Kits and Gen7 Connectors Kits from Traumflug.
If you want to assemble the collection yourself, see the #Parts Lists section.
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.
- The Pololu Stepper Drivers want two single rows of 8 pin female connectors soldered into the board, so get these.
- The Pololu Stepper Drivers come with their male headers, so there's no need to purchase them seperately.
- Don't forget enough (8-9) jumpers for the jumper headers.
- Resistors with 0.25 W are on the safe side, even if the footprint name reads "0.125".
- The Pololus can be operated with up to 35 V, so you may want like-rated electrolytic capacitors.
- You may want to add the cable side of the connectors, their crimp pins and some wire.
|Resistor 180 Ohms||2||R16, R18|
|Resistor 560 Ohms||3||R14, R22, R23|
|Resistor 1 kOhms||7||R2, R6, R8, R10, R11, R12, R13|
|Resistor 4.7 kOhms||2||RT1, RT2|
|Resistor 10 kOhms||3||R1, R3, R30|
|Ceramic Capacitor 22 pF||2||C3, C4|
|Ceramic Capacitor 0.1 uF||12||C5, C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19|
|Electrolytic Capacitor 10 uF||2||CT1, CT2|
|Electrolytic Capacitor 100 uF||3||C1, C2, C6|
|Coil 100 uH||1||L1|
|Diode 1N4004||3||D1, D2, D3|
|LED 3 mm Green||5||LED2, LED3, LED4, LED5, LED6|
|Crystal 16 MHz or 20 MHz||1||U6|
|Socket for the ATmega||1||U1|
|ATmega 644 (or 644P)||1|
|MOSFET TIP120||3||Q1, Q2, Q3|
|0.6 mm Wire||50 cm||for the wire bridges of single sided PCBs|
|Motor Header Molex 26-48-1045 (4 Pin)||4||X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156||This is the one also used in Gen2 and Gen3 Electronics|
|Cable Connector for the above||4|
|Crimp Contact for the above||16|
|Alternative Motor Header||4||X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156||working, but incompatible alternative to the Molex 26-48-1045|
|Cable Connector for the above||4|
|Crimp Contact for the above||16|
|Jumper Header 2 Pin Pairs||4 pair||J2/J3, J5/J6, J8/J9, J11/J12||cut them into appropriate pieces|
|Jumper Header 2 Pin||3||J13, J14, J15||cut them into appropriate pieces|
|Jumper for the two above||9|
|ICSP Header||1||CONN6||alternatively, assemble this out of the remainings of the Jumper 2 Pin Headers|
|Misc Header||1||MISC||cut them to appropriate length|
|Pololu Header||8 or 4||U2, U3, U4, U5||cut them to appropriate length, you want 8x 8 pins|
|Disk Power Header||1||CONN2|
|ATX20 Power Connector||1||CONN1|
|Molex KK100 3 Pin Header||12||HEATER1, HEATER2, FAN1, TEMP1, TEMP2, I2C, X_MIN, X_MAX, Y_MIN, Y_MAX, Z_MIN, Z_MAX||Reichelt are tested to be fully compatible with Molex|
|Cable Connector for the above||12|
|Crimp Contact for the above||36|
|Molex KK100 6 Pin Header||1||SERIAL||alternatively, use the same as for Jumper 2 Pin|
|Optional: Cable Header for the above||1||only needed if you intend to solder your own USB-to-TTL cable|
|Optional: Crimp Contact for the above||6||only needed if you intend to solder your own USB-to-TTL cable|
|Heatsink for the Pololus||4|
|Cyanacrylate Glue||4 drops||for glueing the heatsinks onto the Pololus|
Generation 7 Electronics uses a TTL header for serial communications to the host. As many modern PCs lack a serial port, these need an appropriate USB to TTL cable:
|USB to TTL Cable||Mouser||Adafruit Industries||MAKE Store||MakerBot Industries||Watterott|
An alternative to the USB to TTL cable is the same electronics in form of a small breakout board:
|USB to TTL Breakout Board||Watterott||Sparkfun|
|Cable for the above||Watterott|
- To find out which components to put where, have the layout on your PC screen available.
- PCBs fabricated with Voronoi paths need more heat, so raise your soldering iron's temperature by about 20 deg Celsius.
- Start with the flattest parts, usually wire bridges or resistors. This way, components won't fall out when you lay the PCB on it's front for soldering. Then continue with parts of raising height, connectors are usually among the last ones.
- To ease soldering jumper headers and similar components, put a small drop of cyanacrylate glue onto the component side before inserting them. As the PCB is single-sided, this won't hurt the solder point.
The pictures show the soldered 1.1 board, semiconductors not yet inserted. 1.1 has a few different tracks between the MOSFETs and the ATmega. It's a good idea to check supplied voltages before inserting them.
- The coil 100 uH looks just like a resistor. It's a bit thicker and comes with rings brown-black-brown.
- Start with the 10 wire bridges, then follow the table in the parts list.
- As 8 pin headers for the Pololus are expensive, many kits come with lower cost 10 pin headers. Cut 2 pins off of each.
- While soldering a pair of these headers, insert a Pololu to ensure good alignment.
These steps show how to get from a soldered mainboard to a working one.
Power Source Selection
The picture shows an v1.1 board. Boards v1.0 has only one jumper in this area, which equals the "Molex 4 Pin" one. Insert the jumper and make sure the ATX20 connector is free if you supply the ATmega through the Molex 4 pin connector. Let the jumper header free when the ATX20 is inserted.
The lack of a jumper for the 5V coming through the serial line is a flaw in the 1.0 design. You should cut off pin #3 of the serial header, as the 5V coming from the serial line sometimes conflicts somewhat with the 5V coming from Gen7's own PSU.
Power Supply Checks
If you want to do some extra checks to confirm you soldered correctly before inserting semiconductors, insert the power source selection jumper as explained above and hook up your type of power supply.
No smoke? Great, then take a few measurements:
- Red: power supply inserted. In case of an ATX20 PSU, PSU not yet activated.
- Blue: as above, with ATX20 PSU activated (bridge between pin 14 PWR_ON and GND).
- Green: as above, with the Molex 4 Pin also inserted.
Even those without a voltage meter can have a look wether and when one or two LEDs light up.
That done, you can solder in the MOSFETs and plug in the Pololus and the ATmega.
Preprare your Arduino IDE
- Download and unpack or install the Arduino IDE, version 0023 or earlier.
- Also install Gen7 Arduino IDE Support.
If you fire up your Arduino IDE now, you should be able to select your variant of Gen7 board under Menu -> Tools -> Board.
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.
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 conflict with the pins used for the X_MAX, X_MIN and Y_MIN endstops. This isn't an issue in normal operation, but make really sure you have these endstops disconnected before hooking up the programmer.
- 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:
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.
The following sequence was done on Linux and should apply similarly on other OSs. Unlocking and locking the bootloader section is done on Arduinos, it's not done here.
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:0xFF: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 ### For the ATmega644P: ./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644p -P /dev/ttyACM0 \ -B 5 -U lfuse:w:0xF7:m -U hfuse:w:0xDC:m -U efuse:w:0xFF:m ./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644p -P /dev/ttyACM0 \ -B 1 -U flash:w:../Gen7/bootloaders/Gen7/bootloader-<your variant>.hex
Watch your programmer a few seconds blinking and you're done.
Programming the bootloader using Arduino IDE
-- Yet to be found out --
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.
- AVR Fuse Calculator
- Check fuses and other ATmega properties with:
./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644p -P /dev/ttyACM0 -n -v
It's recommended to either use a USB to TTL cable or USB to TTL breakout board. Custom solutions are possible, see Customisations.
Here's how you connect them, GND is always the pin to the left:
Simply plug the connector in, connect USB to your PC and a new serial port should show up in your PC's operating system.
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:
The following table shows what you get with each combination:
In principle, you can run any of the RepRap Firmwares on this board. Adjust the I/O pin layout, adjust compile time options for no secondary board/no RS485 and proceed. Just like Gen2, RAMPS or similar electronics.
Teacup's Simple Installation instructions show nicely how to do this. Two additional tweaks are required for Gen7:
- Have your Arduino IDE prepared for Gen7, as explained above.
- * Use the config.gen7-v1.1-v1.3.h and ThermistorTable.double.h you find there.
With config.h left untouched, at least something should move. This is fine for first tests, but not sufficient to have everything right for your machine. Edit your config.h further to match your machine and your setup. Config.h has a lot of comments inside the file, helping on the details. For example, STEPS_PER_MM_X should be set according to your choice of microstepping. Also, default maximum speeds are very slow, you likely want to raise MAXIMUM_FEEDRATE_....
FiveD has been run succssfully on Gen7. No installation instructions yet, though. If you want to try yourself, start with adjusting the pin layout in configure.h, see the next section, "Other Configurations".
The following should help to configure other firmwares.
|Function||ATMega Name||Teacup||Original firmware||Direction in firmware|
|X Step||PC3||DIO19||19||Digital Output|
|X Direction||PC2||DIO18||18||Digital Output|
|X Min||PB7||DIO7||7||Digital Output|
|X Max||PB6||DIO6||6||Digital Output|
|Y Step||PC7||DIO23||23||Digital Output|
|Y Direction||PC6||DIO22||22||Digital Output|
|Y Min||PB5||DIO5||5||Digital Output|
|Y Max||PB4||DIO4||4||Digital Output|
|Z Step||PA5||DIO26||26||Digital Output|
|Z Direction||PA6||DIO25||25||Digital Output|
|Z Min||PB3||DIO3||3||Digital Output|
|Z Max||PB2||DIO2||2||Digital Output|
|Extruder Step||PA3||DIO28||28||Digital Output|
|Extruder Direction||PA4||DIO27||27||Digital Output|
|Power Enable||PD7||DIO15||15||Open Drain Output, active low|
|Motors Enable||PA7||DIO24||24||Digital Output|
|Heater 1||PA0||DIO31||31||Digital Output|
|Heater 2||PB0||DIO0||0||Digital Output|
|Fan 1||PB1||DIO1||1||Digital Output|
|Temp 1||PA1||AIO1||1||Analog Input|
|Temp 2||PA2||AIO2||2||Analog Input|
This part describes possible modifcations for advanced users only.
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:
|GND||CTS (set to GND)||+5 Volts||RxD||TxD||Reset|
RxD is ATmega's pin 14 (data to the chip); TxD is ATmega's pin 15 (data from the chip).
With pin 3 you can feed the ATmega, if you have no other current source. If you have another current source, e.g. your power supply, you might have slightly different potentials of 5V though, so you better keep this pin unconnected. As of version 1.1, the board comes with a jumper to make sure no bad things can happen.
Pin 6 is usually connected to the serial line's DTR. This triggers a reset each time you start a connection to the ATmega and is very convenient when uploading firmware - no pressing of the reset button needed, then. Arduinos have this hardwired. If you keep pin 6 free, press the reset button each time your IDE (avrdude) attempts an upload.