TB6600/HY-DIV268N-5A Stepper Driver Case with 40mm Fan
While rebuilding my old MaxNC-15 CNC Mill, I decided to strip the antiquated electronics off and replace it with a Raspberry Pi with a Protoneer RPi-CNC HAT board connected to several external HY-DIV286N-5A drivers and modern hybrid bipolar stepper motors. When I started the project, little did I know how much of a "piece of junk" the HY-DIV286N-5A driver board, and it many variations, truly is. If you decide to use these drivers, don't expect to just plug them on and use them -- expect to rework the entire circuit. For some insight on what needs to be done, I refer you to this thread:
http://www.cnczone.com/forums/stepper-motors-drives/186930-tb6600-drive-ebay.html
The most important changes are to remove the series diode from the incoming power feed so that back EMF can unload into the power supply and add decoupling/filter caps on the Vref line (current limiter reference voltage). Also, reducing the load on the Vreg (+5V) is important, such as moving the LEDs to be powered from VIN instead of the on-board generated +5V.
Also, be certain to check all parts to make sure that the parts installed on your board are actually correct -- for example, make sure the resistors on the optoisolators aren't 56-ohm parts. They should be 270-ohm or 330-ohm or even 560-ohm parts as the PCB is marked, but some boards have 56-ohm resistors (stamped as "560" on the resistor) installed instead of their intended 560-ohm resistor (stamped as "561" on the resistor).
There also seems to be several different variations of these driver boards each with various levels of problems. So you are at the luck-of-the-draw as to what you'll receive and what all you'll have to do to fix it. And most all of them have incorrect charts on the case for the microstep and current limit dip-switch settings -- they didn't even get that right!
Anyway... while I was modifying my driver boards, I decided to add an "alert" LED to show when the driver chip is hitting either the current limiter or the thermal limiter and add a cooling fan to allow running at higher currents without overheating. So, I needed a better case that had additional LED holes and a mounting hole for a 40mm fan. I found this design here on Thingiverse, but it strangely doesn't have holes for the screws to hold it in place on the heatsink and wasn't very customizable for different LED configurations, so I decided to pull out OpenSCAD and develop this one from scratch.
Note that this OpenSCAD file requires that you either use the current development snapshot of OpenSCAD or comment out and/or delete the 'assert' statements in the code, as the current release version of OpenSCAD doesn't yet support that function. Those are only used to make sure that the customizations are consistent and is not necessary for rendering the model.
I also pulled in the 40mm Fan Grill from the Sanginololo [sic] case and copied it here to make it easier to find. Those little 40mm fan grills print really nice and work well. But there's nothing in my OpenSCAD code for them.
I have included STL files rendered for both the original 2-LED configuration and the 3-LED configuration that I used for my modified driver board. You can use either one as-is or modify the OpenSCAD variables to tweak it for your needs.
If I was starting over with my project, I would probably make the box just a little deeper because I didn't realize that the original case that came with the driver was actually pressing down on the large electrolytic capacitor and slightly bowing the PCB. It's not hurting anything, so I won't bother reprinting them, but you may wish to tweak that setting and recreate the STL files. To do that, just add a couple millimetres to the "BoxHeight" variable where it's being computed from the original box height and the change in wall thickness between this case and the original case. The STL files included are exactly as I used for printing mine.
My next task is to completely redesign this driver module in case I need replacements for these. That will be much easier than having to modify additional boards in the future. I would have done that in the first place, but I had already bought these drivers before finding out how horrible they are. If I do redesign it, I'll probably do a board turn on OSHPark and will make it available there.
Update (2016-12-11) : I finally completed redesigning the TB6600 driver. The new design is a much improved drop-in replacement for the HY-DIV268N module, allowing you to use your existing heatsink and configuration. The design files can be found at https://github.com/dewhisna/TB6600StepperDriver and boards can be ordered from https://www.oshpark.com/shared_projects/tKN4X7AL.