Start a new topic

Brushless Motor Control Interface Code

Hello to everyone


I decided to do this project but realized its way above my head. If any of you guys can help me, I would very much appreciate.Here is HMI file download link and details of the project.


https://drive.google.com/file/d/0B1Qe2RxFuZI6OGMzenVtVl9USGs/view?usp=sharing




Project Summary 

Equiment

*Arduino UNO R3

*3 Phase BLDC Motor

*BLD-300B Motor Drier (Motor driver has PWM signal input and speed output via built-in hall sensors) (Seperate equipment is deemed not necessary)

Setup:

*Arduino Pin 9, is connected to PWM input of driver

*Arduino analog Pin A0, connected to driver speed output

*Nextion HMI connected Arduino UNO TX ve RX pins, power via external source

 

Purpose

The coding shall control the motor speed in two ways.


1)Page 1 on HMI file/ With 'Up' and 'Down' buttons on Disperse2.HMI file, page1, PWM signal will be set between 0-255 and with each push of the buttons, the signal will increase by +5 or decrease -5. And this state will be displayed on the 'progress bar' below in percentage.(rougly each push of up or down button will increase or decrease the power by %2) ( Progress bar= (100/255)*5

When 'Start' button on the same page pressed, it will send the PWM signal to driver to start the operation based on the power level on 'progress bar'.Likewise, 'Up' and 'Down' buttons shall be able to increase power when it is operational. 'Stop' button will do as name suggests :)

And, 'Back' button on this page will be active only when motor is not operating ( as PWM is 0)

And if possible at this stage, the analog reading from driver speed output will be converted to real time RPM and will be printed on 'n0 value' area.

2 )/Pages 2,3 on HMI file/ Preset programs will be created, that will run the motor at spesific PWM(speed) values for spesific durations.(ex; program 19, when chosen, the motor will start with PWM 60 and run for 3 minutes, and for the next 10 minutes after it will run at PWM 200 and stop at the end of duration etc...) On Disperse2.HMI file, page2, 'numeric pad' will be used to enter program number in 't0.txt' field, and when 'OK' is pressed, it will start the corresponding preset program operation, will switch to page3, displaying remaining time on t0.txt field. When Abort pressed, it will stop the operation. Back button will not be active when motor is running.


Login or Signup to post a comment