About 26km after Dharmapuri bypass, watch out for the diversion at Thoppur. Here you'll leave the NH7 and get to the state highway to Bhavani via Mettur. Other option is to continue on the NH7 and take the NH47 at the outskirts of Salem.
Route Option 1 : Bangalore ->Hosur-> Krishnagiri->Thoppur ->Mettur-Perundurai->Dharapuram ->Palani : 360km
Route Option 2 : Bangalore ->Hosur-> Krishnagiri->Thoppur ->Salem-> Perundurai->Dharapuram ->Palani : 380km
In Option 2, you'll face some slow traffic around the Salem outskirts till you get to the the NH47 flyover.
Bangalore to Palani. Route Option 1 : Bangalore ->Hosur-> Krishnagiri->Thoppur ->Mettur-Perundurai->Dharapuram ->Palani : 360km
Route Option 2 : Bangalore ->Hosur-> Krishnagiri->Thoppur ->Salem-Perundurai->Dharapuram ->Palani : 380km