Part Number Hot Search : 
VP16256 PWR1315A ZXTP2013 LT4363 BR901 29LV1 XF0899P FR16MR05
Product Description
Full Text Search
 

To Download AN031102-0311 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  AN031102-0311 page 1 of 26 abstract this application note discusses the closed lo op control of a 3-phase brushless direct cur- rent (bldc) motor using the z16fmc family of microcontrollers (mcus). the z16fmc product family is desi gned specifically for motor co ntrol applications, featuring an on-chip integrated array of application-specific analog an d digital modules. the result is fast and precise fault control, high syst em efficiency, on-the-fl y speed/torque and direc- tion control, as well as ease of firmware development for custom ized applications. this document further discusses ways in wh ich to implement a sen sorless feedback con- trol system using a phase locked loop along with back emf sensing. test results are based on using the z16fmc modular deve lopment system (mds ) module, a 3-phase motor control (mc) application board and a 3-phase 24 vdc, 30 w, 3200 rpm bldc motor with internal hall sensors. the source code files associated with this application note, an0311-sc01 and an0311- sc02, were tested with version 4.12 of zds ii for zneo mcus. subsequent releases of zds ii may require you to modify the code supplied with this application note. ? ? the sample project included in zds ii v4.12 and the firmware in the rev d (or earlier) ver- sion of the z16f28200kitg development kit were preprogrammed with an0311-sc01. the source code files contained in an0226-sc02 are enhanced versions of an0311-sc01 that allow users to easily ch ange parameters to accommodate differing motor types. revision history each instance in the following table reflects a change to this document from its previous version. for more details, refer to the corresponding pages or appropriate links provided in the table. date revision level description page number mar 2011 05 an0311-sc02 source code added to encompass multiple motor types; co rrection to timerprescale data in pll flow, figure 17. 1 , 22 dec 2010 01 original issue. all note: application note sensorless brushless dc motor control with the z16fmc mcu AN031102-0311
AN031102-0311 page 2 of 26 sensorless brushless dc motor control with the z16fmc mcu application note features the power-saving features of this z16fmc application include: ? smooth s-curve motor start-up with reduced starting current ? sensorless (back-emf) control us ing phase locked loop feedback ? microcontroller-based overcurrent protection ? selectable speed or torque setting ? selectable speed or torque control ? selectable control of motor direction ? uart interface for pc control ? led for max speed indication ? led for motoring running indication ? led for fault indication discussion the z16fmc series flash microcontrollers ar e based on zilog?s advanced zneo 16-bit cpu core. the z16fmc mcu family of devi ces set a new standard of performance and efficiency with up to 20 mi ps performance at 20 mhz. it supports 16-bit internal and external bus widths and provides nea r-single-cycle instruction execution. the z16fmc?s external interface allows sea mless connection to external memory and peripherals. a 24-bit address bus and a selectabl e 8-bit or 16-bit data bus allows parallel access up to 16 mb. up to 128 kb internal fl ash memory is accessible by the cpu, 16 bits at a time, to improve processor throughput. up to 4 kb of internal ram provides storage of data, variables and stack operations. figure 1 displays a block diagram of the z16fmc mcu architecture.
AN031102-0311 page 3 of 26 sensorless brushless dc motor control with the z16fmc mcu application note in each of the z16fmc products, the novel de vice architecture allows for realization of a number of enhanced control features: ? time stamp for speed control ? integrated operational amplifier ? multi-channel pwm timer time stamp for speed control most microcontrollers use at least one dedicate d comparator to detect the zero crossing of the input ac voltage signal so that the out put driving pulses can be synchronized and figure 1. the z16fmc mcu architecture wdt with rc oscillator por/vbo & reset control internal precision oscillator zneo 20 mhz cpu adc 10-bit 12-channel comparator operational amplifier 3 x timer i c espi 2 x lin-uart with irda dma controller interrupt controller flash controller ram controller abcdefgh 128 kb 4 kb multi-channel pwm timers 2 ports 88888114 number of pins available
AN031102-0311 page 4 of 26 sensorless brushless dc motor control with the z16fmc mcu application note adjusted to properly regulate the motor speed. an alterna tive approach based on zilog's motor control mcu eliminates th e need for this comparator by instead employing an ana- log to digital converter (adc) in conjunction with a timer. in this case, the adc samples the ac line voltage, with the timer running in the background. when the adc samples the line voltage's zero crossing, it reads the timer count and writes the result to a register. as a result, the timer s are cued for the output pulse width modula- tion (pwm) pulses to efficiently regulate the speed of the motor. this time stamp approach results in a very simple and cost-e ffective solution for smooth operation of the motor in steady state. integrated operational amplifier appliance controllers almost invariably mo nitor motor speed by sensing the current through the windings, using sensor and sensorless techniques in conjunction with the adc. ordinarily, sampling instances by the adc are synchronized by the mcu. with this process, an external opera tional amplifier is often used to convert the current signal to a voltage signal; the adc next samples the volta ge signal and outputs the result to the pro- cessor. the processor then synthesizes the pwm outputs to control motor speed. in the case of the z16fmc family of microcon trollers, an on-chip integrated operational amplifier eliminates the requirement for an ex ternal component, thereby reducing overall system cost. multi-channel pwm timer the z16fmc features a flexible pwm module with three complementary pairs - or six independent pwm outputs - supporting deadband operation and fault protection trip input. these features provide multiphase control capa bility for a variety of motor types and ensure safe operation of the motor by prov iding immediate shutdown of the pwm pins during a fault condition. theory of operation in a brushless dc motor, the rotor is comp rised of permanent magnets while the stator windings are similar to those in poly-phase motors. for a detailed discussion of bldc motor fundamentals, as well as closed-loop control using sensorless techniques, refer to the motor control electronics handbook by: richard valen tine, mcgraw-hill, ny, 1998. in sensor-based control applications, the hall elements are integrated and are used to detect the position of the rotor for drive synchronization. in contrast, sensorless control employs the detection of back emf signals which are generated (induced) by specific phase windings to synchronize the timing of the control loop. a block diagram of the bldc motor control system based on the z16fmc mcu is shown in figure 2. in a 3-phase commutation a rrangement, at any given instance, only two phases are energized. the back emf voltage is in turn generated in the unenergized phase winding, and the zero crossing of this induced voltage is detected for synchronization of the subsequent closed-loop control events. as discussed earlier, th e innovative time stamp feature of the z16fmc mcu provides for robust , efficient implementation of this critical sensing function without the requirem ent for an additional comparator.
AN031102-0311 page 5 of 26 sensorless brushless dc motor control with the z16fmc mcu application note the algorithm for back emf sensing is based on an implementation of a phase locked loop (pll), as shown in figures 3 and 4 and described in appendix c, back emf sens- ing phase locked loop. this al gorithm is especially advantag eous during startup, result- ing in a very smooth increase in the motor sp eed as well as nearly instantaneous reversal of direction of rotation on command, as outlined below. with a conventional approach du ring the start-up sequence, po wer is applied to the wind- ings in order to place the ro tor in a known starting position, followed by commutation and start of back emf sensing and control. in contrast, the pll-based approach implemented herein makes it possible to lock the back emf signal from the onset of the start-up phase without the requirement for initial placement of the rotor in a specific position. moreover, this approach significantly re duces any erratic movement of the motor during start-up or a reversal of direction. during normal operation following the start-up period, phase torque/current mode control is achieved via sensing of the voltage generate d across a sense resistor in the motor drive figure 2. . a 3-phase bldc motor control system
AN031102-0311 page 6 of 26 sensorless brushless dc motor control with the z16fmc mcu application note circuit. this voltage is routed to the on-c hip integrated adc, after which data processing by the cpu, based on a predefined computatio nal algorithm, results in the regulation of the pwm commutation signal period(s). as discussed earlier, another key feature of the z16fmc mcu is the direct coupling of the on-chip integrated comparator to the pwm module to enable fast, cycle-by-cycle shut- down during an overcurrent fault event. o scilloscope-generated waveforms representing this sequence of events are shown in figure 5. in conjunction with th e integrated on-chip hardware blocks, the 3-phase bldc motor control software developed herein allows fo r ease of programming to achieve the desired closed-loop control characteris tics. the routines that enable the sensing of the motor's back emf and current are all interrupt-driven. it is critical that the highest interrupt prior- ity is assigned to the back emf sensing event for subsequent synchr onization of the com- mutation events. in this case, timer 0 is u sed for the time stamp function as well as for updating the commutation period, if necessary. figure 3. cycle-by-cycle shutdown
AN031102-0311 page 7 of 26 sensorless brushless dc motor control with the z16fmc mcu application note testing this section provides informatio n about how to run the code and demonstrate this applica- tion, including the equipment u sed to build the implementatio n, its configuration and the results of its testing. equipment used the following equipment is used for the setup; the first five items are contained in the z16fmc series development kit (z16fmc28200kitg). ? zilog z16fmc mds module (99c1299-001) ? zilog 3-phase motor control application board (99c0960-001) ? opto-isolated usb smart cable to connect the pc to the z16fmc series development board ? linix 3 phase bldc motor 24vdc, 30w 3200rpm (45zwn24-30) ? 5 v dc power supply for the z16fmc mds module ? 24 v dc power supply for bldc motor ? digital oscilloscope or logic analyzer hardware setup figures 4 and 5 illustrate the ap plication hardware connections.
AN031102-0311 page 8 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 4. z16f2800100zcog and motor control application board figure 5. 3-phase bldc hardware setup with z16fmc mds module
AN031102-0311 page 9 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 6 displays the proper port settin gs in the hyperterminal emulation program. procedure observe the following steps to test the 3-ph ase sensorless bldc motor control applica- tion demo program to the z16fmc mds module. 1. install the zds ii ? zneo version 4.12 or newer software on your pc. 2. connect the opto-isolated usb smart cable to the pc. ? to install the driver of the opto-isol ated usb smart cable, refer to the installation guide of the opto-isolated us b smart cable included in the z16fmc series development kit. 3. connect the hardware setup as shown in figure 7. 4. power up the z16fmc mds board using th e 5 vdc adapter included in the kit. 5. open the an0311-sc01 project in zds ii for zneo. figure 6. hyperterminal display settings
AN031102-0311 page 10 of 26 sensorless brushless dc motor control with the z16fmc mcu application note 6. from the main.c source file, choose the following mode for the motor control appli- cation: #define loop_select_value 1u // 0u = torque loop, 1u = speed loop 7. compile the application and download the code to the z16fmc mds module. 8. stop the debug mode from the ide; disconnect the opto-isolated usb smart cable and switch off the power supply to the z16fmc development board. 9. connect the 24v dc supply sour ce to the mc application board. 10. ensure that the run/stop switch on the z16fmc development board is in the stop position. 11. first apply power to the z16fmc developm ent board supply, then apply power via the 24v supply to the mc application board. 12. set the run/stop switch on the z16fmc development board to run. 13. additionally, observe the following points: ? if speed mode is selected, the speed of th e motor can be varied by adjusting the potentiometer on the z16fmc development board. ? if torque mode is selected, the motor sp eed is decreased with application of force on the shaft of the motor. ? the direction of rotation of the motor is set by changing the position of the direction switch on the z16fmc development board. you can now add your application software to the main program to ex periment with addi- tional functions. while debugging your code, ensure that the opto-isolated usb smart cable controls the reset pin of the mcu. after debugging and running your code, detach the opto-isolated usb smart cable from p3 of the z16f28200kit g to free the reset pin and apply a power cycle to reset the mcu from debug mode. result this motor control applicatio n was tested with the z16fmc mds board connected to zilog?s 3-phase motor control application board. the bldc motor specifications are: ? manufacturer: linix ? motor type: 3-wire, 3-phase brushless dc motor ? voltage rating: 24 v ? power rating: 30 w ? maximum speed of rotation: 3200 rpm ? note:
AN031102-0311 page 11 of 26 sensorless brushless dc motor control with the z16fmc mcu application note observations that we noted about speed and torque are indicated in table 1. summary this application note descri bed the closed-loop control of a sensorless bldc motor using the advanced on-chip integrated features of the z16fmc mcu. the z16fmc prod- uct line is ideally suited for su ch applications, providing for a seamless start-up of the motor from an idle mode to full operational sp eed, on-the-fly reversal of the direction of rotation, an extremely fast fa ult detection cycle and a lower total solution cost. these fea- tures, along with the powerful zneo cpu core and some of the best development tools table 1. speed and torque observations function description observation speed ? run/stop switch in stop position ? motor is in idle mode. ? yellow led blinks. ? run/stop switch in run position. ? direction switch set to a clockwise rotation. ? potentiometer r10 at minimum value. ? motor starts rotating. ? when the motor is loa ded mechanically by holding the shaft, speed initially decreases then picks up gradually; current increases. ? green led blinks. ? run/stop switch in run position. ? direction switch set to a clockwise rotation. ? potentiometer r10 at maximum value. ? motor starts rotating with no load. ? green led blinks. ? run/stop switch in run position. ? direction switch set to a counterclockwise rotation. ? potentiometer r10 at minimum value. ? motor starts rotating at a speed of 1280 rpm. ? when the motor is loa ded mechanically by holding the shaft, speed initially decreases then picks up gradually; current increases. ? green led blinks. ? run/stop switch in run position. ? direction switch set to a counterclockwise rotation. ? potentiometer r10 at maximum value. ? motor begins rotating at a speed of 3890 rpm with no load. ? green led blinks. to r q u e ? run/stop switch in run position. ? direction switch set to a clockwise direction. ? motor begins rotating at a speed of 1250 rpm at no load. ? motor stops rotating upon holding the shaft constant current consumption of 60ma. ? green led blinks. ? run/stop switch in run position. ? direction switch set to a counterclockwise direction. ? motor starts rotating at a speed of 1250 rpm at no load. ? motor stops rotating upon holding the shaft. ? constant current consumption of 60ma. ? green led blinks. ? run/stop switch in stop posi tion. ? motor is in idle mode. ? yellow led blinks.
AN031102-0311 page 12 of 26 sensorless brushless dc motor control with the z16fmc mcu application note available in the industry, result in less co mplex board designs and reduced design cycle time. references the following documents are associated with the z16fmc series of motor control mcus; each is available for download on www.zilog.com . ? z16fmc series motor control mc u product specification (ps0287) ? z16fmc series motor control deve lopment kit user manual (um0234) ? z16fmc series motor control develo pment kit quick start guide (qs0079) ? zilog developer studio ii ? zneo user manual (um0171) ? zneo cpu core user manual (um0188) ? sensorless brushless dc motor control with z8 encore! mc microcontrollers appli- cation note (an0226)
AN031102-0311 page 13 of 26 sensorless brushless dc motor control with the z16fmc mcu application note appendix a. schematics figures 7 and 8 show basic block and mcu schematics, re spectively, for the z16fmc motor control mds module. figure 7. z16fmc motor c ontrol mds module, #1 of 2 5 5 4 4 3 3 2 2 1 1 d d c c b b a a top -reset pc[7:0] ana[11:0] pwml1 pwmh1 pwml2 pwmh2 de1 txd1 rxd1 ncts1 vref pf7 pg3 pa[7:0] -reset pc0 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 25 monday, november 08, 2010 top title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 25 monday, november 08, 2010 top title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 25 monday, november 08, 2010 top mcu mcu txd1 pc[7:0] pwml1 pwml2 pwmh1 de1 pwmh2 vref -reset ana[11:0] rxd1 ncts1 pa[7:0] pg3 pf7 mds interface interface pwml1 pwmh1 pwml2 pwmh2 txd1 rxd1 vref -reset de1 ncts1 pa[7:0] pc[7:0] ana[11:0] pg3 pf7 a1 fab a1 fab power&communications power&communications -reset pa[7:0] pc0
AN031102-0311 page 14 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 8. z16fmc motor c ontrol mds module, #2 of 2 5 5 4 4 3 3 2 2 1 1 d d c c b b a a dbg interface mcu pd0_pwmh1 pd3_de1 pa2_de0 pa0_t0in pb1_ana1_t0in1 pd1_pwml1 pa5_txd0 pc5_miso pb0_ana0_t0in0 pa1_t0out pb4_ana4 pc4_mosi -reset pa4_rxd0 ph1_ana9 pb5_ana5 ph2_ana10 ph0_ana8 pd5_txd1 pb3_ana3_opout pc2_nss ph3_ana11_cpinp pd4_rxd1 pb6_ana6_opinp pb2_ana2_t0in2 pd2_pwmh2 pa3_ncts0 pb7_ana7_opinn pc1_tout pc1 pc3_sck pc3 pa6_scl pa6 pa7_sda pa7 pc4_mosi pc4 pa4_rxd0 pa4 pa3_ncts0 pa3 pa5_txd0 pa5 pc5_miso pc5 pa1_t0out pa1 pc2_nss pc2 ph2_ana10 ana10 de1 pd3_de1 ncts1 pd6_ncts1 pwml1 pd1_pwml1 pwmh2 pd2_pwmh2 txd1 pd5_txd1 pwmh1 pd0_pwmh1 pwml2 pd7_pwml2 rxd1 pd4_rxd1 pc6_t2in_pwmh0 pc6 pc7_t2out_pwml0 pc7 ana9 ph1_ana9 ana8 ph0_ana8 pb6_ana6_opinp pb3_ana3_opout ph3_ana11_cpinp pb7_ana7_opinn pa0_t0in pa0 pb3_ana3_opout ana3 pb2_ana2_t0in2 ana2 pb1_ana1_t0in1 ana1 pb6_ana6_opinp ana6 pb4_ana4 ana4 pb5_ana5 ana5 pb0_ana0_t0in0 ana0 pb7_ana7_opinn ana7 pa2_de0 pa2 vref gnd dbg -reset pc1_tout pd6_ncts1 pc0_t1in dbg gnd pc3_sck pa6_scl pa7_sda pd7_pwml2 pc6_t2in_pwmh0 pc7_t2out_pwml0 ph3_ana11_cpinp ana11 agnd vref gnd pe5 pe6 pe7 pg3 pf7 pe0 pe1 pe2 pe3 pe4 pe0 pe1 pe2 pe3 pe4 pe5 pe6 pe7 pc0_t1in pc0 ana[11:0] pc[7:0] pwmh1 pwml1 pwmh2 pwml2 de1 txd1 rxd1 ncts1 vref -reset pa[7:0] pg3 pf7 vcc_3v3 vcc_3v3 vcc_3v3 vcc_3v3 vcc_3v3 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 35 monday, november 08, 2010 mcu title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 35 monday, november 08, 2010 mcu title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 35 monday, november 08, 2010 mcu lqfp u1 z16f2810 lqfp u1 z16f2810 vss2 1 avdd 2 ph0/ana8 3 ph1/ana9 4 pb0/ana0/t0in0 5 pb1/ana1/t0in1 6 pb4/ana4 7 pb5/ana5 8 pb6/ana6/opinp/cinn 9 pb7/ana7/opinn 10 pb3/ana3/opout 11 pb2/ana2/t0in2 12 ph2/ana10 13 ph3/ana11/cpinp 14 vref 15 avss 16 pc0/t1in/t1out/cinn 17 pc1/t1out/compout 18 dbg 19 pc6/t2in/t2out/pwm0h 20 pc7/t2out/pwm0l 21 pg3 23 pe7 25 pe6 26 pe5 27 pd7/pwm2l 29 pc3/sck 30 pd6/cts1 31 pa7/sda 32 pa6/scl 33 pa5/txd0 34 pa4/rxd0 35 pc4/mosi 38 pd5/txd1 39 pd4/rxd1 40 pd3/de1 41 pc5/miso 42 pf7 43 pa3/cts0/fault0 46 pa2/de0/faulty 47 pa1/t0out 48 pa0/t0in/t0out 49 pd2/pwm2h 50 pc2/ss 51 reset 52 pe4 54 pe3 55 pe2 57 pe1 58 pe0 59 pd1/pwm1l 61 pd0/pwm1h 62 xout 63 xin 64 vdd2 22 vdd3 24 vdd4 37 vdd5 44 vdd1 53 vss3 56 vss1 60 vss4 28 vss5 36 vss6 45 c6 12pf c6 12pf c4 0.1uf c4 0.1uf r3 7.8k r3 7.8k 1 2 + c8 10uf + c8 10uf 1 2 p1 hdr/pin 2x3 p1 hdr/pin 2x3 1 1 2 2 3 3 4 4 5 5 6 6 c9 0.01uf c9 0.01uf c12 0.01uf c12 0.01uf c15 0.01uf c15 0.01uf c3 100pf c3 100pf 1 2 c18 0.01uf c18 0.01uf r7 5k r7 5k 1 3 2 y1 20 mhz y1 20 mhz 1 3 2 c20 1000pf c20 1000pf j1 hdr/pin 2x8 j1 hdr/pin 2x8 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 r8 1k r8 1k 1 2 r18 10k r18 10k 1 2 r6 10k r6 10k 1 2 c10 0.01uf c10 0.01uf c13 0.01uf c13 0.01uf c16 0.01uf c16 0.01uf c19 0.01uf c19 0.01uf r4 49.9k r4 49.9k 1 2 c2 22pf c2 22pf c11 0.01uf c11 0.01uf c14 0.01uf c14 0.01uf r5 10k r5 10k 1 2 c17 0.01uf c17 0.01uf r1 10k r1 10k 1 2 c1 22pf c1 22pf c7 0.01uf c7 0.01uf r2 12.4k r2 12.4k 1 2 c5 0.01uf c5 0.01uf
AN031102-0311 page 15 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 9 shows the schematics for the mds board?s power and serial interfaces. figure 9. z16fmc mds board power and rs-232 connections 5 5 4 4 3 3 2 2 1 1 d d c c b b a a user -reset console 3.3 ok vcc 3.3v stop/run direction power & rs232 gnd pa1_t0out 5v vcc_5v gnd pa3_ncts0 pa4_rxd0 pa0_t0in pa7_sda pa5_txd0 pa2_de0 rxd0 cts0 txd0 vcc_3v3 vcc_3v3 pa6_scl pa6 pa7_sda pa7 pa4_rxd0 pa4 pa3_ncts0 pa3 pa2_de0 pa2 pa5_txd0 pa5 pa1_t0out pa1 pa0_t0in pa0 gnd pc0_t1in -reset pa[7:0] pc0 vcc_3v3 vcc_3v3 vcc_5v vcc_3v3 vcc_3v3 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 45 monday, november 08, 2010 power and rs232 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 45 monday, november 08, 2010 power and rs232 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 45 monday, november 08, 2010 power and rs232 c25 0.1uf c25 0.1uf + c24 10uf + c24 10uf 1 2 c23 0.1uf c23 0.1uf r10 100 r10 100 1 2 r15 10k r15 10k 1 2 r9 100 ohm r9 100 ohm 1 2 d3 yell d3 yell 2 1 c29 0.1uf c29 0.1uf c22 0.1uf c22 0.1uf c27 0.1uf c27 0.1uf r14 10k r14 10k 1 2 r11 10k r11 10k 1 2 s3 eg1218 s3 eg1218 1 3 2 d2 red d2 red 2 1 s2 eg1218 s2 eg1218 1 3 2 p2 con dc p2 con dc 2 3 1 u2 sp3222ebca u2 sp3222ebca en 1 c1+ 2 c1- 4 c2+ 5 c2- 6 t1in 13 t2in 12 r1out 15 r2out 10 v+ 3 v- 7 t1out 17 t2out 8 r1in 16 r2in 9 shdn 20 vcc 19 gnd 18 nc 11 nc1 14 r13 100 r13 100 1 2 c21 0.1uf c21 0.1uf u3 spx2815au-3.3 u3 spx2815au-3.3 vi 3 gnd 1 vo 2 r17 100 r17 100 1 2 r16 100 r16 100 1 2 r12 100 r12 100 1 2 d1 green d1 green 2 1 tp2 tp2 1 2 3 p3 db9 female p3 db9 female 5 9 4 8 3 7 2 6 1 s1 sw pb no s1 sw pb no 1 2 c26 0.1uf c26 0.1uf + c28 10uf + c28 10uf 1 2 tp1 tp1 1 2 3 d4 green d4 green 2 1
AN031102-0311 page 16 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 10 displays mds interface schematics. figure 10. mds board interfaces 5 5 4 4 3 3 2 2 1 1 d d c c b b a a nc nc nc nc nc nc nc nc nc nc mds interface ana7 gnd pd5_txd1 gnd pc1_tout vref gnd ana3 pc3_sck pwmh1 gnd pc4_mosi gnd ana5 pa7_sda pd3 pc6_t2in_pwmh0 gnd vcc_3v3 pc7_t2out_pwml0 ana4 gnd pwml2 pa2 pwmh2 pc2_nss vcc_33v ana0 pa6_scl pd6_ncts1 pa4_rxd0 pc0_t1in pwml1 ana1 pc5_miso pa3_ncts0 ana2 pd4_rxd1 -reset vcc_3v3 vcc_3v3 gnd gnd ana6 vcc_33v pa5_txd0 gnd pb5_ana5 ana5 pb7_ana7 ana7 pb3_ana3 ana3 pb0_ana0 ana0 pb6_ana6 ana6 pb2_ana2 ana2 ph0_ana8 ana8 pb1_ana1 ana1 pb4_ana4 ana4 ph1_ana9 ana9 ph3_ana11 ph2_ana10 ana10 ph3_ana11 ana11 pc0_t1in pc0 pc6_t2in_pwmh0 pc6 pc7_t2out_pwml0 pc7 pc1_tout pc1 pc3_sck pc3 pa6_scl pa6 pa7_sda pa7 pc4_mosi pc4 pa4_rxd0 pa4 pa3_ncts0 pa3 pa2_de0 pa2 pa5_txd0 pa5 pc5_miso pc5 pa1_t0out pa1 pc2_nss pc2 pa0_t0in pa0 gnd pa0 pa1 pf7 pg3 ana9 ana8 ana0 ana1 ana4 ana5 ana6 ana7 ana3 ana2 ana10 ana11 pwmh2 vref pwml2 pwmh1 pwml1 txd1 rxd1 ncts1 -reset de1 pa[7:0] pc[7:0] ana[11:0] pf7 pg3 vcc_3v3 title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 55 monday, november 08, 2010 mds interface title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 55 monday, november 08, 2010 mds interface title size document number rev date: sheet of     6800 santa teresa blvd san jose, ca 95119 408-513-1500 website: www.zilog.com page  
     
 
     
 
     
 
     
