Jump to content

Firmware


jayjay23

Recommended Posts

6 minutes ago, Berus said:

About this dubt, I had never noticed before now, it is written here under the controller image before the sinewave image :D

http://www.iamips.com/pro_zero.php

"Optimization of power supply systems, independent research and development FOC vector control, motor precision adjustment, understanding better output power scheme."

Of course you board is different ..

FOC is used to control the AC synchronous and induction motors.[2] It was originally developed for high-performance motor applications that are required to operate smoothly over the full speed range, generate full torque at zero speed, and have high dynamic performance including fast acceleration and deceleration. However, it is becoming increasingly attractive for lower performance applications as well due to FOC's motor size, cost and power consumption reduction superiority.[3][4] It is expected that with increasing computational power of the microprocessors it will eventually nearly universally displace single-variable scalar volts-per-Hertz (V/f) control.[5][6]

https://en.wikipedia.org/wiki/Vector_control_(motor)

But well, I can't deal with so many things in so few time :-)

  • Upvote 1
Link to comment
Share on other sites

Ok, now I got the PWM value setup by externa potentiometer. The motor is running in open loop with a fixed frequency. Next step is to calc/sync that frequency with the hall sensors signals.

On the video, the code is also doing max current control of 0.8amps or my finders would be hurt by now :-)

 

 

  • Upvote 2
Link to comment
Share on other sites

1 hour ago, electric_vehicle_lover said:

Ok, now I got the PWM value setup by externa potentiometer. The motor is running in open loop with a fixed frequency. Next step is to calc/sync that frequency with the hall sensors signals.

On the video, the code is also doing max current control of 0.8amps or my finders would be hurt by now :-)

 

 

But there's still a strange sound?

Link to comment
Share on other sites

The sounds is because the current (PWM) does not the match the motor velocity. The motor velocity is fixed by the fixed frequency of the sine wave - that's the next step to improve.

When the current (PWM) increases, the motor is stopped and starts oscillating until it runs, after that, it run but with a noise that seems proportional with the increasing of the current. If the frequency could increase, the motor would rotate faster and there would be no noise.

Anyway, this kind of tests help me to understand better the motor. Because when the motor is stopped there will be no possible to measure the hall sensors signals and then there is no frequency for the motor... but seems that is can run in open loop on that specific situation. Let's see!! :-)

Link to comment
Share on other sites

  • 2 weeks later...

So I tried to put space vector working and I am a bit disappointed because I couldn't as I were expecting but anyway, the final result is very good and I tested many possibilities and I got the best possible with lower noise and current.

The bad news, the motor runs at max 18.8km/h with 60V input voltage. This means this motor will never run faster on this generics.

Anyway, I will continue developing the firmware.

Here is the best:

 

  • Upvote 3
Link to comment
Share on other sites

Guys, you doing an amazing work! Very interesting. I also want update firmware up to 18 km/h. Although my skills very poor, so all I can do is wait for you, guys ). 

My battery was almost dead, so I put 3 6S battery Turnigy 5000mA in serial. They fits fine, although I need to make new cover from fiberglass from one side (because battery is little thicker than default). So, now my voltage is 18S and 75V at full charge. And its works fine for me. I tested this setup in many ridings (up to 2.5 hours) with no problem. I have 333 W*h and about 35 km range. 

If ECU max speed 18.8 km/h from 60V (16S), from 75V (18S) it must have max speed up to 23 km/h. But I think basic 18 km/h is also must be good. Fast and enough safe. My foldable bike Strida have average speed 14-16 km/h. My ECU average speed is 10 km/h (because at 12 km/h it beeps). So, I think 16-18 km/h must be an optimal setup.

 

N5000-6S-25(1).jpg

1.jpg

  • Upvote 2
Link to comment
Share on other sites

4 minutes ago, Steel said:

My battery was almost dead, so I put 3 6S battery Turnigy 5000mA in serial. They fits fine, although I need to make new cover from fiberglass from one side (because battery is little thicker than default). So, now my voltage is 18S and 75V at full charge. And its works fine for me. I tested this setup in many ridings (up to 2.5 hours) with no problem. I have 333 W*h and about 35 km range. 

If ECU max speed 18.8 km/h from 60V (16S), from 75V (18S) it must have max speed up to 23 km/h. 

It doesn't work that way. Overvolting the electronics can cause them to fail, components such as the MOSFETs and electrolytic capacitors may not be designed to take the higher voltage. Especially with the capacitors, running them over their rated voltage will cause them to fail sooner even if they don't blow up immediately.

  • Upvote 3
Link to comment
Share on other sites

29 minutes ago, chriscalandro said:

Also, even if the motor runs at 18 full on, that means you actually have to run it slower or you are going to fall over!  Motor max speed 18 = max safe speed MAYBE 15.

 

