HOME
Electronic Modules: CPM4
NEXT Module
UP to Electronic Modules
  • Gracefull Speed Control of a DC Motor
  • 12-30 Volt Systems
  • Up to about 5 Amps
  • Continuous Rotation and Limited Range Systems

CPM4 - A Motor Controller for Kinetic Sculpture. 2004.
  • Adjustable Rate Speed Ramping
  • Potentiometer, Basic Stamp, and  Radio Control
  • Limit Switch Triggered Ramp-To-Halt
  • Adjustable Current Limiting
  • System Shutdown on Overcurrent (if desired)
  • Autoreverse at Limits (if desired)
  • Motor Torque Bargraph and Output
  • 5V to other systems
  • Full Display

The CPM4 Does:
The CPM4 is For:
Rationale:  Motor control is a fairly complex subject that can be a blockade, or at least a  major time-consuming impediment in the creation of art that moves.  The CPM4 allows a rich set of control techniques to be employed without the hassles.  It also protects the physical system and itself from abuse, and streamlines the integration, debugging and maintenance of machine-motor-brain systems.
T H E    R A M P I N G    C O N C E P T

The key feature of the CPM4 is that is can GRADUALLY change a motor's speed by itself.    You control how gradually by adjusting a panel pot (#3 in picture below). For example, if a CPM4 is commanded to go from 0 to 100% motor speed, it may take several seconds to make the transition (if set all the way "soft"),  or none (if set all the way "hard").  This means a very simple control interface (e.g. one logic signal or a switch) can result in a graceful movement.  It also means that if commanded to reverse direction, the CPM4 won't just slam the motor into reverse - it will ramp down to zero, reverse, then ramp back up.  Ramping functionality can give a sculpture the appearance of a much more elaborate control system than it actually has.

