1

I have one external sensor and I want it to be connected with Arduino. The sensor came up with a usb cable and the pin out diagram is also given in the data sheet .

When I simply connect the the cabe which came along the sensor (E322968) with no Arduino board involved, but through Arduino IDE and setting baud rate to 115200 I am able to see the output in serial monitor of the Arduino . enter image description here

I want to capture this data to some variables for further manipulation. In the data sheet the pinout is specified as enter image description here

Please help me get the data to Arduino variable .

What I tried is connected,

  1. the RX1 or Arduino mega to the TX1 of the sensor (pin2) and
  2. from Arduino VCC(5v) to VCC of the sensor :: pin(1)
  3. ground to gnd of sensor, (pin5)
1

the RX1 or Arduino mega to the TX1 of the sensor (pin2) and

That will not work. These pins are for RS232, which uses the same communication protocol (UART) as the Arduino, but it uses different voltage levels. But fortunately your sensor has also RX and TX pins at TTL level (Transistor-Transistor-Logic). You want to connect these to the Arduino.

One thing to keep in mind: The sensor logic seems to work at 3.3V (voltage on the RX and TX lines). If you also want to send data to the sensor, you may need to step down the 5V of the Uno to the 3.3V of the sensor on its RX line (since 5V might damage the sensor). You can use a simple voltage divider with 2 resistors or a proper level shifter (which uses transistors) (voltage dividers limit the communication speed, though 115200baud should not be a problem).

4
  • It will be very much help full if you can share a schematic for the same including the level shifter to be used. And I am using an Arduino Mega – Lawliet May 11 at 9:20
  • Look for example here. Though you only need this, if you want to connect Arduino TX to sensor RX (for sending data to the sensor). You don't write, if you really need that – chrisl May 11 at 9:50
  • Thanks , I want to connect Tx(ard)->Rx(sens) , may be in future as I can send commands to the sensor for changing the output modes . – Lawliet May 11 at 9:53
  • More correctly: RS232 is the protocol (standard) and an UART (universal asynchronous receiver/transmitter) is a type of integrated circuit (IC - chip) that is designed to work a.o. according to that protocol. – PimV May 12 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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