I followed a 3 parts video tutorial on youtube to add a servo and a microswitch and configured marlin for auto bed leveling for my prusa i3 rework.
I have adjusted the offsets and the retract/extend angles.
When I home my axes with G28 the nozzle is moving at X0, Y0 and then at the center of the bed, raises a few mm, extends the probe, touches the bed and retracts the probe. I think my printer declares that point as Z=0. The same happens with G29 command. If I start a print the nozzle starts extruding at Z=3,5mm which is my Z offset.
What am I missing? I had troubles with the 5V power from arduino to RAMPS and powered the servo with an external voltage regulator 7805. Also I connected the microswitch on Zmin endstop headers on RAMPS. Is that correct?