Solutions Cubed Technical Support Forum: Push My Buttons - Solutions Cubed Technical Support Forum

Jump to content

Subscribe to Bench Press        RSS Feed

Push My Buttons

Leave Comment
Posted Image
Image: Motion Mind 2 test fixture for button mode

Our Motion Mind product is designed to be highly versatile but still easy to use. It can be configured to respond to serial communication, read encoder feedback signals, and update the motor drive signal every 5ms. This creates a powerful, yet inexpensive position control system.

But sometimes the customer doesn't really need that much control, or complexity. For example, what if you simply needed to control an 8A 12V fan. You want to have user via button presses. The Motion Mind can do that quite easily.

Just set the DIP switches to button control mode (mode 2).
Posted Image

Button mode can be configured for bidirectional mode where button presses control motor speed from full reverse to full forward. But in this application we just want to use uni-directional mode. To do that we ensure that 0V is present on connector J4 pin 4. Once it is in uni-directional mode you can use the baud rate DIP switch setting to control whether the motor spins forward (M+ is at the motor voltage and M- is PWMed) or reversed (M- is at the motor voltage and M+ is PWMed). The 19.2K setting selects forward (Note: these settings are all described in the Motion Mind datasheet).

You will need to connect momentary push buttons to J4 pin17, the speed up button connection, and J4 pin 16 the speed down button connection. See the schematic below for example connections.

Posted Image

As shown on the schematic, via a potentiometer, there is still a need to set the button ramp rate. The button ramp is the allowable change in the PWM signal for every button press "debounce" period. If the button ramp rate is a small value then the motor will change speed slowly. If it is a high value the motor will change speed abruptly.

The ramp rate can range from 1 to 1023. It is normally set with an analog input (at J4 pin 3), but can also be set via the serial interface.

Let's assume that the Motion Mind checks for a button press every 50ms. If you set the ramp rate to a "1" by tying J4 pin 3 to ground the motor would update slowly. If the motor were stopped and you pressed and held down the speed up button the motor would reach a maximum PWM output in 1023*50ms = 51.15 seconds. The rate at which the Motion Mind checks the button states defaults to 50ms. This can be adjusted by changing the TIMER register via the serial interface.

Posted Image

Solutions Cubed provides software that makes interfacing/programming the Motion Mind easier. The screen shot above is an example, although the screen you see could differ depending on the software revision. Some notes are in order here.

1. The ramp rate is shown circled here. You'll notice that the analog feedback value and the velocity limit settings match. These both indicate the ramp rate when operating in button mode.

2. The TIMER register sets how often the Motion Mind looks to see if either the speed up or speed down buttons are pressed. TIMER*5ms is the update rate, and so the default is 50ms.

3. If you set the FUNCTION.ADSTEP bit (setting the ADSTEP bit in the FUNCTION register) the ramp rate will no longer be derived from the analog signal at J4 pin 3. Instead you can write a value to the VELOCITY_LIMIT register with the software.

4. The bottom of the software will show you what operating mode you are in.

So with these settings what exactly happens when you press the speed up button? Let's assume the motor is stopped (PWM output is 0% duty cycle). If you press the speed up button then 50ms later the PWM signal would increase by 423 (see ramp settings in software screen capture above). That's about 41% positive duty cycle. If the button remains pressed then 50ms after that the PWM output would be increase by another 41% to roughly 82%. 50ms later the output would increase to 100% duty cycle or full speed foward. To reduce speed the speed down button would need to be pressed (see schematic above to clarify connections).

Electronically the motor drive signals would look like this...

Posted Image

Conclusion: There are a variety of settings available with the Motion Mind, but button mode is actually very easy to use and can be implemented with or without a serial interface. This is a great operating mode for controlling the drive signal to a variety of loads.

0 Comments On This Entry

 

September 2010

S M T W T F S
   1234
56 7 891011
12131415161718
19202122232425
2627282930  

Recent Entries