I don't know how much money you want to throw at this exercise, but I would go even further than John and suggest a full blown drive, not just a driver board. You will have your hands full working with hardware and software as it is. You can buy brushless AC drives and motors that can operate in torque and velocity mode out of the box. Plug it together, power it up, configure it and then go work on the software. You can also buy packaged DC brush drives that are very good for a few hundred bucks.

Dave


On 9/15/2016 10:30 AM, John Kasunich wrote:

On Thu, Sep 15, 2016, at 04:46 AM, 'Luke Steele' via Machinekit wrote:
Hi John,

My only hesitation with the approach you outline is that I'd be going a
long way outside my comfort zone, though maybe this is the excuse
I've been looking for to learn some more electronics.
Everybody's comfort zone is different of course.

You mentioned the LMD18200, and I looked it up.  That is a chip, not a
complete driver.  It takes a significant amount of electronics knowledge
to make a reliable system, even starting with a chip like that which has
a lot of built-in functionality.  Power distribution, ground bounce, common
mode voltages, choice of switching frequency, electrical noise, thermal
management, circuit board layout, etc, etc, are all non-trivial issues.

Because you mentioned a naked chip, I assumed that you were
comfortable with all those issues.

I would actually recommend a driver board instead of a chip.  Unless
you intend to do mass production and need to absolutely minimize
parts cost, a board is a simple and cheap way to offload SOME of the
technical details.

Googling "DC brush motor controller" should get you lots of hits.
This one vendor, for example, has 156 drivers, ranging from $3 for
a naked chip that handles 1 amp up to complex packaged drives
that can do 100 amps or more.

http://www.robotshop.com/en/brushed-motor-controllers.html?dir=desc&order=stats_sales_order_count

Your first step is to determine supply voltage, expected motor current,
and locked-rotor motor current.  (The latter is simply the supply voltage
divided by the DC resistance of the motor.)  Your driver must be able
to handle somewhat more than the expected motor current, maybe
150% of expected.  The more margin the better - things always happen
and you'd rather not fry the controller.  Often the price difference
between a 3A controller and a 10A controller is only a few dollars.
Even if you think you only need 3A, the 10A controller will run cooler
under normal conditions, and will be less likely to get fried under
abnormal conditions.

  I'm still tempted to have a go
at implementing the controlling digitally. If it doesn't work I'll probably
learn a bit in the process anyway. By the way, what do you mean by
switching frequency?
That is the frequency at which you are PWMing the output.
And one more question - how in your scheme would you measure
motor current?  The LMD18200 has a current output, but would it
provide the kind of fidelity required?
That all depends on your needs.  What kind of force/torque fidelity
do you want?

Figure 18 on the LMD18200 datasheet
http://www.ti.com/lit/ds/symlink/lmd18200.pdf
shows a configuration that closes a current loop using an LM3524
controller chip.  It takes an analog input for current magnitude and
a separate bit for current polarity.  As shown in figure 19, there is
a significant non-linearly as the current goes under 1A.  (The full
version of figure 19 including polarity reversal would be mirrored
around both axes.)  I would think the inability to accurately control
current in the +/- 1A range would be a show-stopper for you.

In a one-off design, I would NOT use the chip-supplied current
feedback.  Many of the hassles of power electronics can be avoided
by isolating the control from the power.  I would spend the $10-20
for an isolated current sensor.  For example:
http://www.digikey.com/product-detail/en/lem-usa-inc/HO-8-NP-0000/398-1141-ND/4331974

This sensor can be wired in series with the motor armature, runs
on 5V, and has an output voltage that is A/D converter friendly:
2.5V at zero current, swinging positive and negative relative to that
reference voltage by 100mV/A.  Connecting the primary turns
in series instead of parallel lets you increase the sensitivity to
200mV/A or 300mV/A, and is probably a good idea.

If the goal is to focus on the control of the pendulum, I would use
a simple hysteresis controller for the current.  If you want to get
into the minutia of motor control you could send the output of
that sensor to the controller's A/D converter and do the current
loop in software - although that would require MUCH faster
control loops relative to the pendulum control.

We've wandered far off topic for the machinekit mailing list.
I'd be happy to continue this discussion off-list.  (Power electronics
and motor control is my day job as well as a hobby.)


--
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