I made this to get filament sensor to work on my R17.
It is a simple design and I did not use any bowden couplings to fixate the hose. I just cutted the bowden hose about 70-80mm under the extruder and pushed the ends into the the plastic part. It have worked fine and right now I do not see any reason to have any couplings. The only thing I saw that could be better is when it unloads the filament when you run out of filament is that it can catch on the edge inside the plastic and then forces the bowden tube apart some. For me that is ok, but maybe I fix it further on.
The electrical connection.
I bought some PHR-2 connectors and pins on the local electronic shop and a micro switch that seemed to be small enough. Do not have the article number right now.
Connect the two cables to normally closed connections on the micro switch. If you do this wrong the only thing that happens is that when you start a print it alarms direct that there is no filament.
I have some pictures here when it is in operation. Anyhow It works for me!
Wish you a great build! :-)