Ground in schematics to which ground the battery or arduino ?

I have a read a topic on L298 H bridge and i was given this schematic... The schematic has 4 grounds which grounds do I connect to arduino (5v) and which to the other power supply for the motors (12v battery)

All grounds need to be connected.
Preferably all to the same point, the battery - , but that is not always practical.

Thanks for replying in a short time :), So I can connect all the grounds to the same ground (arduino 5v or bateery 12v) ? Is that true ? Thanks in advance :slight_smile:

Yes. Connect all grounds. Ground is used as the reference point for all signals.
Battery -
Arduino Ground
Any signal grounds

I thought that you couldn't (without some more components) connect a v5 ground and a different voltage ground... Am I wrong on this?

All grounds need to be connected unless the portions of the system are electrically isolated. I don't see that here.

Thanks CrossRoads.