Sensors interface with micrcontroller

Saeedk9574

Member level 3
Joined
Nov 6, 2023
Messages
60
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
416
Hi everyone,
I am working on a GSM SMS relay controller and I have a question about interfacing of digital sensors (like motion detector, smoke detector, and so on) with MCU. When I see the similar boards they have used optocouplers to connect these digital sensors to the microcontroller, however these sensors have a common ground with the controller board. So we wont have isolation with optocoupler because of the common ground. My question is while there is no isolation why we do not use a simple transistor instead of optocoupler?


 

Attachments

  • 1728806190573.png
    38.2 KB · Views: 82

Because circuit author misses basic electronic design knowledge.
Thanks for your reply. As we can see it in many devices with the same ground, there would be some other reasons. In some topics, it is said that optocoupler reduces the noise caused by long wire connections. In this case, is it possible to have noise reduction even with same grounds?
 

Even with separated GND, optocouplers will not reduce noise. For that, you would need e.g. a bypass cap on the oc input.
The only benefit of using oc in this manner is protection of the MCU input against overvoltage or reverse polarity, just the oc will be damaged.
 
optocouplers will reduce common-mode noise in certain applications - the LED acts like a differential receiver.
 
optocouplers will reduce common-mode noise in certain applications - the LED acts like a differential receiver.
In a differential setup, I agree the LED acts like a differential cml receiver.
But common-mode noise is always in reference to a separate potential (e.g. shield GND), therefore there is no noise on the differential lines to be reduced by the LED.
And for differential-mode noise, the LED will also not eliminate anything.
 

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…