Search found 9 matches

by ienaboard
Fri May 22, 2020 4:23 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

I didn't sleep tonight thinking about what happened to my ESP32. Today maybe I found an answer. https://media.autosen.com/autosen_content/snippets/NPN-Skizze-Snippets.jpg Looking at this image, +Vdc is my ESP32 pin connected to the output. When the sensor's transistor is "active", the output is conn...
by ienaboard
Thu May 21, 2020 5:46 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

Solved when I was doing a wrong wiring on the breadboard. Suddenly it began to work perfectly whitout any apparent reason. Then I found that I putted the 4k7 resistor between sensor and input pin instead of between input and output (3V3) pin. With this wiring works with the internal pull up too. wir...
by ienaboard
Wed May 20, 2020 4:21 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

I ordered a some new stepdown. But if still will not work I think I need to use a 5V accu for the ESP32 and another 12V accu for sensor.
by ienaboard
Mon May 18, 2020 7:55 am
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

It may be that the internal pullup in the ESP32 just has a value that is too high, causing noise (e.g. from your stepdown) to be able to interface the line. You may want to try adding an external pullup of, say, 4.7K or so to 3.3V, see if that changes things. Unfortunately, nothing changed. I tryed...
by ienaboard
Mon May 18, 2020 7:14 am
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

Sure! You may also want to try to add a small capacitor (1nF, for example) in parallel with that resistor to clamp down on high-frequency noise even more. Adding a capacitor will I add delay between sensor's signal and ESP32? I need a precision of 10ms with the signal. This project is a simple cloc...
by ienaboard
Sun May 17, 2020 6:38 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

It may be that the internal pullup in the ESP32 just has a value that is too high, causing noise (e.g. from your stepdown) to be able to interface the line. You may want to try adding an external pullup of, say, 4.7K or so to 3.3V, see if that changes things. Thank you for your answer. This could b...
by ienaboard
Fri May 15, 2020 3:57 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

Try sticking a delay(10); or delay(100); in your loop(). I tried with no success. I am beginnig to think that the problem is the stepdown. I am using this one and maybe connecting to ground could make some problem. Moreover, even if I wrote `FALLING` sometimes the interrupt is triggered on `RISING`...
by ienaboard
Thu May 14, 2020 5:28 pm
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

Re: ESP32 DEVKIT and 12V NPN Sensor

username wrote:
Thu May 14, 2020 3:37 pm
What voltage is sensors output ?
If it's 5v you have a problem. You need to get it to 3.3v.
The sensor is NPN. The signal wire is "floating" and, when the sensor is triggered, the wire is connected to ground. I have no voltage.
by ienaboard
Thu May 14, 2020 10:00 am
Forum: General Discussion
Topic: ESP32 DEVKIT and 12V NPN Sensor
Replies: 12
Views: 10536

ESP32 DEVKIT and 12V NPN Sensor

Hi I have a strange problem with an ESP32 connected to an sensor with an open collector output (NPN). I try to explain. This sensor is a photoelectric retroreflective switch (E30-R4NA with reflector), working with 6to36V DC Because is a "mobility project", I need to make it working with a 12V batter...