Changing firmware on Me High-Power Encoder Motor Driver


#1

Hi,

We have 2x Me High-Power Encoder Motor Drivers, and 4x 36mm Encoder DC Motors, all being controlled by an Orion board. Our problem is that the motors make a high pitched noise when you try to rotate them slowly.

The reason for this is the frequency of the PWM signal being sent to the motors, which causes some kind of vibration in the motors at that frequency. So we want to change this frequency, to be high enough so humans can’t hear it.

To do this, we want to change and update the firmware on the driver boards. We have found this repository:


We have also figured out how to upload new code to the boards.

But what we don’t understand is what is the difference between the different firmwares in this repository?

EncodeDriver-HighPower/slave seems to work
EncodeDriver-New/slave seems to have wrong pins set, and also uses 2 H-bridge pins per motor. Does our board have this? If so, what are the correct pin numbers for these?
What are EncodeDriver-V2.0 and MeEncoderMotorDriverV2.1 used for? Do they apply to our driver boards?


#2

Hi niels,
This link is the information including pin definition and schematic of Me Encoder Motor Driver.

EncodeDriver-V2.0 and MeEncoderMotorDriverV2.1, are you referring tothis one?
If not, can we have the picture?


#3

No it is this one, the Me High-Power Encoder Motor Driver that we have with 36 mm Encoder DC Motors.

And the pins I was talking about are not those you can connect to on the board, but the ones defined in the firmware of the board, such as here in this code.

So my question is, can all the different firmwares in this repository be used for this board, or are they for other boards?


#4

Hi niels,
Actually your application is DIY application, I am not we always can offer exact suggestion. But I did try to consult with the engineer.
I am afraid your high power encoder driver is the first edition, refers to “1”; while the “encodedrive-V2.0” and “meencodemotordriver-V2.1” are new drivers mainly for competition like MakeX, and usually customers cannot purchase directly. To confirm that, you may take a picture of your motor driver for us?

We can change the pwm through the program to smaller number, then less noise, but also slower speed:
image


#5

Setting the maxspeed lower will not solve the problem. Because the problem is a high pitched noise that you hear when it runs slowly. The sound comes from the frequency of the PWM signal.

We have now started to make our own code for the board instead. It is not done yet, but you can follow it here:


#6

Hi Niels,
If the noise doesn’t come from motor motion, change pwm will not make difference. Sound from frequency of pwm signal is not avoidable. And I am afraid we will not update its firmware as it is a little bit old. If you make new code and share with all, that will be much appreciated.


#7

We already managed to get rid of the noise by changing the pwm frequency to something higher than humans can hear. The only side effect is that arduino timers will run at a different speed, which made it hard to make it work with your code. That’s why we started over, using libraries for the encoder and the PID part.


#8

Glad to hear that you fixed the issue and thanks for your sharing. I think many users cannot do that except those sophisticated geeks like you.


#9

Hello! I’m a colleague of @niels and I’d like to make some notes regarding this thread. Indeed the pwm frequency will affect the noise. The noise originates from the motor and the reason is that mechanic parts inside the motor will vibrate with the frequency of the pwm signal. If that frequency is within the audible range it can produce that rather annoying noise. The default PWM frequency of the arduino uno is somewhere around 900Hz i think. So a solution is to change this frequency to be above the hearable range (20kHz) by writing to the timer control registers of the atmega328P. This can be confirmed by googling around on the subject. And of course also by trying it.
From reading up on this matter I’ve come to understand that the PWM frequency used when driving motors this way will also affect the tourque of the motor. This we must try out a bit more to find the best way to deal with it.

We will continue to develop our custom firmware and will of course share it with everyone to use. We will only implement the commands from the original API that we need for our purposes. So our firmware won’t exactly be able to replace the original firmware depending on what functionality from the original firmware that is needed.

It’s for example unlikely that we’ll need the moveTo commands and similar. Our main need is to be able to set smooth speeds for the motor.


#10

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.