Think twice if you want to travel with train to Chiangmai. From all train trips that i have tried in other country, this one is the worst.
Even with AC , free food , bread, and cup of tea but the seat inside is very hard such as wooden boards, and you must sit inside 15 hour till the train reached chiangmai. Very painful for your back.
My advice is take night bus or flight, it's more convenient. But if you want to try my experience you can start open the railway website and book online :)