Wish I could be more help, but my BLDC knowledge is minimum. 

We are not talking no load speed here, the wheels maximum speed should be the beep or tilt back speed so that there is a safe amount of torque still available to balance the rider. Assuming a wheel does have this safe behaviour then putting a higher voltage battery in would have naff all effect. The electronics of the wheel should still tilt back at exactly the same speed. BLDC controllers know the RPM of the motor they control as it is the controller's timing of the phases that drives that RPM in the first place.

As I understand if the Gotway wheels are the brand that would be most likely to exhibit this behaviour, I.e. Go faster with a higher voltage. @EUC Extreme has the most experience here of using LiPOs on Gotway wheels to go faster.

Personally, even though I have loads of those batteries to fly large RC helicopters (Trex 550, 600, Goblin 770) I would not risk overvoltaging my electronics like that, certainly not without wearing the sort of safety gear that @EUC Extreme does. 

You also need to consider the stalled condition, when the wheel is at zero RPM, if a heavy load is applied (I.e. Lean forward hard ) than maximum current is limited only by the battery and motor total series resistance, 5000mAh LiPo's should have significantly lower internal resistance than 18650 cells, so maximum current through the windings (and controller) will increase by way more than the 20% increase in voltage, there is a significant risk of burning out motor windings as well as the controller.

  • Upvote 2
Link to comment
Share on other sites

What I see with my experiences, using the lab power supply, when I fast decrease speed, the voltage goes higher up to 70v or more. I believe that when regen the controller needs to support much higher voltage and so it must be designed for that.

@Steel, thanks for sharing!!!

I would like to know if I could use that battery packs and have a BMS board also with them to just connect the charger, like on the generics EUC.

Also, since we can design and 3D print our own shells, we can use any type/size of battery packs :-)

 

Link to comment
Share on other sites

Since LiPo packs bring out the balance wires from every cell, it would be possible to connect those into a standard EUC BMS. AS @EUC Extreme stated though, one advantage for him is to use several LiPo fast chargers to recharge the cells very quickly. Obviously a BMS and standard charger would lose that and the BMS itself may limit maximum charge current.

Actually on the cheap generic EUC's, using high capacity LiPo's and external LiPo chargers could be a win-win, The three big problems with cheap generics are:

poor BMS behaviour, solved if you get rid of it!

Poor low voltage behaviour, still there if you let the battery drain too far but the much lower internal resistance and higher capacity of (say) 5000mAh LiPos would make them safer for much greater distances.

Inadequate motor power: the lower internal resistance of LiPos would give a higher voltage, and therefore power at the wheel so even this would be slightly improved.

@electric_vehicle_lover stated that regen braking generates voltages higher than a 16 cells, this is true, but that it proves the electronics can handle a higher cell count I'm not so sure as it does not result in high currents and the BMS shunts the excess voltage. In fact, this is my one concern with using LiPos without a BMS- the LiPos are exposed to the full regenerative voltage so care would be needed if the cells are fully charged, going down a long hill might damage them, If not fully charged the lower internal resistance should keep regen voltages from getting too high. 

I still wouldn't personally risk using a higher cell count, it is interesting that @EUC Extreme found that the Gotways controller prohibits it. In practice you would probably find 3 series connected 5 cell LiPo packs would perform better than a cheap 132Wh 16 cell generic pack. Not that I'm suggesting that, 2 off 6 cell + 4 cells or 2 off 8 cells with suitable chargers would be best.

Edited by Keith
  • Upvote 1
Link to comment
Share on other sites

56 minutes ago, Keith said:

Since LiPo packs bring out the balance wires from every cell, it would be possible to connect those into a standard EUC BMS. AS @EUC Extreme stated though, one advantage for him is to use several LiPo fast chargers to recharge the cells very quickly. Obviously a BMS and standard charger would lose that and the BMS itself may limit maximum charge current.

Actually on the cheap generic EUC's, using high capacity LiPo's and external LiPo chargers could be a win-win, The three big problems with cheap generics are:

poor BMS behaviour, solved if you get rid of it!

Poor low voltage behaviour, still there if you let the battery drain too far but the much lower internal resistance and higher capacity of (say) 5000mAh LiPos would make them safer for much greater distances.

Inadequate motor power: the lower internal resistance of LiPos would give a higher voltage, and therefore power at the wheel so even this would be slightly improved.

Also the packs should heat up considerably less, as I think it's the internal resistance that's to blame for the voltage drop & heating of the packs.

56 minutes ago, Keith said:

