Check to see if the brakes are in good shape as you try this simple thing. Get a cheap ohm meter and test each of the abs sensors on each wheel. Unplug them and test the sensor to each wheel. Record your readings. They should all be close to each other in output. If one is way off from the rest replace it. If they are the same then it is up the line and in to the engine compartment for the answer. Often it is a wheel speed sensor.
Describe the racheting sound more.