MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now

Anet A8 Auto Leveling Sensor: TRONYX XY-08N

Please Login to Comment

Hi All,

When I bought my Anet, I also bought this sensor, as it seemed equal to the ROKO SN04-N ( However, now that it came I don't find any information about it, so can someone tell me if it's usable on A8?

Best Regards,

My induction sensor died... I ended with this design I would want to share with you ... Working on glass and any surface of course ;-)

ANET A8 optical z probe (BLtouch like with servo)
by aeropic

Hi everyone, I was sent my sensor (a ROKO) and I plugged it in with the pins in the wrong order, would this break my sensor? If so is there anything I could do?

I also wanted to add an interesting find. I know someone said it works on glass, but in my experience it didn't just by laying it on the heatbed. I did find out however that putting aluminum tape on the back of the glass made it detect it and it is only off by about 2 or 3 mm compared to the regular bed. I also would think the aluminum bed to aluminum tape would conduct heat better if using it.

there are two different sensors - 12V => will not work with glass...
if you have the 6 - 36V (like in the link above) it should work with a 3mm glass - you will have ~1mm spare so it will be very close to the surface.

  • make sure the pins/cables of the connector are in the right order. Many others and I also had to correct the pins on the connector.
  • If you use a different mount for your sensor, make sure you have set the offset from nozzle right.
    • when you first home your Z with the Sensor - make sure you can kill the power quickly - if the nozzle would crash the bed or sensor is off the bed (when offset from nozzle isn't right - and yes it happened to me.)

Skynet upgrade:
6-36V Sensor installation:

Hello Carlos, maybe this video can help:


My one seems to be working correctly. I did have to swap the pins around. Running really close to the glass bed with Skynet firmware

I have this same one but the ROKO SN04-N I think I have it hooked up right because the led glows a faint red when i bring it near the hotbed? I just haven't installed it yet because I was wondering if the LED should glow brighter?

Hello !
Do you have any problem of sensor bug ?
Form time to time, my sensor seems not to detect the bed and the extruder fall into the heated....


Did you find a solution to this? Mine has worked great for about a month now tonight it failed on the center rear sample during the bed leveling routine and drove the hot end down onto the bed.

1) I measure the distance for the red led to light (3 mm for me)
2) I adjust the place of the sensor 3 mm higher than the hot end touching a A4 paper
3) I adjust the offset to be perfect basing on this
I does not work so good to me, so I adjust it going back to z0 and counting the mm needed to be good.

Hope it help.


Thanks, I'll give it a try.

Have anyone tried it on a glass bed? Does this sensor work with the glass bed or need to stick with the aluminum bed?

Yes. It's pretty close to the glass, but it works for me.

Hi Guys,

Thank you all for posting your experiences with the Tronxy sensor on the ANET A8.

I purchased this printed in January, and have been enjoying it without a sensor until now. I ordered a sensor in February but when it arrived I realised it wasn't the official sensor - but this tronxy one. So Thought it was useless, and it was sitting in my desk for months. When I saw this thread, I realised I could get it to work.

So I updated my firmware to Skynet, using the configuration file for the 5 button, front left 12mm sensor mount. and followed all the instructions on how to level your bed. resetting the Z axis Correctly. All the commands in the manual seemed to be accepted by the printer, however when I started to print,after successfully measuring the 9 points of the print bed, the head remains 10mm above the print bed.... and it carries on trying to print in thin air... tried several times to address it, but to no avail.

Any help gratefully received.



what is your Z offset?

Swap Blue and Brown wire... install Skynet3d 2.3.2 ( READ the Auto BedLevelling Guide... select the configh file that applies to your sensor position (copy and paste) and flash with supplied Arduino... run Cura and level with :

Preheat Nozzle and Bed
M851 Z0 - reset Z offset to “0”
M500 – Save to EEPROM
G28 – Auto Home (sensor will be centred at this point)
G1 X110 Y110 / (G1 X110 Y135 if you have an A2 with 220x270 bed) - move nozzle to centre
Move Nozzle down to the correct gap (about the thickness of a4 paper)
G92 Z0 – This tells the printer that “This is now Z0”
G30 X110 Y110/ (G30 X110 Y135 if you have an A2 with 220x270 bed)
-Tests the trigger distance and displays the offset as a positive value e.g Z2.1
M851 Z (eg. M851 Z-2.1)
M500 – Save to EEPROM
Add a G29 After the G28 in your start g code to activate auto bed levelling.

If you want to 'purge' your nozzle before printing insert this 'start' gcode

G28 X0 Y0 Z0 ; home X, Y and Z axis end-stops
G29 ; initiate z-probing
G0 X0 Y0 F9000 ; Go to front
G0 Z0.15 ; Drop to bed
G92 E0 ; zero the extruded length
G1 X80 E25 F500 ; Extrude 25mm of filament in a 8cm line
G92 E0 ; zero the extruded length
G1 E-1 F500 ; Retract a little
G1 X80 F4000 ; Quickly wipe away from the filament line
G1 Z0.3 ; Raise and begin printing.


Where in my Gcode do I put?:

G0 X0 Y0 F9000 ; Go to front
G0 Z0.15 ; Drop to bed
G92 E0 ; zero the extruded length
G1 X80 E25 F500 ; Extrude 25mm of filament in a 8cm line
G92 E0 ; zero the extruded length
G1 E-1 F500 ; Retract a little
G1 X80 F4000 ; Quickly wipe away from the filament line
G1 Z0.3 ; Raise and begin printing.

My start Gcode looks like this:

;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
;M109 S{print_temperature} ;Uncomment to add your own temperature line
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15.0 F{travel_speed} ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 F200 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
G1 F{travel_speed}
;Put printing message on LCD screen
M117 Printing...

Could you share which configuration profile is used for the TRONXY XY-08N ?

I have the TRONXY XY-08N sensor mounted 'front-left' so within the Skynet3d software I used the 'A8- 5buttonkeypad- autolevel- front left sensor' and then just select either 12mm or 18mm sensor and copy the configuration file to your skynet3d folder... then upload. You can fine tune your sensor position in the firmware if you need to adjust it. It all depends where you have your sensor mounted and positions can be adjusted if needed.

Thank you sikknote for clearing that up, I have the same setup. I wasn't sure which profile to use because the "Front Left" 12mm and 18mm pictures did not look like the TRONXY, so I chose the "Stock" profile. Good thing I had a metal ruler in my hand when it was homing!

I too have the Tronxy XY-08n. My fine tune Adjustment for mine is as follows on lines 589 through 591 in Configuration.h:

define X_PROBE_OFFSET_FROM_EXTRUDER -19 // X offset: -left +right [of the nozzle]

define Y_PROBE_OFFSET_FROM_EXTRUDER -46 // Y offset: -front +behind [the nozzle]

define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

I have found that to be pretty much smack dab in the center for the sensor :)

Hi. I bought the same sensor but I have a graber i3 frame and I am using ramps and marlin FW, does anybody have any instructions on how to connect this sensor to the board? Do I have to swap the brown and blue cables or solder the resistors as in other sensors? I hope someone can help me.

On the Tronxy XY-08N I had to configure the wires BLUE - BROWN - BLACK

which does Configuration Profile does that use?

I bought the same sensor with my Anet A8. Have you had any success? Can it work with the stock firmware right out of the package, or does it require upgrading?

hello Carlos, !!!
I have this tronxy sensor, but my printer dont as metal bed. It Is inductive or capacitive?


Hey carlos, I actually have a RN04-N and it appears to be very similar to this. I have a small fiberglass board that I route the sensor through including a 1k resistor for logical 5v, black wire to 15k resistor to pin 4, other end of that resistor to pin 1 on optical isolator. Ground is blue wire to pin 3 and 5, which will then go to ground on the board. Brown wire will go straight to 12v pwr. Is this correct? I still have my printer in the mail, and Im hoping this will work for the chinese knock NPN inductive sensor.

if you use Skynet3D you have to Change the Position of the Probe to this

