Jump to content

Firmware


jayjay23

Recommended Posts

1 minute ago, Berus said:

But this controller, in theory, is for unicycle 500w motor- 30km/h, not classic generic unicycle .

Yeah I know. O also tried to buy that motor but Microworks didn't have in stock. Anyway, the microcontroller is the same STM32F103 and the blocks of circuit should be similar - I hope to continue developing the firmware on this board because it should easy my work - but I is much more expensive :-( :-(

Link to comment
Share on other sites

8 minutes ago, electric_vehicle_lover said:

Yeah I know. O also tried to buy that motor but Microworks didn't have in stock. Anyway, the microcontroller is the same STM32F103 and the blocks of circuit should be similar - I hope to continue developing the firmware on this board because it should easy my work - but I is much more expensive :-( :-(

 

I have posted some times ago a link to taobao shop, and I have bought some from that shop .. and one with bluetooth.

if knew that you needed a new controller I could give you one at cost price.:)

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

1 hour ago, jbwheel said:

Changing IRFS7530 MOEFETs would be easy, for this one DRV8302 MOSFET you would need solder habilities unless you ask directly to the makers... What about lowering the max operating voltage of the motor ?

@electric_vehicle_lover 

Also for the same motor, more volt means more speed, more amp means more torque and VESC allow a very fine control of it... But increasing the wheel size allow to increase speed, just look at the MSuper2 where the wheel diameter is bigger but not the motor diameter.

Well, for now I will focus on the current chinese boards, because they are a ready solution in terms of hardware. And the cheap ones, are much more cheap than VESC boards with the advantage they are already inside the generics EUCs, with the same holes and sizes for the bolts, cables, etc. Also it is proven that the firmware for this generic EUCs don't need to implement FOC and so in the end I don't see advantages on using VESC boards and firmware. Anyway, I will keep looking at VESC firmware -- well, VESC seems to such a relevant project for BLDC motor control and bicycles/bikes/skaters/unicycles(?).

6 minutes ago, Berus said:

I have posted some times ago a link to taobao shop, and I have bought some from that shop .. and one with bluetooth.

if knew that you needed a new controller I could give you one at cost price.:)

Well, I tested some boards that seems equal but have very different firmware and even microcontrollers - I am just trust now on boards and motors from the same seller and seems that some users from this forum built the 30KM/h EUC using the board + motor from Microworks.

  • Upvote 1
Link to comment
Share on other sites

3 minutes ago, electric_vehicle_lover said:

 

Well, I tested some boards that seems equal but have very different firmware and even microcontrollers - I am just trust now on boards and motors from the same seller and seems that some users from this forum built the 30KM/h EUC using the board + motor from Microworks.

 

Yes I know .. some users here have replaced generic EUC controller/motor ..with a 500watt motor and MC controller.

5 minutes ago, electric_vehicle_lover said:

Well, for now I will focus on the current chinese boards, because they are a ready solution in terms of hardware. And the cheap ones, are much more cheap than VESC boards with the advantage they are already inside the generics EUCs, with the same holes and sizes for the bolts, cables, etc. Also it is proven that the firmware for this generic EUCs don't need to implement FOC and so in the end I don't see advantages on using VESC boards and firmware. Anyway, I will keep looking at VESC firmware -- well, VESC seems to such a relevant project for BLDC motor control and bicycles/bikes/skaters/unicycles(?).

 

..and remember  that @lizardmech was developing a controller VESC based

  • Upvote 1
Link to comment
Share on other sites

Almost have my test vesc set up, had trouble with the first PCB, but I discovered I can use a STM32f4 dev board with the VESC firmware and build the power stage on through hole boards. Going to test TI instaspin FOC setup as well to compare.

  • Upvote 2
Link to comment
Share on other sites

19 hours ago, Tomek said:

 

I didn't dive into the topic but my assumption is that switching the mosfets to higher-voltage rated ones and/or adding a good heatsink would make it suitable for 67.5V+ that EUCs are using, but maybe there are other voltage-sensitive components I'm forgetting.

The DRV8302 is extremely annoying, it's rated to 60V but likes blowing up at over 50V. On top of that it has a built in buck converter to converter to supply the MCU and other parts with 5v directly from the motor power supply. It also has two current sense amps built in which are used to detect motor current which need to replaced when you remove it.

