If you give us an idea of where you live, perhaps we can search online and find some legal aid resources for you.
Drawing up a visitation agreement and submitting it to your STBX will help keep down costs a lot. If both parties agree on everything (as in division of assets, custody, child support, etc), then the it's just a matter of producting the affidavits and draft judgments for the judge's approval. When people start to argue and litigation is required, that's when it gets pricey.