Can I just overwrite firmware of I3plus+ (with inductive sensor) with ADVi3++ with no BLtouch?

I use I3plus+ on a monoprice maker select plus.

After some months, I installed an inductive sensor (LJ12A3-4-Z/BY) using Tom’s guide (https://www.youtube.com/watch?v=EcGFLwj0pnA) and then flashed the firmware using arduino IDE. So the sensor has a resistor, is powered via 5V, and is connected to where the physical z endstop switch was originally connected to. Everything working perfectly.

So you can say I sort of customized the board firmware based on the original I3plus+ firmware – although all I edited was the configuration.h file.

I’m worried that if I flash and upgrade to ADVi3++… things will stop working (specially auto-bed leveling).

Has anyone had a similar scenario prior to updating? Will there be issues with this kind of sensor connected in this way?

Hi again,

To clearly describe my setup, here is what I actually did (see screenshot). This was taken from instructions in this link… https://www.instructables.com/id/Wanhao-I3-Plus-Bed-Auto-Leveling-W-Inductive-Senso/

So what I am thinking is modify the configuration.h file of advi++ to something like this…

/**

  • A Fix-Mounted Probe either doesn’t deploy or needs manual deployment.
  • (e.g., an inductive probe or a nozzle-based probe-switch.)
    */
    // @advi3++: Mark II probe is fix
    #ifdef ADVi3PP_MARK2
    #define FIX_MOUNTED_PROBE
    #endif

// Force enable fix mounted probe
#define FIX_MOUNTED_PROBE

And then, since my inductive probe is a BY (not a BX), I would also still need to disable Z endstop signals.

// Enable pullup for all endstops to prevent a floating state
// @advi3++: Enable pullups except for Mark II
#ifdef ADVi3PP_MARK2
#define ENDSTOPPULLUPS
#endif
#if DISABLED(ENDSTOPPULLUPS)
// Disable ENDSTOPPULLUPS to set pullups individually
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// @advi3++: Sets the directions for BLTouch
#ifdef ADVi3PP_BLTOUCH
// Mechanical endstop with COM to ground and NC to Signal uses “false” here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
#else // @advi3++: Mark II or Mark I no probe
// Mechanical endstop with COM to ground and NC to Signal uses “false” here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
#endif

Screen Shot 2019-12-26 at 9.24.07 AM

It is a very bad idea to use a voltage divider to get 5V from 24V. If anything goes wrong, you will fried some parts with 24V and potentially a lot of current. But it is up to you.

Hmmm… you have a point (and thanks for the response). I will definitely revisit this circuit at a later time when I have more time to dedicate in dismantling the printer’s insides again :slight_smile:

Assuming I keep it as is, are there any sections of your configuration.h file that I may have missed to make it work (besides the sections I mentioned in my post above)?

I would say your modifications are OK and there is nothing else to modify. But very difficult to say without testing myself. I had in the past planned to support this kind of sensor in ADVi3++. I even bought one, probably similar to what you have.

But then I see all the trouble of the Mark II with its sensor (also similar to what you have). It seems to be very unreliable. Especially when you have a glass bed, as many have (including myself). A BLTouch seems to be a far better alternative.

True. I can attest that this kind of setup does sometimes fail to detect the bed (about 1 out of 100 prints). I’m guessing that there could be power supply issues on my printer. I don’t use glass bed though. Yes I do plan to change to the BLTouch sometime.

I’ll try out the configuration.h changes soon and will post here what I find.

Thanks and Happy holidays!

Also, with voltage divider, excessif current is dissipated as heat. So you have to be careful. I recommend to read the datasheet of your sensor and evaluate the amount of power that will be dissipated and that your resistor are able to handle it. I am not sure that a 1/8 Watt resistor (very common) will be enough.

As said on Sparkfun:

Basically, don’t use a voltage divider as a voltage supply for anything that requires even a modest amount of power. If you need to drop down a voltage to use it as a power supply, look into voltage regulators or switching supplies.

https://learn.sparkfun.com/tutorials/voltage-dividers/all

Ok. I have a step down converter module lying around. I’m thinking of using that instead of a voltage divider and then combine it with an optocoupler. I ordered those cheap optocouplers and will arrive in a few days.

I couldn’t wait to rewire my sensor so I went ahead and flash the LCD and firmware based on whatever it was wired with. Not sure if the modifications indicated below are the best and most efficient way to do it but things worked… whew!

Here is what I have:

  • Inductive Sensor LJ12A3-4-Z/BY replacing z endstop switch (see hand sketched diagram in earlier post) – will be rewired differently sometime soon
  • Monoprice maker select IIIP

Here is what I did to make it work:

  • Downloaded source files of ADVI3PP from github
  • Used Arduino IDE to edit 3 files:

(1) advi3pp_defines.h — commented out #if and #endif

//#if defined(ADVi3PP_BLTOUCH) || defined(ADVi3PP_BLTOUCH3) || defined(ADVi3PP_MARK2)   
#define ADVi3PP_PROBE
// #endif                                                                         

(2) Configuration.h
— remarked endstop pullup for z
//#define ENDSTOPPULLUP_ZMIN

— set endstop inverting to false (previously true)
#define Z_MIN_ENDSTOP_INVERTING false
#define Z_MIN_PROBE_ENDSTOP_INVERTING false

— defined fix mounted probe outside of the #ifdef / #endif block of code because it only gets defined for mark 2 builds
#ifdef ADVi3PP_MARK2
#define FIX_MOUNTED_PROBE
#endif
#define FIX_MOUNTED_PROBE

— similar to above, defined safe homing because it only gets defined for bltouch builds
#if defined(ADVi3PP_BLTOUCH) || defined(ADVi3PP_BLTOUCH3)
#define Z_SAFE_HOMING
#endif
#define Z_SAFE_HOMING

(3) advi3pp_handlers.cpp – remarked the assert line and created my own holder
// assert(index < advi3pp::SensorSettings::NB_SENSOR_POSITIONS);
auto dave = F("Dave");
static const FlashChar* names[advi3pp::SensorSettings::NB_SENSOR_POSITIONS] = {dave, teaching_tech_side, custom};
return names[index];

  • Flashed LCD and uploaded firmware via Arduino IDE

A step down converter and an optocoupler is probably a good solution. Would be interesting to have some info about your experience once you get it operational.

Can you also publish the support you have used and some pictures?

Success!!!

I was able to get the inductive sensor + buck converter + optocoupler concept working on ADVi3++

So I’d like to share my experience on how I got it done… please see attached PDF.

I’d like to apolgoize in advance if my “hacks” on your Marlin version did not seem to be the most “elegant” of solutions… hehe.

Auto Bed Leveling using Inductive Sensor, Buck converter, and Optocoupler (For Wanhao and other 3d Printers).pdf (1.6 MB)

Which probe support are you using?

I made and used this… https://www.thingiverse.com/thing:2946587

hi @andrivet,

Just wanted to ask if the upcoming 5.0 version would support the inductive sensor I am currently using (LJ12A3-4-Z/BY) with your 4.0 firmware. I was able to make it work with manual modifications of your files (kindly refer to my earlier posts on this thread). It would be great if I wouldn’t have to do it all over again when 5.0 comes out. Thanks and good day!

Yes, it will.

1 Like