0

I want to connect a Hokuyo scanning range finder to an Arduino Mega, the outputs are labeled like this:

  • COM+
  • COM-
  • Input
  • Output
  • DC12/24
  • GND

I want to read its serial output with Arduino, please help me in details. Thanks

Glorfindel
5781 gold badge7 silver badges18 bronze badges
asked May 23, 2016 at 13:40
3
  • Have you looked at the hardware documentation of the device you are trying to connect to, normally this will provide details on how to connect and interface with the COM Ports Commented May 23, 2016 at 13:47
  • 2
    Failing @Harvey's suggestion, you will at the very least need to specify the exact model of the device you are trying to interface with. But I suspect this will be off-topic here anyway; Super User is concerned with using computers from a user perspective, not programming or hardware design. Commented May 23, 2016 at 13:58
  • There are many protocols involved in COM programming also, so also a very broad question Commented May 23, 2016 at 13:59

1 Answer 1

1

You should specify what model of Hokuyo scanning range finder you have. Some models are USB-interfaced, in which case COM+ and COM- could possibly correspond to USB D+ and D- leads.

The Hokuyo URG-04LX has both USB and RS-232 interfacing. The linked page shows the following pinout on CN1:

Pin No. Signals Colors
1 N.C. Red
2 N.C. White
3 OUTPUT(Synchronous output) Black
4 GND(5th pin of 9-pin, D-sub connector) Purple
5 RxD(3rd pin of 9-pin, D-sub connector) Yellow
6 TxD(2nd pin of 9-pin, D-sub connector) Green
7 0V Blue
8 DC5V Brown

Given that pinout, you would connect pin 5, RxD, to a TXD output on the Mega, and pin 6, TxD, to an RXD input on the Mega. Note, before making any such connection, measure the output voltage on pin 6. An ordinary Mega supports 0 V and 5 V levels for serial data, but standard RS-232 levels are lower and higher than that; for example, ±12 V. If you connect ±12 V RS-232 levels to your Mega, you will damage it. The several Hokuyo documents I've looked at don't say whether they use traditional RS-232 levels (±12 V) or TTL levels (0-5 V).

answered May 23, 2016 at 16:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.