Then it's not even clear if it is meant to drive such high powered MOSFETs, it possibly dies from overcurrent to the gate driver sometimes.

Link to comment
Share on other sites

I AM looking to the 30B4 controle board I bought. The current ICS are ACS712ELCTR-05B-T and they can measure max of +- 5 amps. There are 2 ICS, one at phase. I total phases Ia + Ib + IC = 0 amps. But each phase have 120 degres from each other. How can we calc max current to the motor and só the max power this board can controle??

Link to comment
Share on other sites

2 hours ago, lizardmech said:

Almost have my test vesc set up, had trouble with the first PCB, but I discovered I can use a STM32f4 dev board with the VESC firmware and build the power stage on through hole boards. Going to test TI instaspin FOC setup as well to compare.

@lizardmech Let us know how will go the instaspin test/comparison. I'm very curious about instaspin .. are you using piccolo launchpad ?

Edited by Berus
Link to comment
Share on other sites

1 hour ago, electric_vehicle_lover said:

I AM looking to the 30B4 controle board I bought. The current ICS are ACS712ELCTR-05B-T and they can measure max of +- 5 amps. There are 2 ICS, one at phase. I total phases Ia + Ib + IC = 0 amps. But each phase have 120 degres from each other. How can we calc max current to the motor and só the max power this board can controle??

Well, the gotway and IPS seem to use 35amp ACS709, I don't know how accurate ACS hall based current sensors work above their current rating. Worst case it might be 10amps or so.

  • Upvote 1
Link to comment
Share on other sites

54 minutes ago, Berus said:

@lizardmech Let us know how will go the instaspin test/comparison. I'm very curious about instaspin .. are you using piccolo launchpad ?

Yes, one of the c2000 boards, actually I would rather use hercules but they put a protected rom section on the piccolo that contains secret motor control code they won't give out. So the high end hercules has inferior motorcontrol if you use TI software. I tried to get a toshiba MCU which has a nice motor control function, but they were stored in the UK who apparently decided BLDC controllers are military items comparable to high end FLIR and radar.

  • Upvote 1
Link to comment
Share on other sites

33 minutes ago, lizardmech said:

Well, the gotway and IPS seem to use 35amp ACS709, I don't know how accurate ACS hall based current sensors work above their current rating. Worst case it might be 10amps or so.

Ok seems I found it.  As Microworks say: "Suitable for 14 inch electric unicycle with 500w motor".

The line voltage is: 60V / sqrt(3) = 34.6V
The line max current is: 5 Amps measured by the ACS712ELCTR-05B-T.
Power per each line/phase: 34.6 * 5 = 173 watts
Total power max power: power line * 3 = 173 * 3 = 519 watts.

I hope is correct :-)

So, to increase power, change the ACS712ELCTR-20B-T. ---> +- 20A and the mosfets and dissipation :-)

Link to comment
Share on other sites

Aren't only two phases powered at the same time on BLDC? One has to go to ground. I bought the newer 40amp versions with better sensors haven't tried them yet. Still 5 amps seems much too low, what happens when you hit a bump at max speed? Will it shutdown thinking it's overcurrent or will the motor control fail due to lack of current data? 

  • Upvote 1
Link to comment
Share on other sites

This was a gotway I think, spotted the same IC on IPS and firewheel boards.

I ordered ACS723LLCTR-40AB-T from rs-online.com. It should be possible to swap but gain will need to be adjusted.

DSCN1616_annoted.jpg

Edited by lizardmech
moar
Link to comment
Share on other sites

That board from www.kebye.com (GotWay) seems to have a similar design to 30B4 board. The current ICs seems to have a 0.002 ohm resistor in parallel with the current path (this means that current measured may be different from the 35 amps) of ICs. Also the power supply section seems to use different ICs.

Link to comment
Share on other sites

22 hours ago, electric_vehicle_lover said:

I AM looking to the 30B4 controle board I bought. The current ICS are ACS712ELCTR-05B-T and they can measure max of +- 5 amps. There are 2 ICS, one at phase. I total phases Ia + Ib + IC = 0 amps. But each phase have 120 degres from each other. How can we calc max current to the motor and só the max power this board can controle??

20 hours ago, lizardmech said:

