Marlin pin usage

1,654 views
Skip to first unread message

Robsbots

unread,
Oct 31, 2013, 3:52:48 AM10/31/13
to cyclone-p...@googlegroups.com
Hi guys.

I'm setting up the firmware for use on the board I designed.
I have some questions about the current pin definitions and their use in the current Marlin version downloaded from the Cyclone git_hub.

I have the axis stepper and end stop pin defines set, but I need to know what the other pins are used for.

Which pin definition should be used to control the spindle ? I would assume E0_ENABLE_PIN, The Extruder 0 enable pin.

Which pin definitions should I use for the non printer type hardware such as the MOS power drivers and the relays.
I need 1 pin per relay. There are 2 relays.
I need 1 pin per MOS driver. There are 2 MOS drivers.
One of these will be used to control the spindle I would assume.
Regarding the Z probing. Can I use a pin other than the Z_MIN_PIN or is that fixed in code ?

Thanks for the help.

Rob.

Iceflow

unread,
Oct 31, 2013, 5:43:06 PM10/31/13
to cyclone-p...@googlegroups.com
Hello Robsbots.

You can use the D8, D9, D10 pins in a ramps board, this are used for the heaters in the repraps :D see the ramps schematic. http://reprap.org/wiki/RAMPS_1.4#Summary

E0 and E1 can also be used... his fuctions are "similar" ON-OFF hehehehe

For the zprobing im not sure if the Zmin is fixed in the code, dont really know what that means hehehehe :P but i suppose that any of the endstops pins can be used... X- X+ Y- Y+ Z- Z+

Dont know what pin uses Carlos for the zprobbing, maybe he can tell us :P and maybe he has some advice for the other pins, he know much more than i about all this hehehehe

I made some new PDFs for your board :D dont mind to ask for new ones if you made changes!! ;)

Here they are!!


2013/10/31 Robsbots <r...@robsbots.org.uk>

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.
Para ver este debate en la Web, visita https://groups.google.com/d/msgid/cyclone-pcb-factory/6fffd195-f637-4fdc-a5c5-030eb47ce282%40googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.

outputs.zip

Robsbots

unread,
Oct 31, 2013, 10:41:15 PM10/31/13
to cyclone-p...@googlegroups.com
Hi Iceflow

Think I may have cracked the pdf thing. Check the output folder in the github and you should find some pdf files of the board.
These are generated with Ghostscript from the post script output from KiCad.

Hopefully these files will be compatible with Adobe. Have a look and let me know if you can open them.

Regarding the pins. I would think we should choose one pin definition from Marlin to represent the "tool power". I'm not sure what is activated in the G-code generated by the current tool chain
Not really sure which one would be most appropriate though. I think Carlos has done some work with the Marlin code so thought he may have an opinion on which should be used. Likewise for the Z-probe.  I think the current pin being used for Z-probing is the Z axis minimum end stop pin but I'm not sure if it has to be this pin. My board provides a separate pin for both Z min and Z probe.

Thanks.

Rob

 

On Thursday, 31 October 2013 21:43:06 UTC, Iceflow wrote:
Hello Robsbots.

You can use the D8, D9, D10 pins in a ramps board, this are used for the heaters in the repraps :D see the ramps schematic. http://reprap.org/wiki/RAMPS_1.4#Summary

E0 and E1 can also be used... his fuctions are "similar" ON-OFF hehehehe

For the zprobing im not sure if the Zmin is fixed in the code, dont really know what that means hehehehe :P but i suppose that any of the endstops pins can be used... X- X+ Y- Y+ Z- Z+

Dont know what pin uses Carlos for the zprobbing, maybe he can tell us :P and maybe he has some advice for the other pins, he know much more than i about all this hehehehe

I made some new PDFs for your board :D dont mind to ask for new ones if you made changes!! ;)

Here they are!!


2013/10/31 Robsbots <r...@robsbots.org.uk>
Hi guys.

I'm setting up the firmware for use on the board I designed.
I have some questions about the current pin definitions and their use in the current Marlin version downloaded from the Cyclone git_hub.

I have the axis stepper and end stop pin defines set, but I need to know what the other pins are used for.

Which pin definition should be used to control the spindle ? I would assume E0_ENABLE_PIN, The Extruder 0 enable pin.

Which pin definitions should I use for the non printer type hardware such as the MOS power drivers and the relays.
I need 1 pin per relay. There are 2 relays.
I need 1 pin per MOS driver. There are 2 MOS drivers.
One of these will be used to control the spindle I would assume.
Regarding the Z probing. Can I use a pin other than the Z_MIN_PIN or is that fixed in code ?

Thanks for the help.

Rob.

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-factory+unsub...@googlegroups.com.

Robsbots

unread,
Nov 1, 2013, 6:01:24 AM11/1/13
to cyclone-p...@googlegroups.com
Things are looking good.

Had a LOT of help from Kobus (Sorry for bugging you so much) and have the GUI2 running on Ubuntu. I have Marlin running on my bread boarded controller.
I can send G-code to it. I just need to know how to direct the M3 and M5 g-codes to a pin. As far as I know Marlin does not recognise these codes. Could we cheat and use a fan control ?
I would like 4 digital controls for spindle and other hardware. Should we hack Marlin to use more M codes or re-purpose existing codes ?

Let e know what you think.

Thanks

Rob.

Samuel Kranz

unread,
Nov 1, 2013, 11:41:57 AM11/1/13
to cyclone-p...@googlegroups.com
some time ago ive modified the marlin code to support the m3 and m5 gcode.. but for the extruder pin.. you may have a look to it..

Robert Last

unread,
Nov 1, 2013, 1:24:53 PM11/1/13
to cyclone-p...@googlegroups.com
That's great. I assume its the extruder enable pin that is controlled by the M3/M5 commands.

I should be able to get the controller to activate the spindle. I will hopefully be testing the Z probing tomorrow. Do I have to use the Z endstop pin or can I configure any pin for the Z probe ?

I still need to play with my Marlin pins config file. I get errors regarding temperature and Marlin stops and asks for a M999 reset before it will continue. I think I need to disable the temperature testing somehow.

I will let you know how I get on.

Thanks

Rob
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.

Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 1, 2013, 1:44:57 PM11/1/13
to cyclone-p...@googlegroups.com
yeah its the extruder enable pin.. the temperature control can be disabled in the config.h - you can select the used temperature sensor - and there is an option to disable the tempsensor..

Robert Last

unread,
Nov 1, 2013, 2:18:27 PM11/1/13
to cyclone-p...@googlegroups.com
Thanks.

I have the spindle attached to the E0 step enable pin.

I think the temperature sensing is disabled. I have the following :-
#define TEMP_SENSOR_0 0
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

Currently I'm getting the following error from Marlin :-

Error:0
: Extruder switched off. MINTEMP triggered !
Error:Printer stopped due to errors. Fix the error and use M999 to
restart. (Temperature is reset. Set it after restarting)
ok

I will need to look though my pins.h file and work out what is happening.
Currently all my endstops are hanging off the analogue pins plus X_step
and X_direction.

Iceflow

unread,
Nov 1, 2013, 7:07:06 PM11/1/13
to cyclone-p...@googlegroups.com
The PDFs now opens :D good work!!


2013/11/1 Robsbots <r...@robsbots.org.uk>
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.

Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Robert Last

unread,
Nov 1, 2013, 7:24:45 PM11/1/13
to cyclone-p...@googlegroups.com
Great news. I knew I had installed something but could not remember what :)

This the problem with getting old.....

I then found ghostscript again and gave it a go.

Thanks

Rob


2013/11/1 Robsbots <r...@robsbots.org.uk>


2013/10/31 Robsbots <r...@robsbots.org.uk>
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.
Para ver este debate en la Web, visita https://groups.google.com/d/msgid/cyclone-pcb-factory/6fffd195-f637-4fdc-a5c5-030eb47ce282%40googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.
--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.
Para ver este debate en la Web, visita https://groups.google.com/d/msgid/cyclone-pcb-factory/d6210004-d731-440f-b537-1732488f435f%40googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.
--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Robsbots

unread,
Nov 3, 2013, 12:28:59 PM11/3/13
to cyclone-p...@googlegroups.com
Hi guys. I just can't figure out the config for Marlin.

I have the following set in pins.h :-


/*******************************************************************************
* Robsbots Cyclone controller pin assignment
* Using the GEN7 files for the Arduino IDE.
Pin mapping for the controller design
********************************************************************************/
/* These Pins are assigned for the modified GEN7 Board from Alfons3 Please review the pins and adjust it for your needs*/

//                                   +---\/---+
//  Z max endstop   INT0 (D 0) PB0  1|        |40  PA0 (AI 0 / D31)    Z min endstop
//  Relay 1         INT1 (D 1) PB1  2|        |39  PA1 (AI 1 / D30) Y max endstop
//  Relay 2         INT2 (D 2) PB2  3|        |38  PA2 (AI 2 / D29) Y min endstop
//  MOS driver 1     PWM (D 3) PB3  4|        |37  PA3 (AI 3 / D28) X max endstop
//  MOS driver 2     PWM (D 4) PB4  5|        |36  PA4 (AI 4 / D27) X min endstop
//  Programming     MOSI (D 5) PB5  6|        |35  PA5 (AI 5 / D26) X step enable
//  Programming     MISO (D 6) PB6  7|        |34  PA6 (AI 6 / D25) X step
//  Programming      SCK (D 7) PB7  8|        |33  PA7 (AI 7 / D24) X direction
//  Programming                RST  9|        |32  AREF
//                             VCC 10|        |31  GND
//                             GND 11|        |30  AVCC
//                           XTAL2 12|        |29  PC7 (D 23)    Y Step Enable
//                           XTAL1 13|        |28  PC6 (D 22)    Y Step
//  USB recieve     RX0 (D 8)  PD0 14|        |27  PC5 (D 21) TDI    Y Direction
//  USB transmit    TX0 (D 9)  PD1 15|        |26  PC4 (D 20) TDO    Z Enable
//  Spare 1         RX1 (D 10) PD2 16|        |25  PC3 (D 19) TMS    Z Step
//  Spare 2         TX1 (D 11) PD3 17|        |24  PC2 (D 18) TCK    Z Direction
//  Spare 3         PWM (D 12) PD4 18|        |23  PC1 (D 17) SDA    I2C SDA
//  Spare 4         PWM (D 13) PD5 19|        |22  PC0 (D 16) SCL    I2C SCL
//  Sapre 5         PWM (D 14) PD6 20|        |21  PD7 (D 15) PWM    Z Probe
//                                   +--------+
//

#if MOTHERBOARD == 14
#define KNOWN_BOARD

#if !defined(__AVR_ATmega1284P__)
    #error Oops!  Make sure you have 'Gen7 with ATMEGA1284p and 16MHz' selected from the 'Tools -> Boards' menu.

