![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Stepper Motors and Drives Discuss stepper motors, drivers and related topics here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I have been looking at this app note http://ww1.microchip.com/downloads/e...tes/00822a.pdf trying to figure out how the current feedback works. I am not firmilure with the PIC CPU but looking at the asm code I cant see where it even looks at the feedback signal AIN1 and AIN3 they go back to RA1 and RA3 but it doesnt even look like the software ever checks them. I understand the electronics it just looks to me like the program runs at a set current value and ignores the feedback. Also what do you think about the 100% on time in one phase and varing the other phase, every other microstepper driver I've seen varies both phases. Hope someone can help me with this. Thanks Ken |
|
#2
| |||
| |||
| The Pic has hardware PWM, the code just has to set the % value and the hardware does the rest, including monitoring feedback. Only varying one phase? why? one you've got setup to manage one phase its just as easy to manage both. Not sure the motor would like 100% on one phase and not on the other. |
|
#3
| ||||
| ||||
| if you were varing both. Thanks for the reply I am off to read the data sheet again and see what I missed. |
|
#4
| |||
| |||
| Ok I give up I cant find anywhere in the data sheet or searching on the web Where the input to the compartor RA1 or RA3 affects the PWM in any way. Can you point me to a datasheet or appnote that explains it? I am trying to do this in a AVR chip because I am much more comfortable with them but I need to under stand how this one works first. Thanks Ken |
|
#5
| |||
| |||
| I'm not sure I'm following the question but from a real quick scan of the sheet the actual PWM control of the motors current is actually controlled by the L298, not the Picmicro and the pic isn't using the feedback voltage(s). L298 appears to be passing a sense voltage back to the 18F/C452 on AN1/RA1 AN3/RA3 but the Pic is actually setting its PWM's from a truth table based upon microstepping, speed etc and setting the duty cycle of CCP1/2 from those tables directly. There doen't appear to be any code to deal with AN1/2 RA1/RA3 and I don't think its doing anything with the input voltage and doesn't seem to do anything with portA at all. It might be directly loading values to registers to determine if the motor is running or what the direction is later but I didn't go that deep. I'm not sure thats of any help.? Hopefully someone who knows what they're talking about will be along shortly! |
| Sponsored Links |
|
#6
| |||||
| |||||
| controling device L297 or micro in this case whitch varies the PWM to raise or lower the current. its not to high for the motor. Thanks Ken |
|
#7
| ||||
| ||||
| That appears to be like a lot of other Microchip app notes; good for understanding the basics, but missing a lot of stuff needed for a practical design. The part about driving one phase full on doesn't make much sense. The main reason for microstepping is smoothness, and with one phase full on and a sine on the other the torque will be varying throughout the rotation which is not the best for smooth movement. Like you, I couldn't find anywhere in the code where they were looking at the current feedback. |
|
#9
| ||||
| ||||
| I'vd been through this app note before also, and come to the same conclusions on the comparitor inputs as being unused. My conclusion was it used duty cycle only current control, and that it used a VS equal to the coil voltage of the motor, thus no chopping action on 100% currents. I can't say that I subscribe to free running async duty cycle variation as a good method to do microstepping.
__________________ Phil, Still too many interests, too many projects, and not enough time!!!!!!!! Vist my websites - http://pminmo.com & http://millpcbs.com |
|
#10
| |||
| |||
| I read that datasheets theorethical part but didnt the code itself. -these comparators interrupt so theres no need to check them. -duty cycles are picked from the duty cycle lookup table and only the full ON phase is switched to 50percent if the comparator interrupts. This is what should happen,but since i didnt read the code i cant say if they really wrote the code this way. |
| Sponsored Links |
|
#11
| ||||
| ||||
| Tracid, The code doesn't use the interrupts, they are never setup or enabled.
__________________ Phil, Still too many interests, too many projects, and not enough time!!!!!!!! Vist my websites - http://pminmo.com & http://millpcbs.com |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |