I think most all the motel choices are fairly grim, but the OP is looking for budget options.
Personally, I would break the trip to SF at Ridgecrest, which is an actual small city with many more options than the other places because of the presence of China Lake air base. This also allows a visit to Trona Pinnacles should you pass the road during daylight hours (although that is unlikely on a one day trip from LA).