I'm currently working with a sensor that is a open collector output flow sensor. The manufacturer states I need to use a 12V supply and a pull up resistor connected the output of that supply (R1). This generates a roughly -6V to 6V square wave with the frequency changing based on the flow rate. I need to read this data with an Arduino and based on the recommendation of a coworker I'm trying to use an optocoupler with the hope of getting a 0 to 5V square wave out. I've made a crude drawing with the circuit but the issue I'm having is protecting the optocoupler from the negative voltage from the sensor, the optocouplers I've looked at have a reverse voltage of 6V and I believe this means any voltage exceeding this spec will damage the optocoupler. Based on a little research I think others use a reverse biased diode to protect the internal LED of the optocoupler but I haven't been able to find any info on how these parts are selected. Any guidance or info is appreciated.





