Im using servoblaster in pcm mode and setting pulsewidth from code for turning my servos position to desired angle. But my question is, cant i use it for controlling the speed of dc motor. I read some recommended pigpio for this purpose. But is it not possible with servoblaster?
You can control the speed of a standard DC motor using PWM.
PWM works my splitting each second into many time slots. The number of time slots per second is the PWM frequency. During each time slot the signal will be high then low. The percentage of the time slot that the signal is high is the PWM duty cycle. It's a gross simplification but for the sake of argument full speed is a 100% duty cycle, half speed is a 50% duty cycle, etc.
Servoblaster generates servo signals. These have a PWM frequency of 50Hz. So each time slot is 20 milliseconds long. Servos typically accept signals in the range 1 to 2 milliseconds long. That is roughly the range which servoblaster will output. That means you can vary the dutycycle between 5-10%. I doubt that will be enough to even start a DC motor turning.
You really need to be using a proper PWM generator.
My pigpio will generate servo signals and PWM signals. pigpio is pre-installed with recent versions of Raspbian.
Found the default cycle time in servoblaster is 20000 us but the default min and max width is restricted to 500 us to 2500 us to protect servos. Changed the default value from 0us to 20000us that solved the problem with motors.