# Thread: Constant Current source LM338

1. ## Constant Current source LM338

Guys I need some feedback with regards to using the LM338 5A regulator to provide the constant current requirement for my CNC machine

I am using 2 6.2V 2A per phase motors and I built the Tachus42 driver board which works well, I powered the driver and motors with 13.8V at 20A using the regulators and I saw only 4A going into the motor, allowing each winding to draw it's required 2A, I have not noticed anything that could be of concern (heating, noises, smoke, etc) but I would still like to hear from the forum members as I am sure someone has tried it before, and I am wondering why the 338 is not a normal CC source for builders on a budget.

2. I'm not 100% certain of what you are trying to do, but if my guess is correct, this approach will probably not work.

I haven't done a detailed analysis, but my quick-look understanding of the "constant current" circuit that you posted is that it requires a resistive load to do its thing - the sense resistor and load form a voltage divider. The voltage regulator adjusts its output voltage depending on the current flowing through the sense resistor (within the scope of its "headroom"). That current flows because the load is connected and drawing current. If the load is disconnected, no current can flow.

If you plan to drive a stepper motor winding, it will act as anything but a straight resistive load. Rather, the winding combines both inductive and resistive components, and to top it off, you will be switching the winding on and off in order to put the motor through its paces. I'm not sure how you intend to do the switching, but you are probably going to have a very difficult time pumping a constant current through an inductive load that gets turned on and off with this circuit. You might even find that the circuit causes the regulator to go into oscillation.

So, I doubt that this circuit is what you are looking for in this application. But maybe some creative modifications would be promising.

3. This type of setup is commonly used by hobby people doing LED lighting. The reason, is that LEDs need constant current management, rather than constant voltage. In the case of LEDs, the load is more like a diode with a rather sharp Vf vs I curve. The concept works, because the transistor is operating in a sort of analog mode rather than a digital one.

Dimming is sometimes done by switching these on/ off at KHz speeds.

The thing you have to watch, is that there is a minimum Voltage head room required to maintain the constant current, and of course if the V drop x current = too much power, then the transistor cannot dissipate enough energy to avoid heating up.

While I don't claim to really understand stepper motor control, the circuit can certainly provide relatively constant current and be switched under a lot of loading conditions. The input / output caps are critical to avoiding oscillation, and sometimes this requires two caps on each end, one for higher frequency and another for lower frequency damping. (at least when used in LED applications)

4. Well Just as an update, I have been using this circuit in place of the motor resistors and chopper circuits for the past two months and IT WORKS!!!

I have looked at the voltage in and out with a scope and everything looks fine, no oscillation. however due to the difference in voltage from input to output, 35VDC in and output varies to provide the constant current, the IC dissipates alot of heat, I have 3 of these circuits providing 4A each to the motors and it works well.

I understand your concern with regards to the switching but, because of the fact, that a PAIR or winding goes off while another it turned on I think that is what allows the circuit to work without worries for high switching spikes.