#endif

    //x axis pins
    #define X_STEP_PIN      25                 
    #define X_DIR_PIN       24           
    #define X_ENABLE_PIN    26
    #define X_MIN_PIN       27
    #define X_MAX_PIN       28
   

    //y axis pins
    #define Y_STEP_PIN      22
    #define Y_DIR_PIN       21
    #define Y_ENABLE_PIN    23
    #define Y_MIN_PIN       29
    #define Y_MAX_PIN       30
   
    //z axis pins
    #define Z_STEP_PIN      19
    #define Z_DIR_PIN       18
    #define Z_ENABLE_PIN    20
    #define Z_MIN_PIN       31
    #define Z_MAX_PIN       0
   
    //extruder pins
    #define E0_STEP_PIN     12     // Needs setting
    #define E0_DIR_PIN      13     // Needs setting
    #define E0_ENABLE_PIN    2     // Needs setting
   
    #define TEMP_0_PIN      -1     // Needs setting // was 7
    #define TEMP_1_PIN      -1     // Needs setting
    #define TEMP_2_PIN      -1     // Needs setting
    #define TEMP_BED_PIN    -1     // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)
    
    #define HEATER_0_PIN    14     // Will not compile if set to -1
    #define HEATER_1_PIN    -1     // Needs setting
    #define HEATER_2_PIN    -1     // Needs setting
    #define HEATER_BED_PIN  -1     // Needs setting

    #define SDPOWER         -1     // Needs setting
    #define SDSS            -1     // Needs setting              //  SCL pin of I2C header || CS Pin for SD Card support
    #define LED_PIN         -1     // Needs setting

    #define FAN_PIN         -1     // Needs setting
    #define PS_ON_PIN       -1     // Needs setting
    //our pin for debugging.

    #define DEBUG_PIN       -1     // Needs setting

    #define BEEPER -1   
    #define SDCARDDETECT    -1        
    #define SUICIDE_PIN     -1     //has to be defined; otherwise Power_off doesn't work
   
    #define KILL_PIN        -1     // Needs setting
    //Pins for 4bit LCD Support
    #define LCD_PINS_RS     -1     // Needs setting
    #define LCD_PINS_ENABLE -1     // Needs setting
    #define LCD_PINS_D4     -1     // Needs setting
    #define LCD_PINS_D5     -1     // Needs setting
    #define LCD_PINS_D6     -1     // Needs setting
    #define LCD_PINS_D7     -1     // Needs setting
   
     //buttons are directly attached
    #define BTN_EN1         -1    // Needs setting
    #define BTN_EN2         -1    // Needs setting
    #define BTN_ENC         -1    // the click    // Needs setting
   
    #define BLEN_C          -1    // Needs setting
    #define BLEN_B          -1    // Needs setting
    #define BLEN_A          -1    // Needs setting

    #define encrot0         -1    // Needs setting
    #define encrot1         -1    // Needs setting
    #define encrot2         -1    // Needs setting
    #define encrot3         -1    // Needs setting
#endif

The configuration.h contains the following for the temperature section :-

#define TEMP_SENSOR_0 0
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

// Actual temperature must be close to target for this long before M109 returns success
#define TEMP_RESIDENCY_TIME 1    // (seconds)
#define TEMP_HYSTERESIS 3       // (degC) range of +/- temperatures considered "close" to the target one
#define TEMP_WINDOW     1       // (degC) Window around target to start the recidency timer x degC early.

// The minimal temperature defines the temperature below which the heater will not be enabled It is used
// to check that the wiring to the thermistor is not broken.
// Otherwise this would lead to the heater being powered on all the time.
#define HEATER_0_MINTEMP 0
#define HEATER_1_MINTEMP 0
#define HEATER_2_MINTEMP 0
#define BED_MINTEMP 0

If I connect to the controller I get the following error :-
start
echo: External Reset
Marlin 1.0.0
echo: Last Updated: Nov  3 2013 16:57:55 | Author: Carlosgs
Compiled: Nov  3 2013
echo: Free Memory: 12666  PlannerBufferBytes: 1232

Error:0
: Extruder switched off. MINTEMP triggered !
Error:Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)

I'm just not sure what I should do to stop this.
I also need to manually reset the controller for it to connect.

Any ideas would be much appreciated.

Thanks,

Rob



Iceflow

unread,
Nov 3, 2013, 6:18:52 PM11/3/13
to cyclone-p...@googlegroups.com

You need to disable all the thermistor settings... pronterface its expecting temperature readings and you dont have thermistors conected to the board so that error appears...

Configuring all thermistors to 0 will disable all.

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Robert Last

unread,
Nov 3, 2013, 6:37:20 PM11/3/13
to cyclone-p...@googlegroups.com
I think I have.

If you check below the pins.h config in my previous message you should see the thermistor section from the configuration.h file.
That contains the following code :-

#define TEMP_SENSOR_0 0
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

Apart from those setting, what else should I change ?

Thanks

Rob

Iceflow

unread,
Nov 3, 2013, 6:47:01 PM11/3/13
to cyclone-p...@googlegroups.com
I read fast and dont see that... :S as far as i know with that settings it will "ignore" the thermistors... did you upload correctly the firmware with that settings?


2013/11/4 Robert Last <r...@robsbots.org.uk>

Robert Last

unread,
Nov 3, 2013, 6:59:18 PM11/3/13
to cyclone-p...@googlegroups.com
I think so. There is no way to check with the Arduino ide. But no errors where shown when I uploaded the code.

Kobus du Toit

