TFmini Auriga wire UART RJ25


#1

Hi Support.

Recently I bought a TF-Mini lidar(Benewake) and I want to connect it to an Auriga card. But I have a couple of question about how to connect it.
The TF-mini uses UART communication and 4 wire connection:
1 Black GND
2 Red +5V
3 White RX
4 Green TX

So the first question is: How to connect it to the Auriga or any other card?
I know I must use the RJ25 to dupont adapter, and this cable has these colors when using it into port_6:
1 Blue SCL
2 Yellow SDA
3 Green GND
4 Red +5V
5 Black A10
6 White A15

Using the Auriga pinout for port number 6, I must wire the TF-Mini and the RJ25-dupont using this schema:

TF-Mini --> RJ25

1 Black GND --> 3 Green GND
2 Red +5V --> 4 Red +5V
3 White RX --> 5 Black A10
4 Green TX --> 6 White A15

Is this configuration schema correct?

An the other question: As the TF-Mini uses UART and the default UART of the Auriga is Port_5, May I use other port for this UART using SoftwareSerial?

Thanks in advance


#2

Hi kike,
Actually I’m not aware of TF-Mini lidar so I can’t provide special support for you.
I will enclose the schematic diagram for Auriga, hope it will work to you.
Me Auriga V1.1.pdf.zip (325.4 KB)


#3

I think here you don’t understand what software serial is and the difference between software serial and hardware serial.

Hardware serial is some hardware circuits that run parallel to the CPU to send serial communications. Basically the CPU just tells the hardware I want to send this data and the hardware serial circuits turn the needed pins on and off in the timing needed to send the data and it doesn’t use any CPU resources. Being hardware circuits these hardware circuits are physically connected to certain pins and can only operate those pins.

Software serial is created by the CPU using a timer interrupt. The CPU can use any pin as a GPIO pin (general purpose input/output) i.e make it high or low. An interrupt works by interrupting the normal execution of machine instructions to runs an ISR (interrupt service routine). So Software serial wants to send some data it sets up a timer interrupt to interrupt the CPUs normal execution at the baud rate of the transmission and put the code for switching the pin on/off to send the needed data in the ISR. So software serial uses CPU to switch the needed pin at the needed time by interrupting the normally execution of the CPU to do it. This means 2 things: 1. it will take up some of the CPU processing (on another post you noted that it affected the CPU maintaining the servo signals) and 2. the CPU can create software serial on any pin becuase the CPU can operate any pin, you just need to tell the software serial which pin you want to be RX and which pin you want to be TX.

I also noted on your previous post that the TF-mini isn’t accurate at measurements below 6m. Anything below 6m has an error of +/- of 5cm and the smaller the distance the worse the error. For the distance you quoted you want to measure then you will need to use a VL53L0X


#4

Hi Support.
Using the schematics I could connect the TFMini to port 10 in the Auriga card.

This is how I made it:
RJ25-Dupont —> TFMini
Red (+5V) —> Red (+5V)
Green(GND) —> Black(GND)
White(RX) —> Green (TX)
Black(TX) ----> white (RX)

And the arduino program with this instruction:

SoftwareSerial Serial4(A11,A6); //for Port 10

Serial4.begin(115200);

And now get right readings from the sensor

Thanks


#5

You’re welcome.


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.