<p>You, obviously, do actually have a Z-probe, but in case another user does not, or you decide not to use yours, I will cover both cases (with and without a Z-probe).</p>

<h3>Z-probe not present</h3>

<p>If not, then in <code>configuration.h</code> set the <code>FEATURE_Z_PROBE</code> to <code>false</code>, like this: </p>

<pre><code>#define FEATURE_Z_PROBE false
</code></pre>

<p>or </p>

<pre><code>#define FEATURE_Z_PROBE 0. 
</code></pre>

<p>Then you also need to set </p>

<pre><code>#define DISTORTION_CORRECTION 0
</code></pre>

<p>as this requires the <code>FEATURE_Z_PROBE</code> if otherwise set to <code>1</code> or <code>true</code>. <em>However</em>, thereafter, upon recompilation, I then get a lot of other errors...  but these seem to be more to do with selecting the correct board, <code>#define MOTHERBOARD</code>, in <code>pins.h</code>, than the disabling of the Z-probe. This error:</p>

<pre><code>fastio.h:29: error: 'DIOORIG_FAN2_PIN_WPORT' was not declared in this scope
</code></pre>

<p>is due to, from <a href="http://forum.repetier.com/discussion/2444/cant-compile-firmware" rel="nofollow noreferrer">Can't compile firmware</a>:</p>

<blockquote>
  <p>You are using <code>ORIG_FAN2_PIN</code> in your configuration but apparently your boards pin definition does not define that pin. In that case check board description and use the digital pin number instead for that function.</p>
</blockquote>

<p><em>Actually that is not entirely true</em><sup>1</sup>.</p>

<p><strong>NOTE</strong>: It might be easier to just define <code>Z_PROBE_PIN</code> to something other than <code>-1</code>, which is what it is defaulting to, as set in <code>configuration.h</code>:</p>

<pre><code>#define Z_PROBE_PIN -1
</code></pre>

<h3>Z-probe present</h3>

<p>If you do have a Z-probe, then trace the wires to see where they go on the controller board, determine that pin number on the board and then enter that pin number into <code>configuration.h</code>. For example, <em>if</em> it is connected to pin 63, then:</p>

<pre><code>#define Z_PROBE_PIN 63
</code></pre>

<p>and <code>leave DISTORTION_CORRECTION</code> untouched.</p>

<h3>Where to plug the Z-probe in</h3>

<p>If your Z-probe has become unplugged, then you need to choose a pin to connect it to. This is easy... you simply connect it to any free pin. Now, you probably only have three end stops, at the top of the delta frame. These are the MAX end stops. So, you can simply connect the Z-probe to any of the three MIN end stop pins, on the board. Obviously, you will leave the three <code>#define</code>s for the MIN end stop, in <code>Configuration.h</code>, un-configured, and then specify the pin, that you did use, in </p>

<pre><code>#define Z_PROBE_PIN &lt;your pin&gt;
</code></pre>

<p>See <a href="https://forum.repetier.com/discussion/comment/1950/#Comment_1950" rel="nofollow noreferrer">Is there a complete step by step manual for building Z probe - comment 1950</a></p>

<blockquote>
  <p>Put the zprobe on any free pin you have but do NOT set it in endstops. It is not a endstop it is a zprobe.</p>
  
  <p>Then set it in zprobe section with pullup enabled so it is drawn to high internally until you connect the pin with gnd. Then G31 should also be consistent. I guess you missed the pullup part making it a random result.</p>
</blockquote>

<p>and <a href="https://forum.repetier.com/discussion/comment/1952/#Comment_1952" rel="nofollow noreferrer">Is there a complete step by step manual for building Z probe - Comment_1952</a></p>

<blockquote>
  <p>Not sure why this is a problem. You have 6 endstop pins and need 3 for
  endstops + 1 for zprobe = 4 pins. Still 2 endstop pins free.</p>
  
  <p>When I said not in endstops I meant not in the endstop configuration.
  There you only put switches that work as endstop.</p>
