Hoverboard motor + Arduino

Thread Starter

Bogdan.m

Joined Apr 20, 2019
57
Hello everyone, i got a hoverboard motor as a gift from a friend and i was thinking of putting to use. it has a common lead + the 3 wires, i was thinking of putting that common lead to a + source and drive the rest with 3 MOSFETs with this code, do i need anything else ? Do i need something between the coil and the power source ? is 1 second "on" too much ? any other ideea is welcome

Code:
void setup() {
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(80, OUTPUT);
  pinMode(A0, INPUT);
}
void loop() {
  int value = analogRead(A0);

  digitalWrite(8, HIGH);
  delay(value);
  digitalWrite(8, LOW);
  delay(value);

  digitalWrite(9, HIGH);
  delay(value);
  digitalWrite(9, LOW);
  delay(value);

  digitalWrite(10, HIGH);
  delay(value);
  digitalWrite(10, LOW);
  delay(value);
}
 

KeithWalker

Joined Jul 10, 2017
3,091
You need to do some serious reading about brushless DC motors before you start connecting any power. The design of brushless motor controllers is quite complex. If you try to do it yourself, with no experience, you will damage a lot of components and probably the motor too.
I would suggest that you try to find the recommended controller for that motor, or one that will meet its published specs. Then you can control that controller with your arduino or raspberry pi.
Regards,
Keith
 

Thread Starter

Bogdan.m

Joined Apr 20, 2019
57
This is why i opened this topic, to learn stuff. Is it possible to power it up only with arduino ? I do not want to hook it up to a controller and use a potentiometer because i learn nothing that way :)
 

MisterBill2

Joined Jan 23, 2018
18,479
This is why i opened this topic, to learn stuff. Is it possible to power it up only with arduino ? I do not want to hook it up to a controller and use a potentiometer because i learn nothing that way :)
There is a lot more to driving a brushless DC motor than an arduino can provide by itself. UNDERSTANDING the controller and what it is doing would be a useful education.
Those "3 wires" are powered in sequence to drive the motor, and so you must have a driver to operate them in sequence. So while the code shown might operate some outputs in sequence the power for the motor will need to be switched by something with more ability. THAT is were running it with some controller will provide a way to see how it is done.
 

KeithWalker

Joined Jul 10, 2017
3,091
This is why i opened this topic, to learn stuff. Is it possible to power it up only with arduino ? I do not want to hook it up to a controller and use a potentiometer because i learn nothing that way :)
NO!
Look up and read the spec of your motor. It is powerful and draws a LOT of current. Brushless DC motor controllers are quite sophisticated devices. they use the back EMF generated by the windings to control the speed. Do some serious reading about them and the motors before you start destroying your arduino and other electronic devices.
 
Top