Code Monkey home page Code Monkey logo

smc3's Introduction

SMC3

The SMC3 is a "Simulator Motor Controller for 3 Motors" written for the Arduino UNO R3. At the time of writing this it has not been tested on any other Arduino model. The SMC3 uses a PID motor control loop. The PID algorithm has been optimised for this application and achieves 4096 PID updates per second for all three motors giving smooth precise motor control with well tuned parameters. Some characteristics of the controller:

  • Designed specifically for use with Simtools motion control software
  • Controls the position of upto three motors using analogue feedback
  • Hard (reverse) braking if motors move beyond defined limits
  • 10bit accuracy (1024 steps) for both "target" position commands and position "feedback"
  • Extensive command set to setup and monitor the parameters for each motor
  • A second serial port for (optional) real time "live" monitoring/configuration
  • 4096 PID calculation updates per second for each motor
  • Companion windows software to configure and monitor the SMC3
  • There are currently two MODES of operation that are configured by a single line of code at compile time before uploading to the Arduino.

MODE1: Supports the more common H-Bridges used in the forums.

This mode has a PWM output pin plus two Motor Direction output pins. Examples include the MonsterMoto shield.

MODE2: Designed for H-Bridges that require direct drive of Highside and Lowside switch inputs.

In this mode one switch is driven as a direction pin and the other with the PWM output however the PWM duty needs to be inverted whenever the motor changes direction with the direction pin. (An alternate approach would be to switch the PWM between inputs as direction changes) An example H-Bridge that uses this mode is the cheap 43A IBT-2 found on ebay.

Software Setup

  • As the SMC3 is an Arduino motor controller the first thing you need to do is get the software onto your "Arduino UNO R3".
  • Download the SMC3 software attached to this post (SMC3.ino)
  • Get the Arduino IDE tools installed on your computer if you don't already have them. Follow the Arduino Getting Started guide found here: http://arduino.cc/en/Guide/Windows (Note the step for installing the drivers!)
  • Open the SMC3.ino with the Arduino IDE
  • Edit the code at the top if the file to select the MODE you will be using
  • Compile and Download the SMC3.ino program to your Arduino UNO R3

If you want, you could now test out the Windows SMC3 Utilities software and check communications before proceeding further.

smc3's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.