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

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jjansen
Normal user
Posts: 21
Joined: 17 Oct 2016, 14:20

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

#1 Post by jjansen » 27 Apr 2017, 16:31

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.
Last edited by jjansen on 24 Nov 2017, 20:53, edited 1 time in total.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

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

#2 Post by grovkillen » 27 Apr 2017, 21:55

Great work! Thanks for sharing.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

raymonvdm
New user
Posts: 3
Joined: 24 Nov 2017, 16:11

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

#3 Post by raymonvdm » 24 Nov 2017, 18:12

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

jjansen
Normal user
Posts: 21
Joined: 17 Oct 2016, 14:20

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

#4 Post by jjansen » 24 Nov 2017, 20:38

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

raymonvdm
New user
Posts: 3
Joined: 24 Nov 2017, 16:11

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

#5 Post by raymonvdm » 26 Nov 2017, 02:01

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

raymonvdm
New user
Posts: 3
Joined: 24 Nov 2017, 16:11

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

#6 Post by raymonvdm » 26 Nov 2017, 18:34

Ik created an new schema and this one is working with my test sketch

Image

jochem
New user
Posts: 7
Joined: 15 Feb 2017, 11:17

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

#7 Post by jochem » 07 Feb 2018, 20:38

did somebody already made a gerber file for this project?

jochem
New user
Posts: 7
Joined: 15 Feb 2017, 11:17

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

#8 Post by jochem » 09 Feb 2018, 12:34

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.
Last edited by jochem on 09 Feb 2018, 12:56, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

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

#9 Post by TD-er » 09 Feb 2018, 13:34

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.

jochem
New user
Posts: 7
Joined: 15 Feb 2017, 11:17

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

#10 Post by jochem » 10 Feb 2018, 18:11

thanks for you r help.

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

jochem
New user
Posts: 7
Joined: 15 Feb 2017, 11:17

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

#11 Post by jochem » 10 Feb 2018, 18:15

Image

jochem
New user
Posts: 7
Joined: 15 Feb 2017, 11:17

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

#12 Post by jochem » 12 Feb 2018, 14:37

first i will try this out on breadboard en finally i will create a gerber file and make the pcb

j0er9
New user
Posts: 1
Joined: 19 May 2019, 19:41

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

#13 Post by j0er9 » 19 May 2019, 19:47

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests