On Wed, Sep 14, 2016, at 01:09 PM, 'Luke Steele' via Machinekit wrote:
> Hi John,
> 
> I'm planning to use a DC servo (an electrocraft E240 - because I have one I 
> can borrow from a CNC conversion). Haven't selected an H-bridge, but maybe 
> an LMD18000 (also because I have some already), though maybe I'll need 
> something with a higher peak current. I'll start with those two and see how 
> I get on.
> 
> Yes, controlled variable will be force. To be honest I haven't had a great 
> deal of experience with DC motor control (other than simple PID 
> speed/position controllers with no real modelling), so I'm expecting this 
> to be a challenge (a fun one, hopefully!). My vague plan at the moment is 
> to leave the servo unconnected, then try attaching a known mass (via cable 
> and pulley, and no pendulums) to the cart, then look at acceleration, and 
> try and use this to establish my viscous damping etc. Then progress to a 
> force controller, again just moving a mass along the track (still no 
> pendulums).

You also have to decide how to couple the motor to the cart.  One extreme
would be to use a screw, where one revolution of the motor will move the
cart one screw pitch - likely 2-4mm.  This would give you lots of force but
not much speed, and the motor inertia would dominate relative to the
cart inertia.  Or you could drive the cart wheels directly, meaning that
the motor has to move with the cart.  Or you could use a pulley and belt
with the cart attached to the belt and the motor stationary.  In either of
those cases, one revolution of the motor moves the cart by the circumference
of the pulley or wheel, likely to be much more than 5mm.  Bigger pulleys
mean less force available per unit of torque (and current).

> So anyway, I'll have three incremental encoders - one on the back of the 
> motor, two for the pendulums. Then current consumption for the servo from 
> my h-bridge.

If you close the current loop in software, you'll need a fast control
thread and an A/D converter.  Might want to measure the L/R time
constant of the motor armature to get a feel for the bandwidth needed.
It might be more than you can practically do in a general purpose 
controller like the BBB.  Analog current loop (or even a simple analog
hysteresis controller) might be the best choice for the current loop.

> I thought the BBB looked promising as people are using it for motion 
> control. I'm not actually intending to use machinekit - my understanding 
> was it's basically for CNC type applications where you have a precomputed 
> trajectory, am I wrong?

Machinekit (and LinuxCNC) consist of two main parts.  There is the high-level
CNC application with GUIs and non-realtime code to interpret G-code.
And there is the low level part, HAL and drivers and the realtime layer.
The CNC application isn't relevant to your project, but the HAL layer
might be.  It gives you a bunch of functional blocks that that you interconnect
as needed.  (in some way similar to NI's Labview, but without the fancy GUI).
It also gives you some handy testing tools - a software oscilloscope and 
meter to look at signals as they flow between blocks, etc.  You can write
your own realtime blocks in C, and non-realtime blocks in multiple
languages.

Skim thru this tutorial for a good overview that should help you decide
if it makes sense:  http://linuxcnc.org/docs/html/hal/tutorial.html

-- 
  John Kasunich
  [email protected]

-- 
website: http://www.machinekit.io blog: http://blog.machinekit.io github: 
https://github.com/machinekit
--- 
You received this message because you are subscribed to the Google Groups 
"Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to