Video work modified ElmChan Dc Servo Controller http://depositfiles.com/en/files/tse...iles/tseutbpe8
Continue Subjects Russian UHU by Hudognik here, as this open project and i hope that who be else joined to modernizations Elm Chan servocontroller.
Present new variant scheme and code.
- Moved converter RS-232/UART from PCB into DataCable. USB/UART on FT232 - works, but bad. Better use RS232/UART.
- Added limit move Limit_L & Limit_R. Questioning of their condition through 20ms (for eliminating noise). If Limit are not used, that detail their chain possible not to install. Internal pull-ups resistors to all input are installed software in AtMega.
- Select type contact (Normally closed or normally open)
- Input EMERGENCY STOP (E-Stop) - it is actuated one temporarily enable Limit_L & Limit_R to condition “ServoError”.
- Output “ServoError”. Moves over to condition “ServoError” with simultaneous indication of this condition. Disable thereof conditions through Off-On power, unset on Reset or in ServoTuning push “Stop” or change the mode.
- Two steps of protection from unbalance of the positions. 1st. - at excess 20 000 steps immediately transition in condition “ServoError” . 2st. - on time - at excess 3 steps are included timer and if in current 15 seconds unbalance will not become less 3 steps, that transition in condition “ServoError”. If for 15 sec. unbalance will become less 3 steps, that timer reset.
- Sensing the condition encoder possible (as variant) on interruptions from internal comparator. On him and external entities VD2,VD3, R23-R25, R29 is made analog exclusive or (EOR). The differences in work I have not noticed (no high-resolution encoder), but theoretically she better (fast), than with questioning encoder on interruption from Timer0 (12mks).
- It is actuated WatchDog (period 38ms)
- Increased reliability of keeping data in EEPROM. For this: record of each parameter from ServoTuning is produced in 3 bytes located in miscellaneous area EEPROM. At power-up are read these 3 bytes, are then compared and if one of them is not others, that is produced rerecording the bad cell. This is repeated for all importances in EEPROM. When loading parameter from EEPROM in ServoTuning are read given only from one area (without checking for equality). After conservation and loading parameter address EEPROM is changed on address not containing data. After these change - I reset EEPROM did not observe.
I have done 4 variant Source Code: Servo_AtMega_TimerInt - for AtMega8, on Timer, Servo_AtMega_CompInt – for AtMega8, on comparator and such for AtMega88 - Servo_AtMega88_TimerInt and Servo_AtMega88_CompInt. The Code trims with interruptions from Timer0 possible to use as with scheme, which I shown earlier, so and new variant. With interruptions from comparator, only with new variant of the scheme. The Code trim with interruptions from compator I have checked only with AtMega88, with AtMega8 only partly, but guarantee on 95% that she will work.
When adjusting in ServoTuning importances for Your motor save in zero bank, as started with it.
Possible ways of the further improvement:
- Installing the quartz on 24МГц and change the program
- Use the hardware multiplying (only on AtMega)
- Change of time of the servo cycle with 1ms on more low importance
- Development PCB. Since I all change did on PCB, which shown earlier + with additional element with outboard montage.
Commentary in Source Code in russian language, but if it is necessary can translate one of the SourceCodes (for example).
What supply (motor voltage) are you using in the video? Looks like pretty low voltage.. How high of voltage have you tested?
The First engine usual DC Motor Brush - for test. He on 220V, but I felt from 130V. So maximum velocity on video 2500 RPM, under 220V he quicker.
The Second motor – servomotor (old – 1975 Y.), is installed on old tool, which I remake. The Engine on 110V, but I shall add a little more 130V (such beside me Power Source was got).
On tool with encoder 60 lines x 4 = 240 imp/rotation reaches velocities 4500mm/min (161 imp/mm => F=12 075kHz). Above - limit rotation motor.
Thanks for all this great info. I look forward to read more The video was really cool
Last edited by hesham morsy; 12-17-2008 at 06:14 AM.
Dear arisov77 can you give us PCB layout for yore board
ps : hot hot hot hot hot hot hot hot hot hot hot hot hot hot hot
That for Russia i m from Egypt the temperature is +20 to +12 and i m freezing
One more thing to ask on the Russian board their is a discussion about l298 Version any result ??
Last edited by hesham morsy; 12-28-2008 at 09:32 PM.
Happy New Year!
http://www.cnczone.com/forums/attach...9&d=1223011455, then I added the separate PCB current limit. The rest elements by outboard montage.
Last edited by arisov77; 01-02-2009 at 06:30 AM.
u don't share the source file of ATmega+l298 drive....can u please share the same.
Do I need to change the potentiometer with a quadrature encoder (mechanical resistive)?If yes will the code change with the encoder resolution?(what should be the encoder resolution I have to chose for 1024 position resolution)?Also could you please post the hex file and code for atmega8 with L298 motor driver.It will be very helpful
Please guide me Arisov.And thank you for sharing your project.
Last edited by youthreewire; 01-31-2009 at 12:18 AM. Reason: code request for L298
Arisov nice work - keep it up!