@electric_vehicle_lover stated that regen braking generates voltages higher than a 16 cells, this is true, but that it proves the electronics can handle a higher cell count I'm not so sure as it does not result in high currents and the BMS shunts the excess voltage. In fact, this is my one concern with using LiPos without a BMS- the LiPos are exposed to the full regenerative voltage so care would be needed if the cells are fully charged, going down a long hill might damage them, If not fully charged the lower internal resistance should keep regen voltages from getting too high. 

Maybe adding TVS (Transient Voltage Suppressor) -diodes could help with that. Placing several something like 75V (for example) in parallel between the motor phase-wires? I have some 75V TVS's that should be capable of handling up to 1.5kW spikes (so several in parallel should be able to handle larger spikes / for a longer while).

 

Link to comment
Share on other sites

Right. I have tried to raise the voltage and the device will not start up time.
In principle, the use of BMS lipo battery has not been ruled out.
Although it loads fast, BMS does not know it. Its job is just to keep the cells stable.
But if the download Lipoa batteries quickly, it is good to use a charger Balancing cells.
So I do not see any reason to use the original BMS.


@Esaj  I also wondered that if you use something like voltage regulator that should be the same all the time. and then you could use a higher voltage batteries. That would interest me very much.
But I could not find a suitable component.
At the moment, the battery time is usually about an individual cell 3,8V And then I download. Because just at that voltage performance decreases significantly.
In practice this means that, if I drive very dramatic, I get to 10 km and should be recharged.
Well, the download is over in a few minutes. But it would still be nice to recharge less often.

Edited by EUC Extreme
Link to comment
Share on other sites

9 minutes ago, EUC Extreme said:

@Esaj  I also wondered that if you use something like voltage regulator that should be the same all the time. and then you could use a higher voltage batteries. That would interest me very much.
But I could not find a suitable component.

Something like this could maybe work:  http://www.aliexpress.com/item/1-5KE75CA-bidirectional-TVS-TVS-diode-DO-201AD-CSYXKJ/32473041390.html

It's a 1.5kW 75V transient suppressor diode, basically it starts to conduct when the voltage exceeds 75V (well, it isn't that precise if you look at the datasheet). Those are available in different voltages and powers. The idea I had was to put those between the motor phases (multiple in parallel between phases to handle larger power than 1.5kW), but I don't know how it will affect when they start conducting (as they will short two phases of the motor, the motor should then start to brake hard, but it might be "too powerful" braking), or if it could otherwise affect the riding badly.

Here's a datasheet of those:  http://www.vishay.com/docs/88301/15ke.pdf

 

 

 

Link to comment
Share on other sites

15 hours ago, Keith said:

...

As I understand if the Gotway wheels are the brand that would be most likely to exhibit this behaviour, I.e. Go faster with a higher voltage. @EUC Extreme has the most experience here of using LiPOs on Gotway wheels to go faster.

...

The voltage has no direct correlation with the speed - speed is controlled by the frequency of the alternating current produced by the controller. With a higher voltage you just increase the maximum possible speed of a wheel - as far as i have understood BLDC motors you have to overcome the back-emv to still be able to make the motor produce torque...

 

Quote

...

@electric_vehicle_lover stated that regen braking generates voltages higher than a 16 cells, this is true, but that it proves the electronics can handle a higher cell count I'm not so sure as it does not result in high currents and the BMS shunts the excess voltage. In fact, this is my one concern with using LiPos without a BMS- the LiPos are exposed to the full regenerative voltage so care would be needed if the cells are fully charged, going down a long hill might damage them, If not fully charged the lower internal resistance should keep regen voltages from getting too high. 

The regenerative voltage comes to the battery via the discharge side from the BMS - so there is no charge protection effective. And the BMS has no chance to "shunt the excess voltage" - it would only have the chance to shut-off. In nowadays wheels there is no other effective way to consume energy than "stressing" full batteries by overcharging. The other possibility would be to shut-off the wheel ;(

Just a little bit of energy can be consumed by "plugging breaking" - burning the energy in the motor coils and Mosfets. That's imho why some of the "bigger" wheels fry their mosfets while encouraged braking...

 

1 hour ago, EUC Extreme said:

...

@Esaj  I also wondered that if you use something like voltage regulator that should be the same all the time. and then you could use a higher voltage batteries. That would interest me very much.
But I could not find a suitable component.
At the moment, the battery time is usually about an individual cell 3,8V And then I download. Because just at that voltage performance decreases significantly.
In practice this means that, if I drive very dramatic, I get to 10 km and should be recharged.
Well, the download is over in a few minutes. But it would still be nice to recharge less often.

Using a voltage regulator to keep the voltage constant while driving would introduce new losses in the DC-DC converter and maybe a new overheat problem. But if designed properly it could be a solution, if the problem could be identified as the second "assumption" i stated below.

Imho it would be needed to researched why the performance decreases significantly once the lipos reach 3,8V - they should still have enough capacity stored? Could be maybe the (*1) firmware, that it does not increase the pwm duty cycle to increase the average current to compensate the lower voltage - or that this mainly effects the performance of the wheel if one goes faster (*2), because the back-emf already got to high so that with the lower battery voltage no "real" current and so torque can be produced...?

53 minutes ago, esaj said:

Something like this could maybe work:  http://www.aliexpress.com/item/1-5KE75CA-bidirectional-TVS-TVS-diode-DO-201AD-CSYXKJ/32473041390.html

It's a 1.5kW 75V transient suppressor diode, basically it starts to conduct when the voltage exceeds 75V (well, it isn't that precise if you look at the datasheet). Those are available in different voltages and powers. The idea I had was to put those between the motor phases (multiple in parallel between phases to handle larger power than 1.5kW), but I don't know how it will affect when they start conducting (as they will short two phases of the motor, the motor should then start to brake hard, but it might be "too powerful" braking), or if it could otherwise affect the riding badly.

