DB9 is actually a popular port for research and monitoring equipment since it is less sensitive to the background noises. But then you suddenly found that wiring point-to-point for every device to a computer or a hub and collect data are cumbersome. This inconvenience is unpleasant when adding a device or placing the device accross the room.
Look at the port #4 and a pinout map of a DB9(M) connector. It is "serial" because of one dedicated pin for RX (receive) and another for TX (transfer).
I recently purchased a Dylos DC1100 Pro, a laser-scattering monitor to count fine particles in the ambient air. Not surprisingly (since I am writing this article), it comes with a DB9 port to communicate with a PC. A COM-to-USB cable is offered by the manufacturer about ~$10 or through AliExpress for about $2-3. But that is not where the fun starts.
Why and why?
Saving a few bucks can be a great push. Besides, I have a couple MAX3232 module, also marked as RS232-TTL, purchased sometimes ago and a few serial-to-USB adapters. Why not make your own cable? You could get a RS232-TTL though AliExpress with less than $1 each.
Raspbery Pi is a litte device running on 5V and on average at 0.5A. So that is a 2.5W-powered device. Your laptop is somewhere 20-40W, and your desktop is around 20-80W power or a few times higher.
Since your are reading this. I supposed you like to make your own stuff, sometimes it does not work, but hey, at least you try, right?
Also, to make a COM cable, you need a USB-to-TTL module to connect serial data to USB inteface. Wiring two modules likes the photo below, you now have a DIY DB9-to-USB cable. I used an old USB cable to connect between RS-232-TTL to CP2102-TTLmodule with $1.11. So the RS-232-TTL module will (mostly) listen to RS-232 interface, and CP2102-TTL will digitize the signal from RS-232 module.
Here are how these two module connected.
Tips: They are connected in parallel.
So that is a long way to make a COM or RS232-to-USB with DB-9 port cable. You could also get a similar cable with $1.3 or so.