Page 1 of 1

Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 27 Apr 2017, 16:31
by jjansen
I made a pulse counter based on the Inductive Proximity Sensor (LJ12A3-4/BX) in order to measure my water consumption at home.
The sensor is able to detect metal.

Connection schematic
Image

Image
Water meter with sensor; every pulse equals 1 liter of water usage.

Image
Proto PCB in which I integrated a LM7805 power converter to convert 12V to 5V to also power the ESP.

Re: Pulse counter with LJ12A3-4-Z (Inductive Proximity Sensor)

Posted: 27 Apr 2017, 21:55
by grovkillen
Great work! Thanks for sharing.

Re: Pulse counter with LJ12A3-4-Z (Inductive Proximity Sensor)

Posted: 24 Nov 2017, 18:12
by raymonvdm
I`m also trying to build this setup but i cant seem to get it working i tried two different types of sensors

Setup one is based on OMDHON CHE12-4PA-710 / LJ12A3-4-Z/BY (Where black is connected to ground) It seems to be couting but ESP Easy seems to be missing pulse

Setup two is based on OMDHON CHE12-4NA-A710 / LS12A3-4-Z/BX (Where black is connected to V+ Where something seems to be wrong with my breadboard setup.

Which GPIO should i be using on the NodeMCU and do i need to add some resitors in the circuit. I`m currently using one resitor (10k) between the GPIO(14) and the dioder

Re: Pulse counter with LJ12A3-4-Z (Inductive Proximity Sensor)

Posted: 24 Nov 2017, 20:38
by jjansen
Can you share some photos of your setup?
I am also using GPIO(14)..

Edit: Just checked; have the CHE12-4NA-A710 / LS12A3-4-Z/BX
In schematic above;
brown = terminal 3
black = terminal 2
blue = terminal 1

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 26 Nov 2017, 02:01
by raymonvdm
Yesterday i got it working using a pull up but today after soldering the pullup to the PCB is stopped working again. I Guess i got a buggy connection somewhere.

Therefore i would like to know how to use pullup resistors

Image

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 26 Nov 2017, 18:34
by raymonvdm
Ik created an new schema and this one is working with my test sketch

Image

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 07 Feb 2018, 20:38
by jochem
did somebody already made a gerber file for this project?

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 09 Feb 2018, 12:34
by jochem
Oke i gave it a try, first the schema in fritzing:
Image

this is my first schema and electricity isn`t my job, so if there is an mistake somewhere, please tell me.

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 09 Feb 2018, 13:34
by TD-er
You seem to have the + and ground from the 12V input connected to eachother in the schematic.

And just to make it easier to read the schema, try to have the lines connected to the ground below the V+ lines.

Does the D4 have internal pull-up resistors in the WeMos?
If not, then try to have the D4 connected to the 3V3 on the Wemos via a 10k resistor.

And the diode + transistor both have a voltage drop of about 1V .. 1.4V, so I am not sure you can get the level on D4 close enough to ground.

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 10 Feb 2018, 18:11
by jochem
thanks for you r help.

according the data sheets gpio 3 and 4 do have an pull-upp

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 10 Feb 2018, 18:15
by jochem
Image

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 12 Feb 2018, 14:37
by jochem
first i will try this out on breadboard en finally i will create a gerber file and make the pcb

Re: Pulse counter with LJ12A3-4-Z/BX (Inductive Proximity Sensor)

Posted: 19 May 2019, 19:47
by j0er9
Thanks for sharing your setup. Really inspiring.

I had some issues finding the correct resistor combinations to get 5v on the GIPO pin.
After killing an esp8266 with to much power on the GPIO I switched to an optocoupler approach. Pretty go setup can be found at https://www.youtube.com/watch?v=RLqjoJSE5IY.
Maybe this helps somebody.