Spindle control by SPI digital potentiometer

More
4 months 2 days ago #347381 by lanius3006
Hello everybody. I don´t know much about electronic systems so I am looking for some guidance. Me and some friends are converting a Sherline benchtop lathe to CNC. We plan to use a RPi with a CNC breakout board. So far we have been able to control the steppers but not the spindle. Originally, the spindle is controlled manually by a KBIC-240D DC motor speed controller. This board controls the spindle by means of a manual potentiometer and a lever switch. We are replacing the manual potentiometer with a digital one, especifically a MCP4131. However, this
potentiometer is controlled only by SPI communication protocol and as I understand it the default HAL file only sends PWM signal through the designated pin. 

How can I configure the HAL file so that the RPi can establish SPI communication with the potentiometer?

Please Log in to join the conversation.

More
3 months 3 weeks ago #347497 by andypugh
One thing to be very aware of is that the potentiometer on the KBIC controllers is at a very high voltage. It is referenced to DC+ so has 100V or so to earth.
If your digital potentiometer can't handle this then you might have problems.

I used this circuit to run a KBIC using PWM, which might be a better plan. Any logic-output (push-pull) optocoupler will work, but you probably need optical isolation to avoid letting the magic smoke out (DAMHIK)

photos.app.goo.gl/BpBKZob1TomX1gtSA

(It's shown with a VFD but it's basically a PWM-controlled potentiometer emulator)

Please Log in to join the conversation.

Time to create page: 0.179 seconds
Powered by Kunena Forum