Aren't only two phases powered at the same time on BLDC? One has to go to ground. I bought the newer 40amp versions with better sensors haven't tried them yet. Still 5 amps seems much too low, what happens when you hit a bump at max speed? Will it shutdown thinking it's overcurrent or will the motor control fail due to lack of current data? 

As far as i understood BLDC driver logic, you have, as@lizardmechstated, always two coils active. So you have the three states (beside idle) Ia=-Ib, Ic=0; Ib=-Ic, Ia=0; Ia=-Ic, Ib=0.

The ia+ib+ic=0 with three "signals" with a phase shift of 120 degrees are correct for the generated voltage/induced current by the BLDC working as generator. I assume the possible waveforms are descriped and prooven in http://krex.k-state.edu/dspace/bitstream/handle/2097/1507/JamesMevey2009.pdf;jsessionid=856476A06A2D55274A5DA09CC9D06254?sequence=1 (and should be very important to know, so one can drive the BLDC properly!)

So in reality you should have with an turning BLDC in motor mode your ia=-ib,ic=0, etc (driven by the BLDC controller) and "overlaid" the induced current (by the generated voltage) as 3 phase alternating current. Imho this "overlaid" difference to the current "forced" by the generator gives sensorless drivers the possibility to calculate the the motor position.

20 hours ago, electric_vehicle_lover said:

Ok seems I found it.  As Microworks say: "Suitable for 14 inch electric unicycle with 500w motor".

The line voltage is: 60V / sqrt(3) = 34.6V
The line max current is: 5 Amps measured by the ACS712ELCTR-05B-T.
Power per each line/phase: 34.6 * 5 = 173 watts
Total power max power: power line * 3 = 173 * 3 = 519 watts.

I hope is correct :-)

So, to increase power, change the ACS712ELCTR-20B-T. ---> +- 20A and the mosfets and dissipation :-)

This seems right. At least for sinosuidal voltages/currents - i have no idea if the same is true for trapezodial waveforms. Anyhow the "error factor" wont be too big.

If the current is limited to 5A this will give you an very very low riding feeling without any safety margin - by now way comparable to actual 500W motor wheels... 20A will still be very restrictive. The 40A, stated from @lizardmechseem more feasable.

If you look at the current consumption of an Ninenbot One E+ (500 W motor) it averages well below this 5A with spikes up to 10A driving without inclines at about 20km/h. With inclines, accelerating, etc the current averages somewhere between 10A-20A with peaks up to 30A. The worst peaks (very seldom) where between 40-50A. (If the measured and sent values from the 9bot are correct).

If microworks states this for 14 inch with 500 W motor, you are sure that the current sensor are really limited to 5A and do not have an extended range by paralleled resistors?

  • Upvote 1
Link to comment
Share on other sites

4 hours ago, Chriull said:

This seems right. At least for sinosuidal voltages/currents - i have no idea if the same is true for trapezodial waveforms. Anyhow the "error factor" wont be too big.

If the current is limited to 5A this will give you an very very low riding feeling without any safety margin - by now way comparable to actual 500W motor wheels... 20A will still be very restrictive. The 40A, stated from @lizardmechseem more feasable.

If you look at the current consumption of an Ninenbot One E+ (500 W motor) it averages well below this 5A with spikes up to 10A driving without inclines at about 20km/h. With inclines, accelerating, etc the current averages somewhere between 10A-20A with peaks up to 30A. The worst peaks (very seldom) where between 40-50A. (If the measured and sent values from the 9bot are correct).

If microworks states this for 14 inch with 500 W motor, you are sure that the current sensor are really limited to 5A and do not have an extended range by paralleled resistors?

I am using SVM modulation, there is a table with kind of sinewaves waves that I output in PWM modulation - I found the motor is more silent running this way and not with the 6 trapezoid.

I were looking at the board, seems the pins that measure current are in short circuit on the PCB -- for sure the PCB trace works like a specific very low resistor in parallel with IC internal resistor that is 1.2 mΩ. I will take a picture with high detail so we can together this thing. 

Link to comment
Share on other sites

4 hours ago, electric_vehicle_lover said:

I am using SVM modulation, there is a table with kind of sinewaves waves that I output in PWM modulation - I found the motor is more silent running this way and not with the 6 trapezoid.

