To the preposition di / da esponds one single preposition in Spanish and French, de. It is to assume that some people speak French or Spanish and so it is more or less sure that they are going to be caught in this trap. Those who speak Spanish or French should understand that in Italian one should distinguish.
di is used
with the genitive (la macchina di mio fratello / the car of my brother
to describe the material (scarpe di cuoio / leather shoe)
to add an infinitive without adding any semantic value
(Penso di farlo <=> an infinitive is just added : I think that I am going to do it.
: Unlavoro da fare <=> passive voice / obligation: A task to be done)
di as a comparative particle (Lui è più simpatico di te <=> He is more friendly than you)
in compound words (l'uscio di casa / the housedoor)
source / origine "è di / he is from " but "viene da / he comes from ".
da is used
to describe the source, origine of something (Il treno viene da Roma / The train from Rome).
to describe the use of something (macchina da scrivere / typewriter)
to express obligation (Un film da vedere / A film one must see)
to describe characteristics (Una donna dai capelli biondi)