Hello alberto,
You will want to connect the ground of all circuits to the same "common" connection. The drawing I have posted is for a relay which uses 12 VDC for the coil. If you have a relay that will use a different value of power, then you will want to change accordingly. Please note the...