Solar DC circuit: Preventing Buck Converter from Dropping out Due to Motor switching on/off (in Parallel)
To keep the input voltage to the buck converter from dropping down to some really low value during the inrush current period of the 150 watt motor, use a diode and capacitor. This will "hold-up" the voltage at the input to the buck circuit despite it dropping down across the motor. The diode gets reverse biased during this short period and therefore the motor load doesn't discharge the capacitor.

But, you have to choose a capacitor that is sufficient. For instance, if the buck regulator will work down to (say) 8 volts without a problem, then you can start to calculate the hold-up capacitor. Based on the pi taking (or needing) say 1 amp we can say: -

$$I = C\dfrac{dv}{dt}$$

Where dv is the permissible drop from 24 volts to 8 volts i.e. 16 volts and dt is the the inrush time for the motor (say) 2 seconds hence: -

$$1\text{ amp} = C\dfrac{16 \text{ volts}}{2\text{ seconds}}$$

C therefore equals 125,000 uF or above.

The numbers used above are my guesstimates and may not bear much resemblance to the real values needed by the buck regulator or the pi current.