What about using the 5 volt output from the motor driver module?5V USB type C
What about using the 5 volt output from the motor driver module?5V USB type C
Would one 12V be able to power the whole mechanism? Is that a 5V out from 12V in?What about using the 5 volt output from the motor driver module?
Yes!Would one 12V be able to power the whole mechanism? Is that a 5V out from 12V in?
I will connect the 5V to the VIN. I am excited to try this. I will let you know how it goes. Thank you so much!Yes!
Correct, 5 volt is available from the 12 volt input.
Everything works and the sensors are detecting metal and the ESP32 is registering it, but I am having one problem. I wired all of the "In"s to one common anode and when one sensor is triggered both lane 1 and 2 LED lights up. I included a diagram of how I wired it with the black wires to each ground and the positive wire across the optocouplers.. Why does one sensor trigger both lanes using this method and how do I fix it?I will connect the 5V to the VIN. I am excited to try this. I will let you know how it goes. Thank you so much!
On the input side, output side or both?I wired all of the "In"s to one common anode and when one sensor is triggered both lane 1 and 2 LED lights up.
On the input side, output side or both?
That's not the same module shown before.
I would check the solder connections on the input and output wiring, possible shorts.
Correct. When I activate one circuit, it appears the rest are activated as well. But I want them to activate individually. Does the LED indicate a complete circuit or does it only indicate power is being supplied? I dont understand how they all light up if there is no ground for each of them.The input wiring looks OK from my perspective although not focused very well.
You are saying those two LEDs in the red circles are both lighting up regardless of which sensor is activated?
View attachment 359866
So I could essentially swap to a PNP sensor run the black wires to the "IN"s and ground the other lanes to common ground and that would work for this board?That board is wired different and not the same board shown in post #8.
It has a common negative input which explains why all the inputs are lit up.
That board is triggered by a positive signal on the anode and won't work unless modified.
View attachment 359868
Correct the output from the PNP sensor would connect to where those brown jumpers are currently.So I could essentially swap to a PNP sensor run the black wires to the "IN"s and ground the other lanes to common ground and that would work for this board?

https://www.amazon.com/AOICRIE-Opto...553&sprefix=aoicrie+2pcs+pc817,aps,110&sr=8-2Do you have a link to this module or the model or part number?
Would multiple PNP sensors still work? Or will the common grounds cause the same issueThanks.
My previous suggestion won't work because the way the board is made.
This mod will work but the LED is removed.
I believe your best option and least expensive is to replace the PC817 module rather then replacing the sensors.
View attachment 359870
I am eventually going to expand this project to use more than 2 sensors and will probably change the sensors from NPN NO to PNP NC. I will have to adjust the code a bit but that is no worries should be simple. Thank you! I am excited to try this.With the PNP sensors the common ground is not a problem.
Actually this PC817 module you have will work fine for PNP sensors.
But isn't it less expensive to just replace the module since you already have two NPN sensors?
Good news: the new sensors work and control each lane individually.Sounds good!
Should work out just fine.