update:
I made some tests and i cannot explain some results, so i need some help again.
At 12 V, both motors are working fine, but if i lower the voltage down to 9 V, sometimes the motors just don't start.
I don't get it... why? At 9 V sometimes the motors start, but other times they start for only 0,2 sec, and then they stop. After some resets and other retries, the motors start, and i cannot explain this.
I do not understand the cause of this malfunction. Maybe the Shottcky diodes do this stop? Or maybe the L298N?
The second problem is with my IR sensors.
I used a IR emitter, a Photo Diode and some resistances and i created my own sensors. This is the circuit
**broken link removed**
When i use a white paper for the reflection i get on the output ~ 0,3V. When i use black paper for the reflection, i get on the output ~0,05V.
The problem is if i will be able to to differentiate these two voltages. If i will use ADC from uc it will be ok?