Then you should know exactly about which time which voltage is at which coil paisr and could integrate the maximum motor power by this (if you assume there is a peak current of 5 Amps at the peak voltages) ;) Imho at max load you have quite a low (to zero) phase shift between voltage and current at the motor. If the motor is idling i would assume a higher phase shift (more wattless/reactive/idle power) and less "real" power consumption. (is an "educated" guess - to get an serious opinion one should google or the above quoted master thesis seems quite a serious resource for proven facts) But this makes no real difference for the power consumption of the mosfets...

Quote

I were looking at the board, seems the pins that measure current are in short circuit on the PCB -- for sure the PCB trace works like a specific very low resistor in parallel with IC internal resistor that is 1.2 mΩ. I will take a picture with high detail so we can together this thing. 

Would make sense - 5A max peak current is just nothing for an EUC. Even the smallest airwheels can deliver/use more peak current ;)

  • Upvote 1
Link to comment
Share on other sites

On 19.4.2016 at 4:22 PM, electric_vehicle_lover said:

Ok seems I found it.  As Microworks say: "Suitable for 14 inch electric unicycle with 500w motor".

The line voltage is: 60V / sqrt(3) = 34.6V
The line max current is: 5 Amps measured by the ACS712ELCTR-05B-T.
Power per each line/phase: 34.6 * 5 = 173 watts
Total power max power: power line * 3 = 173 * 3 = 519 watts.

I hope is correct :-)

So, to increase power, change the ACS712ELCTR-20B-T. ---> +- 20A and the mosfets and dissipation :-)

An Update to my previous answer, since i had some time inbetween to remember and look up some basics to 3 phase currents:

The sqrt(3) in your above formula is the factor between the line voltage (between any of the 3 BLDC connections A,B and C) and the pase voltage (between the BLDC motor connectins A,B,C and the neutral "point", which is not available from the BLDC motors). For a 3 phase current (as generated from the BLDC) the 3 voltages are phase shifted by 120 degrees and if you imagine 3 "arrows" (one at 0 degrees, one at 120 and one at 240 with the point A,B,C at the end and the neutral "point" at the common start point of the three arrows) that is just a geometric factor, without any correspondance to the waveform itself. (There is a nice video showing this http://youtu.be/sC5UEVi7oQQ with the resulting vector showing the rotor position)

As far as i have understood the way BLDC motors are driven, there is no real 3 phase current used - one always commutes 2 coils for on third of the period. Without overlapping and a phase shift of 180 degrees between the two commuted coils (e.g. Ia=-Ib) (*1). So here the the sum of the 2 phase voltages is the line voltage (e.g. Va=-Vb, 60V=Va-Vb). With an max current of 5A this should lead to an max power of just 60V*5A=300W. Here on could start to indroduce the waveform (effective values vs. peak values), phase shift between voltage and current (?"wattfull, wattless, apparent"? power)

This kind of commuting is absolutely not optimal for an normal 3 phase motor - you get torque ripples, noise, etc and so wasted power for unwanted movements instead of a smooth turning motor. This imho lead the BLDC Motor developer to not uniformly distribute the coils along the rotor so this shortcoming with the commutation fits the motor better and alows smoother turning... Could be imho what James Mevey wrote in Appendix C of his master thesis (http://krex.k-state.edu/dspace/bitstream/handle/2097/1507/JamesMevey2009.pdf;jsessionid=856476A06A2D55274A5DA09CC9D06254?sequence=1) with an overview on page 300. So with the right motor flux (?current in the coils driven by the controller?) and a motorspecific coil winding funtion you either get a smooth rotor-stator flux linkage (?torque?) or one with many "harmonics" (high torque ripple, noise, etc)

Seems there he describes the theory behind your experimental finding:

13 hours ago, electric_vehicle_lover said:

I am using SVM modulation, there is a table with kind of sinewaves waves that I output in PWM modulation - I found the motor is more silent running this way and not with the 6 trapezoid.

...

 

This master theses would be imho a very nice reading to get an thorough understanding of whats happening within the BLDC and the driver - but unfortionately this are 335 pages of heavy theory, as it seems... So not really something to read inbetween ;) And it's not always necessary to understand every detail to apply some given algorithms and could also start to go off-topic regarding firmware development...

(*1) Have just seen in the master thesis, that there are also more complex patterns with overlapping commutations which would change the simple description above... ;(

Edited by Chriull
  • Upvote 1
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...