Help using PC serial port
Posted on 2009-04-22
I need to create an application using C# and the serial port (D-SUB) of my computer.
The goal is to create a solution that will detect when a car's door is opened/closed and start/stop recording videos using a web cam.
This solution will be used in our company so we can manage the usage of our transportation vehicles (VANS).
Whe the passengers door is opened the web cam should start recording videos. When it's closed, the recording must stop.
I'm creating a cable that will be connected to the door's switch and to a car PC running a .Net C# application.
I searched the internet for a solution and found that I can use the PC serial port to solve the problem.
The problem is that I didn't find any helpful electronic schema explaining how to proceed.
I don't know about the connector pins, voltage, etc.
I found that one (or more) pins of the D-SUB connector has +5VDC available for use.
The idea is taking that 5VDC pin and use it to detect if the door is opene;closed.
Could you please help me to create the switch cable schematics, so I can create the application that will detect when the door is opened/closed?
Thanks for helping!