unread,
Nov 3, 2013, 7:03:37 PM11/3/13
to cyclone-p...@googlegroups.com
You can maybe print out to the serial port.  If you see messages appearing then you know your new code has been uploaded
You can also enable verbose in the Arduino settings and you can then see what it is doing

Robert Last

unread,
Nov 3, 2013, 7:10:10 PM11/3/13
to cyclone-p...@googlegroups.com
I set the verbose output and AVRDude verified the code had been uploaded.

Still the same problem though.
Rather than using pronterface I'm currently using Kobus's GUI2 interface
to connect.
> --
> Has recibido este mensaje porque est�s suscrito al grupo "Cyclone PCB
> Factory" de Grupos de Google.
> Para anular la suscripci�n a este grupo y dejar de recibir sus correos
> electr�nicos, env�a un correo electr�nico a
> cyclone-pcb-fac...@googlegroups.com.
> Para publicar una entrada en este grupo, env�a un correo electr�nico a
> cyclone-p...@googlegroups.com.
> Para ver este debate en la Web, visita
> https://groups.google.com/d/msgid/cyclone-pcb-factory/b984455d-5bf8-4d7d-a9bc-4f43b54f0822%40googlegroups.com.
> Para obtener m�s opciones, visita
> https://groups.google.com/groups/opt_out.

Iceflow

unread,
Nov 3, 2013, 7:17:23 PM11/3/13
to cyclone-p...@googlegroups.com
If all its ok with the upload it have to be something with the pins... its the other thing you "touched", but i cant understand why? i have disabled the thermistors some times for trying things and its ok... :S at least in my printer...


2013/11/4 Robert Last <r...@robsbots.org.uk>

Robert Last

unread,
Nov 3, 2013, 7:27:06 PM11/3/13
to cyclone-p...@googlegroups.com
Yeah.

Samuel told me to set the Thermistor values to 0 which sounds right. I have chosen pins on the avr to make the board easier to route. I just have no real knowledge of Marlin so can't see why it does not work.

I'm sure Carlos or somebody will see my pin setup and say "You idiot, you need to set setting X to Y" or something, I just don't know enough to figure it out my self.

Iceflow

unread,
Nov 3, 2013, 8:10:27 PM11/3/13
to cyclone-p...@googlegroups.com
I too cant help you more :( its beyond my knowledge... sorry.


2013/11/4 Robert Last <r...@robsbots.org.uk>

Robert Last

unread,
Nov 3, 2013, 8:12:05 PM11/3/13
to cyclone-p...@googlegroups.com
Thanks for trying. I think I need a Marlin guru on this one. :)

Rob

Daniel "yOPERO" Garrido

unread,
Nov 4, 2013, 2:46:37 PM11/4/13
to cyclone-p...@googlegroups.com
Rob

Try enabling "cold extrusion", now I am on my phone so I can not give much more details.

Daniel "yOPERO" Garrido

unread,
Nov 4, 2013, 2:48:48 PM11/4/13
to cyclone-p...@googlegroups.com
Also I think there is another setting called " minimum extrusion temp"

Peter van der Walt (Gmail)

unread,
Nov 4, 2013, 2:50:12 PM11/4/13
to cyclone-p...@googlegroups.com

In repetier you can set num_extruders: 0 and heated_bed = false.

Not sure if marlin has similar

On Nov 4, 2013 9:48 PM, "Daniel "yOPERO" Garrido" <yope...@gmail.com> wrote:
Also I think there is another setting called " minimum extrusion temp"

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 4, 2013, 3:18:36 PM11/4/13
to cyclone-p...@googlegroups.com
I think "prevent_dangerous_extrusion" is the meant setting in configuration.h

Robsbots

unread,
Nov 5, 2013, 1:24:06 PM11/5/13
to cyclone-p...@googlegroups.com
Hi guys.

I'm still having the same problem.

Currently I have the following set :-
in pins.h

    #define TEMP_0_PIN      -1   
    #define TEMP_1_PIN      -1   
    #define TEMP_2_PIN      -1   
    #define TEMP_BED_PIN    -1 
    
    #define HEATER_0_PIN    -1  
    #define HEATER_1_PIN    -1  
    #define HEATER_2_PIN    -1  
    #define HEATER_BED_PIN  -1
in configuration.h

    #define TEMP_SENSOR_0 0
    #define TEMP_SENSOR_1 0
    #define TEMP_SENSOR_2 0
    #define TEMP_SENSOR_BED 0

    #define HEATER_0_MINTEMP -1
    #define HEATER_1_MINTEMP -1
    #define HEATER_2_MINTEMP -1
    #define BED_MINTEMP -1

    #define HEATER_0_MAXTEMP 250
    #define HEATER_1_MAXTEMP 250
    #define HEATER_2_MAXTEMP 250
    #define BED_MAXTEMP 120
    //#define HEATER_BED_DUTY_CYCLE_DIVIDER 4

    //#define PREVENT_DANGEROUS_EXTRUDE

Apart from hacking at Marlin and removing the temperature checking routines I'm not sure what to hit next.

Any more pointers would be much appreciate.

Thanks

Rob

Peter van der Walt (Gmail)

unread,
Nov 5, 2013, 2:05:12 PM11/5/13
to cyclone-p...@googlegroups.com

Why the affinity to marlin?   Repetier takes two lines to become a cnc....

Or Grbl?

Peter

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Robert Last

unread,
Nov 5, 2013, 2:15:35 PM11/5/13
to cyclone-p...@googlegroups.com
No real reason to be honest.  I think Carlos has Marlin working so I though I'd get that working on my set up. Its also what I use for my printer. I have been thinking I might change though. I will have a look at Repetier at some stage this evening and see if I can configure it.
I does bug me that I can't make it work though. I don't like the thought that I've failed.

