Jump to content

Firmware


jayjay23

Recommended Posts

1 hour ago, electric_vehicle_lover said:

That is what you say but others like OnSemi and TI employees consider that is also possible not making that calculation.

Seems you are not reading before answering.

Again where are you getting this idea? Can you link to Onsemi and Ti employees saying you do not need clarke and park transformation to perform FOC?

Link to comment
Share on other sites

9 minutes ago, lizardmech said:

Again where are you getting this idea? Can you link to Onsemi and Ti employees saying you do not need clarke and park transformation to perform FOC?

Why are you misleading??

Again:

I did quote what I was talking about:

Screenshot_from_2017-09-08_15-59-13.png

Edited by electric_vehicle_lover
Link to comment
Share on other sites

So where are the OnSemi and Ti examples of FOC that do not rely on know motor inductance and resistance values to determine magnetic properties? Saying you can perform FOC on a very slow 8 bit microcontroller without needing to know any of the motor variables is a very large claim but you aren't providing anything that supports what you are saying.

Link to comment
Share on other sites

25 minutes ago, lizardmech said:

So where are the OnSemi and Ti examples of FOC that do not rely on know motor inductance and resistance values to determine magnetic properties?

Sorry but you have no reason on this point - because the document from OnSemi that I linked and I am following "Field Oriented Control of Permanent Magnet Synchronous Motors"  implements FOC and don't do any calculation of the magnetic fields, don't rely on know motor inductance and resistance values to determine magnetic properties.

 

25 minutes ago, lizardmech said:

Saying you can perform FOC on a very slow 8 bit microcontroller without needing to know any of the motor variables is a very large claim but you aren't providing anything that supports what you are saying.

I am saying that I documented the theory math of "very low resolution FOC" and implemented it, following the concepts math of that OnSemi document.

Link to comment
Share on other sites

That's microsemi not Onsemi. It's most likely the motor values are are in the speed controller as the document is for a specific kit that comes with a motor. I read up on it a little more, technically you could call a controller that ignores motor flux and resistance while using physical sensors FOC, however as I said earlier without anyway to compensate for phase lag it will no longer align with the Q axis once moving. For direct drive servos and gimbals it's fine as they rarely exceed 1hz but not vehicles. Basically the efficiency and performance will be bad to the point batteries and motors will have to be larger to reach the same level of performance. No one does it anymore because proper controllers are far cheaper than motors and batteries. I was looking at some older FOC systems from before 32bit MCUs were common they relied on various hacks like switching to 6 step BLDC once moving or gate drivers that could be configured to shift the sinewaves based on frequency.

Link to comment
Share on other sites

8 minutes ago, lizardmech said:

I read up on it a little more, technically you could call a controller that ignores motor flux and resistance while using physical sensors FOC, however as I said earlier without anyway to compensate for phase lag it will no longer align with the Q axis once moving. For direct drive servos and gimbals it's fine as they rarely exceed 1hz but not vehicles. Basically the efficiency and performance will be bad to the point batteries and motors will have to be larger to reach the same level of performance. No one does it anymore because proper controllers are far cheaper than motors and batteries. I was looking at some older FOC systems from before 32bit MCUs were common they relied on various hacks like switching to 6 step BLDC once moving or gate drivers that could be configured to shift the sinewaves based on frequency.

Good that finally you could understand that there are low cost hardware that does FOC ignoring motor flux and resistance -- that is what I did, after following Shane Colton documentation and firmware, for the OpenSource firmware to the MicroWorks 30B4 board. And for this Kunteng STM8 8 bits 16MHz EBike motor controller, I had to go even simplifying even more but it is still FOC, at least IMO -- anyway, the original firmware for sure does that so we had to figure it out and do it!!

What I got today:

No FOC, see the amount of current motor asks for the power supply:

Screenshot_from_2017-09-08_18-06-05.png

