You are here

simulate turboprop engine ... using VESC, how to....

18 posts / 0 new
Last post
Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10
simulate turboprop engine ... using VESC, how to....

Dear forum,

I am new to VESC in general.

I am  a RC modell pilot since several years and a big fan of the plane Pilatus PC 6 Turbo Porter (Turboprop engine)...

I would like to simulate the startup of a real turboprop using BLDC motor. controlled by VESC...

The startup of a real turboprop can be looked up here for excample https://www.youtube.com/watch?v=tegh5BBTtIQ

I am using brand new version 2.03 together with maytech super foc ESC (https://shop.elektro-skateboard.de/eigenbau-tuning/regler-escs/902/maytech-superfoc-6.8-based-on-vesc6).

I was able to use VESC Tool to update FW to 4.2 (HW 60)...to make the first big steps in FOC and BLDC motor for RC modell planes...

I am using an 260g outrunner BLDC, more details are here https://hobbyking.com/de_de/turnigy-aerodrive-sk3-4250-410kv-brushless-outrunner-motor.html

After running through all wizsards (Setup Motors FOC an Setup Input), I could spin the propeller of my PC6 model using my transeiver....great!

 

But:

The startup using the control of my tranceiver is near at the real startup, it shows small problems to start spinning ....but I am sure, it is possible to get closer to my wishes...

 

So finally I would like to ask you for  tips or links which you think can help me to take a deep dive into optimizing VESC Tool / FOC to program my ESC to come really close to my wishes to simulate a real turboprop using VESC Tool...

Regards, Eckehard

vadicus
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

To start the motor real slow without load, you would need hall sensors, encoder or something to precisely communicate the position of the rotor. Should be hard to do. A quick search yields some retrofits for ~$16.  http://e0designs.com/products/hall-effect-sensor-board/

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

frank
Offline
Last seen: 3 weeks 3 days ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

You could try HFI instead of sensors. Or you can use a AS5047 magnetic encoder. 

The motor is probably too fast for the ESC you purchased. At 4S you will reach the ERPM limit of this device.

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hi vadicus

thanks for providing this information.

Usually, in RC plane applications, sensored BLDC motors are not common, but it seems to be clear, position sensoring help the controller to spin the rotor in the way I m expecting.

Following your advice I found more links I would like to share : https://danielz.uk/how-to-add-external-hall-sensors-to-a-turnigy-sk3-outrunner/

 

On the other hand, VESC seems to support sensorless spinning the rotor a really low speed (during foc wizzard it spinns two times for about around 60 degrees).

I searched vesc forum for foc_openloop command...

Unfortunately, I was not able to get the rotor spinning (send alive pakets ON, terminal command: foc_openloop 10 60)...

 

Before ordering hall latching sensors and build a external position sensor for outrunner BLDC, I will try to experiment using foc_openloop (no sensors).

 

I hope I will have success, any help is highly appreciated

Regards

Eckehard

 

 

 

frank
Offline
Last seen: 3 weeks 3 days ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847

HFI should work. It is a High Frequency Injection to determine the rotor position. https://www.youtube.com/watch?v=-qV1_xyrgzs

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hi Frank,

uiii, thanks for HFI , I will have to check https://www.youtube.com/watch?v=kaFeAjzTqfc to get it working with my BLDC.

 

Question regarding max. ERPM of my hardware...

My supply battery ist 6sLipo only. My understanding is, that rotor RPM times pole pair should be less than max ERPM of VESC hardware?

rotor RPM: kv times supply voltage, (410 x 22V)

pole pair: count of magnets divide by 2 (7)

This would result in 65000 for max ERPM... should be enough for VESC 6 hardware design....

Please comment....

 

Regards

Eckehard

 

vadicus
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

I did have a thought about HFI but suggested sensors because I never had a good success with it which is likely due to specifics on of my hardware design (my fault).

You also mentioned 4.12 version, which means two sensors, which makes it less likely to work well. With that, I would give it a shot. If it doesn't work, I'd try sensors or better encoder which should provide the best precision.

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello forum,

I switched from "sensorless" to "HFI" and followed mentioned video to set HFI Start, Run and Max values. The result was deflating....

It may be, it depends on settings and used motor, I could not figure out.....

The problems are:

minimum rpm is to high, remember I would like to start really slow, say 10 rpm /min

Startup direction is not predictable, sometimes it oscilates between forward and backward

Magnetic encoder is ordered, so next update will depend on delivery....

I will keep you updated...

If you think, HFI can still be used (for my application), please let me know links or write down your hints here for giving it another try....

Thanks in advance

Eckehard

 

vadicus
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

I've tried HFI on three larger motors, not RC, and made it to work, sort of, but could not get consistency/reliability that would allow it to use on a vehicle. Sensors just work, 100% of the time, they are cheap and come with most motors where it matters. For RC aircraft, sensorless mode works in most cases though. For cases, like these where super slow rotation is needed, a sensor or encoder will be the most reliable choice. 

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello forum,

thanks to share your experience using HFI!

I will add a position sensor/encoder, to help VESC to get exact angle of rotor.

I already ordered AS5047P RotaryMagneticEncoder which is reported to work well...

Another option would be to use 3 hall sensors...

Are there any practical results comparing rotaryEncoder with hall sensors ........with regard to my application (extremly slow rotation)?

Which (encoder or hall) will may be better?

Again, many many thanks for sharing

Eckehard

 

pf26
Offline
Last seen: 2 days 8 hours ago
VESC FreeVESC Silver
Joined: 2018-12-04 08:44
Posts: 53

AS5047 gives you 14-bit core resolution per motor turn (ie 0.02degree)  /    hall sensors give you 6 positions per pole pair - ie  24 values for 4pole pairs motor, this is  15degree resolution... VERY rough - and possibly affected by motor current, speed, temperature.. Hall sensors makes it very difficult to control position or slow speed. It will just help the observer a bit, potentially,

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Dear pf26,

Dear forum,

thank you for your information, which helps me a lot to choose the right sensor!

-I already received AS5047P eval board and magnet for motor shaft...

-A small adapter has been 3d-printed to assemble motor shaft 5mm to magnet 6mm...

Currently I am avaiting delivery of :

-JST PH 2.0 6pin connector , to connect to HALL Port of my  VESC 6 board

-Hall sensors, as a alternative solution, or to play with it only....

 

So hopefully I can give an update about progress soon.... :-)

 