I may have to put this behind me and move on I think.

Peter van der Walt (Gmail)

unread,
Nov 5, 2013, 2:17:54 PM11/5/13
to cyclone-p...@googlegroups.com

Sometimes the failure lies not in oneself but rather in the worldwide belief that marlin is the best.  Yes its good, but i keep going back to repetier for two reasons. Ease of config and dev support. Repetier sorts out any questions in record time.

I ran my OpenCNC on Repetier (wiki.openhardware.co.za)

All it needs is to set number of extruders to 0 and heated bed to false

Robert Last

unread,
Nov 5, 2013, 3:52:16 PM11/5/13
to cyclone-p...@googlegroups.com
I'm gonna have a play with it now.  I just keep thinking the problem is with my design rather than Marlin.

If I can get Repetier to work with my circuit then I'll be happier.

Wish me luck.

Rob

Peter van der Walt (Gmail)

unread,
Nov 5, 2013, 3:56:25 PM11/5/13
to cyclone-p...@googlegroups.com

Holding thumbs and more than happy to help.  Know repetier inside and out.  (;

Robert Last

unread,
Nov 5, 2013, 4:36:27 PM11/5/13
to cyclone-p...@googlegroups.com
Hi Peter.

I'd like to take you up on your offer to help.

I have made a definition for the pins on my board. I just copied another definition and edited it to match.

My problem is, if I set NUM_EXTRUDER = 0 in configuration.h the software fails to compile.
I have tried this with versions 0.83 and 0.82.2

The compiler error is expected '}' before 'else'
Line 1134
This error disapears if I set NUM_EXTRUDER to 1

This is using the RAMPS pin config. I have a ramps I can play with to compare problems between that and my board.

I have not found the heat bed setting yet.
Could you let me know which version of the firmware you used for your cnc work.

Thanks

Rob

Kobus du Toit

unread,
Nov 5, 2013, 8:17:43 PM11/5/13
to cyclone-p...@googlegroups.com
I also tried it with 0.83 and Arduino 1.0.5.  Same error as what you are getting


Robsbots

unread,
Nov 6, 2013, 11:33:48 AM11/6/13
to cyclone-p...@googlegroups.com
I have also taken a quick look at GRBL but unfortunately I would need to redesign my board to comply with their pin mapping rules.

On to teacup and Sprinter. I may look at those tomorrow. (Or maybe not. Just got a pi cam to play with ;) )

Samuel Kranz

unread,
Nov 6, 2013, 3:19:09 PM11/6/13
to cyclone-p...@googlegroups.com
I think im gonna use grbl.. Yesterday I started to design a pcb..

Daniel "yOPERO" Garrido

unread,
Nov 7, 2013, 5:14:24 AM11/7/13
to cyclone-p...@googlegroups.com
So far I have only performed pen tests on my Cyclone, I am using grbl on a arduino uno and a cnc shield, grbl has everything we need and also is very simple.

We could open a branch and work on modifying it to match Cyclone's requirements. In 1 or 2 weeks I will have more time to spare.

Robert Last

unread,
Nov 7, 2013, 5:52:43 AM11/7/13
to cyclone-p...@googlegroups.com
Hi Samuel.

I have some competition :)

Will your board be machinable on the cyclone ?
What processor will you use ?
Will you use the stepstick drivers for the steppers ?

Would love to see the design when done.

Rob.

Samuel Kranz

unread,
Nov 7, 2013, 8:24:59 AM11/7/13
to cyclone-p...@googlegroups.com
Hi Rob

I will publish my pcb in a few days.. Most of the components will be SMT (Actually dont like THT. maybe later).. the pcb is doublesided (only one component side) to reduce its size..

Will your board be machinable on the cyclone ?
- Hopefully yes.. smallest trace is 12mil. maybe double sided will be a bit tricky..

What processor will you use ? 
- the same as the arduino uno - Atmega 328 - the board will be fully compatible to the arduino uno r3 and grbl.. all the pins are useable.. except the bootloader.. (Im using the FT230X so the arduino bootloader wont work- maybe the serial converter will be changed .. I have to think about it)..

Will you use the stepstick drivers for the steppers ? 
- of course i´ll use the stepstickdrivers.. (x,y,z), there is also a relay for the spindle.. and three endstops .. everything can also be connected over the pins (ability to use external components e.g. spindle driver, motor driver, lcd, even the serial converter to use a bluetooth module..)

the z probing wont have a seperate connector.. (GRBL dont support it atm) but it can be added through a unused pin..

I havnt thought about changing the firmware to support everything.. 

Samuel 

Samuel Kranz

unread,
Nov 8, 2013, 4:35:35 AM11/8/13
to cyclone-p...@googlegroups.com
Here some pics of the eagle files



Iceflow

unread,
Nov 8, 2013, 5:45:10 AM11/8/13
to cyclone-p...@googlegroups.com
Looks good :D


El 8 de noviembre de 2013 10:35, Samuel Kranz <secu...@gmail.com> escribió:
Here some pics of the eagle files



--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 8, 2013, 3:36:48 PM11/8/13
to cyclone-p...@googlegroups.com
Im finally done :D..

I'll start etching the pcb the next hours :D

Hope everything works..

Another high res pic..

Iceflow

unread,
Nov 8, 2013, 3:47:57 PM11/8/13
to cyclone-p...@googlegroups.com
Are you going to etch a double sided board? how do you do that at home? O.o how you manage to do the vias correctly? im very interested to know hehehehe