Now with very low resolution FOC, see the decreased amount of current -- the motor speed also increased
But there are still some issues reading IQ current and the control results also in bad results sometimes, as seen the yellow phase B current is not a good sinewave:

Screenshot_from_2017-09-08_18-12-26.png

 

Link to comment
Share on other sites

Just now, electric_vehicle_lover said:

Good that finally you could understand that there are low cost hardware that does FOC ignoring motor flux and resistance -- that is what I did, after following Shane Colton documentation and firmware, for the OpenSource firmware to the MicroWorks 30B4 board. And for this Kunteng STM8 8 bits 16MHz EBike motor controller, I had to go even simplifying even more but it is still FOC, at least IMO -- anyway, the original firmware for sure does that so we had to figure it out and do it!!

Yes technically "doing FOC" is quite different from making a useful FOC controller as I have tried to explain over and over again. It's a dead end using old 8-bit micros, a decent MCU costs $10. Using low cost controllers is not low cost because you will have to spend more money on every other component in the vehicle. None of those cheap ebike controllers have any chance of working in an EUC, even ignoring voltage problems, poor quality controllers are not something you want on an EUC where failure = faceplant. I don't understand why you refuse to work on anything that has a possibility of making a working EUC controller? There's approximately three decades of scientific research detailing how to create FOC controllers based around clarke and park transforms + SVM, trying to invent your own system is crazy and incomprehensibly wasteful.

With your experience in embedded programming it would take very little time to make a functional EUC controller if you didn't ignore all conventional FOC development.

Link to comment
Share on other sites

I resolved some bugs on the firmware and finally I have my both very different motors running with the very low resolution FOC. The EUC motor runs very well, I would say with almost equal to the OpenSource firmware on the MicroWorks 30B4 board.

Video of my EUC2 motor running at 60V (yes, the S06S EBike motor controller did run at 60V and there is a version of this controller that runs at 72V):

Screenshot_from_2017-09-10_02-41-16.png

 

But the Q85 EBike motor runs badly and I am pretty sure it is because is a high eRPM motor!! The EUC2 motor runs at 125 eRPM, needs to draw the SVM/Sinewave with steps of 64us/using 125 points. Q85 motor runs at 480 eRPM wich is only 32 points to draw the sinewave!! I am pretty sure the issue is this, lack of resolution -- I can go now and try optimize the firmware, I have some ideas... anyway, the original firmware don't seem to run very well this motor, maybe because of this limitation... But the MicroWorks 30B4 board may have the same issue, since the PWM frequency is the same!! I think EUC motors have lower eRPM than this geared EBike motor.

As for comparison, here is the MicroWorks 30B4 board running the OpenSource firmware with FOC:

 

Edited by electric_vehicle_lover
Link to comment
Share on other sites

It looks exactly what you would expect when the hall sensor readings no longer match the q axis due to phase lag and various changes that occur as current increases. The EUC motor is doing the same thing when you run it at higher speeds just not to the same degree.

I'm still confused you spent a year telling everyone you wanted open hardware for EUC and electric vehicles and encouraging people to develop. Now you hate open hardware? Did you forget you had said all that or were you just lying when you said you wanted open hardware and would help work on the software? Very confusing.

 

Link to comment
Share on other sites

1 hour ago, lizardmech said:

I'm still confused you spent a year telling everyone you wanted open hardware for EUC and electric vehicles and encouraging people to develop. Now you hate open hardware? Did you forget you had said all that or were you just lying when you said you wanted open hardware and would help work on the software? Very confusing.

My opinion has evolved over the time, just like development projects does when we get more and more information over the time. I already explained the reasons why I am not motivated to work with custom board and instead focus on a widely available and cheap already existing motor controllers. You are repeating the same arguments when I already did explain my motivations -- you are misleading and being unfriendly and that is the reason that I feel the need to ignore you; due to your behavior, it is now more and more clear to me that I would not want to work with you in a project.

Link to comment
Share on other sites

1 minute ago, electric_vehicle_lover said:

My opinion has evolved over the time, just like development projects does when we get more and more information over the time. I already explained the reasons why I am not motivated to work with custom board and instead focus on a widely available and cheap already existing motor controllers. You are repeating the same arguments when I already did explain my motivations -- you are misleading and being unfriendly and that is the reason that I feel the need to ignore you; due to your behavior, it is now more and more clear to me that I would not want to work with you in a project.

Surely you can see how telling someone to invest time making hardware then waiting almost a year until it's ready only to say "oh I changed my mind" is maybe a little bit offensive? Telling people you are going to do something then refusing to do it isn't "evolving your opinion" it's outright lying and dishonest. It's not like you got busy with other things or no longer have time to work on it, you specifically chose to screw over everyone else for whatever reason. Look back throughout the thread, it's 50 pages of many people working on it that would always help you out with motor control information or electronics when possible, yet when the situation is reversed you will never help anyone else.

You have the nerve to call me complaining "misleading and unfriendly" your own posts explicitly state you want people to develop open hardware then you change your mind and hurl insults accusing people of some conspiracy to steal open source stuff. How do you possibly justify your behavior? I know english isn't your first language so I'm willing to attribute it to misunderstanding. You keep saying you have explained your reasons, this is completely untrue, you were fine with the price of the microworks controllers and I have repeatedly said I'm fine with designing you low cost hardware only to be ignored. Please clearly explain from your perspective what the problems are and what you think you meant when you were telling people to work on custom hardware.

Link to comment
Share on other sites

24 minutes ago, lizardmech said:

Surely you can see how telling someone to invest time making hardware then waiting almost a year until it's ready only to say "oh I changed my mind" is maybe a little bit offensive?

I would say you are dreaming. I never compromised myself as also you never discussed your hardware/prototypes -- you were working alone, in your project.
 

24 minutes ago, lizardmech said:

You have the nerve to call me complaining "misleading and unfriendly" your own posts explicitly state you want people to develop open hardware then you change your mind and hurl insults accusing people of some conspiracy to steal open source stuff. How do you possibly justify your behavior? I know english isn't your first language so I'm willing to attribute it to misunderstanding. You keep saying you have explained your reasons, this is completely untrue, you were fine with the price of the microworks controllers and I have repeatedly said I'm fine with designing you low cost hardware only to be ignored. Please clearly explain from your perspective what the problems are and what you think you meant when you were telling people to work on custom hardware.

I will say again my motivations: I want to work on projects that will be adopted by many as possible and for that I believe the hardware needs to be very cheap and widely available. For instance, (at least until now) VESC hardware is very expensive (135€) and seems some shops have it out of stock. The EBike motor controller I am developing firmware for costs only 14€ and can be bought from many online shops, they always have them in stock.
VESC is very well known on a growing market that is eskate and still costs 135€ and EUC market seems to be decreasing...
EBike market is big and will keep increasing that is why I got much more interest on the firmware for the EBike motor controller, including more 2 developers, one that is actively developing the firmware, already bought a few controllers (but went to find the cheaper ones!!) and even built a test bench:

 

Edited by electric_vehicle_lover
Link to comment
Share on other sites

On 10/25/2016 at 0:38 AM, electric_vehicle_lover said:

Well, if you are developing a board, there must be source files over the time of development.
The shell, firmware and software I am doing are/were also failures but still aggregates a lot of knowledge to be shared - it is always a work in progress, and as OpenSource in this case.

I will just collaborate for free in OpenSource projects - it is your decision to develop as open or closed.

If you never discussed the hardware I was building why exactly were you demanding access to the prototype hardware design files in exchange for assistance with software? The VESC price thing isn't entirely true either, early on in the thread others were telling you where you could buy chinese VESC clones for $50 or $60, you just ignored them or dismissed them as the VESC is unsuitable for EUC due to 60V limit. Every time anyone tries to find an open solution for hardware the reason why it's not good enough changes but the solution always remains the same: everyone must purchase proprietary hardware from specific chinese vendors.

