Issue with interrupting Vl6180x x proximity sensor with esp8266 nodemcu v3?

Hi ...how are ....do anyone works with that proximity sensor vl6180x....I do a project with that esp8266 nodemcu v3...and there a problem in the interrupting function that even the connection are right and I made sure of it ...it interrupts infinitely or it didn't interrupt at all
I used version 2 of the project and I use the esp8266 nodemcu v3 ......the auther of the project told in the buildparts that I can use esp8266 nodemcu v3 even he build the connection schematics with another board
I checked the soldering that I build several and I give it to my colleagues he is professional in that and he confirmed that my connections are right and nothing wrong with that ,,,so the soldering part is fine
it is an open source project for an engineer called alex ....he built it and uploaded it also he uploaded videos for the project after he built it as ademo ....so I didnot write the code
but the project files are in software folder you will find 4 files one for the master which is ecu1 and the other 3 for the not master
he also built it except he says I can substitute this chip with esp8266 with the same pins and the same configuration so from your experience what maybe the causes that prevent the sensor from making interrupts if the code is working and the connections are right ...is that may be configuration are different ?
the code in the software folder in the link and the shematics in the connection representations in the buildparts foder

hi how are you…thank you for responding …first I test vl6180x as a unit with arduino program and it works fine …but when I connect it with the esp project it didnot operate or specifically the interrupt function didnot work even the connections are fine and my colleague checked on it …so do you think it is a matter of configuration …should I change some options in the library of vl6180x to fix the configuration of the sensor with the esp8266 nodemcu v3 ?

which vl6180x. library are you using?
Edit: used Adafruit VL6180X Libraryon a ESP32 and ESP8266 reads distances up to 20cm OK

that is the same library I use

@khaledeisa ,

Your other topic on the same subject deleted.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

what microcontroller did you use? the ESP8266?

what are you using interrupts for?
what other devices than the vl6180x are connected to the ESP8266? have you tested the devices in separate programs?
can you upload code which demonstrates the problem? upload any serial monitor output indicating what is wrong and stating what you expect?
upload a schematic showing devices and power supplies

I use esp8266 nodemcu v3
in the secmatics the author use esp mini d1 but he told me that I can use nodemcu if I didnot found mini d1 in the store so I bought that
and yest I tested the sensors for a separate programs by using arduino uno and it worked

The project consists of 4 pieces when you get close to one it interrupts and the other piece respond(lights up)...it is an agility lights to increase visual response

Ecu 1 is the master and Ecu2,3,4 are slaves

Here is the code of ecu1


do you think what is remaining for me is to proper configure the libraries for esp8266......so is there a difference between the configuration of vl6180X_we for D1 mini and configuration of vl6180X_we for esp8266 nodemcu v3? should I change any values so the sensor work good esp8266 nodemcu v3 ?
also I use the library [Adafruit VL6180X Library

hi ...how are you .....what cause the sensor(Vl6180X) when it gets the power (3.24 volt if I connect it to 3.3v output pin and 5.4 volt if I connect it to vu output pin ) and in both cases it didnot respond and the led light in it didnot blink or lights up...what are the main reasons behind that ....the auther of the project code his design uses espminid1 and he told me I can use the main code on esp8266 nodemcu v3 as that is the one I bought as I found it only in the store (my design uses nodemcu v3 ) ....so what are the hardware differences or issues that cause that ?


Hi @khaledeisa ,

do you refer to the led inside the sensor that blinks on video?

This here:

image

If yes, that is an IR (infrared) led. If cannot be seen by human eyes, however if you use a smartphone camera the camera sensor will convert its signals to a visible effect.

yes I mean that ....but it can be seen clearly by the eyes but when the sensor didnot respond I found the red light didnot blink

Hi how are you …i bought a new esp8266 (also I bought logic level shifter and 74125 IC) and built the project from the beginning as the schematics in the beginning it works fine the rgb ring lights up and the sensor responds and performs the interruption function BUT when I reset the esp nodemcu v3 or unplug the replug the usb to pc the sensor didnot respond …do yoou think that because I still didnot connect the logic level shifter or the ic between the ring and the esp ?
note :I connect the shdn pin on the sensor to 3.3v but that part nit in schematics

Please specify the exact sensor model (a direct link is preferred) and if possible post here your sketch (within "CODE" tags).

PS: Just a note about the drawings: you have Win10, so you can take a snippet with the diagram only, and not the whole PC screen, using Win+shift+S keys, using the mouse select the area to capture, and just paste directly inside the forum editor.

the sensor is vl6180x
and the link to code is

Ok, but there are at least 3 breakout boards with different pins and your schematic is hard to read, could you please confirm which is exactly the sensor you're using (a "real" link please!) and how you connected to the ESP?

PS: And what happens if you load and try the "VL6180X_WE_demo.ino" example code?

@khaledeisa, stop cross-posting. Last warning.

Dear @Coding_Badly coding....I only think on my problem from different then share my new point of view in another...focus on my different questions you will find I develop a different angle of seeing to find a solution....I don't mean to cross post or wasting your time ...sorry for misunderstanding

@docdoc It works ....but when I operate the main projet it stops after ressetting or unplug the usb.....connection of vl6180x is (vin to 3v....gnd to gnd...gpio to d6....shdn to 3v ....sda to d2 ...scl to d1 )
Sorry but I search google for apot of time and I didnot find direct link to the product ,manufacture or datasheet but itis well known that this product sold in all stores
What comes in my mind
That i could use 2 batteries in parallel to power the esp and increasing current capacity
Or play in the resistance between push button and esp
Or using logic leve shifter between ring led and esp

Is that picture actually how you have an Adafruit Neopixel Ring connected?
I can't tell if that one 3.7V battery is supposed to power everything (including the +5V 16 Neopixel Ring) or if you're just using the one battery for only the one sensor.
In any case, the Neopixels take a bit more work. They are supposed to have a separate +5V supply and a 1000uF electrolytic capacitor across the power supply.
https://learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections
Taken from ^:

Adafruit explains:

Can NeoPixels be powered directly from the Arduino’s 5V pin?
Sometimes. The Arduino can continuously supply only about 500 milliamps to the 5V pin. Each NeoPixel can draw up to 60 milliamps at full brightness. So yes, you can skip the separate DC supply and power directly off the Arduino as long as just a few pixels are used, more if the colors and overall brightness are low. When in doubt, give the pixels a separate power supply.

So if your picture is accurate, and you have the 16 Neopixel Ring and are using full brightness, that's 60mA * 16 = 960mA current draw for the ring.

Also, your Github code shows the Neopixel data pin on D2.
Line 357:

#define RGBDATAPIN 2

Your picture shows your Neopixel ring on D4. If your V3 NodeMCU ESP8266 is the same as the following picture I dug up, that may be a problem on D4.

1 Like