--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 8, 2013, 4:57:34 PM11/8/13
to cyclone-p...@googlegroups.com
There are two options for me ;) 
 - the toner transfer method
 - or using a photosensitive pcb

i think how to do it with a photosensitive pcb is clear ( print on a foil - adjusting - ... )
-> i dont like that method (cause I dont like chemistry ^^ ) 

so usually I use the toner transfer method..

also printing on an overhead foil (laserprinter)
but i print the bottom side mirrored over the top side so the foil can be folded (adjusting and stuff)
next step ist to "iron" the pcb -> for that I use my modified laminator.. to heat both sides same time..
-> etch :D

takes me an hour to manufature 2 similar pcbs and ill get an accuracy to etch 10mil traces (up to 6mil for spaces)
usually i get the vias more or less correct (I would assume 4 out of 5 pcb work) .. 
vias with 0.6mm hole and 1.2mm diameter usually work.. (there are always bad pcbs and thats why I always etch two) ;)

happy etching ^^

btw some pictures of the tonertransfer ;) etching is for tomorrow ;)


Iceflow

unread,
Nov 8, 2013, 7:22:54 PM11/8/13
to cyclone-p...@googlegroups.com

Yeah, all that stuff i know heehhhe i want to know how do you do the vias and connect both sides of the copper at home ;)

Anyway, that boards looks awesome dude!! Well well done work!!

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 9, 2013, 2:28:17 AM11/9/13
to cyclone-p...@googlegroups.com
oh oops ^^ usually I use a piece of wire to connect both sides. ^^

Iceflow

unread,
Nov 9, 2013, 3:35:10 AM11/9/13
to cyclone-p...@googlegroups.com
Hell!! what a shame :P i expected some fancy and unknown way to do it hehehehe well... its a way at least ;) i hoped that there is some hidden and new way to do the vias lol

Anyway, can you share your files to take a peek to this board? BOM, PDF of the board to isolate, and so on... :D

Great job mate, and of course, when you have photos of the board soldered show to us!! :P and tell us how it goes when you try it!!


El 9 de noviembre de 2013 08:28, Samuel Kranz <secu...@gmail.com> escribió:
oh oops ^^ usually I use a piece of wire to connect both sides. ^^

--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Kobus du Toit

unread,
Nov 9, 2013, 3:48:38 AM11/9/13
to cyclone-p...@googlegroups.com


--
Has recibido este mensaje porque estás suscrito a un tema del grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este tema, visita https://groups.google.com/d/topic/cyclone-pcb-factory/nbH_1pTBJRo/unsubscribe. Para anular la suscripción a este grupo y todos sus temas, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.

Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Samuel Kranz

unread,
Nov 9, 2013, 4:33:22 AM11/9/13
to cyclone-p...@googlegroups.com
I would appriciate another way.. 
but i dont know another simple and inexpensive way to do it. 
I also tried to use rivets but unfortunately the made poor contact i had to solder them.. 
maybe the reason was that i used a center punch to fix them.. A rivet press is to expensive for me.. 

maybe this is something intresting for you

btw I will upload the design soon..

Robsbots

unread,
Nov 13, 2013, 6:12:11 AM11/13/13
to cyclone-p...@googlegroups.com
Well.
I have just tried the latest version of Marlin from here. https://github.com/ErikZalm/Marlin

I have added my own pins.h def for my board design and set the following defines, and still get an error. In this case I get :-

Error:0
: Extruder switched off. MINTEMP triggered !

I have also tried to set the number of extruders to Zero but the firmware does not compile with this option.
If anyone has any ideas on where to go from here I would love to know.
I assume Carlos has had this working with his Sanguinololu setup.

Defines set :-

#define TEMP_SENSOR_0 0
#define TEMP_SENSOR_1 0
#define TEMP_SENSOR_2 0
#define TEMP_SENSOR_BED 0

I have also tried changing the following with similar results.

// The minimal temperature defines the temperature below which the heater will not be enabled It is used
// to check that the wiring to the thermistor is not broken.
// Otherwise this would lead to the heater being powered on all the time.

#define HEATER_0_MINTEMP -1
#define HEATER_1_MINTEMP -1
#define HEATER_2_MINTEMP -1
#define BED_MINTEMP -1

Thanks

Rob.

Samuel Kranz

unread,
Nov 13, 2013, 9:04:01 AM11/13/13
to cyclone-p...@googlegroups.com
Have you tried to disable "prevent_dangerous_extrusion"??

Robert Last

unread,
Nov 13, 2013, 9:18:32 AM11/13/13
to cyclone-p...@googlegroups.com
Same problem I'm afraid.

Rob
--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Daniel "yOPERO" Garrido

unread,
Nov 13, 2013, 10:21:16 AM11/13/13
to cyclone-p...@googlegroups.com
Rob
Have you tried setting one extruder and then set the pin extruder to a non existent pin(-1) in pins.h ?

Robert Last

unread,
Nov 13, 2013, 10:24:11 AM11/13/13
to cyclone-p...@googlegroups.com
I currently have the E0_ENABLE_PIN set to -1
The Step pin is 65 and the DIR pin is 66

Samuel Kranz

unread,
Nov 13, 2013, 11:20:40 AM11/13/13
to cyclone-p...@googlegroups.com
 Have you tried to set the mintemp to 0? Maybe the "-1" is stored wrong so the actual value is pretty high.. 
for example negative 8Bit chars (signed char) are stored on 7bit + 1bit for the sign. 
so the first bit is set to 1 when the value is negative.. if the uC reads the value as an unsigned char the value is pretty high.. 

