Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
using 5v-12v as input sensor
#16
And honestly I thought that was going to work. When wired like that, a NPN sensor appears to behave correctly (i.e. the LED indicator on the sensor lights up when an object is detected, unlike with the PNP sensor that remains permenantly triggered), and the output wire switches from 12V to GND, but it does not get registered as a change in input from a digitalRead of the PCF8574 input.
I was beginning to wonder whether I had somehow damaged the optocoupler or PCF8574, but don't think I have since it still correctly reads an input if I simply attach a short wire from DI to GND.
Reply


Messages In This Thread
using 5v-12v as input sensor - by amararsa24s - 09-08-2024, 11:05 AM
RE: using 5v-12v as input sensor - by admin - 09-08-2024, 11:26 AM
RE: using 5v-12v as input sensor - by amararsa24s - 09-09-2024, 07:08 PM
RE: using 5v-12v as input sensor - by amararsa24s - 09-09-2024, 06:10 PM
RE: using 5v-12v as input sensor - by admin - 09-09-2024, 11:03 PM
RE: using 5v-12v as input sensor - by amararsa24s - 09-10-2024, 07:32 AM
RE: using 5v-12v as input sensor - by amararsa24s - 09-11-2024, 05:08 PM
RE: using 5v-12v as input sensor - by admin - 09-11-2024, 11:42 PM
RE: using 5v-12v as input sensor - by amararsa24s - 09-12-2024, 06:31 AM
RE: using 5v-12v as input sensor - by amararsa24s - 09-14-2024, 11:11 PM
RE: using 5v-12v as input sensor - by tanoshimi - 02-01-2025, 03:01 PM
RE: using 5v-12v as input sensor - by twostar - 02-02-2025, 12:13 AM
RE: using 5v-12v as input sensor - by admin - 02-02-2025, 12:39 AM
RE: using 5v-12v as input sensor - by tanoshimi - 02-02-2025, 09:28 AM
RE: using 5v-12v as input sensor - by twostar - 02-02-2025, 10:04 AM
RE: using 5v-12v as input sensor - by tanoshimi - 02-02-2025, 10:26 AM
RE: using 5v-12v as input sensor - by twostar - 02-02-2025, 10:35 AM
RE: using 5v-12v as input sensor - by tanoshimi - 02-02-2025, 10:44 AM
RE: using 5v-12v as input sensor - by twostar - 02-02-2025, 11:21 AM
RE: using 5v-12v as input sensor - by tanoshimi - 02-02-2025, 07:47 PM
RE: using 5v-12v as input sensor - by twostar - 02-03-2025, 03:44 AM
RE: using 5v-12v as input sensor - by tanoshimi - 02-03-2025, 07:56 AM
RE: using 5v-12v as input sensor - by admin - 02-03-2025, 05:32 AM
RE: using 5v-12v as input sensor - by twostar - 02-03-2025, 05:35 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)