Jump to content

Firmware


jayjay23

Recommended Posts

2 hours ago, lizardmech said:

M4 but it's just a small riser that fits on switching MCU is easy. I don't know if it would be worth while porting the entire VESC firmware for safety applications, it's probably better to have a smaller simple firmware without all the motor detection in it. I think instaspin and a few other commercial options are already safety certified so it's just a matter of making a small MCU board with a different MCU. You can always measure the motor specifications with an M4 board and write the specs into the firmware.

The Instapin CPU is SIL/ ASIL certified. The Software on top must meet the safety also.

  • Upvote 1
Link to comment
Share on other sites

I can't get my high side gate driver to float with the phase voltage for some reason. @electric_vehicle_lover would you be able to scope the gate driver high side output on a working controller? From what I under stand it should be phase voltage +12v. Mine always just sits at 13V above ground and never goes higher, but I don't know how it's supposed to look on a scope when working correctly.

  • Upvote 1
Link to comment
Share on other sites

3 hours ago, changfrancis said:

i finally got ecplise to work. yeah

 

I hope you mean flash and debugging :-)

Please ask if you need help.

12 minutes ago, lizardmech said:

I can't get my high side gate driver to float with the phase voltage for some reason. @electric_vehicle_lover would you be able to scope the gate driver high side output on a working controller? From what I under stand it should be phase voltage +12v. Mine always just sits at 13V above ground and never goes higher, but I don't know how it's supposed to look on a scope when working correctly.

Sorry but I will continue to be away from home for next 2 to 3 weeks.

Edited by electric_vehicle_lover
Link to comment
Share on other sites

Some important information about motor start up strategy used on VESC:

Re: FOC startup algorithm to perform commutation?

  •  
  •  

Postby benjamin » 09 Feb 2016, 10:59

For sensorless BLDC it works like the following:

It is assumed that the position is known and the corresponding commutation is used. Then the motor usually moves and the actual position will be picked up, then it runs normally. If the initial assumption does not generate any torque and the motor gets stuck for longer than the corresponding minimal ERPM, the position will be advanced with two commutations. Then the motor usually starts, otherwise this is repeated. Also, when the motor is not running, the back emf is tracked to follow the rotor position. This works quite well and at very low speed, so just moving the motor slightly before starting can make the start more smooth.

For FOC:

The observer will always report some angle, and at start that angle is used. Most of the time the motor starts, but sometimes the observer gets stuck. What happens then is that when the estimated ERPM has been lower than openloop RPM for longer than hyst time (in the foc tab), the angle will be advanced in openloop with openloop RPM for the time in the box next to the hyst box. During this openloop rotation the observer usually picks up the correct angle, and the motor starts after that. Otherwise the same steps are repeated. The observer also tracks the back emf while the motor is undriven, just as bldc, and this also works at low speed. The openloop current is the commanded current.

For encoder operation, openloop rotation with openloop rpm will always be used until the index pulse is found, even when running position control. For position control, 1/3 of the maximum current will be used for openloop rotation until the index pulse is found. If you just move the motor a bit by hand before starting the index will be found, so then open loop isn't used.
 
Does FOC in 'Hall sensor mode' use the hall sensor information at startup to determine absolute position and perform its initial commutation?

Yes, the hall sensors are used at low speed and the observer at high speed. The threshold speed can be chosen as well, and there is a hysteresis of 100 ERPM. While the hall sensors are used, interpolation is used between them based on previous speed so that the angle is rotated smoothly then as well. When the speed is very low, no interpolation is used either. Also, if the hall sensors are disconnected and an invalid sequence is shown (e.g. 111 as there are pull-ups), sensorless is used all the time.
  • Upvote 2
Link to comment
Share on other sites

Well, the FOC control seems to be done just like many documents and videos online. The other important part, the observer, he already confirmed that is a sliding mode observer and there also papers online about it.

I meet about 5 different users from VESC on Berlin Makerfaire this weekend (also one relevant developer). One guy, CEO of a company that were exposing on the fair, told me he tried to recruit Benjamin but seems he is a very talented engineer and earns very well from his current job. Also I were told that VESC were a project of doctorate project of Benjamin.
I also were with a community manager/PR girl that were riding an e-skate with a VESC (the http://www.faradaymotion.com/hyperboard/) and she told me that Benjamin cooperated with his team to help them but the team had to fly to go to Benjamin place.

http://www.faradaymotion.com/hyperboard/ girl riding eskate with VESC:

2016_10_02_17_14_35.jpg

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

18 hours ago, lizardmech said:

Ok I fixed it now, was a hardware issue.

Nice work :)

