Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-11 Thread propcoder
Mod operation is a counter with reset on TOP value - simple, no processor needed. I did those things with logic elements, making circuits for some constant TOP value. Isn't it possible to make lookups in hardware? Demultiplexer connected to table storage? How many selecting bits do we need - 3

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-11 Thread propcoder
No, I didn't yet. I will do when I will have time and report the results. 2013.07.11 07:31, Peter C. Wallace rašė: BTW, did you try the latest BLDC version in master? It should make a big improvement by halving the peak error in the commutation angle

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-11 Thread propcoder
I suspect thread takes 430uS time only on LinuxCNC startup. I should re-check this. 2013.07.10 16:54, Anders Wallin rašė: pushing the servo thread time down to 230us while you sometimes get delays that cause it to be 430us does not seem right.

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread andy pugh
On 10 July 2013 10:05, propcoder marius.alks...@gmail.com wrote: Last month I tried running bldc motors (8 poles, 3000rpm max) with LinuxCNC and MESA 5i23, 7i43 and 7i39. I am quite happy now, but I see the limitations of this set John Kasunich made some improments to the bldc component at the

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Anders Wallin
This sounds doable as long as there is space on the fpga for a lookup-table and you can get the commutation tuned correctly (I guess the tuning/alignment process is already required and works ok for the current bldc implementation). Could you somehow verify that the non-optimal behavior or

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread propcoder
2013.07.10 13:10, Anders Wallin rašė: This sounds doable as long as there is space on the fpga for a lookup-table and you can get the commutation tuned correctly (I guess the tuning/alignment process is already required and works ok for the current bldc implementation). I use qi mode with

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread propcoder
Sorry, correcting: While servo thread usual time was about 230us, max time was 430us. 2013.07.10 13:27, propcoder rašė: While servo thread usual period was about 230us and max period was 420us. -- See everything from

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread John Kasunich
On Wed, Jul 10, 2013, at 06:05 AM, andy pugh wrote: On 10 July 2013 10:05, propcoder marius.alks...@gmail.com wrote: Last month I tried running bldc motors (8 poles, 3000rpm max) with LinuxCNC and MESA 5i23, 7i43 and 7i39. I am quite happy now, but I see the limitations of this set

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread andy pugh
On 10 July 2013 14:15, John Kasunich jmkasun...@fastmail.fm wrote: As an aside, I really like the idea of doing the encoder to angle to sine-wave calculations in the FPGA. I think that softDMC probably already does that. -- atp If you can't fix it, you don't own it.

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Anders Wallin
pushing the servo thread time down to 230us while you sometimes get delays that cause it to be 430us does not seem right. the latency test with a 1ms thread usually gives a max jitter of 20us with well-behaving hardware. if that works correctly down to 250us you would expect variation within 230us

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Peter C. Wallace
] Custom firmware for MESA and BLDC motors On 10 July 2013 14:15, John Kasunich jmkasun...@fastmail.fm wrote: As an aside, I really like the idea of doing the encoder to angle to sine-wave calculations in the FPGA. I think that softDMC probably already does that. Indeed, the 7I39 was made

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Sebastian Kuzminsky
On 7/10/13 07:15 , John Kasunich wrote: On Wed, Jul 10, 2013, at 06:05 AM, andy pugh wrote: John Kasunich made some improments to the bldc component at the fest, which made a significant improvement to his motor performance (half the current and twice the speed) by setting the phase angle to

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread John Kasunich
On Wed, Jul 10, 2013, at 11:07 AM, Sebastian Kuzminsky wrote: git branch --contains 1e2ac52bcfe71898fbd4449f370a7f015d7c1c8f says that that commit is in master only. If it should be in 2.5 too we should cherry-pick it back. I think it is a very low risk change, and should be OK for

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread andy pugh
On 10 July 2013 16:15, John Kasunich jmkasun...@fastmail.fm wrote: I think it is a very low risk change, and should be OK for 2.5, but since Andy is the BLDC expert (sorry Andy ;-) I'll let him make the call. I was very impressed by the results, and the concept makes perfect sense. The patch

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Peter C. Wallace
] Custom firmware for MESA and BLDC motors On 10 July 2013 16:15, John Kasunich jmkasun...@fastmail.fm wrote: I think it is a very low risk change, and should be OK for 2.5, but since Andy is the BLDC expert (sorry Andy ;-) I'll let him make the call. I was very impressed by the results

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread andy pugh
On 11 July 2013 00:43, Peter C. Wallace p...@mesanet.com wrote: The only thing that might be nice is to have the ability to enable/disable this optimization. The reason is that on drives like the 8I20 we plan to add a velocity pin that will allow extrapolation of the commutation angle in the

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Peter C. Wallace
] Custom firmware for MESA and BLDC motors On 11 July 2013 00:43, Peter C. Wallace p...@mesanet.com wrote: The only thing that might be nice is to have the ability to enable/disable this optimization. The reason is that on drives like the 8I20 we plan to add a velocity pin that will allow

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread propcoder
I am not sure I understand this correctly, but maybe this is possible: substract_encoder_offset -- mod_encoder_count -- take_only_needed_MSB -- customized_table_lookup with custom pre-calculated encoder offsets for 120 and 240 degrees -- scale_multiply_sines -- 3_PWMGENS I mean use

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Peter C. Wallace
On Thu, 11 Jul 2013, propcoder wrote: Date: Thu, 11 Jul 2013 07:06:15 +0300 From: propcoder marius.alks...@gmail.com Reply-To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net To: emc-users@lists.sourceforge.net Subject: Re: [Emc-users] Custom firmware for MESA and BLDC

Re: [Emc-users] Custom firmware for MESA and BLDC motors

2013-07-10 Thread Peter C. Wallace
On Thu, 11 Jul 2013, propcoder wrote: Date: Thu, 11 Jul 2013 07:06:15 +0300 From: propcoder marius.alks...@gmail.com Reply-To: Enhanced Machine Controller (EMC) emc-users@lists.sourceforge.net To: emc-users@lists.sourceforge.net Subject: Re: [Emc-users] Custom firmware for MESA and BLDC