Robert Last

unread,
Nov 13, 2013, 11:26:19 AM11/13/13
to cyclone-p...@googlegroups.com
MIN_TEMP is set to 0.
I have the pin def for extruder enable set to -1

This is part of my current set up for the configuration file and the
pins.h file
https://gist.github.com/robsbots/7451893
> --
> Has recibido este mensaje porque est�s suscrito al grupo "Cyclone PCB
> Factory" de Grupos de Google.
> Para anular la suscripci�n a este grupo y dejar de recibir sus correos
> electr�nicos, env�a un correo electr�nico a
> cyclone-pcb-fac...@googlegroups.com.
> Para publicar una entrada en este grupo, env�a un correo electr�nico a
> cyclone-p...@googlegroups.com.
> Para ver este debate en la Web, visita
> https://groups.google.com/d/msgid/cyclone-pcb-factory/7e0b0489-268b-456a-a6c8-d982e92072ca%40googlegroups.com.
> Para obtener m�s opciones, visita
> https://groups.google.com/groups/opt_out.

Daniel "yOPERO" Garrido

unread,
Nov 14, 2013, 5:41:40 AM11/14/13
to cyclone-p...@googlegroups.com
what I meant was something like this:

#define E0_STEP_PIN -1
#define E0_DIR_PIN -1
#define E0_ENABLE_PIN 24 // or any other pin you can use

Robert Last

unread,
Nov 14, 2013, 9:32:45 AM11/14/13
to cyclone-p...@googlegroups.com
Hi Daniel.

Unfortunately that set up  gives errors on compile.
Marlin seems to need at least one extruder to be defined before it will compile.
I think the only option for Marlin would be to add a define to make it CNC compatible and then edit the code to remove temperature and extruder related stuff dependent on the define.

Rob
--
Has recibido este mensaje porque estás suscrito al grupo "Cyclone PCB Factory" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a cyclone-pcb-fac...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a cyclone-p...@googlegroups.com.

Ethan Dicks

unread,
Nov 14, 2013, 11:17:11 AM11/14/13
to cyclone-p...@googlegroups.com
On Thu, Nov 14, 2013 at 9:32 AM, Robert Last <r...@robsbots.org.uk> wrote:
> Hi Daniel.
>
> Unfortunately that set up gives errors on compile.
> Marlin seems to need at least one extruder to be defined before it will
> compile.
> I think the only option for Marlin would be to add a define to make it CNC
> compatible and then edit the code to remove temperature and extruder related
> stuff dependent on the define.

I have already done this. It took about a dozen strategic adds of
"#if EXTRUDERS > 0" and the like plus a couple of #undefs in
4 files to get Marlin to compile without complaint. I need to get
those changes into GitHub and I will share the link.

-ethan

Ethan Dicks

unread,
Nov 14, 2013, 12:20:14 PM11/14/13
to cyclone-p...@googlegroups.com
On Thu, Nov 14, 2013 at 9:32 AM, Robert Last <r...@robsbots.org.uk> wrote:
> Hi Daniel.
>
> Unfortunately that set up gives errors on compile.
> Marlin seems to need at least one extruder to be defined before it will
> compile.
> I think the only option for Marlin would be to add a define to make it CNC
> compatible and then edit the code to remove temperature and extruder related
> stuff dependent on the define.

Hi, guys,

Try this branch...

https://github.com/ethandicks/Marlin/tree/Marlin_v1

