Welcome! Log In Create A New Profile

Advanced

Marlin heating D8 instead of D10

Posted by stuuuuuuuuuu 
Marlin heating D8 instead of D10
October 15, 2016 03:36PM
I am working on building a 3-d printer and the only thing I have left is the hot head. The thermistor is correctly reading the temperature but when I try to heat the hot end nothing happens. I started measuring things with my multimeter and found that when I turned on the hot end it I could measure 12v from D8 but not D10. Every wiring guide I can find says to plug the hot end into D10 so I think there is something wrong in the software.
Re: Marlin heating D8 instead of D10
October 16, 2016 12:05AM
Just about... You can put anything on any pin. You just need the Pins.h file to (correctly) say where your stuff is. Are you talking about D8 and D10 of a RAMPS board? Without a little more information, it is really hard to offer any help.
Re: Marlin heating D8 instead of D10
October 16, 2016 12:05AM
Just about... You can put anything on any pin. You just need the Pins.h file to (correctly) say where your stuff is. Are you talking about D8 and D10 of a RAMPS board? Without a little more information, it is really hard to offer any help.
Re: Marlin heating D8 instead of D10
October 16, 2016 05:24AM
what motherboard did you set in configuration.h

did you edit pins_RAMPS.h?

I’m guessing you actually have a ramps?

It could be a bad clone mega or ramps also.... remove the ramps and check d8 is getting 5v on output

You could even go back a step, load up the blink demo in the ardunio ide and change the port to 8 or 10 and check that port on the mega is changing.

Edited 2 time(s). Last edit at 10/16/2016 05:29AM by Dust.
Re: Marlin heating D8 instead of D10
October 16, 2016 09:48AM
Quote
Roxy
Just about... You can put anything on any pin. You just need the Pins.h file to (correctly) say where your stuff is. Are you talking about D8 and D10 of a RAMPS board? Without a little more information, it is really hard to offer any help.

Yes I am talking about D8 and D10 on the RAMPS board. I thought it would be something to do with pins.h but there are almost 3000 lines of code and I didn't know where to start
Re: Marlin heating D8 instead of D10
October 16, 2016 09:52AM
Quote
Dust
what motherboard did you set in configuration.h

did you edit pins_RAMPS.h?

I’m guessing you actually have a ramps?

It could be a bad clone mega or ramps also.... remove the ramps and check d8 is getting 5v on output

You could even go back a step, load up the blink demo in the ardunio ide and change the port to 8 or 10 and check that port on the mega is changing.

I set the motherboard to 35 (extruder, fan, fan). I do have a RAMPS. I will try checking the pins on the mega, I assume D10, 9 and 8 on the RAMPS correspond to D10, 9, and 8 on the mega.
Re: Marlin heating D8 instead of D10
October 16, 2016 10:12AM
This pin scan code is new to the [github.com] branch. It helps you find (or confirm) where your GPIO pins are located:
You should be able to paste this into Marlin_main.cpp and connect it up with a case 43: in the right spot.


Quote
Roxy
/**
* M43: Scan for a pin to help the user locate unused pins on their controller board
* Either an LED or volt meter can be placed on the desired pin.
* This command will scan the non-sensitive pins and put a voltage on the pin for
* a short duration.
*
* S Start Pin number. If not given, will default to 0
*
* E End Pin number. If not given, will default to 127
*
* N No Sensitive Pin Checks. Use with caution!!!!
*
* R Repeat pulses on each pin this number of times before continueing to next pin
*
* W Wait time (in miliseconds) between pulses. If not given will default to 500
*
*/


//
// sensitive_pin() is used by both M43 and M44 to avoid messing with pins that should not be touched.
// It is cleaner to have it as a function call than as in-line logic.
//
static bool sensitive_pin(int p) {
int i;
for (uint8_t i = 0; i < COUNT(sensitive_pins); i++) {
if (p == sensitive_pins || p==68 || p==69 || p==70 || p==71 || p==72 || p==73 || p==74 //causes KILL on my printer
) {
return true;
}
}
return false;
}

inline void gcode_M43() {
int p, j, s=0, n_flag=0, e=127, w=500, r=1;

if (code_seen('R'))
r = code_value_int();

if (code_seen('S'))
s = code_value_int();

if (code_seen('E'))
e = code_value_int();

if (code_seen('N') )
n_flag++;

if (code_seen('W'))
w = code_value_int();

for(p=s; p<=e; p++) {
if ( n_flag==0 && sensitive_pin(p) ) {
SERIAL_ECHOPAIRPGM("Sensitive Pin: ", p);
SERIAL_ECHOPGM(" untouched.\n");
} else {
SERIAL_ECHOPAIRPGM("Pulsing Pin: ", p);
pinMode(p, OUTPUT);
for(j=0; j<r; j++) {
digitalWrite(p, 0);
idle();
delay(w);
digitalWrite(p, 1);
idle();
delay(w);
digitalWrite(p, 0);
idle();
delay(w);
}
}
SERIAL_ECHOPGM("\n");
}
SERIAL_ECHOPGM("Done\n");
}
Re: Marlin heating D8 instead of D10
October 16, 2016 10:17AM
I tested each pin using blink without the RAMPS attached and it worked correctly. I then tried it with the RAMPS attached and the pin I specified in the code would blink its corresponding LED and measure 12v on the screw terminals so it seems that the electronics are working correctly and the problem is in the code.
Re: Marlin heating D8 instead of D10
October 16, 2016 10:32AM
I just found this in my pins.h:
 #if MB(RAMPS_13_EFF)
    #define HEATER_0_PIN       8
  #else
    #define HEATER_0_PIN       10   // EXTRUDER 1
  #endif

I know that D8 is usually for a heated bed but I am not using one so is there a reason that the hot end should be connected to D10 or should I just use D8 for my hot end and leave the code as it is

Edited 3 time(s). Last edit at 10/16/2016 10:54AM by stuuuuuuuuuu.
Re: Marlin heating D8 instead of D10
October 16, 2016 04:37PM
I would just move the wire to where it should be. If you know where the code expects things to be, it is easier to get good support if you just conform to what it expects.
Sorry, only registered users may post in this forum.

Click here to login