Jump to content

Firmware


jayjay23

Recommended Posts

44 minutes ago, electric_vehicle_lover said:

I wish he shared is new code, so I could take advantage of the SW filtering for hall sensors he mentions - I am now still with the problems on hall sensors...

Have you looked at the software filter on the current sensors? It already has two software filters in BLDC tool, not sure if they reside in BLDC tool or the MCU.

  • Upvote 1
Link to comment
Share on other sites

I really like Arduino, it was and still is very important for OpenSource and DIY. But also lacks advanced features that are needed to develop this advanced system - for instance, no one did FOC with Arduino, just 6 steps BLDC and SVM. I searched a lot on web and Arduino code is my first stop

Link to comment
Share on other sites

My firmware is not working!!!! on 30B4 board, the motor runs forward and backward, but with some fails, like if there is noise on the hall sensors signals.
I tested with 2 diferent motors - the MicroWorks 30km/h motor have the worst results. @changfrancis is start joining, maybe with his help we can move forward a bit faster.

What we are trying to do is not new, there are many articles about motor control and FOC using the similar technology on the 30B4 board - even 30B4 board have "high technology" for motor control when compared to gen1 boards.

Link to comment
Share on other sites

1 hour ago, electric_vehicle_lover said:

My firmware is not working!!!! on 30B4 board, the motor runs forward and backward, but with some fails, like if there is noise on the hall sensors signals.
I tested with 2 diferent motors - the MicroWorks 30km/h motor have the worst results. @changfrancis is start joining, maybe with his help we can move forward a bit faster.

What we are trying to do is not new, there are many articles about motor control and FOC using the similar technology on the 30B4 board - even 30B4 board have "high technology" for motor control when compared to gen1 boards.

Do you know the inductance, resistance and flux of the motor? You must have that information and some other variables for complex FOC control to work.

  • Upvote 1
Link to comment
Share on other sites

I think inductance, resistance and flux of the motor are values needed for the rotor position estimator. I am far to be there and for now I am using the hall sensors to get direct rotor position value.

Also, I did read that are ways to measure/empirically get approximation of that values. When we get there, I am sure we will figure a way to have them.

Link to comment
Share on other sites

I don't know if you can actually run FOC on hall sensors alone. all the commercial ones I have tried only use them as an aid for very low speed startup. All the FOC math diagrams I have seen still have the clarke and park transformations even when using an encoder.

Link to comment
Share on other sites

I don't know if you can actually run FOC on hall sensors alone. all the commercial ones I have tried only use them as an aid for very low speed startup. All the FOC math diagrams I have seen still have the clarke and park transformations even when using an encoder.

@lizardmech, yes, encoder for the rotor position. When not encoder is present, an rotor position estimator is used. Hall Sensors are used for zero and low speeds when an estimator doesn't work. For EUC application, I think hall sensors should always be present or an encoder (but I never saw an encoder on a EUC). This is my understanding.

Link to comment
Share on other sites

I think the position sensors are only used to compliment the sensorless FOC algo, it just feeds the data from them into it along with the park and clark transformations. From my understanding FOC vector control is inherently sensorless and halls or encoder sensors are an additional thing on top of the FOC algo.

  • Upvote 1
Link to comment
Share on other sites

1 year after

I just saw that this thread was created in September 2015 by @jayjay23 - 1 year ago.

In one year, we got several people that bought the MicroWorks gen1 boards to develop the firmware. In the end, everyone from that group did leave and I am the only one. We just got gen1 boards to run the motor forward and backward using hall sensors (that board seems to not be able to do FOC) however the board have BEMF detectors. The best code is a reading from the IMU and a try to balance the EUC...... We could see a trying to balance but very slow...

After I decided to move to MicroWorks gen2 boards because the hardware is almost the same but with some good additions like serial Bluetooth and hall current sensors in 2 phases - with Bluetooth I can debug much better the firmware by sending messages to my PC, like for instance send the IMU angle value. With the current measurement in 2 phases, the board should be able to make a better motor control using FOC that should translate to better efficiency and less noise.

I started to port the firmware from gen1 boards to gen2 board (MicroWorks 30B4) and most of the code were reused. Than I added code for serial Bluetooth including the printf(). I also added code for the current measurement.

The motor runs with the same code used on gen1 but at low and medium speeds the motor vibrates and makes noise although seems to run better at the higher speeds. This is the current state of the firmware.

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

It is finally here.

I got the items from Taobao the china ebay, i guess it is cheaper than Aliexpress but getting a courier that will ship to western countries can be difficult.

1. 30B4 controller board @ 220rmb ~ $33usd

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=43973598019&_u=e1qcvq294ff2

2. Bluetooth adapter @ 40rmb ~ $6usd

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=531660846217&_u=e1qcvq29d2a6

3. ST programmer @ 10rmb ~ $1.50usd

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=523108494686&_u=e1qcvq297a24

IMG_3468.JPG

  • Upvote 2
Link to comment
Share on other sites

One advice - don't run the EUC motor with a lab power supply. If the power supply cut the current when the motor is running at high speed (due to current limit in the power supply) the board will reset and block/brake the motor to max possible, generating high current and burning MOSFETs or more. This happen to me to first 2 boards.

The issue is that the control mosfet ics don't have a state for running the motor free wheel... at reset state the motor is always blocked/brake.

  • Upvote 1
Link to comment
Share on other sites

I am setting up a small lab space for development, unfortunately i only have one set of motor and accessories.

I will need to use my daily driver EUC for development too. Currently, waiting for element14 to delivery some quick connector for me to quickly disconnect the testing board.

Btw, do you have the firmware from the original 30B4 ? Once i flash the development firmware, does it means that i will never be able to flash back the original firmware ?

 

 

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