DISCLAIMER: This is an untested design and may need adjustments. I will be testing this design over the next few days, so some of these files may change. Feel free to use and adjust them at your own risk.
With that out of the way, I am working on an enclosure for my Anet A8 and am working on switching to a bowden extruder with a J-Head. I wanted to also include a filament runout sensor with it. I looked at a few designs of bowden mounts that utilize the parts from the existing A8 extruder motor in the setup to minimize the number of parts that I need to buy or print. I also looked at a few filament runout sensor designs and tried to figure out how I could mount the two on my new setup. I thought, I wonder if there is anything with the two integrated together. Looking through thingiverse, I could not find anything that merged the two together. This is my idea for a bowden extruder motor mount which includes an integrated filament runout sensor to be used with octoprint. Though this is an untested design, the concept seemed pretty solid.
My first print of this I did with the motor and switch housing face down. I did it using Cura with supports only touching the build plate. The screw holes for the mounting plate were printed vertically, but because the holes were round, no supports were needed for them. If you use supports for those small holes, you may have trouble getting the support material out. I was going to try to do this in Slic3r, but it kept wanting to put support material in those holes, which is why I fell back to using Cura.
The entire design for this was created using OpenSCAD. I used this bracket done by Brogs007 as a base design idea for the project. I wanted to be able to mount this to the top of my enclosure easily, so I included four screw mounting holes with recessed spots for the screw heads so as not to interfere with the mounting of the stepper motor. The filament feeds into the runout sensor on the right side and gets pulled through with the extruder motor. The filament should slide past the microswitch fairly easily for filament loading.
For visualization, I have included the microswitch.scad file. I adapted this file from sturmschneid on github. His file created the basic microswitch, and I modified it to include the actuator lever. I have this file in my OpenSCAD libraries folder, but it will also work having the file in the same folder ad the main scad file. If you don't plan to use this file in your setup, you will need to remove the line:
EDIT: I have made a change to the design as suggested by William J. Steele in my facebook post to add some cover/strain relief for the switch connections and wires. In the scad file I made this as a configurable option so you can make it as my original design shows, or with the wire relief.
Update notes for the extruder assembly with the switch in place.
05/29/2018 - Initial upload
05/29/2018 - Added switch connector cover and wire relief hole for the connection wire to the filament sensor housing.
06/02/2018 - Created 6mm threaded hole for bowden tube fitting and adjusted the screw holes and nut reliefs for use with 2mm screws and nuts. I also increased the wire hole size slightly for larger wires.
I made some updates to this design for it to work with the stock Anet A8 extruder parts. This needed an angle cut in the filament sensor switch section to allow room for the filament tension arm to spring out and hold the filament properly. The feed hole for the filament had to also be brought out more to allow it to match up with the filament entry hole in the A8 extruder's tension arm.
FINAL UPDATE: I think I finally have the finished design that works. My previous revision didn't allow enough room to access the tension arm reliably. I inverted the filament runout sensor so the connection wire sticks out the top. That with it's position allowed for better access to the tension arm when changing filament. One thing to note is that this is designed for use with the existing Anet A8 tension arm. Due to the fact that the tension arm points downwards, this will not work with aftermarket longer tension arms unless you mount the extruder motor on the edge. I currently have mine mounted to the top center of my enclosure which would not allow for the longer arm. I have posted a few pics of my final setup of this so you can see how it looks fully assembled.