Those $15 controllers can never be used for an EUC, implying you can get an EUC controller similar to what is found in the 30km/h controllers at that price is totally unrealistic. Some of the higher voltage controllers you have suggested are even more expensive than the microworks models while lacking an IMU and being unable to even fit in EUC cases. Low cost hardware can easily be designed but because you always change the criteria of what is acceptable when any solution is offered it gives the impression you are focused on selling chinese hardware and opposed to open source.

Link to comment
Share on other sites

as said ealirer, I applaud @electric_vehicle_lovers dedication to cheap controllers... but aren't these controllers history anyways? we all want to ride Gotways, Kingosongs, Inmotions and Rockwheels that go well beyond 30kmph... I think custom hardware is inevitable for any serious project. Also, I've been reading on VESC forums that VESC doesn't do as good a job on slow speeds as hoverboard controllers, so that makes me doubt if VESC in itself is an answer. @lizardmech, did you have any more progress on your VESC/instaspin experiments?

PS

at 345euro the official VESC 6 from trampa is too expensive for me for just toying around, but as soon as clones start appearing, I'll get two to hack a hoverboard and play around with self-balancing algorithms. My plan is to leave VESC software untouched and have a separate arduino with an IMU/gyro and a PID loop.

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

I just worked my way through the entire thread. 50 pages ... damn :blink1:

I understand @lizardmech's point of view, but then again: this is an open source project done by some people, and who cares if they take the "wrong" path? If you are sure that what they are doing is "the wrong way", and after several posts trying to convince them you always get into an argument because the other party doesn't want to believe you, why don't just give up, follow the project, wait for the moment it gets into trouble and enjoy a nice and gratifying "told you so!" moment, and just do your own thing in the mean time? That's what I would do if I was convinced I was right and they are wrong, and I couldn't convince them of this.

It would be a lot more productive than spending hours fighting on this forum, and in the end it's the result that counts.

 

I have no idea what's going on, but quickly looking on Github it seems the development side of this project died somewhere in the spring of 2017. Where did everyone go? 

  • Upvote 1
Link to comment
Share on other sites

1 hour ago, ir_fuel said:

I have no idea what's going on, but quickly looking on Github it seems the development side of this project died somewhere in the spring of 2017. Where did everyone go? 

IMO after I realized that EUCs are more dangerous than EBikes, I started and moved to this project: https://opensourceebikefirmware.bitbucket.io/
Also the MicroWorks stopped to sell the board and told that EUC market decreased, which other sources confirm.

