Self Balancing Reaction Wheel Nidec 24H Motor difficulty

Hello!

I am trying to make a reaction wheel that balances itself, but I am having problems with the functionality of the motor.
I have acquired a Nidec Motor 24H677H010
(data sheet page 6: http://www.hcmfa.com/admin/data/product/1512290006_1.pdf )
and I am using an Arduino UNO for this project.

The motor has 8 wires, from what I found out, 3 of them are used for the encoders, which I am not using at the moment, the remaining 5 are used for: Power supply, GND, Break, PWM, CW/CCW.
I have attached a picture of my setup.

What I'm having a problem with is:

  1. the CW/CCW. According to the data sheet, High voltage going to the (blue, CW/CCW) wire makes it go clockwise and LOW voltage makes it go counter-clockwise. Yet, for me, any voltage, makes it go clockwise and when I put LOW it doesn't spin at all. The wire goes straight from the motor to a digital pin (no. 4, not PWM) and there is no wire mistake (I really hope, but I checked so..).

  2. the PWM. when I put values close to 0 the motor spins really fast, whereas when I put values nearing 255 it goes slower. Shouldn't it be the opposite?
    And if I input a value like 1000, it spins just as fast as the "0" input value (so really fast as well).
    This wire is connected to the 6th digital pin which is a PWM pin.

For the code I'm not doing anything crazy, I'm just sending HIGH voltage to the CW wire (since LOW won't do anything) and 0 to the PWM wire(which weirdly makes it spin faster than a 255 input (which makes the motor slow down and stop)).

As for the break function, that works like it's supposed to: When attached to GND it stops the motor.
A question I have would also be if it was possible to speed up the breaking time by some bit? Right now it takes too long to decelerate the wheel enough so that it has an effect strong enough to counter the torque due to the force of gravity. What could I do to improve the process of moving the "inverted pendulum" so that it is more affected by the breaking and accelerating of the wheel?

Any type of advice is well appreciated,
Kind regards and thank you for your time.

It looks like you have no common ground between the motor board and the Arduino, as required. Signals require a ground reference.

Other than that, you aren't following the specifications in the motor data sheet.

-PWM should to be 20-30kHz and duty cycle 20%-100%. Arduino PWM outputs are around 500 Hz.

-9V block batteries are intended for smoke alarms and if one works at all, it will last for a few minutes at best. The specs suggest 24V.

-Breadboards tend to burn out when used for motor connections. They aren't intended for high currents.

pin_function.png

pin_function.png

jremington:
It looks like you have no common ground between the motor board and the Arduino, as required. Signals require a ground reference.

Other than that, you aren't following the specifications in the motor data sheet.

-PWM should be 20-30kHz and duty cycle 20%-100%. Arduino PWM outputs are around 500 Hz.

-9V block batteries are intended for smoke alarms and if one works at all, it will last for a few minutes at best. The specs suggest 24V.

-Breadboards tend to burn out when used for motor connections. They aren't intended for high currents.

pin_function.png

Thank you for your response.

-What do you recommend I do for the PWM? How do I up the % of the duty cycle (I know what it is, I just don't know how with just an Arduino I can Achieve it)

  • So you recommend just soldering the wires together without the breadboard?

Google will find Arduino code for high frequency PWM on Arduino, e.g. "arduino 30 kHz pwm"

For percent PWM, for example integer values in the range of 20-100, use something like:

int pwmvalue= ((unsigned int) percent*255)/100;
analogWrite(pin, pwmvalue);

Yes, solder motor connections.

Thanks for the support, it was really helpful!

Hello, I'm trying to make a reverse pendulum with a 24H nidec motor like you. I would like to know how you manage to use the break function. Indeed the engine exerts a good torque by accelerating but not by decelering. I think you should use the break function but I don't see how to use it. Thanks a lot for your help.

1 Like

"Brake" mode using the motor driver will never have as much torque as acceleration mode, because it merely shorts together the motor terminals.

If you want to drive the motor in reverse, make sure that the motor has stopped rotating before reversing the motor driver, or you may burn out the driver.