Dual VESC for rotary speaker?

Support for creating custom user applications on the VESC.
rutgerv
Posts: 8
Joined: 09 Jan 2017, 12:18

Dual VESC for rotary speaker?

Postby rutgerv » 09 Jan 2017, 12:29

Hi guys,

I'm new to BLDCs but have skills in artificial intelligence, programming, microcontrollers and electronics. I'm building myself a rotating speaker (Leslie) and plan to use two BLDCs to control rotation of an upper and lower rotor. They require little torque, but quite a fine speed-control. The speaker contains two rotors (lower and upper) that typically run between 40 to 400 RPM and the ramp-up and ramp-down curve at which they change speed is quite important to the sound. That's why I decided to try the VESC for controlling the motors. I'm hoping to approximate the preferred speed ramp-up and down curve by using hall-sensor feedback and a learning algorithm that drives the VESC for each rotor. I'm also interested in VESC as it seems to be a relatively low-noise (acoustical) controller, compared to those with much harder pulse-type waveforms to drive the motors. As you can imagine you don't want to have the speaker sound be contaminated by a whirring motor.

The reason I registered to this forum is because I have one specific question while I'm preparing to use VESC for this application. Would it be possible to run the control code and hardware for 2 motors from a single STM32 instead of 2? From what I read on the website, there's plenty of CPU power left. How about I/O pins? I had a look at the pin-out in the schematics, and it looks pretty-much fully used. Perhaps by removing some of the interfaces (I saw some control-pins on the power_con that I probably don't need)? Or by adding a MUX (would that still work with the refresh rate that's need for good control)?

I hope someone can elaborate on what's possible. Otherwise, I'll just play it safe and use two independent VESCs.

Regards,

Rutger

ps. I will make the project open-source when it's finished (and if it's succesful).

rew
Posts: 893
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Dual VESC for rotary speaker?

Postby rew » 10 Jan 2017, 08:42

There are several hints that this is possible:
"ODRIVE" is a project that drives two motors from one STM32.
The STM FOC demonstration projects/software supports two motors on one STM32.

However, the cost of the CPU is only about 10% of the whole VESC. So an extra processor is not that expensive. The VESC software is not geared towards running two motors at once. So you'd be in for a hefty rewrite of the source code....

Get it to work with a single VESC per motor first, optimize later.

rutgerv
Posts: 8
Joined: 09 Jan 2017, 12:18

Re: Dual VESC for rotary speaker?

Postby rutgerv » 26 Jan 2017, 09:02

Thanks for the suggestion! I just bought 2 VESC boards on ebay (unpopulated) and I'm working on the parts order from Mouser.

I have another question though, for the more knowledgable about ESCs. The current capabilities of the VESC are way beyond what I need for this project. The top current draw I expect from the motor would be around 5 amps at 24V. Would it be possible to simple replace the driver FETs on the VESC with lower rated (and hopefully cheaper) ones? What are the crucial parameters of these FETs that are required for the VESC design to work without other hardware/software changes?

Rutger

rew
Posts: 893
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Dual VESC for rotary speaker?

Postby rew » 30 Jan 2017, 18:12

QGTOT is an important one. Keep in mind that with 60V FETs nobody dares runnning them above 54V. So you'll need 30V FETs here.

If you go with weaker fets the QGTOT is probably not going to be an issue. If you're willing to try a slightly different footprint, try AUIRF4104S... (I selected TO263 just as the IRFL7530). It's "on its way out", but for a project like this that shouldn't be too much of an issue.

Edit: Forgot to check the QGTOT ("Total gate charge"), 75nC, about 1/3rd of the IRFS7530.

arvidb
Posts: 199
Joined: 26 Dec 2015, 14:38
Location: Sweden, Stockholm

Re: Dual VESC for rotary speaker?

Postby arvidb » 30 Jan 2017, 18:20

How much does QGtot affect switching time (if at all)? Could it be that one would need to increase the deadtime with much lower QGtot? Maybe using larger-valued gate resistors would be a better idea than increased deadtime, to keep the actual switching time about the same?

rutgerv
Posts: 8
Joined: 09 Jan 2017, 12:18

Re: Dual VESC for rotary speaker?

Postby rutgerv » 31 Jan 2017, 15:48

Thanks for the suggestion!

So if I understand correctly a major change in Gate Charge needs a corresponding software tweak to make it work?

I checked the AUIRF4104S, but Mouser no longer has a stock of it.

Instead I found this 40V FET (mouser number: 757-TK40P04M1T6RSSQ). It has a very low Gate Charge (29nC, compared to 236nC of the IRFS7530). But a fairly high on-resistance (10.3mOhms, compared to the 1.4mOhms of the IRFS7530). So... would that work without additional adaptations?

Rutger

rutgerv
Posts: 8
Joined: 09 Jan 2017, 12:18

Re: Dual VESC for rotary speaker?

Postby rutgerv » 31 Jan 2017, 15:53

Or how about 942-IRF40R207 (40V, 4.2mOhms, 68nC) or 726-IPB160N04S4H1ATM (40V, 1.4mOhms, 137nC) or 942-IRFS7437TRLPBF (40V, 1.8mOhms, 225nC)?

Haha, sorry about spamming so much options. I could appreciate any advice you have on a suitable FET for this application. In case of doubt, I'll just pay the money for the IRFS7530.

rutgerv
Posts: 8
Joined: 09 Jan 2017, 12:18

Re: Dual VESC for rotary speaker?

Postby rutgerv » 01 Feb 2017, 16:45

And additionally, are the shunt resistors of 1 mOhms (R53, R54) really needed to be 7W capable? There's a lower power version at 3 Watt.

rew
Posts: 893
Joined: 25 Mar 2016, 12:29
Location: Delft, Netherlands.

Re: Dual VESC for rotary speaker?

Postby rew » 01 Feb 2017, 18:00

Lowever QGTOT means lower switching times. This means that you DO NOT have to tweak the software to INCREASE the deadtime.

Maybe you COULD lower the deadtime, but it is not that bad having a slightly oversized deadtime. You could improve efficiency a bit by lowering the deadtime, but it is not that much.

Hmm. lets calculate I think the answer comes out in watts (edit:HA I was wrong here!):
IIRC deadtime is now set to 400ns, so switching at 20kHz, there are 40k switching moments per mosfet pair. So if your motor is running at 10A, each switching moment there is 0.6V loss over the mosfet-diode. Times 10A equals 6W. But this is only for 400ns, so that's 2.4uJ. Now multiply by a total of 120k switching moments gives us 288mW.

(that was the answer I was expecting... now for the better answer...)
Now that was assuming 10A motor current. This number is linear with the motor current. So in fact it is 28.8mW/A. This "W/A" can be written as "V".

In hindsight it makes sense that it's in Volts.
0.6V for 400ns out of every 25us comes to an average of 9.6mV... Per mosfet pair, or 28.8 for the three of them.

I could be wrong with the dead time. Maybe it's 800ns. I don't remember.

In conclusion... you don't need to mess with the deadtime if you get lower QGTOT (=better) mosfets.

Do not increase the gate resistors. They are meant to prevent ringing, not to adjust the switching times to the dead time in the software.

The shunts are oversized. I use 2W ones, and only one was blown off the board. I think it was badly soldered and a FET shorted. Over 1400A through that poor resistor.... Came right off the board....

If you do not intend to use 50A, you can scale down on the shunt resistors. Each factor of 2 in "lower amps" allows you to reduce the shunt wattage by a factor of four. You do the math.

Your selections of mosfets is odd. Your first selection is already much more expensive than my suggestion. I HAVE used the IRFS7437. I think they powered my bike for a while.

If you are going to be limited to 5A, you are 10 times lower than the 50A of the standard VESC. So to get the same losses in the FETs you can tolerate a 100 times larger RDSON. Searching with those criteria I get
http://nl.mouser.com/ProductDetail/Tosh ... ns9xIbs%3d as the cheapest option. You are really paying for "packaging" (i.e. the plastic the fet lives in), and shipping with such low requirements.

Just put in the requirements in the component selector and find yourself a mosfet. But then... once you find one, keep in mind that you'll get a much better FET if you pay just one dollar more for each fet. So much less heat to worry about in your controller.

arvidb
Posts: 199
Joined: 26 Dec 2015, 14:38
Location: Sweden, Stockholm

Re: Dual VESC for rotary speaker?

Postby arvidb » 01 Feb 2017, 18:57

Thanks rew, great explanation about the switching time etc!


Return to “Custom Applications”

Who is online

Users browsing this forum: No registered users and 1 guest