I have some experience in this area (four patents issued and two that have been filed but not yet allowed).
1. Documenting your invention process is critical. Get a good bound note book (no loose leaf or 3 ring binders) and if the pages are not numbered, number them sequentially. Record your design and development history thoroughly. Make entries only in black ink. If you need to make a correction, do not erase or obliterate your entry - strike a single line through so the corrected text is legible and initial the strike thru. Date and initial each page. If you are collaborating with a co-inventor, have that person initial too. Things that can't go in the note book (blueprints, models, etc.) should be similarly documented with date and initials and referenced in an entry in the notebook. Nothing related to your invention process is too trivial to record.
2. Do not disclose or display your invention to the public. This includes showing a sketch or model. If you have built and sold one it is considered disclosed and in the public domain.
3. It is absolutely essential that the claims in your patent submission are written so as to give you the most broad protection possible. Poorly written claims will allow a competitor to work around the patent protection on your invention. This is not a job for amateurs. Don't take shortcuts and try to do it yourself. I also advise against using an attorney in general practice - this is a specialized field of law. Find a law firm with an Intellectual Property department, preferably an IP department that has filed for inventions of similar type to yours.
4. You can find the government's filing costs on the USPTO website. Legal fees vary widely, but in my part of the country I'd budget $5,000 minimum just to get to the point where you can file. You may need to double that if your claims are not allowed and you decide to file a request for reconsideration.
5.
www.freepatentsonline.com is a great IP resource. It has a searchable database of the entire USPTO library. You can get a start on the process by doing a thorough patent search for similar inventions. Your attorney will have to do this before he/she develops your claims, and every hour you spend searching is one hour less that a paralegal will do on your behalf at billable rates.
Good luck!