(#) define X_PROBE_OFFSET_FROM_EXTRUDER -22 // X offset: -left +right [of the nozzle]
(#) define Y_PROBE_OFFSET_FROM_EXTRUDER -45 // Y offset: -front +behind [the nozzle]
(#) define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

Thats the correct position of the z-probe ;)

error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe."

Probe offsets, travel limits and boundaries for probing must be set accordingly (values depend also on end switch positions)!

Move your bed to measure distance between nozzle and front/back limit of your bed, move carrier on X axis to measure distance between nozzle and limit of your bed. Add bed width/depth for max pos. Measure distance from center of probe to nozzle for x/y probe offset. Using the probe linked by CarlosCastro you get:

//Probe offsets (line# 590-593)

define X_PROBE_OFFSET_FROM_EXTRUDER -22 // X offset: -left +right [of the nozzle]

define Y_PROBE_OFFSET_FROM_EXTRUDER -45 // Y offset: -front +behind [the nozzle]

define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

On my Anet A8 i got following travel limits (travel limits are not the same as build volume!):

// Travel limits after homing (units are in mm) (line# 730-736)

define X_MAX_POS 235

define X_MIN_POS -35

define Y_MAX_POS 222

define Y_MIN_POS -2

define Z_MAX_POS 240

define Z_MIN_POS 0

Using clamps to hold my glass bed in place i need 25mm on the front side of the heated aluminum and the distance from nozzle to probe on the back side.

// Set the boundaries for probing (where the probe can reach) (line# 823-827)



Setting up configuration.h accordingly all probing positions can be reached. Your mileage may vary.

Comment has been deleted

Hi, i try your suggestion but i get #error "The given RIGHT_PROBE_BED_POSITION can't be reached by the Z probe."
while compiling on skyNET 2.3.1

I just got this to work

Ok so after spending the past few evenings trying to figure this out Iv've finally managed to get it to work, mostly.

First step: Borrow a Windows laptop (could not get Pronterface UI to pull up on Mac version of Cura 15.whatever)

Second: Download and extract Skynet3d v2.3.1 to the desktop, heres the link --->

Third: Open the folder and navigate to the documentation folder and read installation guide

Four: Follow the guide it works

IF YOU CANT LINK TO YOUR 3D PRINTER: Google and download a USB-SERIAL CH340 driver
this also applies for MACs

Probe Bracket ---->

On the Tronxy XY-08N I had to configure the wires BLUE - BROWN - BLACK

Side Note: when printing I get a bunch of garbage displayed on the print lcd screen but the prints come out perfect. Guessing an update in the future will hopefully fix it. For now Im happy to have my printer up and running again.

Anet A8 Probe Bracket for anet sensor
by chelrix

Thank you very very much - you made my day :-D
By telling me to configure my cables.

Glad I could helped. Just share the knowledge if you see the question pop up again.


Just to be sure, what guide are you mentioning?

Download the ZIP File for SKYNET here :

Extract it to your desktop

Open the extracted file and than open the Documentation Folder.

Click on Installation Guide.pdf

I have a Anet A8 and bought the same sensor you did but I have yet to install it since I just got it 2 days ago. The video may help. The only difference should be the bracket but IMO that's no big deal.

I'ts an 8mm sensor and you will need to either a voltage divider or a zener diode. Look at for more info

You showed us some nice pictures, but what colour wire goes to what?
Can you show us a clear picture with no other wires around how this connects to the board?

Hi Carlos,
I've do one with A8 and SkynetV2.3.1.
You must change some electric contact but it work fine.
You can see how at:

Hello Xilofono, I'm sorry entering in this discussion but my problem is similar to Carloscastro's one and also a little bit different: my wire colors are (RED on the left, BLACK in the middle and YELLOW on the right of Motherboard) [ ].
In this case, what color wire could I plug in positive (+) pole power cable?
I'm sorry to disturb this discussion but I'm not able to find anything, it is since Friday that I am trying. This solution (to give power at the probe) is the first suggestion positive I've read.
Best regards.

Hi, thanks for your answer.
Can you send another pic of the board connector? Did you connected the brown wire to the +V on the board?
Also, did you needed any script to align the sensor position related to bed? I found some information on a Facebook group, but the suggest using another holder for the sensor instead of the one that it come with. My problem is that I use a fast take in/out for the extrusor vent and that can be a problem.

Hi Calos,
you can find pics at:
Yeah you must connect the brown wire to the +V from the power supply (I've used that one on the board).
I've not use any script for align the sensor, only use the correct config.h of Skynet [A8- 5buttonkeypad- autolevel- front left sensor / 12mm sensor].
Have fun!

Thanks to my help, I have already managed to operate the sensor and calibrate my printer.

Thank you so much for the pics man!!
I just flashed the latest Aned FW with autoleveling (A8-L_firmwareUpdate for Auto Level.hex from FB group) and tried to follow DavidDean's Youtube Vid but failed badly > it litteraly bored itself into the plate :P

Makes sense now to connect the 6-36V Probe to the 12V mainboard power when the 3.3?V from the S_Z Connector is not enough
Did you need to set the Z probe offset for the Skynet FW to work with the sensor?
(#) define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

Thx for the pic, now (after i printed my own) I finally know how the plate coming with the sensor was supposed to to be installed^^

I have the ROKO SN04-N, the cables I have are blue, brown, black. looking at your sensor seems like it has a different color. but it looks like its also plug and play.

Checking the website you posted it has a screenshot on how to put it on the printer ::

If I we're you I'd plug it into the board to test it once you're done building everything. Did you change the firmware of the printer?

The sensor should work fine if adapted correctly. The description does not tell us what the output is, either NPN or PNP output. The power input I am guess is the Red and the Black wires, which you would have to connect to the power supply of the printer. I am also guessing that the output signal is the yellow much to go on there not even a part number. Be careful as some of these sensors output the source voltage (12V on the A8) and that will mess up your controller board which is normally 3.3V input. You might need an optical isolator or a relay to do the interface. It also might be configured for plug and play, but not enough info to tell. Perhaps contact the guys who sold this to you?

There is no yellow wire, and they are all on a plug ( the sensor details:
It seems to be NPN

Im in the same boat
pulled this from gear best
From Andre Feb 09,2017
I can confirm this sensor will work with the Anet A8 3D printer.

The sensor does need a different mount but that can be found online and printed easily.

You will need to swap the blue and brown wire.

A firmware upgrade will also be required but once completed the printer will auto level.

Over all I'm pleased with the purchase and shipping time required to arrive.
You need to swap the brown and blue wires. 30 seconds of work.

I got it to work by swapping the brown and blue wires, installing the A8-L firmware and following the "official" youtube video instructions for calibrating. Seems to be working great.

On a side note, my printer seems to be a lot faster with the new firmware

Cool I'll give it a try tonight, I was a bit concerned about hooking it to 12v like some others had suggested.

i has ost this other here too, just adding sensor to anet a8, c-lin pl-08N.
8mm npn sensor, wires have .brown ,
i test breadboard this first. what wire have what. and soldening connector wires.
now have addin in anet,
brown come anet 5 volt.
blue come anet GND.
black come out signal. 4,4volt measure. working fine and sense level.

now have proplem how caliprate and make good right position at bed, first tes has basic skynet 232 fix file and move home working fine but then go under table and broken all fast must take power off.
table size i change in confugurationm.h ok,and come error no reach sensor ,too big somethink.
i no remember what i try change but now working but wrong blace and nozzle go after home to -12.49 x 79 y 93 say display. wrong place, why go to this position ?
i want go home, sensor sense home Z position x=59 (sensor left front) manual at dispaly i move this position and display say, x 59 y 54 Z -22,49 sensor led light just. this is good point start after home 0,0,sensor sense level home. but how i say to conficuration.h and were this point ? now have other wrong point.
and need me make somethink gcode too at cura start code and end code area.
but firt i think need make confugure.h good. but no know how.
what row need change ?
offset what this mean ? what need make ? motion menu have.
today has try change conf file manytime all day. hard and longday has.but anythink not move sensor other place.
bed size i must change x max 220,X min 57,y max 217 (because have new X belt tension and bigges value crash to head)
y min 57, z 0. but no go this position ewerytime autohome go x 79 y 93, Z -12,49 i no understand
and error come i must change x right probe 198, left probe 57,y front probe 57, y back probe 181 (biggest value infor error no reach sensor) this is minimum. what can add here.
why have many different limit and i no know what is what and mean were.