-
Tb6600 Drivers
03/11/2015 at 13:46 • 3 commentsNot much to report at present, real life has been getting in the way again. But the stepper drivers I ordered from China have finally turned up, and I had a chance last night to play with them.
So against all the advice found online, I ordered some TB6600 based drivers from eBay. At the price (£11 per axis) I figured it was worth a punt, as even if they're pap I can sell them back on eBay and at least recoup the cost…
First thing to note is that these PCBs appear to have a different layout compared to the ones I've seen discussed on CNC forums. I hoped that it was a newer, better design. The other boards I've seen have all the inputs and outputs along one edge of the board, these ones have the step input control on one side, and motor and power supply on the other.
They're supplied with 4 brass stand-offs, and a heatsink on the TB6600 chip. Immediately I noticed a problem here: the heatsinks are mounted on the *bottom* of the chips. I know I only scraped through my Thermodynamics class last semester, but I'm pretty sure having the heatsink on top of the chip would be a squillion times better. I plan on replacing the heatsinks with something bigger anyway, either with directly mounted fans or in an air cooled box with the other electronics.I suppose I could even leave the underside coolers on and just add a better cooler to the top side.
Surprisingly for boards from China, these things also came with a data-sheet of sorts, detailing the various limits for inputs/outputs, wiring examples and DIP switch settings. Foolishly, I believed the datasheet and wasted 30 or 40 minutes trying to get the board to respond: the Enable PIN has to be pulled LOW to enable the board, not HIGH as stated on the sheet!
I hooked up the board to one of my steppers, a 30V, 3.5A bench supply and an ARM mbed micocontroller to provide the clicks. My code for the mbed was very rudimentary, all it does is send the ENABLE pin LOW (haha, eventually), Direction pin HIGH and provide a pulse to the step pin every 0.4 Seconds. I thought it best to keep it simple to start with (code used is at end of post).
I grounded all the -ve pins on the input side together and to the mbed, as shown in the data sheet diagram. The input side is opto-isolated so the inputs must be grounded separately to the motor supply.
Plugged everything in, checked all the connections, turned it on and… nothing. Well, almost nothing. The motor is trying to step, but is just wiggling back and forward. I know the motors work (see previous posts for test), and the TB6600 board is responding to the pulse (the LED on the TB6600 board flashes for each STEP command it receives), but I just can't get the thing to move. I tried a whole bunch of different timings for the stepping, including a 50% duty cycle between STEP and NOSTEP, but nothing worked. The closest I got to making it work was manually touching the STEP wire to a 3.3V source. If I 'vibrated' the wire just right off the 3.3V output pin on the mbed I could more or less get the drive to rotate.
I'm a bit stumped now, one of my lecturers and a few other students helped out probing the thing with a scope, and even triggering the scope from the step pulse, but we couldn't really make head-nor-tail of the output. The coils were definitely bouncing between 0v and +10v (the bench supply was set to 10v at that point), but not actually rotating.
Also tried one of the other boards and one of the other motors, all with the same result.
So what am I doing wrong? Is it a grounding issue? I've had odd behavior with steppers before when there was a grounding issue between the driver and the MCU, but that didn't seem to solve the issue this time. Any advice gratefully received!Video of the motor failing to rotate:
Code used on the mbed:
#include "mbed.h"
Serial pc(USBTX, USBRX);
// used to communicate with a terminal on a PC – not actually implemented here so can be removed
// Planned to have RPM and direction selectable via terminal, but sadly never got that far!
DigitalOut Enable(p5);
DigitalOut Direction(p6);
DigitalOut Step(p7);
DigitalOut LED(LED1);
int main() {
LED = 0;
Enable = 0;
Direction = 1;
while(1) {
Step = 0; // Set the STEP pin LOW i.e. no step
wait(0.3); // wait for 0.3 seconds
Step = 1; // Set the STEP pin HIGH i.e. make it step
wait(0.1); // wait for 0.1 seconds. Combined wait time gives one step every 0.4 seconds, ie 150 RPM
LED = !LED; //Blink one of the mbed onboard LEDs to use as a visual cue for when stepping should occur
}
} -
Motors Arrived!
02/23/2015 at 21:52 • 0 commentsI order some steppers from CNC4You on eBay on Friday, and they turned up today with DPD (actually it was early: DPD text you a 1 hour time slot in the morning. The guy turned up a minute before the earliest time allowed and we had to stand their awkwardly making small talk until his scanner would let me sign for the package :'D ).
I don't have the proper drivers yet, but I was desperate to check that they worked and see what they were like. I hooked them up to an EasyDriver board and turned the current pot up to the heady max of 750mA. Coupled with the world's simplest Arduino stepper sketch, I had working motors!
I'm really impressed with these so far. They weigh just under 1.5kg each, and even being driven with 750mA @12V they produce useful torque. I was totally unable to stall them by hand. This looks quite promising for my machine!
-
Welding!
02/19/2015 at 21:43 • 2 commentsSo I had my first proper welding lesson today, so much fun! Keeping in mind that I had about an hours practice (taking it in
turns between 4 of us) I don't think I did too terrible a job welding the frame together. It's not pretty, but it seems rigid and the frame is pretty damn square so I'm happy with it. I'll grind down the welds next week to make a nice smooth surface or mounting the rails to. I've welded up the bottom frame, and two feet/legs for the gantry. Very satisfying work, and I was really getting the hang of it by the end.Also been thinking more about the toolchain I want to use with this thing. Some of the features of LinuxCNC are very tempting – particularly the addons that allow proper use of a height probe. I'm just not convinced by having to use a desktop PC with a parallel port to control it all. Putting a force air cooled PC in a milling environment just doesn't seem that sensible, although I am considering a sound-reducing enclosure for the mill so we'll see. I think I'm going to push ahead with GRBL to start with, and move over to LinuxCNC once I've enclosed the mill.
-
Some progress, frame coming on
02/18/2015 at 21:14 • 0 commentso I had to make some changes to the frame design. Not because of any design problems, but because there was a bunch of steel section in the scrap bin that was looking for a home.
Overall the new frame dimensionally the same as before, but now constructed from 25x25mm box. As the SBR16 rails have a 40mm mounting plate, I'm going to run two legnths of 25mm box along two sides.
The steel is all cut to size(ish, must learn to use saws better…) and ready to be welded. Was hoping to get that done today, but ran out of time. I've never welded anything before, so I did get a chance to do some practice welds today and it went pretty well!
I've also cut two 600mm lengths for the grantry, and made two feet out of 50x25mm section (the only bit of it lying around I could steel). I've drilled the holes for mounting to the SBR16UU bearing blocks, and I'll weld the legs onto the feet when I do the rest of the frame.
Current thinking is to use a bolt-on system for the gantry, so that it can be adjusted for squareness once all the other bits are in place. Not sure if this is a good idea or not yet.
Motors:
Been looking at these bad boys and after some comments from a lovely chap called Kert (and not Ken as I original misread his name as!) over on Hackaday.io I reckon the mass of the gantry isn't going to be too much of a worry.
Drivers:
A bit stuck here. I love the price of the TB6600 drivers on ebay (around £11 per axis), but getting not so encouraging reports on their quality. There seems to be a few different board designs, though, so hopefully some more research will reveal one of them that works as advertisedThe next option I've found is about 3x the price, using the CW4056 (or something like that) drivers. More thought/research needed.
Summary:
Slower progress than I'd hoped, but still progress.
-
Bottom frame progress
02/17/2015 at 21:14 • 0 commentsSlight change in the design of the bottom frame - was offered some 25x25mm box section for free so decided to go with that. I'll weld two lengths together along the rail sides so that there's enough room to mount the sbr rails.
The lengths are all cut to size, just need to clean up the ends and weld it together tomorrow.