March 27, 2014 at 10:47 pm #21824
Sorry about that. I’m not doing a very good job of posting all of the intermediate development versions. This file (https://code.google.com/p/eggbotcode/source/browse/trunk/EBB_firmware/app.X/dist/EBBv13_with_bootloader/production/app.X.production.hex) is version 2.2.3 (until I check in a newer version). Once we get a version that is stable and has better pen servo behavior, I’ll make a ‘real’ version and post it.
So, actually measuring peak current on a stepper motor driver like the EBB is actually harder than it sounds. Because these driver chips are ‘chopper’ drivers, they are constantly turning the voltage to the coils on and off – even when the motor is standing still. This is happening at about a 20Khz rate, so your meter won’t see it. And measuring the voltage across the coil isn’t going to give an accurate value either. You have to either measure the voltage across the sense resistor (which is quite hard, because it’s such a low value), or you have to use a real current probe around the motor coil wires. (Which is what I do to verify these things.) And the current probe must be connected to a scope, as it’s a very ‘AC’ type waveform, and you have to look for the peak at each microstep. Just because the current limit pot is set to – say – 1A, you’ll only get the 1A peak through the coils if several things are true: the sequencer has to be on microstep 1 for that coil and you have to have a low enough resistance motor and a high enough input voltage that, taking into account the voltage drop across the FETs in the driver chip and the sense resistor, the driver chip can actually deliver that much current into the coil.
So, yeah. It’s not super simple, unfortunately. I don’t even completely understand it all the way yet.
Hopefully this will help – you can read more on chopper drivers if you want to learn more of the theory.