Giter VIP home page Giter VIP logo

ultralitebldc's Introduction

UltraLiteBLDC

iCE40UL1K (SWG16) based BLDC motor controller. By Using this FPGA to generate driving waveform used to drive Brushless DC motor.

Using LED RGB primitive SB_RGBA_DRV to take advantage of open-drain output driven via PWM with External pull up resistors on each channel.

3 phase output can then later connect to H-Bridge driver to drive the motor.
With I2C Hard IP core of iCE40UL. This can be used as interface between host and this FPGA via simple I2C bus with bus speed up to 400kHz.

Toolchain Setting Up

This project require latest version of iCECube 2. Lattice LSE Synthesis tool is being used instead of Synplify Pro. The LSE should be selected automatically when open this project. But if LSE is not selected by default:

Selecting LSE instead of Synplify Pro

On left hand tab. Right click at Synthesis Tool then Select Synthesis Tools, select Lattice LSE.

Configuring LSE

In Tool-> Tool Options.

  1. Set FSM encoding style to Binary.
  2. At Optimization Goal set it to Balanced.
  3. Target Frequency set to 48(MHz).

Command list (MSB first, 8bit)

  1. 0x10 - Set Motor Speed. Value from 0 to 255 Default at power on is 0.
  2. 0x01 - Turn motor on.
  3. 0x02 - Turn motor off Default at power on.
  4. 0x0A - Motor spin Clockwise Default at power on.
  5. 0x0B - Motor spin Counterclockwise.

A "How to" control

At first powered on.

  1. Send command [0x10] follow by Speed between 0 - 255 to the FPGA.
  2. Send command [0x0A] or [0x0B] for your direction at first tun.
  3. Send command [0x01] to turn motor on.

On The fly.

You can change speed, direction or turn motor on or off. No command sequence is needed.

ultralitebldc's People

Contributors

tinredmc avatar

Stargazers

 avatar

Watchers

 avatar

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.