The simplest way to connect a rain barrel would be to have the sink below it and a sturdy wood frame holding the barrel up. To keep debris out of the plumbing, a false bottom and a screen mesh filter from a homebrew store should do the trick. You can wrap fabric around the mesh filter to trap finer particles. I would also keep the mesh filter a few inches off the bottom so anything that makes it through will settle.