http://memory-alpha.wikia.com/wiki/Miles_O%27Brien (all of the following text from this page)
In all episodes of TNG Seasons 2-5, O'Brien is seen wearing the insignia of a full lieutenant while working as transporter chief; in one of them, "Where Silence Has Lease", he is also addressed by Riker as "lieutenant".
In TNG: "Family", O'Brien is explicitly addressed in dialogue by Sergey Rozhenko as "chief petty officer".
The character of Miles O'Brien, and the exact rank he held in Star Trek, has a history of its own spanning the length of the character's existence.
In thirteen years of the character's appearances, only in the last four was his rank established to be presumably senior chief petty officer (although this term was never directly used on screen). Through various other stages of the character's development, O'Brien was referred to as a crewman, a lieutenant, and various script notes indicated he was a "warrant officer." The novelization of "Emissary" indicated O'Brien held a rank known as "ensign junior grade".
1987: Appears in "Encounter at Farpoint" and is referred to as "Conn". In this episode, O'Brien wears the single pip of a Starfleet ensign (1) and a red command division uniform. In "Lonely Among Us" he appears again, with no apparent insignia, credited as First Security Guard and in the corresponding yellow operations division uniform.
1988: Appears in "The Child", credited as Transporter Chief. He wears the two pips of a Starfleet lieutenant (2). In "Where Silence Has Lease" he appears wearing the same uniform and insignia as "The Child" and is directly addressed by Commander Riker as "lieutenant", seemingly indicating that O'Brien is an officer.
1989: O'Brien's surname is mentioned for the first time in "Unnatural Selection". He is wearing the two pips of a Starfleet lieutenant again and is addressed as chief.
1989: Appears in "The Emissary", again wearing two pips. Toward the end of the episode, then Lieutenant Junior Grade Worf gives him transporter coordinates. After entering them, Worf says "I relieve you", to which O'Brien replies, "Well I… yes, lieutenant", indicating Worf's rank is superior to his own. (It should be noted, however, there have been multiple examples in Starfleet of position occasionally trumping rank, such as a bridge officer being left in command of a ship, even when a superior officer is on duty in engineering).
1990: Appears in "Family" and is addressed as "another chief petty officer" by Sergey Rozhenko, even though he is shown wearing lieutenant's pips, and is given a first (and middle) name, three years after his first appearance. From this point on, O'Brien's character is developed as a senior enlisted member of the Enterprise crew, although he continued to wear the lieutenant's insignia.
1991: Appears in "Data's Day" wearing his usual uniform and insignia. At the end of the episode, O'Brien wears a dress uniform also with the two pip insignia of a lieutenant.
1992: Appears in "Realm of Fear" where O'Brien is given direct orders by Reginald Barclay (who is a lieutenant junior grade) thus firming up the idea that O'Brien is a noncom as opposed to an commissioned officer. This episode marks the first time that O'Brien wears the single hollow pip with his regular uniform (3). (The Star Trek Encyclopedia defines this as the insignia of a "chief warrant officer", although the term is never used on-screen.)
1993: Appears in "Emissary" as "Chief of Operations". For the next three years, O'Brien wears a single hollow pip insignia with his rank again very much in question. Script notes from several Deep Space Nine episodes indicate he is a "warrant officer", while the pilot's novel version states O'Brien is an "Ensign Junior Grade" (3).
cont… read more at http://memory-alpha.wikia.com/wiki/Miles_O%27Brien