Skip to content

oskarscholander/acceleration-smoothie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Throttle Motor Control with Hall Sensor

Welcome to the Throttle Motor Control with Hall Sensor repository! This project offers a proficient control mechanism for motors using a Hall-effect throttle sensor. The core advantage of this code is delivering smooth and adjustable acceleration/deceleration responses based on the Hall sensor input.

🚀 Features

  • Debounce Mechanism: Assures only substantial changes in the Hall sensor throttle position are processed, negating any minor jittery fluctuations.

  • Ease-in Acceleration: Achieve polished acceleration or deceleration based on the variance between the current and target speed, granting full reign over motor behavior.

  • Speed Mapping: Converts Hall sensor readings (analog input) to a suitable motor speed (PWM output).

  • Safety Clamps: Enforces PWM limits to ensure motor safety.

🧰 Prerequisites

  • Hardware:

    • Motor with a PWM-compatible driver.
    • Throttle based on a Hall-effect sensor.
    • Arduino board or equivalent microcontroller.
  • Software:

    • Arduino IDE or an analogous platform for programming your microcontroller.

🛠 Setup

  1. Connect the Hall-effect throttle sensor to the analog pin designated as throttlePin (default: A0).
  2. Interface the motor driver's PWM input to the digital pin denoted as motorPin (default: pin 3).
  3. Power your board and upload the included code.

⚙️ Configuration

The code presents several adjustable parameters:

  • accelerationFactor: Modulate the intensity of the ease-in acceleration. Smaller values yield a gentler motor reaction to throttle alterations, while bigger values elicit a brisker response.

  • speedDifferenceThreshold: Dictates when the motor directly matches the target speed versus utilizing the ease-in technique.

  • debounceThreshold & debounceInterval: Fine-tune the debounce system for the throttle to heighten responsiveness or mitigate jitters.

Personalize these settings for the desired motor activity.

📝 License

This project is under the MIT License - refer to the LICENSE.md document for specifics.

🤝 Contribution

Please feel invited to fork, enhance, suggest improvements, or create PRs to refine this Hall sensor-based motor control solution!


Happy Engineering! 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages