Coder Social home page Coder Social logo

kk6axq / clmc Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 2.65 MB

Closed Loop PID Motor Controller based on the ATMega328p and VNH5019.

License: GNU General Public License v3.0

OpenSCAD 13.07% C++ 72.02% HTML 12.31% C 2.60%
arduino motor-control pid

clmc's People

Contributors

kk6axq avatar

Watchers

 avatar  avatar

clmc's Issues

Current spikes on motor cold start

When driving a Tetrix motor, there's an initial current spike when transitioning from a low output to full output (255 or -255), causing the microcontroller to reset when running on bench power.

Information:
The current sensor read a maximum of 2.06, however my bench power supply briefly triggered an over current warning at 6 amps. The signal LED flashed the startup sequence immediately after this and the previous command was not retained, so the microcontroller definitely reset.

Steps to reproduce:

  • Connect to bench supply.
  • Send the command r1500.
  • Microcontroller resets.
    Issue:
    This probably stems from a brownout in the 5V rail, stemming from either the current protection reducing the voltage or the high current draw reducing the voltage. This suggests that there is a very brief high current spike when starting the motor to full speed.

The motor's internal resistance is 5-6 Ohms, which should draw 2A given V=IR, so that further supports the startup spike theory.

Possible solutions:

  • Run it on battery power or a higher current supply. When powering it from a NiMH battery, the microcontroller does not reset.
  • Add a capacitor to the 12V rail. This would maybe help keep the rail within the 5V regulator's usable range, though it might have to be a big capacitor.
  • Add a capacitor to the 5V rail. This would buffer the 5V rail while the voltage drops, though I don't know what effect this would have on the motor driver.

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.