uncontrolled when printed unless stamped 'controlled copy' in red by document control 96c1299-001g a z16fmc mds board b 55 monday, november 08, 2010 mds interface c30 0.01uf c30 0.01uf c36 0.01uf c36 0.01uf jp3 hdr/pin 2x13 jp3 hdr/pin 2x13 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 c37 0.01uf c37 0.01uf c31 0.01uf c31 0.01uf c38 0.01uf c38 0.01uf c32 0.01uf c32 0.01uf jp2 hdr/pin 2x30 jp2 hdr/pin 2x30 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 jp1 hdr/pin 2x30 jp1 hdr/pin 2x30 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 c39 0.01uf c39 0.01uf c33 0.01uf c33 0.01uf c40 0.01uf c40 0.01uf c34 0.01uf c34 0.01uf c41 0.01uf c41 0.01uf c35 0.01uf c35 0.01uf
AN031102-0311 page 17 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figures 11 through 13 display the schematics for the 3-phase motor control application board. figure 11. 3-phase motor control application board, #1 of 3
AN031102-0311 page 18 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 12. 3-phase motor control application board, #2 of 3
AN031102-0311 page 19 of 26 sensorless brushless dc motor control with the z16fmc mcu application note figure 13. 3-phase motor control application board, #3 of 3
AN031102-0311 page 20 of 26 sensorless brushless dc motor control with the z16fmc mcu application note appendix b. flowcharts this appendix displays flow charts that diagram the main func tion and the read and write apis. figure 14 shows the main control loop. the back emf sensing loop is shown in figure 15. figure 14. initialization and application code space figure 15. initialization and application code space start peripheral initialization enable interrupts main loop (application code) t0_intrp (back emf isr every timer0 time out forms phase locked loop commutation update (every other interrupt) back emf sensing and pll filter (opposite interrupt from com update) return
AN031102-0311 page 21 of 26 sensorless brushless dc motor control with the z16fmc mcu application note a flow chart of the pwm loop is shown in figu re 16. this pwm loop can also be used for specific application code, such as comm unications or additional user interfaces. figure 16. current loop and timed housekeeping pwm_timer_isr (main loop isr every pwm reload, 50s) current loop, pwm duty cycle control (500s update) led status (50s update) and blink (0.4 sec update) torque (current command from adc 2ms update, ltered) return direction switch (7.5ms update, ltered)
AN031102-0311 page 22 of 26 sensorless brushless dc motor control with the z16fmc mcu application note appendix c. back emf sensing phase locked loop the phase locked loop back emf algorithm, implemented to provide a smooth start-up of the motor, is shown in figu res 17 and 18. additional details about the specific formulas in these figures are shown in table 2; a description of these calculations follows. figure 17. back emf sensing using the phase locked loop algorithm figure 18. proportional integral (pi) filter representation for back emf sensing rotor + (radians) error v back emf neutral (volts/radian) back emf divider (unitless) adc (counts/volt) pi filter (unitless) tp speed (sec) (radians/cycle/sec) (rev/cycle) (unitless) (radians/hertz) integrator frequency to angular frequency conversion revolutions per cycle electrical cycles per commutation cycles commutation cycles per timer cycles p mec ? mec ? elect ? com ? timer hh (cycles/sec) (cycles/sec) (rev/sec) (rev/sec) (cycles/sec) (radians) (volts) (volts) (counts) (counts) k c + ? 2 1 timerprescale r 1 adc counts v counts ? clock speed_count speed_constant ? 2 r 1 2 + r 2 ? 1 6 1 2 1 n 2 1 ( ? ) C + e ( ? ) ud(s) = kd e ( ? ) u?(s) = ud ( ? ) f ( ? ) vco filter phase detector kd f ( ? ) ? ko 2 ( ? )
AN031102-0311 page 23 of 26 sensorless brushless dc motor control with the z16fmc mcu application note we begin with the transfer function of the pr oportional integral (pi) filter in the s-plane: table 2. back emf sensing phase locked loop ?
AN031102-0311 page 24 of 26 sensorless brushless dc motor control with the z16fmc mcu application note next, by using the bilin ear transform identity: where t = the sampling period, yields the following equation. when multiplying by: the calculations that follow are: where: and: collecting terms and dividing by z yields the following result:
AN031102-0311 page 25 of 26 sensorless brushless dc motor control with the z16fmc mcu application note when writing this computation as a computer pr ogram, it takes the form of a recursive fil- ter, with the coefficients a0 and a1: where: ? y0 = current output ? y1 = output at the last sample period ? r0 = current adc sample of back emf (phase voltage ? v bus / 2) ? r1 = most recent sample of back emf from adc ? a0 = a0 ? a1 = ?a1
AN031102-0311 page 26 of 26 sensorless brushless dc motor control with the z16fmc mcu application note customer support to share comments, get your technical questio ns answered, or report issues you may be experiencing with our products, please vi sit zilog?s technical support page at ? http://support.zilog.com . to learn more about this product, find add itional documentation, or to discover other fac- ets about zilog product offerings, please visit the zilog knowledge base at http:// zilog.com/kb or consider participating in the zilog forum at http://zilog.com/forum . this publication is subject to replacement by a later edition. to determine whether a later edition exists, please vis it the zilog website at http://www.zilog.com . do not use this product in life support systems. life support policy zilog?s products are not authorized fo r use as critical components in life support devices or systems without th e express prior written approval of the president and general counsel of zilog corporation. as used herein life support devices or systems are devices which (a) ar e intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordan ce with instructions for use provided in the labeling can be re asonably expected to result in a significant injury to the user. a critical component is any component in a life suppor t device or system whose failure to perform can be reasonably expected to cause the fa ilure of the life support device or system or to affect its safety or effectiveness. document disclaimer ?2011 zilog, inc. all rights reserv ed. information in this publication c oncerning the devices, applications, or technology described is intend ed to suggest possible uses and ma y be superseded. zilog, inc. does not assume liability for or provide a representation of accuracy of the information, devices, or technology described in this document. zilog also does not assume liability for intellectual property infringement related in any manner to use of informati on, devices, or technology described herein or otherwise. the information contained w ithin this document has been verified according to the general principles of electrical and mechanical engineering. z8, z8 encore!, z8 encore! xp and zmotion are trademarks or registered trademarks of zilog, inc. all other product or service names are the property of their respective owners. warning:


▲Up To Search▲   

 
Price & Availability of AN031102-0311

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X