(ZIP download here: https://github.com/ethandicks/Marlin/archive/Marlin_v1.zip )

Hopefully I've gotten it right and am using the same repo and
branch everyone else is. Please correct me if I have not.

I have only tested this with HARDWARE_MOTHERBOARD set
to 6 and EXTRUDERS set to 0. If anyone uncovers a
combination of configurable settings that does not work, please
let me know and I'll test/correct. When a few eyes have been
over these changes, I'll probably feel comfortable to submit a
pull request.

Cheers,

-ethan

Robsbots

unread,
Nov 15, 2013, 3:52:15 AM11/15/13
to cyclone-p...@googlegroups.com
Hi Ethan.

I have tried your version of Marlin with my controller set up. I'm using a 1284p on a board the cyclone should be able to mill. Looks great. Compiles and connects to the GUI2 software from Kobus. No errors on connection and seems to receive gcodes. I can't fully test currently as I have managed to toast all my stepstick drivers, but looks really good as far as I can go at the moment.

Thanks.

Rob

Ethan Dicks

unread,
Nov 15, 2013, 10:57:27 AM11/15/13
to cyclone-p...@googlegroups.com
On Fri, Nov 15, 2013 at 3:52 AM, Robsbots <r...@robsbots.org.uk> wrote:
> Hi Ethan.
>
> I have tried your version of Marlin with my controller set up. I'm using a
> 1284p on a board the cyclone should be able to mill. Looks great. Compiles
> and connects to the GUI2 software from Kobus. No errors on connection and
> seems to receive gcodes.

Hi, Rob,

Thanks for testing!

> I can't fully test currently as I have managed to
> toast all my stepstick drivers, but looks really good as far as I can go at
> the moment.

I have an old McWire ( http://reprap.org/wiki/McWire_Cartesian_Bot_1_2
) I was going to use as a test platform while I'm building a Cyclone,
but it will be a few weeks until I can dig it out, dust it off, and
get it going. I appreciate the feedback that it compiled fine with
your board. What was your MOTHERBOARD_HARDWARE value?

-ethan

Robert Last

unread,
Nov 15, 2013, 1:41:42 PM11/15/13
to cyclone-p...@googlegroups.com
Mother board value was 14.
I have added my own pin defs.
The pins.h definition is below.
Just needs to be pasted in some where.


/*******************************************************************************
*********
* Robsbots Cyclone controller pin assignment
* Using the GEN7 files for the Arduino IDE
********************************************************************************
********/
/* These Pins are assigned for the modified GEN7 Board from Alfons3
Please review the pins and adjust it for your needs*/

// +---\/---+
// Z max endstop INT0 (D 0) PB0 1| |40 PA0 (AI 0 / D31)
Z min endstop
// Relay 1 INT1 (D 1) PB1 2| |39 PA1 (AI 1 / D30) Y max
endstop
// Relay 2 INT2 (D 2) PB2 3| |38 PA2 (AI 2 / D29) Y min
endstop
// MOS driver 1 PWM (D 3) PB3 4| |37 PA3 (AI 3 / D28) X
max endstop
// MOS driver 2 PWM (D 4) PB4 5| |36 PA4 (AI 4 / D27) X
min endstop
// Programming MOSI (D 5) PB5 6| |35 PA5 (AI 5 / D26) X
step enable
// Programming MISO (D 6) PB6 7| |34 PA6 (AI 6 / D25) X
step
// Programming SCK (D 7) PB7 8| |33 PA7 (AI 7 / D24) X
direction
// Programming RST 9| |32 AREF
// VCC 10| |31 GND
// GND 11| |30 AVCC
// XTAL2 12| |29 PC7 (D 23) Y Step Enable
// XTAL1 13| |28 PC6 (D 22) Y Step
// USB recieve RX0 (D 8) PD0 14| |27 PC5 (D 21) TDI
Y Direction
// USB transmit TX0 (D 9) PD1 15| |26 PC4 (D 20) TDO Z Enable
// Spare 1 RX1 (D 10) PD2 16| |25 PC3 (D 19) TMS Z Step
// Spare 2 TX1 (D 11) PD3 17| |24 PC2 (D 18) TCK Z Direction
// Spare 3 PWM (D 12) PD4 18| |23 PC1 (D 17) SDA I2C SDA
// Spare 4 PWM (D 13) PD5 19| |22 PC0 (D 16) SCL I2C SCL
// Sapre 5 PWM (D 14) PD6 20| |21 PD7 (D 15) PWM Z Probe
// +--------+
//

#if MOTHERBOARD == 14
#define KNOWN_BOARD

#if !defined(__AVR_ATmega1284P__)
#error Oops! Make sure you have 'Gen7 with ATMEGA1284p and 16MHz'
selected from the 'Tools -> Boards' menu.

#endif

//x axis pins
#define X_STEP_PIN 25
#define X_DIR_PIN 24
#define X_ENABLE_PIN 26
#define X_MIN_PIN 27
#define X_MAX_PIN 28


//y axis pins
#define Y_STEP_PIN 22
#define Y_DIR_PIN 21
#define Y_ENABLE_PIN 23
#define Y_MIN_PIN 29
#define Y_MAX_PIN 30

//z axis pins
#define Z_STEP_PIN 19
#define Z_DIR_PIN 18
#define Z_ENABLE_PIN 20
#define Z_MIN_PIN 31
#define Z_MAX_PIN 0

//extruder pins
#define E0_STEP_PIN 12 // Needs setting
#define E0_DIR_PIN 13 // Needs setting
#define E0_ENABLE_PIN 1 // Needs setting

#define TEMP_0_PIN -1 // Needs setting // was 7
#define TEMP_1_PIN -1 // Needs setting
#define TEMP_2_PIN -1 // Needs setting
#define TEMP_BED_PIN -1 // MUST USE ANALOG INPUT NUMBERING
NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! (pin 34 bed)

#define HEATER_0_PIN 1 // was 14
#define HEATER_1_PIN -1 // Needs setting
#define HEATER_2_PIN -1 // Needs setting
#define HEATER_BED_PIN -1 // Needs setting

#define SDPOWER -1 // Needs setting
#define SDSS -1 // Needs setting // SCL
pin of I2C header || CS Pin for SD Card support
#define LED_PIN -1 // Needs setting

#define FAN_PIN -1 // Needs setting
#define PS_ON_PIN -1 // Needs setting
//our pin for debugging.

#define DEBUG_PIN -1 // Needs setting

#define BEEPER -1
#define SDCARDDETECT -1
#define SUICIDE_PIN -1 //has to be defined;
otherwise Power_off doesn't work

#define KILL_PIN -1 // Needs setting
//Pins for 4bit LCD Support
#define LCD_PINS_RS -1 // Needs setting
#define LCD_PINS_ENABLE -1 // Needs setting
#define LCD_PINS_D4 -1 // Needs setting
#define LCD_PINS_D5 -1 // Needs setting
#define LCD_PINS_D6 -1 // Needs setting
#define LCD_PINS_D7 -1 // Needs setting

//buttons are directly attached
#define BTN_EN1 -1 // Needs setting
#define BTN_EN2 -1 // Needs setting
#define BTN_ENC -1 //the click // Needs setting

#define BLEN_C -1 // Needs setting
#define BLEN_B -1 // Needs setting
#define BLEN_A -1 // Needs setting

#define encrot0 -1 // Needs setting
#define encrot1 -1 // Needs setting
#define encrot2 -1 // Needs setting
#define encrot3 -1 // Needs setting
#endif
Reply all
Reply to author
Forward
0 new messages