Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ M-BOXE Public

Servo Motor DIY controled by Raspberry-pi to I2C / Servo-Moteur construction "Maison" controlé par Raspberry-py en I2C

Notifications You must be signed in to change notification settings

Nao974/M-BOXE

Repository files navigation

M-BOXE

Servo Motor DIY controled by Raspberry-pi to I2C

Photo M-Boxe

Contents / Contenu

Directory

  • Doc/ Documentation
  • firmware/ Skecth for download to Arduino
  • Library_MotorDriver/  Library to order the card Engine to install in your IDE
  • Library_I2C-Master_Python/   Library in Python to order M-Boxes in I2C

Features

  • Reach and maintain a position (Angle) at a constant given speed
  • Receive position setpoint by I2C link
  • Security in case of exceeding values:
    • Temperature
    • Power consumption
    • Blocking of the motor shaft
    • Activation of the sensor (on / off) inversely to the movement in progress
    • Return to normal operation once the value is below the trip threshold.
  • Transmit the data following the command received by I2C:
    • State
    • Current position
    • Value of a given analog input
    • Value of registers Digital inputs
  • Parameterization by I2C:
    • Sending configuration
    • Integration of a new configuration
  • Saving / Loading Parameters in the EEPROM

Construction

Go to my tutorial Oui Are Makers
Wiring Diagram

Installation

Step 1: Import Motor-Command Library

You should import the control card library into the Arduino IDE: Sketch-> Import Library-> Add Library

Step 2: Firmware Setting

Open the sketch firmware.ino
In USB connection, set the I2C address of your Mboxe to line #define SLAVE_ADRESS 0x14 You can enable debug mode to #define DEBUG false by passing it to 'true'. This will bring up the current position, setpoint position and PID calculations on a time scale in the Series monitor of your IDE. It is enough to subsequently COPY/PASTE this data in a spreadsheet and make a graph.
This graphical visualization will help you to find the best coefficients kp, kd and ki of your PID.
Details of the parameters in the document Parameter_M-BOXE.pdf

Usage

Once your construction and firmware settings have been made, connect your M-BOXE to the I2C bus.
As for power, I use an ATX molex 4P connector and a desktop power supply. It is important to separate the power supply from the motor from the Arduino power supply and the MC board.

The M-BOXE.py library in Library_I2C-Master_Python directory allows you to control your M-BOXE from the I2C bus. Detail of registers (command) I2C in document Register_M-BOXE.pdf

The programs M-Boxe Manager TK in graphic mode or M-Boxe Manager CL in command line are implementations of this library.

History

About

Servo Motor DIY controled by Raspberry-pi to I2C / Servo-Moteur construction "Maison" controlé par Raspberry-py en I2C

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published