I am sorry to be the one spiking your guns but you should be aware that, as a general rule, you can ONLY camp on specifically permitted places. If you're caught camping elsewhere (in nature or a town's street for example), you'll be issued a penalty. Sadly, caravaning is not as popular as say in France or the US, and the authorities are rather restrictive with this activity.
This is not to say there's no caravaning, just that you need to know the restrictions. An important one is to understand the difference between "parking" and "camping": https://www.lalbacaravaning.com/legislacio-evita-les-multes-per-pernoctar-en-autocaravana/ Anyhow, your best bet is always to stop in campings for caravans to avoid misunderstandings, especially not being familiar with the local regulations. There are often disagreements between local authorities and campers on what is parking and what is camping and these are the source of many fines and recourses in court.
To complicate it further, note that Spain has 17 different "autonomias" (sort of "states" in the US), each one with their own legislative branch, therefore, the laws and regulations aren't necessarily the same in each one. Thus, something that is permitted in, say, Basque Country, might no be in Navarra, Aragon or in Catalonia -which are the "states" you're going to be passing by. The common bits though can be read here. Also, note that Basque Country and Catalonia have very similar legislation on this matter.
In short, enjoy your caravaning, but know your restrictions.
Also, if you have the time, while caravaning in my home nation, in CATALONIA, these are two areas I would strongly recommend to visit:
And these are other documents that may come in handy:
Welcome to Catalonia
Map of roads in Catalonia
Routes and getaways
and obviously, the Catalan National Weather Forecast Service: www.meteo.cat -don't use the English version but the Catalan version and ask Google Translate to translate instead as the information is much richer in this version.