Using a DC motor with encoder to drive a fixture (4th axis)

This Section is for users to discuss hardware

Using a DC motor with encoder to drive a fixture (4th axis)

Postby DavidT » Wed Oct 20, 2021 1:29 pm

Hi everyone,

What I'd like to do seems simple enough but I'm missing at least one piece of the puzzle, plus I don't know if UCCNC will allow me to do what I want as I'd like.

What I'm trying to do is pretty much like adding a 4th axis (spindle type).

I wish to be able to set a fixture zero position and then be able to rotate it (tilt its nose down) by X degree (max 15). During a job, the machine would go back and forth between the zero and the defined angular position.

I have a 24V DC motor equipped with a encoder that I would like to use. This is where it gets unfamiliar to me. I mean it looks fairly simple because the motor will rotate in one direction when I apply 24V and rotate the other way if I invert the polarity. Also I'm able to set and read the encoder position in the AUX. ENCODER table.

I don't know what to do next.
Can I use a driver that would be able to read the encoder position and drive the motor according to a position request? If so, please suggest driver models because all I can seem to find are made to work with Arduino or are closed loop stepper drivers (which I could guess how they work but honestly don't know much about).

The other solution I thought is to use limit switches to cut the power to the motor when a position is reached. The zero limit switch would be in a fix position and the angular would have to be move manually... maybe by using a sliding block along a radius & locked by a screw or some kind of index plate & lock pin setup to get easier/faster setup and repeatability. I would use relay to control the power supply and polarity and the limit switches would define the positions.

But being able to specify the angle directly in the code instead of adding a manual operation seems simpler... and cooler. 8-)

Thank you
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Using a DC motor with encoder to drive a fixture (4th ax

Postby eabrust » Wed Oct 20, 2021 11:16 pm

you'll likely want to use something like a CNCDrive driver (http://www.shop.cncdrive.com/index.php?productID=509) or a geckodrive g320x, or similar. Set it up as a step/dir axis w/ steps per unit calibrated to angular degrees, and control it precisely w/ code.

You probably would not be happy doing full on/off control w/ relays.

regards
Eric
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Using a DC motor with encoder to drive a fixture (4th ax

Postby DavidT » Thu Oct 21, 2021 10:34 pm

Eric, this is fantastic!
Thank you very much!
While it may seem too simple/obvious to some I just couldn't find the piece I needed and this is it.

And you're right, I didn't really wanted to go the relay/stop switches route but it was (until now) the only option I could use without the driver.

Thanks again, you made my day. :D
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada

Re: Using a DC motor with encoder to drive a fixture (4th ax

Postby DavidT » Thu Oct 21, 2021 10:54 pm

By the way... this should be the only piece I'm missing right?
I mean, we will be able to set this up directly in UCCNC... all I need is free inputs and outputs on the mainboard?
Thank you
User avatar
DavidT
 
Posts: 13
Joined: Fri Sep 24, 2021 5:51 pm
Location: Montreal, Canada


Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests

cron