Part #/ Keyword
All Products

DIY CNC Constant Current Power Supply Guide

2025-04-21 14:20:03Mr.Ming
twitter photos
twitter photos
twitter photos
DIY CNC Constant Current Power Supply Guide

If you're interested in building a DIY CNC constant current power supply, this article is worth a look.

The centerpiece of this project is a remotely controlled flow valve. All components communicate using RS-485. The valve controls total flow based on a constant current drive, with a maximum output current of 600mA. The valve opening angle is adjusted proportionally to the output current.

If you're short on time, you can skip making a custom PCB and build it directly on a breadboard. Of course, designing a proper PCB is also an option if you prefer a cleaner setup.

For the enclosure, you can use aluminum profiles — they offer slightly better EMI resistance. In the photo, there's a DB9 connector at the front that wouldn't fit due to tall components, so you'll need to remove it. On the right side of the image, near the coil, is an MC34063 chip that generates a negative voltage for the op-amp.

image.png

The black module is a power supply that takes up to 42V input and outputs both 5V and 12V.

image.png

During the testing phase, I swapped out a few different sampling resistors. If your accuracy requirements aren't too high, a standard resistor works just fine for current sensing.

image.png

The driver board is on a separate PCB and uses two OP07 op-amps.

image.png

If you're planning to test performance parameters, you'll want to temporarily add a heatsink for the output MOSFET.

image.png

Here's how the MOSFET is ultimately soldered — its heatsink is directly attached to the metal enclosure for better thermal dissipation.

image.png

The final current sampling resistor is a 1-ohm cement resistor.

image.png

For the microcontroller, you can use an STC 60S2. The DAC is a TLC5615, and the voltage reference is an MC1403. The ADC is handled by the MCU's built-in capabilities. The reference voltage is set to 2.5V, then divided down to 1.024V using a potentiometer.

image.png

Once you've dialed in the reference voltage, seal the potentiometer with glue to keep it stable.

image.png

If the wiring on the back of your board gets messy, you can use jumper wires and secure them with yellow glue.

image.png

The image below shows the enclosure, with holes drilled to mount the MOSFET.

image.png

Here's what it looks like after installing the driver board. The MOSFET is pressed against the enclosure, and a heatsink is mounted on the outside.

image.png

You'll also need to fit the control board inside the enclosure.

image.png

The green terminals are for input, output, and control interfaces.

image.png

If you have enough space inside your enclosure, you can use DB9 connectors. If not, consider switching to the terminal block style shown below.

image.png

The open end of the case will need to be sealed, and you'll also need to route power lines for a cooling fan.

image.png

On the other side, you'll need to cut out holes for connectors. If you don’t have access to a CNC machine, you can draw the cutout layout, drill a row of holes along the edge, and finish it off with a file.

image.png

Use AB epoxy glue to fix the connectors in place.

image.png

Once everything is enclosed, screw on the lid. You'll also want to attach a heatsink to the aluminum case and install a fan to handle continuous operation.

image.png

After assembly, it's time to test.

The system uses RS-485 for communication and data testing. The output current is split into 100 steps, from 0 to 600mA. The communication protocol is simple: the first byte is the device ID, the second byte controls the output (00 for off, 01 for on), and the third byte sets the output level. For example, a value of 1D in hex (29 in decimal) corresponds to 174mA.

image.png

While output current accuracy isn't super high, it's within an acceptable range for most applications.

image.png

And that's it — project complete.

* Solemnly declare: The copyright of this article belongs to the original author. The reprinted article is only for the purpose of disseminating more information. If the author's information is marked incorrectly, please contact us to modify or delete it as soon as possible. Thank you for your attention!