Unable to find the right pin on Melzi 2.0 P802M for BLTouch

edited May 4 in Repetier-Firmware
Good morning everyone, i know, i know: melzi is an old board and it doesnt have enough space for the repetier firmware, and i already banged my head in some walls BUT! I recently found out, that in my zonestar P802M (old model, one of the first, bought in 2015 and pratically never used because reasons...) there should be i spare pin to drive the BLTouch Servo (Actually a 3D Touch, which is the clone version) placed in the EXT connector.... i identified it and tried with every kind of number... from my research the A4 pin should be 28, but it changes based on what pinout i look at... i actually dont know which one is right and how to check if it works... a normal P0 S700 doesnt do anything on my probe.... can anyone indicate me the right pin number and which one to use ? 
Repetier 1.0.4 (SD disabled, Arc disabled, servo enabled, autoleveling and probe enabled)
Based on this picture , i've chosen A4... but i dont know where to look to understand if that pin is used by anything and i have to select another one... I higly suspect that A4 is LED_PIN ... do i have to disable it ? how and where? 

Any help would be greatly appreciated!


Comments

  • Check https://reprap.org/wiki/Melzi for some hint on it. There is no pinout diagram but you see connectors and schematic for all ports so you can get the pin for it. Just note that you need the arduino pin number not chip pin number.
  • edited May 4
    I've looked around all the repetier firmware, and after a while i've selected pin 27 , as it seems free.... After assigning pin 27 to SERVO0, i've tried to launch M340 P0 S700 or M340 P0 S1400... nothing happens... what it could be?

    EDIT: I've also tried 1.0.x-dev just to be sure... still no movement... the bltouch seems unresponsive, using PIN 27/A4

    The sensor do the "self test" when i power up the printer and stays retracted and with the red light on.
    I've downloaded a simple arduino sketch on my arduino uno to test the functionality of the sensor and it works well (pin deployed correctly and touch works fine) 

    https://forum.arduino.cc/t/arduino-sketch-tests-a-3d-printer-tl-touch-auto-leveling-sensor/527949


    is there anything a can do? As i'm disabling SD card support to squeeze the firmware in the melzi, is there any accessible pin or temporary pin i can use to test ?
  • Sure it is arduino pin 27?
    https://www.electrodragon.com/w/images/a/a4/Atmega644-pinout.png
    shows mapping arduino numbers . Pin 27 is PA3 according to this. You said A4 that is pin 28. On the other side if sketch worked it should be correct pin.

    Deactivate timing is 1473 and activate is 647 also there is some variance allowed.
    Have you configured servos correctly? Meaning num servos set to 1 and pin. I think that would be all to configure.

    Also assuming pin 27 is correct make sure no other function uses same pin for something as well.
  • edited May 5
    The sketch i tried is just for my Arduino uno, not for the melzi... So I'm sure the sensor work. I still have to figure out how to attach the servo to a pin of the melzi ...
    I'll attach my config asap , also ... Melzi is a 1284... Sanguino compatible so it should be this :

    https://aws1.discourse-cdn.com/arduino/original/4X/0/7/1/0711dda9bdcbc5769fbd11bcdc27cc8b50b4a9de.jpeg



    But it is labeled differently in the bltouch wiring tutorial ...
    https://static.wixstatic.com/media/f5a1c8_ca35a8657c7a4322b6548e49bd78dd00~mv2.png/v1/fill/w_560,h_384,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/MELZI_PNG.png
    Right ?

    I'll try again tonight with 27 and 28 also ... Just to be sure ... 
    Where do i have to look, apart from pins.h and Configuration.h to discover eventually free pins ? 

  • Oh! Do you know if could be a power problem ? Do i have to attach a separate 5v source for that ? Also, if yes , i have to bridge the GND of the external PSU to the GND of the board ? 
  • Ok from BLTouch it would be 28 and from your image 27 so should at leat be one of them.

    I don't think it is a power problem. Main power comes from USB/Voltage converter and that is how more or less all are doing it.
  • I've checked the configuration for Mobo 63  in your firmware ... Pin 27 should be free and it should be that ... 28,29 etc are busy by the LCD... And from your schematics it should be A4, I've also ordered an original BLTouch just to be sure that is not another "oops ! China did it again" 
  • I'm using the online config tool and in servo i selected servo0 with DIGITAL PIN 27, it's correct??
  • Yes should be correct then. Except maybe pin confusion:-)
  • Ok... i'm finally crying of joy because it works... the mistake was in a youtube video i was following... the correct pulse is 647 instead of 700... i didnt know that... i can confirm that pin 27 is A4 in melzi P802M motherboard! Now i have to understand how it works...
  • > 647 instead of 700... i didnt know that...
    yes I wrote that above :-) Good to hear it was just wrong timing and it now works.
  • I've fixed the probe to the extruder mount and started playing with the auto leveling ... I'll keep you updated... Sending u 10 euros for the help! Cheers!
Sign In or Register to comment.