Here's a datasheet of those:  http://www.vishay.com/docs/88301/15ke.pdf

Unfortionatley not - if you look at the datasheet the 1,5 kW power dissipation is only peak pulses of 10/1000 mikro Seconds waveform (non repetitive). If you have an infinite heatsink, that keeps the diode in all circumstances at (or below) 75°C the maximum power dissipation would be 6,5 W - which is about nothing for this application... ;(

Here the way would be some "shunt" (power resistor, "high power break light", heating element, etc) which gets "switched" to the rectified back-emv from the motor by a mosfet (via pwm, controlled by the processor) so the excess voltage (which would overcharge the batteries) gets consumed. Is implemented in this way in some integrated BLDC controllers...

... and/or a DC-DC converter to bring the back-emv to a level for effective battery recharging... ;) 

 

Edit:

(*1) was imo a strange idea of mine and should be just canceled - can not think that a wheel could drive, if the firmware would be implemented in such a way...;(

(*2) An addition: The performance of the wheel is the torque the motor produces, which is in direct correlation to the current flowing through the coils (at the right moment, with the right frequency, without the iron parts "getting into magnetic saturation", etc..). The current is again dependend on the resistance and the voltage difference (between the battery voltage and the back-emv produced by the motor. So the lower the back-emv of the motor is - == the slower the wheel is driving - and the higher the battery voltage is, the more torque can be produced by the motor. Here a DC-DC converter, higher battery voltage (more cells in series) or a motor with a different characteristic (less back-emv per rpm) would help.

The other variable is the resistance. This is composed of the internal resistance of the battery, the connection/cable resistances, the mosfet resistences and the resistance of the motor-coils. So here the internal resistance of the batteries could be reduced by putting some more packs in parallel - but the internal resistance of the above shown LIPOS is already amazingly low (the nanotech 2200mAh 3S1P 25C-50C pack has an internal resistance of 1 milliOhm compared to ~30 milliOhm of a single LG MH1 cell....)

Edited by Chriull
  • Upvote 3
Link to comment
Share on other sites

Overvoltage is dangerous, I agree. Do not recommend do it. But it seems electronic board in EUC have upper limit not less than 75V, so it works fine. Until now, at least ). 

To protect accumulators from short-circuit can be used simple fuse. Anyway, main goal is increase average speed up to 16-18 km/h from 10 km/h in factory firmware.

  • Upvote 1
Link to comment
Share on other sites

I found a possible bug on the firmware for the Space Vector modulation and I will try to make it working. Next I would like to try to use the potentiometer to setup the speed and not the duty-cycle.

A friend have a local shop to make custom battery packs and use cells of 3.3amps/h instead of the 2.2amps/h. He uaes these cells are for increase electric motor cycles speed and range - a  picture I took yesterday:

20160319_192541.thumb.jpg.ccf27ceb363cd4

  • Upvote 1
Link to comment
Share on other sites

On 3/17/2016 at 9:49 AM, electric_vehicle_lover said:

So I tried to put space vector working and I am a bit disappointed because I couldn't as I were expecting but anyway, the final result is very good and I tested many possibilities and I got the best possible with lower noise and current.

The bad news, the motor runs at max 18.8km/h with 60V input voltage. This means this motor will never run faster on this generics.

Anyway, I will continue developing the firmware.

Here is the best:

 

What speed are you switching the mosfets at? 96v-150v might actually be a better voltage for EUC, rather than trying to get the motors up to 30km/h on 60v like they do now.

  • Upvote 1
Link to comment
Share on other sites

Just now, electric_vehicle_lover said:

@lizardmech I am switching the mosfets at the max speed the motor can get. I am giving max energy (duty-cycle 100%) and switching the mosfets at the max speed the motor accelerates to.

What about when you aren't running at full speed? What does the potentiometer control?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...