The ultra sonic thing will not work to your satisfaction. Here is how I solved a similar problem before I got a fence. First get a copy of the city/county ordinance addressing roaming dogs and learn your rights. In most cities/counties it is illegal for your animals to roam. I started logging, on a calendar when the dogs came in my yard, any damage they did and if they pooped in my yard. I also took pictures. After three weeks I called animal control and had them come over and showed them my log and pictures. If you can get other neighbors to participate in logging incidents that will go very far in helping your case.
The neighbors got a warning citation which explained the situation and their responsibility. They did nothing. I continued to keep my log and called animal control again two weeks later. The next citation the neighbors got cost them $50.00. The third time animal control came out the dogs were confiscated and neighbors fined - I don't remember the amount but it was a lot.
An alternative is to get a dog trap, catch them and have animal control come pick them up - the owners will have to pay to get them back. Most animal controls actually have traps you can borrow at no cost.
Here is something else you need to consider. Your neighbors will retaliate and you will make an enemy for life. If they are vindictive it can get scary - especially if they have guns. So think this through very carefully before you do anything.