Linecar is the company that serves the routes Madrid-Pedraza and Pedraza-Segovia. As far as I know, there is no Segovia-Barcelona direct service, so I suppose your best bet is doing it through Madrid.
Madrid-Pedraza: Departs from Madrid (Estacion Sur, Mendez Alvaro) at 3:30pm Mon-Fri, and 10:30am on Sat, no service on Sun.
Pedraza-Segovia: Only at 7:30am Mon-Fri. Obviously, this schedule is not intended for tourists, but for locals who has to spend the day at the capital of the province for affairs.
From Segovia to Madrid there are zillions of buses and trains, so you don't need to worry about schedules in advance.