</blockquote>

<h3>Highlighting the connections</h3>

<p>The green PCB, for the fan and Z-probe, does not appear to have any logic on it (I can't see any), so it is just a collection of tracks (i.e. wires). As there are no logic chips on it, you can trace the circuit from the Z-probe to the controller (either visually, or using a multimeter set on continuity check). I assume that the PCB is connected to the controller board somewhere/somehow... Via the 10 wire grey ribbon cable that goes to the second green PCB next to the main board, next to LED3, as shown in the first photo? This ribbon cable transfers signals to/from the Z-probe/fan PCB to the secondary PCB, which appears to be a power related PCB (i.e. heaters). Somehow the secondary, power, PCB then connects to the main controller board.</p>

<p>One of the three unused MINIMUM end stop pins <em>should</em> be used for the Z-probe. This is assuming that:</p>

<ul>
<li>you only have three physical end stops (at the top of the three axes) <em>and</em>;</li>
<li>they are connected to the MAXIMUM end stop pins. </li>
</ul>

<p>If you have six end stops, (one at the top and one at the bottom), then that changes things drastically. Assuming that you only have three, then the three unused MINIMUM pins will be used for some other purposes (Z-probe, servo arm, something else?).</p>

<p>You need to confirm that you only have end stops at the <em>top</em> of the printer and not the bottom, i.e. only <code>MAX_ENDSTOP</code> (or <code>X+</code>, <code>Y+</code> and <code>Z+</code>) pins. If so, then you should have three (sets of) (<code>MIN_ENDSTOP</code>) pins with nothing connected to them (in theory). So, one of those three <code>MIN_ENDSTOP</code> pins will have the Z-probe connected to it. If you are having trouble locating the <code>MIN_ENDSTOP</code> pins, trace where the 3 physical (MAX) end stops are connected to, those will be the <code>MAX_ENDSTOP</code> pins. Then from that, the <code>MIN_ENDSTOP</code> pins should be relatively easy to identify. Hopefully that makes sense.</p>

<p>Looking at the schema then it becomes obvious. You see <code>X+</code>, <code>X-</code>, <code>Y+</code>, <code>Y-</code>, <code>Z+</code> and <code>Z-</code>. The physical endstops should be connected to the three <code>+</code> connectors. The three <code>-</code> connectors: two of them are hopefully not connected. The one that is should be the Z-probe. Looking at the photo, unfortunately, it seems as if all six (or just five?) are populated. </p>

<p>Personally, to save time, I would get a multimeter, unplug the <code>X</code>, <code>Y</code>, <code>Z</code> <code>+</code>/<code>-</code> connectors (actually only the <code>-</code> connectors) in turn and test each one, to see which is connected to the Z-probe.</p>

<p>To check the correct pin is used, you really only have two (sensible) options: either visually, or; multimeter. Multimeter would be best, and the most certain. However, there are two other options open to you (one risky, and one laborious):</p>

<ul>
<li><p>As we have whittled it down to two connectors (<code>X-min</code> and <code>Z-min</code>, there are only two pins (for the Z-probe and servo) to worry about, you only have a 50-50 chance of getting it wrong, so you could guess, code it up and see if it works - if it doesn't, then change the pin defined, and recompile...</p>

<p><strong>IMPORTANT</strong>: After a rethink, it is best not to just take the 50-50 chance, as the servo pin is probably configured as an <em>output</em> and the Z-probe pin will be an <em>input</em>. You could end up <em>damaging the control board</em>.</p></li>
<li><p>Finally, you could, in theory, test it programmatically, but that would require writing some test code for the controller, which (as we are having enough trouble as it is with the configuration.h file) would be a nightmare, to put it bluntly.</p></li>
</ul>

<p><strong>Schema</strong></p>

<p><a href="https://i.sstatic.net/6a6lS.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6a6lS.jpg" alt="Schema highlighting the endstop connectors"></a></p>

<p><strong>Photo of control board</strong></p>

<p><a href="https://i.sstatic.net/4qVYK.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4qVYK.jpg" alt="Photo of control board highlighting the endstop connectors"></a></p>

<hr>

<p>It is probably a good idea to read this, lengthly, article: <a href="https://www.repetier.com/documentation/repetier-firmware/z-probing/" rel="nofollow noreferrer">Repetier - Z-probing</a>.</p>

<hr>

<h3>Footnotes</h3>

<p><sup>1</sup> I have finally managed to get <code>Repetier.ino</code> to compile. The problem lay with the <code>Configuration.h</code> file that came with the googledrive download, that you provided. Trying to either manually configure <code>Configuration.h</code>, or pre-loading it into Repetier's configuration tool, always resulted in the same compilation error, see <a href="https://gr33nonline.wordpress.com/2017/06/12/dioorig_fan2_pin_wport-error/" rel="nofollow noreferrer">DIOORIG_FAN2_PIN_WPORT error</a>. The simplest solution is to create a <code>Configuration.h</code> file from <em>new</em>, using the Configuration tool. When you do that, it will compile ok. </p>

<p>Or, if you really want to do it manually, either:</p>

<ol>
<li>Set <code>NUM_EXTRUDER</code> to <code>1</code> and not <code>2</code> as the <code>FAN2</code> compile error comes from the second extruder's set of <code>#define</code>s, or;</li>
<li>More precisely, if you <em>do</em> have two extruders, then change the line <code>#define EXT1_EXTRUDER_COOLER_PIN ORIG_FAN2_PIN</code> and specify a pin, i.e. <code>65</code>, en lieu of using <code>ORIG_FAN2_PIN</code>.</li>
</ol>

CC BY-SA 3.0
2017-06-22T06:48:44.523Z
thanks again for the detailed info. I verified with a mutimeter, the Z-probe is connected to the Z- pin and the servo motor is connected to the X- pin. But now I have 2 questions. What are the numeric values for the Z- and X- pins? also, the servo motor pin was already defined in configuration.h as #define SERVO0_PIN 11. should I use that or replace it with whatever is the correct value for the X- pin?
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-22T12:20:17.703Z
Excellent, I had been wondering what had happened about the multimeter...   Might be worth asking these new points as two new questions, just in case someone else has some ideas... :-) Here is a quick answer though (I'll look into it more later, kinda busy at the moment, will have more time next week):
Greenonline
CC BY-SA 3.0
2017-06-22T12:22:47.460Z
*Already defined*... which configuration.h? The downloaded one, or the one from your original setup? I guess you don't have the latter, as you had to extract the values from the EEPROM, and as for that downloaded config file from the google drive, I personally would discard that completely (or use only as a reference), as it caused me nothing but headaches, and create a new one from scratch, using the config tool link, and plug in the values from the EEPROM the best you can, and then take it from there, and see what's missing.
Greenonline
CC BY-SA 3.0
2017-06-23T02:10:15.007Z
@OjasviSrivastava - You can see the pin numbers in the schematic above, where I have circled it in red. X- and Z- are D3 and D18 respectively
Greenonline
CC BY-SA 3.0
2017-06-23T16:41:30.923Z
Oh okay. So pin numbers can be alphanumeric too? I was not sure about that. The config in the google drive is the one I made from the Repetier-Firmware Config tool. I guess I wasn't careful enough while doing that. I will do that again, now that I can find out which pins are used for what. Thanks again for the save here :) It'd be great if you can tell me where all I went wrong with the previous config. I read your FAN2_PIN_WPORT error article and after configuring for a single extruder it did compile with a low memory warning. I guess I'll worry about extruder2 later. Baby steps
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-23T17:52:21.973Z
@OjasviSrivastava - Not sure about the alphanumeric, maybe just pin 3 and 18. Ah, you made that config file..? ok. Not sure about what was wrong with the previous config, yet, I'll have another look. Yes, the low memory warning is odd, I'm not sure why that happens exactly. I think that the second extruder is ok, *if* you don't select FAN2 and use an actual pin number instead, see [How to compile Repetier with two extruders](https://gr33nonline.wordpress.com/2017/06/17/how-to-compile-repetier-with-two-extruders/)
Greenonline
CC BY-SA 3.0
2017-06-24T07:21:54.880Z
but in the schema I can see D14, D15 and also A14, A15. So if I ignore the alphabets won't there be a conflict?
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-24T13:48:04.590Z
@OjasviSrivastava - The [config tool](https://www.repetier.com/firmware/v092/) has in its menu for the z-probe, amongst the many options, *Digital Pin nn* (i.e.  *Digital Pin 3* ). Use that for D3. Likewise for an analogue pin, such as, A14, use *Analogue Pin 14*. This really merits a separate (short) question, you know? :-)
Greenonline
CC BY-SA 3.0
2017-06-25T09:22:04.003Z
ah, makes sense. Sorry I thought it was too small a doubt. Moving forward I'll keep a better track of side questions
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-10T09:41:21.007Z
2017-06-19T07:20:17.120Z
2017-06-19T07:20:17.120Z
Greenonline
<p>So my printer's calibration got screwed after a sudden reboot and since the current firmware (0.92.6) is licensed, I cannot edit it. So I'm building a new one.</p>

<p>These are the controller boards of my printer:</p>

<p><strong>1. Main controller board:</strong></p>

<p><a href="https://i.sstatic.net/yKmZT.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yKmZT.jpg" alt="Main controller board"></a></p>

<p>The black board is a MKS Base v1.3</p>

<p>The other green board beside it has a DC to DC SMPS (HRD12008) on it, along with Z-min, X-min, T0, Fan-, D11 and a flat ribbon wire connector (can be seen in the picture).</p>

<p>The other box with an acrylic top is a solid state relay.</p>

<hr>

<p><strong>2. Cooling fan and Z-probe PCB:</strong></p>

<p><a href="https://i.sstatic.net/locuk.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/locuk.jpg" alt="Hot-end PCB"></a></p>

<hr>

<p>The brand on all these boards is "D-force". I've traced the printer down to a Taiwanese manufacturer: <a href="http://d-force.tw/" rel="nofollow noreferrer">D-FORCE.TW - 3D Printer</a>.</p>

<p>There are a few parts available: </p>

<ul>
<li><a href="http://www.icshop.com.tw/product_info.php/products_id/23999" rel="nofollow noreferrer">Fan &amp; Z-probe PCB</a>;</li>
<li><a href="http://3dprinter.expresstobuy.com/products/d-force-control-board-3d-printer-dforce/" rel="nofollow noreferrer">Main controller board</a>, and;</li>
<li><a href="http://www.icshop.com.tw/product_info.php/products_id/22546" rel="nofollow noreferrer">Servo motor for calibration (Z-probe)</a>.</li>
</ul>

<p>I haven't been able to find the other green board (with the HRD12008 SMPS on it), yet.</p>

<p>I've downloaded a new firmware from Repetier website. It can be found here, <a href="https://drive.google.com/open?id=0Bwypz0ZN4X9RUXBhcjBRVUVDTWM" rel="nofollow noreferrer">Repetier-Firmware-2017-06-09</a>.</p>

<p>Now, while compiling the firmware, I need to specify the Z-probe pin. I'm unable to do so because it's not plugged into the main board.</p>

<p>Here is a close-up of the Z-probe &amp; the servo motor that pins it down.</p>

<p><a href="https://i.sstatic.net/kZPm7.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kZPm7.jpg" alt="Z-probe close-up"></a></p>

<p>Any help would be appreciated here. On the web these printers are known as "D-force printers".</p>

<p><strong>Edit1</strong>: I found this on the manufacturer's <a href="https://www.facebook.com/groups/1587302991497916/" rel="nofollow noreferrer">Facebook group</a>:</p>

<p><a href="https://i.sstatic.net/GTP3a.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/GTP3a.jpg" alt="MKS Base 1.3 schema"></a></p>

<p>Please note that this is v1.1 and my printer has v1.3 although I haven't found any difference between the two, yet. I'll update on that if I find any. Hope this helps.</p>

<p><strong>Edit2</strong>: The Y-min pin on the main controller board is empty. The X-min and Z-min are connected to the X-min and Z-min on the additional green board respectively. Also, there is a T0 on the additional board which is connected to A13 of the main controller.</p>

CC BY-SA 3.0
2017-06-10T13:48:42.350Z
@Greenonline the Z-probe is not directly connected to the controller board but indirectly via the "Cooling fan & Z-probe PCB" that I've mentioned in the question. This is how my printer has been, from the start. I haven't changed anything. It is the black top-right connector.
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-10T15:07:30.203Z
@Greenonline I can't find any chip on the PCB, just a series of pins and connectors. Its almost identical to (perhaps a revision of) this: http://www.icshop.com.tw/product_info.php/products_id/23999 The 10 wire grey ribbon cable runs from the Z-probe PCB to the 2nd green PCB (beside the controller board). Also, I've added the controller board schema(?) to the question.
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-10T16:17:13.897Z
@Greenonline I've added info regarding min endstop pins in the question. I guess one is used for the Z-probe and one for the servo arm that actuates it? Correct me if I'm wrong. But how do I find out which is used for what? Is a multimeter the only option?
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-10T17:04:44.060Z
@Greenonline correct me if I'm wrong but I think the ribbon cable will carry the signals from the additional board to the Z-probe PCB. So I guess tracing visually will not be possible for me. I guess multimeter is the way to go and I'll buy one ASAP. In the meanwhile I will take the 50-50 chance to see what works. Speaking of which, how dangerous is this process? If I get it wrong (or any other pin that the compiler might ask me for) can it damage the board etc?
Ojasvi Srivastava
CC BY-SA 3.0
2017-06-10T17:06:39.487Z
That, my friend, is the million dollar question ;-)  Don't risk it, be patient, and *get a multimeter*... You should have one anyway... :-)
Greenonline
<delta><repetier>
Building new Repetier firmware for a delta printer (D-force)
Ojasvi Srivastava
# Building new Repetier firmware for a delta printer (D-force)

(Asked by: username_0 on 2017-06-10)

So my printer's calibration got screwed after a sudden reboot and since the current firmware (0.92.6) is licensed, I cannot edit it. So I'm building a new one.

These are the controller boards of my printer:

**1. Main controller board:**

[![Main controller board](https://i.sstatic.net/yKmZT.jpg)](https://i.sstatic.net/yKmZT.jpg)

The black board is a MKS Base v1.3

The other green board beside it has a DC to DC SMPS (HRD12008) on it, along with Z-min, X-min, T0, Fan-, D11 and a flat ribbon wire connector (can be seen in the picture).

The other box with an acrylic top is a solid state relay.

---

**2. Cooling fan and Z-probe PCB:**

[![Hot-end PCB](https://i.sstatic.net/locuk.jpg)](https://i.sstatic.net/locuk.jpg)

---

The brand on all these boards is "D-force". I've traced the printer down to a Taiwanese manufacturer: [D-FORCE.TW - 3D Printer](http://d-force.tw/).

There are a few parts available:

* [Fan & Z-probe PCB](http://www.icshop.com.tw/product_info.php/products_id/23999);
* [Main controller board](http://3dprinter.expresstobuy.com/products/d-force-control-board-3d-printer-dforce/), and;
* [Servo motor for calibration (Z-probe)](http://www.icshop.com.tw/product_info.php/products_id/22546).

I haven't been able to find the other green board (with the HRD12008 SMPS on it), yet.

I've downloaded a new firmware from Repetier website. It can be found here, [Repetier-Firmware-2017-06-09](https://drive.google.com/open?id=0Bwypz0ZN4X9RUXBhcjBRVUVDTWM).

Now, while compiling the firmware, I need to specify the Z-probe pin. I'm unable to do so because it's not plugged into the main board.

Here is a close-up of the Z-probe & the servo motor that pins it down.

[![Z-probe close-up](https://i.sstatic.net/kZPm7.jpg)](https://i.sstatic.net/kZPm7.jpg)

Any help would be appreciated here. On the web these printers are known as "D-force printers".

**Edit1**: I found this on the manufacturer's [Facebook group](https://www.facebook.com/groups/1587302991497916/):

[![MKS Base 1.3 schema](https://i.sstatic.net/GTP3a.jpg)](https://i.sstatic.net/GTP3a.jpg)

Please note that this is v1.1 and my printer has v1.3 although I haven't found any difference between the two, yet. I'll update on that if I find any. Hope this helps.

**Edit2**: The Y-min pin on the main controller board is empty. The X-min and Z-min are connected to the X-min and Z-min on the additional green board respectively. Also, there is a T0 on the additional board which is connected to A13 of the main controller.

**Tags:** delta, repetier
> **Comments:**
> **username_0**: @Greenonline the Z-probe is not directly connected to the controller board but indirectly via the "Cooling fan & Z-probe PCB" that I've mentioned in the question. This is how my printer has been, from the start. I haven't changed anything. It is the black top-right connector.  
> **username_0**: @Greenonline I can't find any chip on the PCB, just a series of pins and connectors. Its almost identical to (perhaps a revision of) this: http://www.icshop.com.tw/product_info.php/products_id/23999 The 10 wire grey ribbon cable runs from the Z-probe PCB to the 2nd green PCB (beside the controller board). Also, I've added the controller board schema(?) to the question.  
> **username_0**: @Greenonline I've added info regarding min endstop pins in the question. I guess one is used for the Z-probe and one for the servo arm that actuates it? Correct me if I'm wrong. But how do I find out which is used for what? Is a multimeter the only option?  
> **username_0**: @Greenonline correct me if I'm wrong but I think the ribbon cable will carry the signals from the additional board to the Z-probe PCB. So I guess tracing visually will not be possible for me. I guess multimeter is the way to go and I'll buy one ASAP. In the meanwhile I will take the 50-50 chance to see what works. Speaking of which, how dangerous is this process? If I get it wrong (or any other pin that the compiler might ask me for) can it damage the board etc?  
> **username_1**: That, my friend, is the million dollar question ;-)  Don't risk it, be patient, and *get a multimeter*... You should have one anyway... :-)  

---

## 1 answers

### Answer by username_1 on 2017-06-10. Score: 3 | Accepted answer

You, obviously, do actually have a Z-probe, but in case another user does not, or you decide not to use yours, I will cover both cases (with and without a Z-probe).
Z-probe not present
If not, then in configuration.h set the FEATURE_Z_PROBE to false, like this: 
#define FEATURE_Z_PROBE false

or 
#define FEATURE_Z_PROBE 0. 

Then you also need to set 
#define DISTORTION_CORRECTION 0

as this requires the FEATURE_Z_PROBE if otherwise set to 1 or true. However, thereafter, upon recompilation, I then get a lot of other errors...  but these seem to be more to do with selecting the correct board, #define MOTHERBOARD, in pins.h, than the disabling of the Z-probe. This error:
fastio.h:29: error: 'DIOORIG_FAN2_PIN_WPORT' was not declared in this scope

is due to, from Can't compile firmware:

You are using ORIG_FAN2_PIN in your configuration but apparently your boards pin definition does not define that pin. In that case check board description and use the digital pin number instead for that function.

Actually that is not entirely true1.
NOTE: It might be easier to just define Z_PROBE_PIN to something other than -1, which is what it is defaulting to, as set in configuration.h:
#define Z_PROBE_PIN -1

Z-probe present
If you do have a Z-probe, then trace the wires to see where they go on the controller board, determine that pin number on the board and then enter that pin number into configuration.h. For example, if it is connected to pin 63, then:
#define Z_PROBE_PIN 63

and leave DISTORTION_CORRECTION untouched.
Where to plug the Z-probe in
If your Z-probe has become unplugged, then you need to choose a pin to connect it to. This is easy... you simply connect it to any free pin. Now, you probably only have three end stops, at the top of the delta frame. These are the MAX end stops. So, you can simply connect the Z-probe to any of the three MIN end stop pins, on the board. Obviously, you will leave the three #defines for the MIN end stop, in Configuration.h, un-configured, and then specify the pin, that you did use, in 
#define Z_PROBE_PIN 

See Is there a complete step by step manual for building Z probe - comment 1950

Put the zprobe on any free pin you have but do NOT set it in endstops. It is not a endstop it is a zprobe.
Then set it in zprobe section with pullup enabled so it is drawn to high internally until you connect the pin with gnd. Then G31 should also be consistent. I guess you missed the pullup part making it a random result.

and Is there a complete step by step manual for building Z probe - Comment_1952

Not sure why this is a problem. You have 6 endstop pins and need 3 for
  endstops + 1 for zprobe = 4 pins. Still 2 endstop pins free.
When I said not in endstops I meant not in the endstop configuration.
  There you only put switches that work as endstop.

Highlighting the connections
The green PCB, for the fan and Z-probe, does not appear to have any logic on it (I can't see any), so it is just a collection of tracks (i.e. wires). As there are no logic chips on it, you can trace the circuit from the Z-probe to the controller (either visually, or using a multimeter set on continuity check). I assume that the PCB is connected to the controller board somewhere/somehow... Via the 10 wire grey ribbon cable that goes to the second green PCB next to the main board, next to LED3, as shown in the first photo? This ribbon cable transfers signals to/from the Z-probe/fan PCB to the secondary PCB, which appears to be a power related PCB (i.e. heaters). Somehow the secondary, power, PCB then connects to the main controller board.
One of the three unused MINIMUM end stop pins should be used for the Z-probe. This is assuming that:

you only have three physical end stops (at the top of the three axes) and;
they are connected to the MAXIMUM end stop pins. 

If you have six end stops, (one at the top and one at the bottom), then that changes things drastically. Assuming that you only have three, then the three unused MINIMUM pins will be used for some other purposes (Z-probe, servo arm, something else?).
You need to confirm that you only have end stops at the top of the printer and not the bottom, i.e. only MAX_ENDSTOP (or X+, Y+ and Z+) pins. If so, then you should have three (sets of) (MIN_ENDSTOP) pins with nothing connected to them (in theory). So, one of those three MIN_ENDSTOP pins will have the Z-probe connected to it. If you are having trouble locating the MIN_ENDSTOP pins, trace where the 3 physical (MAX) end stops are connected to, those will be the MAX_ENDSTOP pins. Then from that, the MIN_ENDSTOP pins should be relatively easy to identify. Hopefully that makes sense.
Looking at the schema then it becomes obvious. You see X+, X-, Y+, Y-, Z+ and Z-. The physical endstops should be connected to the three + connectors. The three - connectors: two of them are hopefully not connected. The one that is should be the Z-probe. Looking at the photo, unfortunately, it seems as if all six (or just five?) are populated. 
Personally, to save time, I would get a multimeter, unplug the X, Y, Z +/- connectors (actually only the - connectors) in turn and test each one, to see which is connected to the Z-probe.
To check the correct pin is used, you really only have two (sensible) options: either visually, or; multimeter. Multimeter would be best, and the most certain. However, there are two other options open to you (one risky, and one laborious):

As we have whittled it down to two connectors (X-min and Z-min, there are only two pins (for the Z-probe and servo) to worry about, you only have a 50-50 chance of getting it wrong, so you could guess, code it up and see if it works - if it doesn't, then change the pin defined, and recompile...
IMPORTANT: After a rethink, it is best not to just take the 50-50 chance, as the servo pin is probably configured as an output and the Z-probe pin will be an input. You could end up damaging the control board.
Finally, you could, in theory, test it programmatically, but that would require writing some test code for the controller, which (as we are having enough trouble as it is with the configuration.h file) would be a nightmare, to put it bluntly.

Schema

Photo of control board


It is probably a good idea to read this, lengthly, article: Repetier - Z-probing.

Footnotes
1 I have finally managed to get Repetier.ino to compile. The problem lay with the Configuration.h file that came with the googledrive download, that you provided. Trying to either manually configure Configuration.h, or pre-loading it into Repetier's configuration tool, always resulted in the same compilation error, see DIOORIG_FAN2_PIN_WPORT error. The simplest solution is to create a Configuration.h file from new, using the Configuration tool. When you do that, it will compile ok. 
Or, if you really want to do it manually, either:

Set NUM_EXTRUDER to 1 and not 2 as the FAN2 compile error comes from the second extruder's set of #defines, or;
More precisely, if you do have two extruders, then change the line #define EXT1_EXTRUDER_COOLER_PIN ORIG_FAN2_PIN and specify a pin, i.e. 65, en lieu of using ORIG_FAN2_PIN.

> **Comments:**
> **username_0**: thanks again for the detailed info. I verified with a mutimeter, the Z-probe is connected to the Z- pin and the servo motor is connected to the X- pin. But now I have 2 questions. What are the numeric values for the Z- and X- pins? also, the servo motor pin was already defined in configuration.h as #define SERVO0_PIN 11. should I use that or replace it with whatever is the correct value for the X- pin?  
> **username_1**: Excellent, I had been wondering what had happened about the multimeter...   Might be worth asking these new points as two new questions, just in case someone else has some ideas... :-) Here is a quick answer though (I'll look into it more later, kinda busy at the moment, will have more time next week):  
> **username_1**: *Already defined*... which configuration.h? The downloaded one, or the one from your original setup? I guess you don't have the latter, as you had to extract the values from the EEPROM, and as for that downloaded config file from the google drive, I personally would discard that completely (or use only as a reference), as it caused me nothing but headaches, and create a new one from scratch, using the config tool link, and plug in the values from the EEPROM the best you can, and then take it from there, and see what's missing.  
> **username_1**: @OjasviSrivastava - You can see the pin numbers in the schematic above, where I have circled it in red. X- and Z- are D3 and D18 respectively  
> **username_0**: Oh okay. So pin numbers can be alphanumeric too? I was not sure about that. The config in the google drive is the one I made from the Repetier-Firmware Config tool. I guess I wasn't careful enough while doing that. I will do that again, now that I can find out which pins are used for what. Thanks again for the save here :) It'd be great if you can tell me where all I went wrong with the previous config. I read your FAN2_PIN_WPORT error article and after configuring for a single extruder it did compile with a low memory warning. I guess I'll worry about extruder2 later. Baby steps  
> **username_1**: @OjasviSrivastava - Not sure about the alphanumeric, maybe just pin 3 and 18. Ah, you made that config file..? ok. Not sure about what was wrong with the previous config, yet, I'll have another look. Yes, the low memory warning is odd, I'm not sure why that happens exactly. I think that the second extruder is ok, *if* you don't select FAN2 and use an actual pin number instead, see [How to compile Repetier with two extruders](https://gr33nonline.wordpress.com/2017/06/17/how-to-compile-repetier-with-two-extruders/)  
> **username_0**: but in the schema I can see D14, D15 and also A14, A15. So if I ignore the alphabets won't there be a conflict?  
> **username_1**: @OjasviSrivastava - The [config tool](https://www.repetier.com/firmware/v092/) has in its menu for the z-probe, amongst the many options, *Digital Pin nn* (i.e.  *Digital Pin 3* ). Use that for D3. Likewise for an analogue pin, such as, A14, use *Analogue Pin 14*. This really merits a separate (short) question, you know? :-)  
> **username_0**: ah, makes sense. Sorry I thought it was too small a doubt. Moving forward I'll keep a better track of side questions  

---