Quote

Now I just some help tuning it and modifying the software. Broke it while testing though, hoverboard bumped something and spark jumped into the 15v rail ground, hopefully it's just 1 mosfet and maybe a driver dead.

Could bidirectional TVS-diodes (with "sufficient" voltage drops) be added between the motor phases to handle any short-lived high-voltage spikes?

https://en.wikipedia.org/wiki/Transient-voltage-suppression_diode

Edited by esaj
Link to comment
Share on other sites

Oh, it wasn't a board fault, the hoverboard rocked and pulled on a cable causing the 15V powersupply to be grounded against 42V in. Only one mosfet and driver were damaged, this kind of thing is why I always use isolated gate drivers. It's back up and running FOC now, hoverboard and EUC motors do seem to be much too difficult to startup sensorless atleast with this software. I think for final versions TVS on 15V rail and between Vin + voltage regulator are a good idea.

  • Upvote 1
Link to comment
Share on other sites

9 hours ago, lizardmech said:

Hall sensors working now, got current/torque control functioning now all that remains is to test higher voltage + current and try and find someone who can help with writing balancing code.

 

I thought Benjamin is doing the balance code? There's nothing which can be taken from Arduino projects?

Link to comment
Share on other sites

10 hours ago, electric_vehicle_lover said:

Do you have a board with the same dimensions as 30B4 (for holes to fix on the EUC shell) and that works with the same battery packs of 60V?

It's not the same dimensions as a 30B4, dimensions are 100mm x 150mm smaller than kingsong, gotway and a few others I think. It needs external dc-dc converters for now for 5v and 15v. But voltage is no issue should scale to 300V+ with only mosfet and voltage sense changes.

Link to comment
Share on other sites

Would be great if you could make a new board version, this time including all needed for the EUC operation and having 40B4 as reference, like the serial Bluetooth module that also works for flashing the firmware. The smaller the best, if is something near 30B4 dimensions, better so we can use the same shell designs and others could just exchange the current boards on their EUCs.

Link to comment
Share on other sites

It can be made much smaller. These were just cheap 2 layer PCBs with everything spaced out to make testing easy. Making tiny isolated dc-dc converters is one thing I need to find a solution to and a buck converter with a very wide input range to power everything. It can probably be VESC size if you give up building them by hand and use small parts.

Link to comment
Share on other sites

You can always try to see if 30B4 components works, like the power supply ICs.

I think there are no option to be assembled by hand on the first versions - other way, who would pay for a batch of 250 units?

If you share the files on github, I can start looking on schematic and give my feedback for things like Bluetooth and flashing firmware.

Edited by electric_vehicle_lover
Link to comment
Share on other sites

On Makerfaire Berlin I found a few users on electric skates and most of them running VESC (one of them is a developer) :-)
Unfortunattly, I saw none EUCs :-(

I also asked for a quick pitch on the developers/users and I got videos like this:


More pictures and videos here: http://vedder.se/forums/viewtopic.php?f=6&t=429#p2572

I also saw a demonstration of a DC motor made only with a magnet and a wire that made me think again how a EUC BLDC motor works:

  • Upvote 2
Link to comment
Share on other sites

4 hours ago, electric_vehicle_lover said:

Would be great if you could make a new board version, this time including all needed for the EUC operation and having 40B4 as reference, like the serial Bluetooth module that also works for flashing the firmware. The smaller the best, if is something near 30B4 dimensions, better so we can use the same shell designs and others could just exchange the current boards on their EUCs.

hmm, maybe a noob question, but why not wait a bit for the final VESC 6.0 board design and adjust it to make a custom version with stronger FETs and current sensors, instead of basing the design on the Microworks boards (that may cause compatibility glitches and other unforeseen hardware<->software issues...)?

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

3 minutes ago, Tomek said:

hmm, maybe a noob question, but why not wait a bit for the final VESC 6.0 board design and adjust it to make a custom version with stronger FETs and current sensors, instead of basing the design on the Microworks boards (that may cause compatibility glitches and other unforeseen hardware<->software issues...)?

VESC 6 still has the DRV8302 that struggles above 50V and blows up because its gate drive current is too weak if you abuse it.

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