MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.34k stars 19.26k forks source link

Not 5V on inductive sensor #7910

Closed Jean-Fred-CEC closed 7 years ago

Jean-Fred-CEC commented 7 years ago

Hi everybody,

I have an issue with upgrading my ZProbe : I bought an inductive LJ12A3-4-Z/BX sensor that I chequed apart. It gives 11,5v on the signal wire when I connect to my power supply and approx 0.5V when it dettects metal. I also bought an LM7805cv voltage regulator that gives 5v when I feed it with 11,5v. Everything is good so far, but when I connect the both, to my ramps, the LM7805cv output is only 1.35v... I checked all the wiring ten times but everything looks good, is it normal that I have a lower voltage than 5v when I connect the sensor and voltage regulator to my ramps?

Best regards,

Jean Fred

Spawn32 commented 7 years ago

Dont think you can "drive" a LM7805 from the signal output from the probe, but i might be wrong :) Forget the LM7805 and use the resistor trick, it works...

Jean-Fred-CEC commented 7 years ago

OK thanks, I will test with the resistors . I saw some printers that had this modification, but I am not an electronics specialist... For undestanding, do you know why I have a different voltage on the LM7805 with an without the sensor? Ground is common but there is no intensity.

Thanks for your repply!

Tannoo commented 7 years ago

LJ12A3-4-Z/BX is an NPN sensor. There is no positive V out from it.

Power it from 12v and the output is negative and goes directly to the z-axis limit input.

Tannoo commented 7 years ago

The LM7805 is not needed for that probe.

Jean-Fred-CEC commented 7 years ago

Are you sure Tannoo? I'm affraid it will fry my ramps with 11.5v instead of 5v...

Tannoo commented 7 years ago

An NPN will not. Mine is the same way. If it was a PNP, yes.

Tannoo commented 7 years ago

If you are testing the output of the NPN sensor with a meter while it's disconnected from any load... yes, you will see a "floating" voltage.

Do some more research on NPN sensors and you will see.

Tannoo commented 7 years ago

If it concerns you that much, you can throw in a zener diode in series to prevent overvoltage of the input.

Tannoo commented 7 years ago

I have had a few of these sensors go bad... but input is still okay. I will admit that when I first start doing probe leveling, I temporarily wired up a sensor and had it working. I was printing multiple things and telling myself to dress up and terminate the wires correctly. Well... I kept putting that off and one day the wires got moved and shorted the 12v+ to the output. That took out the sensor AND 2 inputs. I used some other unused input until I replaced the board.

Jean-Fred-CEC commented 7 years ago

OK, I checked the sensor internal resistance: 10 KOhms... may be this is why the regulator doesn't works? So I made, with some resistances I had, a 7KOhms resistance in order to make a voltage divider, it works! (4,8v) now when I enter M119 I have the sensor trigered.

Thank you all!

Spawn32 commented 7 years ago

LJ12A3-4-Z/BX is blue tip'd ? I have 3 of that series, from 8mm to 18mm, all of them outputs 12v volt on the signal wire, be very careful, it will kill your board, wire it up not connect to you board and trigger it, then measure the signal output voltage before you do anything :)

Jean-Fred-CEC commented 7 years ago

Yes, that's what I did. With the resistor trick, the opened voltage is 4.8v, and 0.5v triggered.

Spawn32 commented 7 years ago

correct, that's what i have, without resistor you would have gotten 12v straight out on the signal wire :/

Tannoo commented 7 years ago

I will say that mine has been working just fine for the last 2 years.

Tannoo commented 7 years ago

No divder, no regulator. Maybe I am just one of the lucky ones.

Spawn32 commented 7 years ago

That is very strange Tanno, is this a blue tip ? but as long as it work's :) no if we could adapt the temp compensation that Prusa has put in to their software it would be great, all we need to do is to use some kapton tap to mount a semic temp sensor to the metal housing of the probe and we could use the prusa routines, this probe drift under temperature... Prusas's PINDA 2 probe has an internal temp probe..

Tannoo commented 7 years ago

I have some blue tipped ones, but they don't see my bed very well. I have been using oranged tipped NPNs that are adjustable range. These see my bed much better and even 4mm away.

Tannoo commented 7 years ago

I have also tried the IR pi sensor that worked better than the blue tipped NPNs.... but still not consistantly.

Spawn32 commented 7 years ago

the blue tip 12mm has a detection range of 4mm and seems very good, the 18mm has 8mm detection but is very big :) and the 8mm has only 2mm, to little :/

Tannoo commented 7 years ago

I know... but it doesn't see my bed very well... even tried some steel banding strips under the glass and still no. They will see it reliably at about .5mm from the bed. Too close for my comfort.

Spawn32 commented 7 years ago

Ahh, glass, i switched to a all in one heatbed with integrated alu plate, on top of it I use a buildtak… On glass I used the 18mm, never tested the 12mm on it..

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.