EBikes market is huge and will keep growing!! I found that the current motor controllers are dirty cheap starting at 14€ and they potentially can be controlled by UART, using for instance an Arduino -- that is my plan, a good EBike motor controller firmware + a firmware to make the controller generic in the hope it can be adopted on the Arduino world where there is no such option, users keep using DC motors :-(
Also I think an DIY EUC can be made using EBike components: direct drive motor + motor controller + Arduino + batteries.

Edited by electric_vehicle_lover
Link to comment
Share on other sites

8 hours ago, ir_fuel said:

Isn't that quite obvious? :) 

I wanted to say they are dangerous (without comparing to EBikes). Wasn't obvious, I had to build, learn and ride to understand the potential issues - and over the time I read the forum messages about the faceplants on every EUC brand, it scares me.

But I still like them but I don't trust to ride fast and so I see them more like a toy. The bicycle, I feel safe riding my Brompton at 30km/h and my big other electric at 45km/h - do not want to ride EUCs at such velocities.

Link to comment
Share on other sites

10 hours ago, ir_fuel said:

It would be a lot more productive than spending hours fighting on this forum, and in the end it's the result that counts.

 

I have no idea what's going on, but quickly looking on Github it seems the development side of this project died somewhere in the spring of 2017. Where did everyone go? 

Well that's the problem, everyone gave up because he basically sabotages the project. As soon as I showed my controller running a motor his reaction was to start attacking me in the thread and start spreading slanderous accusations that I was going to steal peoples code and use it for some closed source product. Even on those microworks controllers there's already existing options for running FOC on stm32F103 MCUs but those aren't allowed to be used because of unknown reasons, anyone with programming experience is told to work on creating an entire FOC control system from nothing which realistically is too hard for anyone without significant engineering experience, so it goes no where, they get burnt out and stop working on it.

I even had a person PM me complaining that they thought he was just doing online advertising for various chinese parts manufacturers and that they didn't believe there was any actual realistic plans to ever release a working EUC firmware. People have tried asking him politely about various issues many times however he just ignores them or becomes hostile. I don't understand what he wants, sometimes I get the impression the microworks thing didn't work out as planned so no one else can be allowed to succeed.

Even just a few posts up hes now FUDing EUCs saying they're too dangerous and everyone needs to ride chinese ebikes instead? He keeps telling people to buy those $14 36v ebike controllers as if they can somehow be used for EUCs in the future, it's physically impossible, totally dishonest and misleading.

Link to comment
Share on other sites

1 hour ago, electric_vehicle_lover said:

I wanted to say they are dangerous (without comparing to EBikes). Wasn't obvious, I had to build, learn and ride to understand the potential issues - and over the time I read the forum messages about the faceplants on every EUC brand, it scares me.

I'm trying to understand this,  you're worried about faceplants caused by cheap motor controllers, but you're opposed to more reliable ones because hardware must be even cheaper than the ones that already fail? Therefore the solution is to not ride EUCs? What kind of logic is this?

Link to comment
Share on other sites

33 minutes ago, lizardmech said:

Well that's the problem, everyone gave up because he basically sabotages the project. As soon as I showed my controller running a motor his reaction was to start attacking me in the thread and start spreading slanderous accusations that I was going to steal peoples code and use it for some closed source product. Even on those microworks controllers there's already existing options for running FOC on stm32F103 MCUs but those aren't allowed to be used because of unknown reasons, anyone with programming experience is told to work on creating an entire FOC control system from nothing which realistically is too hard for anyone without significant engineering experience, so it goes no where, they get burnt out and stop working on it.

I even had a person PM me complaining that they thought he was just doing online advertising for various chinese parts manufacturers and that they didn't believe there was any actual realistic plans to ever release a working EUC firmware. People have tried asking him politely about various issues many times however he just ignores them or becomes hostile. I don't understand what he wants, sometimes I get the impression the microworks thing didn't work out as planned so no one else can be allowed to succeed.

Even just a few posts up hes now FUDing EUCs saying they're too dangerous and everyone needs to ride chinese ebikes instead? He keeps telling people to buy those $14 36v ebike controllers as if they can somehow be used for EUCs in the future, it's physically impossible, totally dishonest and misleading.

What do you expect from me now?? Don't wast your time anymore talking to me, because I will ignore you.

Link to comment
Share on other sites

55 minutes ago, electric_vehicle_lover said:

What do you expect from me now?? Don't wast your time anymore talking to me, because I will ignore you.

I'm just confused why you have been doing all those things. This is the exact kind of thing I'm talking about, you could easily just calmly explain your perspective and refute what I wrote. Instead all we get is "someone dared to disagree with me on the internet now I will ignore you all!!!" as if answering anyone or considering others ideas is beneath you. You don't like criticism but you have no issue deriding others attempts with false accusations in the thread and discouraging others from working on any other attempts to come up with a solution.

Link to comment
Share on other sites

3 hours ago, electric_vehicle_lover said:

I wanted to say they are dangerous (without comparing to EBikes). Wasn't obvious, I had to build, learn and ride to understand the potential issues - and over the time I read the forum messages about the faceplants on every EUC brand, it scares me.

So you started this project but had no experience whatsoever with EUC's?

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...