BTW: During research about AS5047, I found different variants of it. Does anybody has experience with D or U type compared to P type?

(see https://ams.com/angle-position-on-axis for details on AS5047P vs AS5047D vs AS5047U)

Regards

Eckehard

vadicus
Offline
Last seen: 1 month 3 weeks ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

I think halls will be sufficient for the job but, yeah, encoder provides finer control. 

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello Forum....

I received AS5047P, and followed https://vesc-project.com/comment/3596#comment-3596 to connect it to my VESC ...

I used 3,3V to power AS5047P board.... (from ADC Port, 7pin)

I uses HAL Sensor Port to connect AS5047 MISO, CLK and CS (shielded, shield connected to GND), and GND.

 

In VESC Tool i run through motor wizzard...

In MotorSettings/General/MotroType enabled FOC

In MotorSettings/General/SensorPortMode enabled AS5047

In MotorSettings/FOC/Encoder I tried "Detect Encoder".....

Detection starts turning the motor in aprox. 10degrees steps.. forward, and backward..... never stops...

 

Trying to see Encoder signals, I enabled ReatTimeData and ....in

DataAnalysis/RealTimeData/Encoder it seems not to work, because no chnages here, still 360degrees

 

Whats wrong?

Do I have to use a different firmware to use software SPI over HAL Sensor Port?

Please help to find the magic option to get my AS5047P running with my VESC ...

 

Regards

Eckehard

pf26
Offline
Last seen: 2 days 8 hours ago
VESC FreeVESC Silver
Joined: 2018-12-04 08:44
Posts: 53

Possibly your hardware has RC filter on the H1, H2, H3 pins - you should remove the caps in that case. Other wise, check magnet position. Otherwise, I fear you need a scope.

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello pf26

I am using VESC 6 compatible hardware, see pots #1. So I assume, https://vesc-project.com/sites/default/files/Benjamin%20Posts/VESC_6.pdf

shows schematic, which does not have this filters anymore...

I used https://github.com/Adrien-Legrand/AS5X47 to set up testing environment using AS5047 with arduino uno... the serial monitor shows same results as DataAnalysis/RealTimeData/Encoder :

xxxx schnipp xxx

21:12:52.122 -> 359.98

21:12:53.131 -> 359.98

21:12:54.117 -> 359.98

21:12:55.125 -> 359.98

21:12:56.137 -> 359.98

21:12:57.123 -> 359.98

xxx schnapp xxx

That meens, arduino sketch and AS5047P is working in general, but shows stable 359.98 for angle....if no magnet is placed in front of AS5047P chip.

It does not change, if the magnet is places in front of AS5047P chip.

May be AS5047P has to be programmed, before it shows expected functionality, I dont know....

 

Eckehard

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello,

good news....I found a wiring error... I mixed up CS and CLK comming from AS5047P board.....to the 6 pin connector, HAL Port of the VESC board....

I fixed it, now I can see angle values which correspond to the position of the magnet/rotor ...(in my testing environment, arduino uno, serial monitor)..

Eckehard

Eckehard
Eckehard's picture
Offline
Last seen: 1 year 3 months ago
Joined: 2020-02-16 20:07
Posts: 10

Hello,

today some more details about status of my little VESC project....

https://www.youtube.com/watch?v=bn6dZ58U5Aw

 

Thanks to all for supporting me....

and a special "Thank you!" to Benjamin for developement of VESC and supporting us

Eckehard