2021-12-23, 08:00 AM
Hello,
I am working on the below Proof of concept for Pypilot motor Control.
Raspberry pi 4 (Having Pypilot, Open Plotter) connected with Arduino UNO that connects with Motor controller.
I have procured the BLDC Motor controller and BLDC motor from Aliexpress and the details given below. I am unclear to how customize the motor.ino file for this configuration. Also, I could not understand the correct pwm style from the given Motor Controller specification.
However, when i connected Arduino UNO (Standlone - without Pypilot) with Motor Controller, i am able to control the Motor using Analog Pot (Arduino UNO pin 9 - Motor Controller signal Pin, Arduino UNO ADC pin A0 - Analog POT) with the following sketch.
Please give some input to customize the motor.ino to control the motor per this configuration.
Arduino sketch (Standlone Arduino- without Pypilot):
===============
int motorPin = 9; // Motor connected to digital pin 9
//int val = 0; // variable to store the read value
void setup() {
pinMode(motorPin, OUTPUT); // sets the pin as output
}
void loop() {
val = analogRead(A0); // read the input pin
analogWrite(motorPin, (val/4)); // (val/4)analogRead values go from 0 to 1023, analogWrite values from 0 to 255
Serial.println(val);
Serial.println("WELCOME");
}
Motor Controller:
================
https://www.aliexpress.com/item/1005002862957009.html
Motor Details
==============
https://www.aliexpress.com/item/1005002002733450.html?spm=a2g0s.9042311.0.0.7d6c4c4d23RhXI
12v24v1200w brushless propeller|DC Motor| - AliExpress
Cheap DC Motor, Buy Quality Home Improvement Directly from China Suppliers:12v24v1200w brushless propeller Enjoy Free Shipping Worldwide! Limited Time Sale Easy Return.
www.aliexpress.com
I am working on the below Proof of concept for Pypilot motor Control.
Raspberry pi 4 (Having Pypilot, Open Plotter) connected with Arduino UNO that connects with Motor controller.
I have procured the BLDC Motor controller and BLDC motor from Aliexpress and the details given below. I am unclear to how customize the motor.ino file for this configuration. Also, I could not understand the correct pwm style from the given Motor Controller specification.
However, when i connected Arduino UNO (Standlone - without Pypilot) with Motor Controller, i am able to control the Motor using Analog Pot (Arduino UNO pin 9 - Motor Controller signal Pin, Arduino UNO ADC pin A0 - Analog POT) with the following sketch.
Please give some input to customize the motor.ino to control the motor per this configuration.
Arduino sketch (Standlone Arduino- without Pypilot):
===============
int motorPin = 9; // Motor connected to digital pin 9
//int val = 0; // variable to store the read value
void setup() {
pinMode(motorPin, OUTPUT); // sets the pin as output
}
void loop() {
val = analogRead(A0); // read the input pin
analogWrite(motorPin, (val/4)); // (val/4)analogRead values go from 0 to 1023, analogWrite values from 0 to 255
Serial.println(val);
Serial.println("WELCOME");
}
Motor Controller:
================
https://www.aliexpress.com/item/1005002862957009.html
Motor Details
==============
https://www.aliexpress.com/item/1005002002733450.html?spm=a2g0s.9042311.0.0.7d6c4c4d23RhXI
12v24v1200w brushless propeller|DC Motor| - AliExpress
Cheap DC Motor, Buy Quality Home Improvement Directly from China Suppliers:12v24v1200w brushless propeller Enjoy Free Shipping Worldwide! Limited Time Sale Easy Return.
www.aliexpress.com