Hello to everyone
,
I have a line follower(Chinese robot following a black line), which is using a dn711 lm393 Comparator but it has never worked. I think the comparator is not working properly, so I thought I can use Arduino to do the logic 
I found the diagram of the comparator but don't know how to connect the Arduino to it, also I will be using Arduino Nano 
Here are some photos of the robot, the diagram and the PCB diagram 
Thanks in advance for your answers
Stay safe
Images from Original Post so we don't have to download them. See this Simple Image Posting Guide
...R
Please post a photo of the underside of the robot - so we can see the line-following sensors.
I suspect you have to carefully adjust the two preset potentiometers to get your robot to work properly and if it does not work properly as intended I would not be surprised to find that something is damaged which an Arduino cannot fix. however you have not described how it behaves when it is not working properly.
...R
I am sorry, I am new to the forum and I am still learning 
Here is a picture of the paths...Also the robot follows almost straight line and when regulating the potentiometers nothing happens at all..never made it actually work 
Thanks.
It seems to have two LEDs providing light and two Light Dependent Resistors (LDR) to detect the line. LDRs have very little directional sensitivity and I wonder would it work better if you put a piece of matt black card beside each LED / LDR pair so that it shields it from the light from the other LED. It would also mean that it would only get reflected light from directly below or to the outside of the sensor (I mean the robot's outside).
You can probably guess from this that I am doubtful that simply replacing the comparator with an Arduino would improve things enough to justify the trouble.
Most line following robots use reflective optical sensors such as the QRE1113. I think Sparkfun sells a unit with 5 of those sensors. The QRE1113 has a working range of about 1mm so there is very little chance of light spilling over to the next sensor.
...R
Actually I will try that 
But how can I connect the Arduino to the PCB
I got inspired.. lol, sounds like an interesting project.
The gist of the original robot circuit is that the motor on the opposite side from the light dependent resistor (LDR) seeing less reflected light is turned on and the other is off. Thus when one side is over the black line the motor on the opposite side runs, turning it away from the line. This eventually puts the LDR on the other side over the line, activating the other motor, so the robot turns the other direction. In this way, it bounces back and forth, keeping over the line.
To check the original circuit, you should be able to cover one or the other LDR and make the opposite side motor run.
To replace the comparator with and Arduino, one might connect the two signals being inputs being input to the comparators as analog inputs to the Arduino and perform analogRead() on each repeatedly and activate the motor opposite the higher voltage reading. In principle the motors can be controlled via two Arduino digital output connected in place of the comparator outputs. To active the motor, the output is set low and to turn it off the output would be set high. However the Arduino doesn't have enough drive capability to do this directly, so one would have to have a buffer to drive the transistor while adhering to the device specifications.
For this reason, it's probably more sensible to diagnose and fix the original circuit to work as designed.
MrMark:
To replace the comparator with and Arduino, one might connect the two signals being inputs being input to the comparators as analog inputs to the Arduino and perform analogRead() on each repeatedly and activate the motor opposite the higher voltage reading. In principle the motors can be controlled via two Arduino digital output connected in place of the comparator outputs. To active the motor, the output is set low and to turn it off the output would be set high. However the Arduino doesn't have enough drive capability to do this directly, so one would have to have a buffer to drive the transistor while adhering to the device specifications.
I agree generally with that but my concern is that the Arduino won't be able to do any better than the comparator - a lot of work for no benefit. I don't think the problem is poor performance of the comparator.
...R
Robin2:
I agree generally with that but my concern is that the Arduino won't be able to do any better than the comparator - a lot of work for no benefit. I don't think the problem is poor performance of the comparator.
...R
My intent was to describe the original circuit and how an Arduino might be applied. With the last statement, I hoped to make the point that someone who couldn't get the original circuit working is going to have at least as much difficulty adapting operate differently.
For what it's worth, I built this kit a couple years ago to have a simple platform for robotics or remote control. It works well enough with some tuning, but I haven done anything else with it, in part because I have since come into some more sophisticated platforms.
There used to be something called "bang bang" radio control when I flew model airplanes in my youth. In these systems the rudder alternated between full left and full right driven by a solenoid rather than proportional servos, rather like this robot. If it alternated fast enough then it was sort of proportional ala PWM "analog". With a microcontroller in the loop, one could implement a more proportional controller for the robot, so with sufficient expertise and work, it's likely one could do better than the original circuit.
MrMark:
with a microcontroller in the loop, one could implement a more proportional controller for the robot, so with sufficient expertise and work, it's likely one could do better than the original circuit.
At this stage we have given the OP some options and he has to decide which way to go.
I agree that an Arduino can provide more sophisticated control but it does need inputs from effectively functioning sensors.
...R
Actually it started working
...I used some black tape to isolate the light and tuned the potentiometers 
Thanks a lot for the help, I understood the principal of the robot and that's cool 
Once again thanks
I couldn't upload a video but still 
Stay safe