1. Charge by the hour. Don't discount.
2. Provide an estimated range of your time based on your understanding of the scope work at the start of the project. Let the client work out how much it costs on their own.
3. Make it very very very clear that the estimate is non-binding. If it takes more time, the client pays more. If it takes less time, the client pays less.
4. Require a retainer for a large portion of the estimate. The retainer is to be applied against the last invoice so that you are never in a situation where the client owes you money.
5. Have an invoice schedule. Invoice on the schedule.
6. Walk away, if the potential client doesn't like your terms. Preparing proposals is a way of qualifying potential clients. Good clients, accept and pay under your terms.
Often, just saying, "I charge X per hour" is enough to determine if a client is serious. Amateur clients have unrealistic expectations. People you know will expect you to work for free. Don't. It's not worth it.