Lavanya rajan
Well-known member
Hello All,
I'm attempting to monitor the status of a Capacitive Proximity sensor via one of the Teensy 4.0 Digital Inputs. To ensure isolation between the input and the controller side, I've employed an opto coupler. I've attached the schematic I've been utilizing. Despite this setup, the LED connected to the digital pin isn't illuminating. Upon measuring the voltage across the digital pin during a logic HIGH state, I observed a drop of 1.8V. Could someone kindly provide insight into why the LED fails to illuminate?
Additionally, I require some information: Can I interface an Inductive Proximity sensor alongside the Capacitive Proximity sensor, as depicted in the attached schematic?
attaching the code, hope it is correct
I'm attempting to monitor the status of a Capacitive Proximity sensor via one of the Teensy 4.0 Digital Inputs. To ensure isolation between the input and the controller side, I've employed an opto coupler. I've attached the schematic I've been utilizing. Despite this setup, the LED connected to the digital pin isn't illuminating. Upon measuring the voltage across the digital pin during a logic HIGH state, I observed a drop of 1.8V. Could someone kindly provide insight into why the LED fails to illuminate?
Additionally, I require some information: Can I interface an Inductive Proximity sensor alongside the Capacitive Proximity sensor, as depicted in the attached schematic?
attaching the code, hope it is correct
Code:
int inPin = 14;
int val = 0;
void setup() {
pinMode(inPin, INPUT);
}
void loop() {
val = digitalRead(inPin); // read the input pin
if(val==LOW){
Serial.println("LOW");
}
else{
Serial.println("HIGH");
}
}