0

My sensor (photodetector + LED) communicates (send-only: does not receive) via RS-232 at 9600 8-N-1. It has 4 lines for

  • power
  • ground
  • RS-232
  • TTL Serial

The sensor's ground and RS-232 are connected to a Manhattan Serial to USB cable.: Is there any reason why this would not work? or is there anything else to be done / considered?

Battery power has been applied and seems to power the sensor's LED (LED is bright). Raspberry pi has been configured per

The rPi serial-to-usb adapter has been tested as described (click) here The sensor was plugged in: is it reasonable (or have I missed a step?) to expect that:

cat /dev/ttyUSB0

will display the raw data sent by the sensor? Is there a better (surefire+easy) to confirm that serial data is streaming from the sensor? Thank you for actionable suggestions (executable commands).

4
  • 1
    You say it has been tested. Did it work? What is the output? cat is a poor choice - it depends what the sensor outputs. I would use a terminal program e.g. minicom. Incidentally if you have a ttl output why not connect to the Pi RxD (via a divider to ensure voltage does not exceed 3.3V).
    – Milliways
    Jan 26, 2016 at 7:04
  • 1
    What sensor? Are you sure it uses RS232 (+/- 12V) rather than serial TTL (0-5V)?.
    – joan
    Jan 26, 2016 at 8:32
  • @Milliways: No, in the sense that I do not see inbound data from the sensor. I need to perform a loopback tests starting from the Manhattan device to verify that it is not the problem (isolate the problem[s]). Sensor outputs both 5V TTL and RS-232: RS232 was selected for ease of physical connectivity, however, bridging 5V-TTL with a voltage divider is looking more and more attractive.
    – gatorback
    Jan 29, 2016 at 17:48
  • @joan: good questions :) A sophisticated Photo diode cricuit outputs both 5V TTL and RS-232. The data sheet does not provide RS-232 voltage levels.
    – gatorback
    Jan 29, 2016 at 17:50

1 Answer 1

2

I usually use screen /dev/ttyUSB0 9600 to ensure I get exactly what I expect at the correct speed. You may have to apt-get install screen to make that work.

I don't see any issue with what you are doing assuming you got the TX/RX parts right and didn't accidentally cross the RS-232 signal levels onto something TTL level. Note also your TTL serial could be 5 V, which could hurt things if connected directly to 3v3 logic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.