I went here: http://www.history.army.mil/html/mus...ms/survey.html
The three bars and lozenge make him a 1st Sgt.
The crossed gun tubes place him in the Artillery.
That was the easy part. The dating was a litttle tough.
The closest matching cap I could find was issued in 1902. The closest matching uniform I could find was the Coast Artillery soldier on page 54 in the above pdf dated at 1908. There was a change in uniform regs in 1902 and the cap was replaced in 1912. According to the author:
"...there was considerable confusion as to who would wear what throughout the period and both quatermasters and unit commanders did not always follow the rules."
He goes on to say that only the Coast Artillery wore the older patterns until 1911. The only thing is that his cap insignia doesn't match the Coast Artillery insignia.
The number is either the Regiment or Company and if you can figure that out you'll know where he served. Maybe the Army museum could be of more help.