If you DON'T use a chip with built in current controller you're going to have to implement that part of the chips circuitry with other parts or in code - possible but not easy, certainly not in the code alone. The L6207 i mentioned has the H-bridge (like in the L298) but also the current controller part of the L297 (well perhaps not the same circuit but the functionallity).
But since the L297 also has the step indexer built into it it's "locked" to full and half step mode. Oscillator, flip flops, compartors, blanking time etc etc. The L298 is often combined with the L297 and IT has the current controller in it. Remember that when you're microstepping you're NOT just setting the coil current to 1.2A or whatever - the current reference for each coil is changing. The L298 doesn't contain any current controller so if you're going to use that you need some way to regulate the current to whatever level your PIC commands. Geez, it seems you still really haven't grasped the concept here. What size of motor are we talking about here? Is a little NEMA11 with a rated current of couple of hundred mA and a suitable voltage of <24V or is it a NEMA56 which will need a hundred volts or more and currents in 10A range?
You'd then use the two CCP modules to generate the two current refernce signals (SIN/COS) and a couple of I/O's to drive the digital inputs of the driver chip.Īs for generating the SIN/COS reference signals there's been more than a couple of threads on this forum regarding that specific task (though it usually involves a student who's final project is to build a three phase inverter or motor drive), if you search the forum I'm sure you'll find a couple of threads that might be of interest. It's possible to do with a PIC and PBP but it's not an easy task and not a suitable beginners project to implement the current control within the PIC itself.Ī much easier (but still not a beginners project IMO) is to use an exernal driver with integrated PWM current control (such as the L6207 though there are many alternatives) and then use the PIC to generated the apropriate phase- (digital) and current reference (analog) signals. So, you need to be able to regulate the amplitude of the current thru each of the two coils in a SIN/COS relation to each other.
The more "steps" you add the sinewaves the smoother the motion from the motor becomes. What microstepping does is adding more "steps" to the sinewaves. Now draw the waveform for halfstepping out on paper and you'll see that it looks a Little bit more like two sinewaves, still very crude sinewaves with only 3 "steps" to them but still. They are very crude sinewaves with only 2 "steps" to them but never the less. If you draw the waveform of fullstepping mode out on paper you're going to get something that, with a little bit of imagination, is looking like two sine waves with a 90° phase shift between A and B. When microstepping you're not only controling the currents direction thru the coil (like you are when fullstepping) but also the amplitude. I guess it is to much to ask, but i want to learn further about programming in picbasic pro and maybe it can be done :).Īnd sorry for my bad english, im from Mexico!Īre you doing the current sensing/control with the PIC itself (ie sampling the actual current using the ADC) (no you're not if you're using the 16F84) or are you using external comparator and flip/flops to sense and regulate the current? I think that just one pic would control one motor, because it would be too much to ask for the three motors. *the pwm signals to the power transistors or the Hbridges to drive the Bi Polar Motor *switches to select the microstepping config (4, 8, 16, 32, etc)
Of course, if somebody can help me out with this in picbasic pro language i would be very grateful!. Until now, i know that some pwm are required to make the required signals to operate the coils, but i dont have it very clear. At first it worked well with some weird movements sometimes, (i guess it was because of the supply or some electrical noises), but as i have been studying, im interested in programming a pic to work as a microstepper driver. I have a request to anybody willing to help, i dont have a stepper driver like Big easy, but i made one with a 16f84a, i programmed it to receive a dir and step pulse from another pic, and to give the combinations to some mosfets and to the coils of the bipolar motor. Hi there i have been reading threads about microstepping, but i dont get it clearly and i reply to some threads about it, but no body answer (i think that is because they are old threads).