currently at work will post it as soon as possible (when i get home)as well as a single layer pcb for attiny2312 also standalone for prototyping.Played with it yesterday and servo drive working good.Will post pics when done and currently busy building vb app for servo tuning of elm dc servo so that hyperterminal is not needed,but will use max232 for comms
Continue Subjects Russian UHU by Hudognik - CNCzone.com-The Largest Machinist Community on the net! 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).
How to change to +/- 1000 steps for 'Servo Error'? or better would be to be able to input in servo tunning how much we wanted ( from 0 to 32000 steps )
Not sure if there still people working or want to work with this, however the topic is still alive.
I have some (8) of these very nice design boards as left overs.
Professional made thruhole plated boards.
I would say 5 euro each, this included the little booster board.
have also the IRF540N + 620100 each 1,25 euro new
Tiny quarts 8 - 16 - or 20Mhz 0.75 new
This is a nonprofit sell just to cover my next project.
Send from Holland to any place as long as you cover the shipping costs.
I want to try to get this chip programmed and to work, but my knowledge for programming is terrible
I'm trying to get the atmega8a-au to work with this ( my old ) project
So what kind of X-tal can i use 8 or 16Mhz. and what program should i use
I use ponyprog with parallel isp, works well.
i found the mega8 files from older postings, after reading the asm i see that the basic file is compiled as 16mhz. i should use a 16Mhz x-tal?
yeah i need some help how to programm cause there are 2 hex files, and the fuses to set?
1 chip is lost by playing with wrong fuses.
( I can help with pcb's prototypes and small series. parts also obsolete parts)
its working fine up to about 200rpm then loose position, motor could do 3000rpm encoder is 200ppr. encoder with scope checked nice pulse on high speed.
the hex and eep from the first posting is used for the atmega8.
the tuning software does not work, no connection.
i used the max232 for rs232/uart.
could use some assist when someone have time??
I have built this servo board with ATmega48_20MHz_v3_5. Everything is working fine, except that I can´t connect with servotunning. Is it possible to get it work on Windows 7? I tried run serial port terminal and it looks alive, so the configuration should be OK. Black color is received from driver, pink is send to driver (attachment 1). If I try to connect to the servotunning, i get an error message (attachment 2). Any ideas what could be wrong?
I tried also the older version ATmega48_16MHz_v3_4, but no change.
Is it possible to tune the driver right from terminal? How should the command frame look like ?