1 Attachment(s)
PWM to analog 0-5VDC converter
I am trying to find a way to connect a CNC controller that has a 1kHz 5V PWM output to a spindle drive that accepts 0-5VDC (input) analog signal.
There are several PWM-To-Analog converters on the market similar to this - Link (attached image).
Unfortunately, they all convert 5V PWM signal to 0-10VDC. That means at 100% PWM cycle duty they output 10V. My spindle drive accepts up to 5VDC.
Do you know any converters that may work in my case, or can you suggest any walk-around to this problem?
Any advice would be greatly appreciated!
https://www.cnczone.com/forums/attac...d=448422&stc=1
Re: PWM to analog 0-5VDC converter
The easiest way is to add a voltage divider between the converter board and your spindle drive. Something like 1K potentiometer should work fine for testing, then you can replace it with two fixed resistors if everything works.
Re: PWM to analog 0-5VDC converter
The easiest way is to make an integrator, i.e resistor-capacitor network:
Code:
PWM >---/\/\/\/\----------> 0-5VDC
|
___
___
|
GND
Resistor: 1k, capacitor 1uF
Re: PWM to analog 0-5VDC converter
Quote:
Originally Posted by
ZASto
The easiest way is to make an integrator, i.e resistor-capacitor network:
Sometimes you can get away with an RC integrator, but usually you need to add a buffer and a filter for best results. The converter already has all that, the OP just needs to divide its output by 2.
Re: PWM to analog 0-5VDC converter
CitizenOfDreams and ZASto thank you much for your replys!
I ordered one of the convertors (the one on the picture). It arrived today and I tested it with an old 10K potentiometer. It worked beautifully.
Such a simple yet briliant solution. Thank you Citizen!
You mentioned "two fixed resistors". Can you suggest how to select and where to buy the appropriate resistors? I apologize for the basic questions. You could probably tell I am very inexperienced in this. Usually I just buy prebuilt electronic boards for my machines. I never had to do it on a individual component level.
What are the advantages of using resistors instead of potentiometer?
Re: PWM to analog 0-5VDC converter
You are welcome, I'm glad it worked for you.
How to select the resistors: you adjust the potentiometer to get the correct voltage, then disconnect the potentiometer and measure it with an ohmmeter.
There is one trick though. If you are using a single potentiometer, the adjustment will be too coarse and the adjustment range will be too wide. Also, if you turn the potentiometer too far, you may even damage your spindle drive (unlikely, but possible). To prevent that, you can use two fixed resistors and a potentiometer between them.
Let's say you have a 4.7k fixed resistor, a 0.5k potentiometer and another 4.7k fixed resistor. Then the potentiometer will adjust the maximum output voltage from 4.7 to 5.3V - smoothly and safely.
As for buying the resistors, check if there is a local electronics store where you live. If you don't have one, ordering online is the next option. There are dealers like Digikey or Mouser, and there are Chinese sellers on eBay/Aliexpress.
Re: PWM to analog 0-5VDC converter
Great! I'll do just that. Thanks again!