dirty_d
Aug 30, 2008, 02:04 AM
i just made a brushed controller for my bike and destroyed the motor, so ive bought a big 6500W HXT brushless rc motor and want to make a controller for it with a current mode throttle. ill be using an atmega168 for the brains.
im having a hard time deciding on what zero cross detection method i should use, the motor im using has 12 poles i think and about 6000rpm at max speed at 48V so thats about 278us where each phase is floating where i have to detect the zero crossing. if i use a 20khz PWM and sample the floating phase voltage in the middle of the PWM on time ill only get about 5 samples to detect the zero crossing. i figured i can just interpolate the actual zero cross time from the result before and after the zero crossing and adjust the commutation delay timer accordingly. i suppose i could speed up the PWM frequency but that will increase losses in a bunch of places, fet switching, hysteresis, skin effect, and proximity effect losses.
i also thought about using three external comparators, if i use the inverting inputs as the reconstructed virtual neutral point divided down and filtered, and the non-inverting inputs as each phase voltage divided and filtered, i will always have a meaningful state on all three comparator outputs at any time right? the signals would be the same as if i had hall sensors except 30 degrees in advance? i figured i could just route those to the PCINT pins on the AVR and generate an interrupt when one of the comparator outputs changes states, then get the state of all three comparators at the same time and use a lookup table to energize the correct phases. do i need to apply the same PWM signal to the high and low side fets or will only switching the high side work for this?
it seems like there are a lot of smart people on these forums i hope someone can give me some advice, thanks.
im having a hard time deciding on what zero cross detection method i should use, the motor im using has 12 poles i think and about 6000rpm at max speed at 48V so thats about 278us where each phase is floating where i have to detect the zero crossing. if i use a 20khz PWM and sample the floating phase voltage in the middle of the PWM on time ill only get about 5 samples to detect the zero crossing. i figured i can just interpolate the actual zero cross time from the result before and after the zero crossing and adjust the commutation delay timer accordingly. i suppose i could speed up the PWM frequency but that will increase losses in a bunch of places, fet switching, hysteresis, skin effect, and proximity effect losses.
i also thought about using three external comparators, if i use the inverting inputs as the reconstructed virtual neutral point divided down and filtered, and the non-inverting inputs as each phase voltage divided and filtered, i will always have a meaningful state on all three comparator outputs at any time right? the signals would be the same as if i had hall sensors except 30 degrees in advance? i figured i could just route those to the PCINT pins on the AVR and generate an interrupt when one of the comparator outputs changes states, then get the state of all three comparators at the same time and use a lookup table to energize the correct phases. do i need to apply the same PWM signal to the high and low side fets or will only switching the high side work for this?
it seems like there are a lot of smart people on these forums i hope someone can give me some advice, thanks.