Gen7 Board 1.3.1
Release status: devlopment
Description | Generation 7 Electronics
|
License | GPL v2
|
Author | |
Contributors | |
Based-on | [[]]
|
Categories | |
CAD Models | |
External Link | (none)
|
Note: this page describes the new Gen7 Board design currently in progress. If you want something working, use Gen7 Board 1.2.
How to get it
PCBs
Get Gen7 Board PCBs from Traumflug.
As Gen7 is designed to be manufactured on a RepRap, you can make PCBs yourself, of course. How to do this on a RepRap or a general milling machine is described on the Gen7 main page. You want one "Gen7Board" PCB and up to six "Endstop" PCBs.
Yet another way is to purchase from one of the many houses specialized in manufacturing prototype PCBs. Gen7 is single sided, so this won't cost a fortune.
Components
Get Gen7 Components Kits and Gen7 Connectors Kits from Traumflug.
If you want to assemble the collection yourself, see the #Parts Lists section.
Parts Lists
To assemble or verify these lists, open the layout with gEDA/PCB and export a "BOM". This will give you a list of all required components.
Special considerations:
- The Pololu Stepper Drivers want two single rows of 8 pin female connectors soldered into the board, so get these.
- The Pololu Stepper Drivers come with their male headers, so there's no need to purchase them seperately.
- Don't forget enough (8-9) jumpers for the jumper headers.
- Resistors with 0.25 W are on the safe side, even if the footprint name reads "0.125".
- The Pololus can be operated with up to 35 V, so you may want like-rated electrolytic capacitors.
- You may want to add the cable side of the connectors, their crimp pins and some wire.
Electronic Components
Name | Count | Designations | Vendors | Remarks | |||
---|---|---|---|---|---|---|---|
Resistor 180 Ohms | 2 | R16, R18 | Reichelt | Völkner | Farnell | RS | |
Resistor 560 Ohms | 3 | R14, R22, R23 | Reichelt | Völkner | Farnell | RS | |
Resistor 1 kOhms | 7 | R2, R6, R8, R10, R11, R12, R13 | Reichelt | Völkner | Farnell | RS | |
Resistor 4.7 kOhms | 2 | RT1, RT2 | Reichelt | Völkner | Farnell | RS | |
Resistor 10 kOhms | 3 | R1, R3, R30 | Reichelt | Völkner | Farnell | RS | |
Ceramic Capacitor 22 pF | 2 | C3, C4 | Reichelt | Völkner | Farnell | RS | |
Ceramic Capacitor 0.1 uF | 12 | C5, C8, C9, C10, C11, C12, C13, C14, C16, C17, C18, C19 | Reichelt | Völkner | Farnell | RS | |
Electrolytic Capacitor 10 uF | 2 | CT1, CT2 | Reichelt | Völkner | Farnell | ||
Electrolytic Capacitor 100 uF | 3 | C1, C2, C6 | Reichelt | Völkner | Farnell | ||
Coil 100 uH | 1 | L1 | Reichelt | Völkner | Farnell | ||
Diode 1N4004 | 3 | D1, D2, D3 | Reichelt | Völkner | Farnell | ||
LED 3 mm Green | 5 | LED2, LED3, LED4, LED5, LED6 | Reichelt | Völkner | Farnell | ||
Crystal 16 MHz or 20 MHz | 1 | U6 | Reichelt | Völkner | Farnell | ||
Reset Switch | 1 | RESET | Reichelt | Völkner | Farnell | ||
Socket for the ATmega | 1 | U1 | Reichelt | Völkner | Farnell | ||
ATmega 644 (or 644P) | 1 | Reichelt | Farnell | ||||
MOSFET IRFZ 44N | 3 | Q1, Q2, Q3 | Reichelt | Völkner | Farnell | RS | |
0.6 mm Wire | 50 cm | Völkner | for the wire bridges of single sided PCBs |
Connectors
Name | Count | Designations | Vendors | Remarks | |||
---|---|---|---|---|---|---|---|
Motor Header Molex 26-48-1045 (4 Pin) | 4 | X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156 | RS | This is the one also used in Gen2 and Gen3 Electronics | |||
Cable Connector for the above | 4 | RS | |||||
Crimp Contact for the above | 16 | RS | |||||
Alternative Motor Header | 4 | X_MOT_0.156, Y_MOT_0.156, Z_MOT_0.156, E_MOT_0.156 | Völkner | working, but incompatible alternative to the Molex 26-48-1045 | |||
Cable Connector for the above | 4 | Völkner | |||||
Crimp Contact for the above | 16 | Völkner | |||||
Jumper Header 2 Pin Pairs | 4 pair | J2/J3, J5/J6, J8/J9, J11/J12 | Reichelt | RS | cut them into appropriate pieces | ||
Jumper Header 2 Pin | 3 | J13, J14, J15 | Reichelt | Völkner | RS | cut them into appropriate pieces | |
Jumper for the two above | 9 | Reichelt | RS | ||||
ICSP Header | 1 | CONN6 | Reichelt | RS | alternatively, assemble this out of the remainings of the Jumper 2 Pin Headers | ||
Misc Header | 1 | MISC | Reichelt | Völkner | cut them to appropriate length | ||
Pololu Header | 8 or 4 | U2, U3, U4, U5 | Reichelt | Völkner | cut them to appropriate length, you want 8x 8 pins | ||
Disk Power Header | 1 | CONN2 | Reichelt | RS | |||
ATX20 Power Connector | 1 | CONN1 | RS | ||||
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 | RS | Reichelt are tested to be fully compatible with Molex | ||
Cable Connector for the above | 12 | Reichelt | RS | ||||
Crimp Contact for the above | 36 | Reichelt | RS | ||||
Molex KK100 6 Pin Header | 1 | SERIAL | RS | alternatively, use the same as for Jumper 2 Pin | |||
Optional: Cable Header for the above | 1 | RS | only needed if you intend to solder your own USB-to-TTL cable | ||||
Optional: Crimp Contact for the above | 6 | RS | only needed if you intend to solder your own USB-to-TTL cable | ||||
Heatsink for the Pololus | 4 | Völkner | RS | ||||
Cyanacrylate Glue | 4 drops | for glueing the heatsinks onto the Pololus |
Miscellaneous
Generation 7 Electronics uses a TTL header for serial communications to the host. As many modern PCs lack a serial port, these need an appropriate USB to TTL cable:
USB to TTL Cable | Mouser | Adafruit Industries | MAKE Store | MakerBot Industries | Watterott |
---|
An alternative to the USB to TTL cable is the same electronics in form of a small breakout board:
USB to TTL Breakout Board | Watterott | Sparkfun |
---|---|---|
Cable for the above | Watterott |
Assembly Instructions
- To find out which components to put where, have the layout on your PC screen available.
- PCBs fabricated with Voronoi paths need more heat, so raise your soldering iron's temperature by about 20 deg Celsius.
- Start with the flattest parts, usually wire bridges or resistors. This way, components won't fall out when you lay the PCB on it's front for soldering. Then continue with parts of raising height, connectors are usually among the last ones.
- To ease soldering jumper headers and similar components, put a small drop of cyanacrylate glue onto the component side before inserting them. As the PCB is single-sided, this won't hurt the solder point.
The pictures show the soldered mainboard, semiconductors not yet inserted. It's a good idea to check supplied voltages before inserting them.
- The coil 100 uH looks just like a resistor. It's a bit thicker and comes with rings brown-black-brown.
- Start with the 10 wire bridges, then follow the table in the parts list.
- As 8 pin headers for the Pololus are expensive, many kits come with lower cost 10 pin headers. Cut 2 pins off of each.
- While soldering a pair of these headers, insert a Pololu to ensure good alignment.
Setup
These steps show how to get from a soldered mainboard to a working one.
Power Source Selection
In the lower right corner of the board you see three jumper headers. You may jumper one, and only one of them.
- Serial: feed 5 Volts from the serial connector. USB2TTL converter cables provide this pin. The ATmega as well as the Pololus are supplied all the time, then. You can leave the ATX20 disconnected.
- ATX20: power 5 Volts through the big, 20 pin PSU connector. The ATmega will be supplied all the time, while other parts are supplied only on demand. This allows to turn the PSU on and off with G-Code commands. For example, Teacup firmware fires up the PSU on incoming heater or movement commands and turns it off automatically 30 seconds after the last movement or when all heaters are done.
- Molex 4 Pin: supply 5 Volts through the Molex connector in the upper left corner of the board. The ATmega as well as the Pololus are supplied all the time, then. You can leave the ATX20 disconnected.
Power Supply Checks
If you want to do some extra checks to confirm you soldered correctly before inserting semiconductors, insert the power source selection jumper as explained above and hook up your type of power supply.
No smoke? Great, then take a few measurements:
- 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.
- Download and unpack the latest Gen7 Arduino IDE Support package.
- Find the folder
Gen7
in this package and move it into thehardware
folder inside the Arduino package.
If you fire up your Arduino IDE now, you should be able to select your variant of Gen7 board under Menu -> Tools -> Board.
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.
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.
References
- AVR Fuse Calculator
- Check fuses and other ATmega properties with:
./avrdude -C ./avrdude.conf -c <your programmer> -p atmega644p -P /dev/ttyACM0 -n -v
Serial Connection
It's recommended to either use a USB to TTL cable or USB to TTL breakout board. Custom solutions are possible, see Customisations.
Here's how you connect them, GND is always the pin to the left:
Simply plug the connector in, connect USB to your PC and a new serial port should show up in your PC's operating system.
Microstepping
Last not least, you probably want to set up microstepping to something other than the default. The default is halfstepping. Smaller microsteps make the motors run smoother, but also raise the computing load for the ATmega. The smallest steps possible are 1/16 microstepping.
Feel free to select different settings for each of the motors, e.g. 1/8 microstepping for threaded rod axes (Z) and 1/16 microstepping for belt driven axes (X, Y).
Selecting microstepping is done with the jumpers in front of each of the Pololus, they refer to MS2 and MS3. Allegro documents also know about MS1, which is hard wired to High in Gen7. Plugging a jumper sets High, while leaving the header free sets Low. Here's a detail picture of a Gen7, with MS2 set to High, MS3 set to Low:
The following table shows what you get with each combination:
MS2 | MS3 | Microstep Resolution |
---|---|---|
Open | Open | Half step |
Open | Plugged | Not allowed! |
Plugged | Open | Eighth step |
Plugged | Plugged | Sixteenth step |
Firmware
In principle, you can run any of the RepRap Firmwares on this board. Adjust the I/O pin layout, adjust compile time options for no secondary board/no RS485 and proceed. Just like Gen2, RAMPS or similar electronics.
Teacup Firmware
Teacup's Simple Installation instructions show nicely how to do this. Two additional tweaks are required for Gen7:
- Have your Arduino IDE prepared for Gen7, as explained above.
- Instead of using one of the prepared config.hs from the Teacup repository, use the one attached to this post: [1]. Oh, and I hope somebody with an extruder can donate a Gen7 config.h for inclusion into the Tecup repository ...
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.
FiveD Firmware
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".
Other Configurations
The following should help to configure other firmwares.
Pinout
In bold changes from board v1.0
Function | ATMega Name | Teacup | Original firmware | Direction in firmware |
---|---|---|---|---|
X Step | PC3 | DIO19 | 19 | Digital Output |
X Direction | PC2 | DIO18 | 18 | Digital Output |
X Min | PB7 | DIO7 | 7 | Digital Output |
X Max | PB6 | DIO6 | 6 | Digital Output |
Y Step | PC7 | DIO23 | 23 | Digital Output |
Y Direction | PC6 | DIO22 | 22 | Digital Output |
Y Min | PB5 | DIO5 | 5 | Digital Output |
Y Max | PB2 | DIO2 | 2 | Digital Output |
Z Step | PA5 | DIO26 | 26 | Digital Output |
Z Direction | PA6 | DIO25 | 25 | Digital Output |
Z Min | PB1 | DIO1 | 1 | Digital Output |
Z Max | PB0 | DIO0 | 0 | Digital Output |
Extruder Step | PA3 | DIO28 | 28 | Digital Output |
Extruder Direction | PA4 | DIO27 | 27 | Digital Output |
Power Enable | PD7 | DIO15 | 15 | Open Drain Output, active low |
Motors Enable | PA7 | DIO24 | 24 | Digital Output |
Heater 1 | PB4 | DIO4 | 4 | Digital Output |
Heater 2 | PB3 | DIO3 | 3 | Digital Output |
Fan 1 | PA0 | DIO31 | 31 | Digital Output |
Temp 1 | PA1 | AIO1 | 1 | Analog Input |
Temp 2 | PA2 | AIO2 | 2 | Analog Input |
Customisations
This part describes possible modifcations for advanced users only.
Serial Connection
If you want a custom solution, you can create one, of course. Just connecting an RS-232 port to the serial connector won't work, however, even if you ignored the different voltage levels. ATmega's serial signal is inverted (Logical 0 = 5V, Logical 1 = 0V). Here's the serial connector's pinout:
1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|
GND | CTS (set to GND) | +5 Volts | RxD | TxD | Reset |
RxD is ATmega's pin 14 (data to the chip); TxD is ATmega's pin 15 (data from the chip).
With pin 3 you can feed the ATmega, if you have no other current source. If you have another current source, e.g. your power supply, you might have slightly different potentials of 5V though, so you better keep this pin unconnected. As of version 1.1, the board comes with a jumper to make sure no bad things can happen.
Pin 6 is usually connected to the serial line's RTS. This triggers a reset each time you start a connection to the ATmega and is very convenient when uploading firmware - no pressing of the reset button needed, then. Arduinos have this hardwired. If you keep pin 6 free, press the reset button each time your IDE (avrdude) attempts an upload.