IR Obstacle Sensor TCR15000 always on and won't turn off

Customer:

I have a problem with an IR sensor I purchased. I connected it as follows: with the sensor positioned horizontally and the black LED on the left, I connected the bottom two pins to ground, the other two pins to 5V, and the blue LED pin to A0. I’m using 2 IR sensors in my project and I’m wondering if the problem is that both are connected to the same 5V, so both pins receive signal from A0 and A1. The issue is that my sensors won’t turn off.

Original message (Croatian)

Dobar dan, imam problem sa IR senszorom koji sam kupio kod vas. Naime spojio sam senzor na sljedeći način: kada senszor postavimo vodoravno da nam je crna ledica/lampica lijevo; donja dva pina sam spojio na ground, dok sam duga 2 spojio na 5v i dodao pin sa plave ledice/lampice na a0. U projektu koristim 2 IR senzora pa sam razmišljao možda je problem u tome što su oba spojena na isti 5v pa onda oba pina dobivaju signal sa a0 i a1. Znači problem je što mi se senzori ne gase… unaprijed hvala na pomoći.

Originally submitted via email support on 13 May 2023. Migrated to the forum for community visibility.

Soldered Support:

Could you send me the SKU of the IR sensor you’re using and which Dasduino or Arduino board you have? Also, if you have a schematic or sketch of your project, please share it.

Original message (Croatian)

kako bi ti što bolje pomogao otkloniti problem, molim te pošalji mi SKU od IR senzora koji koristiš i koji Dasduino ili Arduino board koristiš.

Također, ako imaš neku shemu ili skicu svog projekta, pošalji ju.

Customer:

I’m not sure what SKU means. The bag says K5-9 and the sensor says TCR 15000. I’m sending you a photo of the connected sensor and code I tested it with. I’m trying to build a smart parking lot with 2 IR sensors and a servo motor that acts as a barrier. The barrier rises when a sensor activates and the program counts vehicle entries and exits. But my sensor is always on. I tried adding a potentiometer to adjust sensitivity but it didn’t work. I’m using an Arduino UNO board.

Original message (Croatian)

Pozdrav, Ispričavam nisam siguran što je SKU, na vrećici u kojoj su mi došli senzori piše K5-9 a na senzoru TCR 15000… Šaljem Vam sliku spojenog senzora i code pomoću kojeg sam ga isprobavao, pošto pokušavam izraditi pametno parkiralište sa 2 IR senzora i servo motorom koji ce sluziti kao rampa, znaci rampa se dize ukoliko se neki senzor upali i program broji ulaze/izlaze vozila… ali meni je senzor uvijek upaljen, pokušao sam dodati potenciometar kako bih probao promjeniti osjetiljivost ali nije mi radilo… Koristim Arduino UNO pločicu.

Attachment omitted in migration: 20230517_151540.heic

Attachment omitted in migration: 20230517_151931.heic

Soldered Support:

SKU refers to the unique product codes we use. I found the sensor you’re referring to: https://soldered.com/product/ir-obstacle-sensor/

I found this schematic showing how to connect this sensor:

The ADC/GPIO on the schematic is actually A0, your analog input on the Arduino. The resistor marked “R2” with value “220R” is actually 220 ohms.

I also found this more detailed pinout:

Looking at your connected circuit, I think it might be wired incorrectly. The resistors you have connected to pins 4 and 1 should actually connect to pins 3 and 2 and then to ground according to the schematic. Try connecting according to this schematic and let me know your results.

The code looks OK at first glance, but we would definitely recommend using the Arduino IDE.

Original message (Croatian)

isprike, trebao sam bolje naznačiti što je SKU - to su jedinstvene oznake za naše proizvode. Uspio sam ga pronaći putem ovih ostalih informacija koje si poslao, riječ je, dakle, o ovom senzoru: https://soldered.com/product/ir-obstacle-sensor/

Na internetu sam pronašao ovu shemu koja opisuje kako se ovaj senzor spaja:

ADC/GPIO na shemi je u stvari A0, tvoj analogni ulaz na Arduinu. Otpornik koji je označen sa “R2” vrijednosti “220R” je u stvari 220 Ohma.

Pronašao sam i ovaj detaljniji pinout:

Sve je sa ove stranice, na kojoj sigurno možeš naći više informacija o ovom senzoru: TCRT5000 IR Sensor Pinout, Equivalent, Circuit & Datasheet

Prema gledanju tvog spojenog strujnog kruga, mislim da je možda krivo spojeno, ovi otpornici koji su kod tebe spojeni na nožicama 4 i 1 zapravo, prema shemi trebaju ići na 3 i 2 pa u ground. Probaj spojiti prema ovoj shemi pa se javi s rezultatima.

Kod se čini OK na prvi pogled, samo bi definitivno preporučili korištenje Arduino IDE-a.

Customer:

I’m not sure how that schematic makes sense when the resistors and signal are on GND and 5V is directly connected. My sensor burned out of course. I have spares so I’ll try reversing the connection.

Original message (Croatian)

Pozdrav, nisam siguran kako ta shema ima smisla kad su otpornici i signal na GND a 5V je direktno spojeno, senzor mi je naravno pregorio… imam dodatne pa cu pokusat obrnuti.

Customer:

I apologize, I made a mistake in the wiring. Thank you for the help.

Original message (Croatian)

Ispričavam se, ja sam pogriješio u spajanju, hvala na pomoći :slight_smile: