Hello, guys. How's it going?
In my school prototype I need to detect a box with a sensor, and it's output will be used to trigger the printing of our names into the box.
The signal must go into the school computer via the serial port, as that's where the printer is connected.
Well I'm kind of an impulsive person, so I just bought the sensor before hand without overthinking, which is stupid.
Specs of the sensor: Input voltage: any ranging from 20 to 250V. AC/DC. Output: relay contacts, NO.
I though: 'well, I'll simply get some 120V from the outlet to feed the sensor, then I'll get +5V from the serial port and connect to the NO contact of the sensor and then to an input pin of the serial port, so everytime the sensor detects the box the contact is gonna close (NF) and then the serial port will be receiving 5V into the pin I assigned. Piece of cake'.
Nope. Looks like the serial port is RS232, and not TTL Which changes everything. Tbf, I'm lost.
Am I able to get -13V out from the serial port to connect to the NO contact of the sensor and then to an input pin of the serial port? To make it work just like I thought..?
What would you do? Is it possible? Plan B is getting a +24V PNP sensor from the maintenance, would it be any easier?
After managing to input High and Low signals into my serial port, what's the best workaround software to communicate with the printer connected to the PC? (Yes, sorry)
In my school prototype I need to detect a box with a sensor, and it's output will be used to trigger the printing of our names into the box.
The signal must go into the school computer via the serial port, as that's where the printer is connected.
Well I'm kind of an impulsive person, so I just bought the sensor before hand without overthinking, which is stupid.
Specs of the sensor: Input voltage: any ranging from 20 to 250V. AC/DC. Output: relay contacts, NO.
I though: 'well, I'll simply get some 120V from the outlet to feed the sensor, then I'll get +5V from the serial port and connect to the NO contact of the sensor and then to an input pin of the serial port, so everytime the sensor detects the box the contact is gonna close (NF) and then the serial port will be receiving 5V into the pin I assigned. Piece of cake'.
Nope. Looks like the serial port is RS232, and not TTL Which changes everything. Tbf, I'm lost.
Am I able to get -13V out from the serial port to connect to the NO contact of the sensor and then to an input pin of the serial port? To make it work just like I thought..?
What would you do? Is it possible? Plan B is getting a +24V PNP sensor from the maintenance, would it be any easier?
After managing to input High and Low signals into my serial port, what's the best workaround software to communicate with the printer connected to the PC? (Yes, sorry)