Using Rs232 with a sonar?

How do we use the RS232 ciucuit board with a sonar?

Could you describe a little more about what you want to do? Are you talking about connecting one of the MaxBotix sonar sensors to a Pololu 23201a serial adapter? Do you want to be able to trigger the sonar, or just let it free-run and read the serial output?

The MaxBotix sonar sensors have inverted TTL level serial outputs, so you can’t hook one straight up to the Pololu serial adapter board. You can build a simple inverter circuit out of a transistor and a resistor to correct the signal, like the manual says:

The good news is that, for simple read-only connections to most RS-232 ports you don’t need any extra hardware. It’s hard to find buried on the MaxBotix website, but there is a description of how to hook one of their sensors up directly to an RS-232 serial port on your computer here. There’s also a nice little demo program there that will graph the sonar range: