Firmware for Sanguish

From RepRapWiki
Jump to: navigation, search

Crystal Clear action run.png
Sanguish Electronics Board

Release status: working

SanguishBeta.jpg
Description All in one electronics with Toshiba drivers
License [GPL]
Author Bryanandaimee
Contributors
Based-on Gen7 and Sanguinololu
Categories Mendel Development
CAD Models
External Link (none)



Sanguish Home ----- Build Sanguish1.0 ----- Build Sanguish1.1 ----- Firmware for Sanguish ----- Use Sanguish


Contents

General Guidelines

Modifying Firmware

The main changes that need to be made to firmware in general are the following.

1. Change the motor enable pins to non-inverting ie. active high logic, Don't forget the Extruder enable pin.

2. Change the step pulse delay if needed to at least 10us.

3. Change the power on control to active high. The power on pin only controls the stepper driver power relay.

4. Add Pin assignments if needed

MCP2200 USB Driver Installation

For windows

1. Get the driver from the Microchip MCP2200 chip product page.

2. Unpack it

3. Run the appropriate install tool. (32 or 64 bit)

4. Plug in the board. No need to power the board at this time as the MCP2200 is powered from USB.

5. Make sure it installs correctly and check which port number it gets.

For Linux

1. Just plug it in. Drivers should already be available and will install automatically

2. Check which port it gets

3. If the driver doesn't load it may need to be activated. Try "sudo modprobe cdc-acm" (without the quotes) in a terminal.

For Mac

Supposedly works. Not sure what the installation steps are. Likely similar to Linux.

Configuring Arduino

The kits are supplied with a 20Mhz crystal, and an ATMega 1284P with the Gen7 bootloader already programmed onto it. Repetier firmware is also installed by default so you can skip the step of uploading firmware unless you need to make changes to the config other than calibration.

1. Go to the Gen7_Arduino_IDE_Support page and download the latest support package. Follow directions to copy the Gen7 folder (inside the unpacked folder) into the Arduino hardware folder.

2. Start Arduino and choose the "Gen7 with ATMega1284P and 20Mhz" board from the Tools --> Board menu.

3. Choose the serial port that corresponds with the MCP2200 on your board from the Tools--> Serial Port menu.

4. Set the RST jumper next to the USB connector on the board. This enables auto reset while programming. You may wish to just leave this jumper set all the time. If you have reset issues during printing you might try pulling this jumper off.

5. Load your firmware and configure pins and config file as needed.

6. Supply power to MTR PWR terminal. The 7805 regulator pulls power from the MTR PWR input. This supplies power to the 5V components.

7. Upload firmware.

Sanguish 1.1

Function ATmega Name Teacup FiveD Direction in firmware
X Step PA3 DIO28 28 Digital Output
X Direction PA4 DIO27 27 Digital Output
X Enable PA5 DIO26 26 Digital Output
X Min PB2 DIO2 2 Digital Input
Y Step PA6 DIO25 25 Digital Output
Y Direction PA7 DIO24 24 Digital Output
Y Enable PA5 DIO26 26 Digital Output
Y Min PA2 DIO29 29 Digital Input
Z Step PC6 DIO22 22 Digital Output
Z Direction PC5 DIO21 21 Digital Output
Z Enable PC1 DIO26 26 Digital Output
Z Min PB1 DIO1 1 Digital Input
Extruder Step PC3 DIO19 19 Digital Output
Extruder Direction PC2 DIO18 18 Digital Output
Extruder Enable PA5 DIO26 26 Digital Output
Motor power Relay PB0 DIO0 0 Active high
Heater 1 PB3 DIO3 3 Digital Output
Heater 2 PB4 DIO4 4 Digital Output
Temp 1 PA1 AIO1 1 Analog Input
Temp 2 PA0 AIO0 0 Analog Input

Repetier

Repetier was tested early in the Sanguish Beta test program and works well. There are settings in the config.h for power-on logic, enable inverting, and step pulse delay. Below are the Pins.h and Configuration.h files I use for Repetier.

File:Repetier Sanguish 1.1.zip

Teacup

Teacup Firmware is a good choice for this board as the step pulse is already fairly long and doesn't need to be changed. A working config.h template is part of the sources (config.sanguish.h).

Sanguish 1.0

Function ATmega Name Teacup FiveD Direction in firmware
X Step PA3 DIO28 28 Digital Output
X Direction PA4 DIO27 27 Digital Output
X Enable PA5 DIO26 26 Digital Output
X Min PB2 DIO2 2 Digital Input
Y Step PA6 DIO25 25 Digital Output
Y Direction PA7 DIO24 24 Digital Output
Y Enable PA5 DIO26 26 Digital Output
Y Min PA2 DIO29 29 Digital Input
Z Step PC6 DIO22 22 Digital Output
Z Direction PC5 DIO21 21 Digital Output
Z Enable PC1 DIO23 23 Digital Output
Z Min PB1 DIO1 1 Digital Input
Extruder Step PC3 DIO19 19 Digital Output
Extruder Direction PC2 DIO18 18 Digital Output
Extruder Enable PA5 DIO26 26 Digital Output
Motor power Relay PB0 DIO0 0 Active high
Heater 1 PB3 DIO3 3 Digital Output
Heater 2 PB4 DIO4 4 Digital Output
Temp 1 PA1 AIO1 1 Analog Input
Temp 2 PA0 AIO0 0 Analog Input

Repetier

Repetier was tested early in the Sanguish Beta test program and works well. There are settings in the config.h for power-on logic, enable inverting, and step pulse delay. Below are the Pins.h and Configuration.h files I use for Repetier.

File:Configuration Rep Sang10.h

File:Pins Rep Sanguish10.h

Teacup

Teacup Firmware is a good choice for this board as the step pulse is already fairly long and doesn't need to be changed. A working config.h template is part of the sources (config.sanguish.h).


Coming soon

Sanguish Beta

Repetier

Repetier was tested early in the Sanguish Beta test program and works well. There are settings in the config.h for power-on logic, enable inverting, and step pulse delay. Below are the Pins.h and Configuration.h files I use for Repetier.

File:Pins.h

File:Configuration.h

Teacup

Teacup is a good choice for this board as the step pulse is already fairly long and doesn't need to be changed. A working config.h is linked below. The power on logic must be changed in the firmware by editing the code in pinio.c or just download the working copy below and replace.

File:Pinio.c This file replaces the original Pinio.c file in Teacup to invert the logic of the power on pin for the motor relay.

See discussion page for more details. --Traumflug 19:59, 11 July 2013 (UTC)

File:Config.SanguishBeta.h This is the example config.h file for the Sanguish Beta board with working pinout, inverted motor enable logic, etc.