There are 2 kinds of settable ramp rates - the first, "Throttle Rate",  desribed above, controls the rate motor speed changes in response to user commands.  The second, "Halt Rate" (#2 in picture),  controls the rate motor speed changes in response to hitting a limit switch. If limit switches are appropriately mounted, this allows for smooth halts at mechanical travel limits.
CPM4 Technical Info

The CPM4 is a 3 board assembly.  The main controls and displays are on the front panel   The microcontroller, I/O, protection, etc are on the main board.  A bolt-on power board sits above the main board and contains all high power components, It also feeds clean 5VDC to the other 2 boards.  Power board modularity allows for future variations. 

This powerboard uses a low-side MOSFET with 20KHz pulse width modulation to throttle the motor.  It uses a relay for reversing rather than an H-Bridge. No claims are made as to this being ideal, but this particular "lower tech" solution works reliably, whereas I have had problems with H-Bridges when long motor leads were present.

The Electrical Interface consists of power and motor connections on the power board, and on the main board a 3 position limit switch hook up, and a 16 pin header.   

The firmware for the CPM4 was written in assembler for the Motorola HC908JL8 microcontroller. The HC08 timers are used to generate a 20 KHz PWM signal (sent to motor power stage); a main pacer; and to time the radio control input pulses.

The bare boards were designed with the free software from Express PCB (below), and built by them with good quality, speed & pricing.
4   W A Y S   t o   T H R O T T L E . . . 

    RADIO BIDIRECTIONAL - A Futaba-type radio signal commands both speed and dir.

    RADIO UNIDIRECTIONAL - A Futaba-type radio signal commands motor speed only.

    PW / ANALOG - Either a 0-5V DC voltage or a 0-100% duty cycle PWM signal
      commands motor speed.  This allows easy pot control of speed, as well as speed
      control from a PWM generating device such as a microcontroller.

    LOGIC - 2 logic inputs (logic is 0 or 5V) give 4 speed options: 0%, 100%, and 2 panel
      settable values  (#4, #5 in picture).  This allows farly versatile control by the Basic
      Stamp, etc.

Throttle sources can be changed at any time electronically.  This allows a single kinetic sculpture to have multiple control options. For example, there could be a manual mode where a control box with knobs and switches is used, and an "autopilot" mode where the machine performs a routine by itself.
C O N T R O L S    (red numbers)
        1- Sets current (motor torque) limit.
        2 - Sets how hard or soft the CPM4 shuts down the motor if limit switch triggers.
        3 - Sets how hard or soft the CPM4 transitions between commanded speeds.
        4 - Sets the "medium" speed value for logic control.
        5 - Sets the "slow" speed value for logic control.
        6 - If jumper installed, this CPM4 will pull a system halt if a prolonged current limiting occurs. 
        7 - If jumper installed, direction will reverse when limit switch in that direction triggers, allowing gracefull reciprocation.
 


D I S P L A Y  Basic information for build and debug   
        Torque Bar Graph.  Shows at a glance "how hard the motor is working".  This is usefull in the build phase, giving visual
         feedback on loading, friction, jams, etc. This data is available also as an analog 0-5V output.
        Blue Throttle LED.  Brightness varies with voltage being sent to motor.
        Direction Now LED.
        Current Limiting LED. Glows when current limiting (as set by adjacent pot) is happening
        Limit Switch LEDs. Glow when limit switch (if present) triggered. 
        Kill LED.  Glows if an external entity pulled kill, blinks if this CPM4 has pulled kill due to overcurrent.
        Thottle Source LEDs. One of the 4 yellow LEDs glows to show what is now giving th speed command.
        Logic Command LEDs. One of the 4 LEDs glows to show which of the 4 logic-commanded speeds is being commanded.
        Radio Signal. This varies in intensity with stick position if the Futaba-like radio signal is being received.
        PW / Ana Signal LED. Glows in accordance with the pw/ana input command.



P R O T E C T I O N    
        Kill Line.  A "Kill" signal line goes to each CPM4 module in a system, and can cause all these units to halt. This allows easy
          implementaion of a master "safe" switch, and/or an automatic shutdown if, for example, someone got too close to a
          dangerous machine. The kill line is bidirectional in that a CPM4 can demand a halt in addition to obeying one.  This demand
          (if enabled) arises if a unit experiences a prolonged (settable) current limit.  This ability to demand a halt in response to a
          current limit can protect an unattended machine in the event of some kind of mechanical jam or collision.   
        Ramping.  The ability to gradually change speed protects motors, electronics and physical structures from shock loading.
        Thermal Cutoff. If a CPM4 gets too hot, it shuts itself off.  This could occur because of inadequate heatsinking
        Current Limiting.  The highest anticipated motor current, which is proportional to torque,  can be set on the panel (#1in
          picture) and this may afford significant protection because the CPM4 won't put out more than this.  In other words, a
          torque limited system can be set up.
        Limit Switch Functionality. For non-continuous mechanisms, encountering limit switches near the ends of travel will
          ramp-to-zero power in that direction. A motor won't stay on, fighting a mechanical limit.  This saves energy, reduces heat
          and mechanical wear.
        Reverse Polarity Protection.
        Power Bus Filtering.  The CPM4 tries not to pollute the power bus.
        Interface Line Protection.  Spikes and out-of-range voltages on I/O lines (whithin limits) will not damage CPM4



L I M I T A T I O N S 
        The CPM4 is intended for open-loop, small to medium (up to about 5 Amp) 12-24 Volt DC motor systems. Although this covers a
        lot, it does not allow closed-loop motion control such as what is found in industrial robots.  Closed loop systems continuously
        track and control a motor's or joint's position which is generally unnecessary in kinetic art situations.


        The CPM4 pays for its comprehensive user interface with size and cost.  Doing away with panel controls & indicators would result
        in a much smaller unit, but require awkward (and hard to remember) setup / debug / maintenance proceedures.  
Power Board
Main Board
The CPM4 Tester is very helpful in verifying the functionality of the many features of a newly constructed unit.
So many pieces.

A completed CPM4 is shown below left.  Each of the 3 sub boards is shown finished, surrrounded by its  parts.
click for full sized schematic
works of  Carl C Pisaturo