1 Attachment(s)
I2C 8+8 expander with extra features
This project, based on pic16F876, was born as a simple 8+8 IOs expander because in industrial automation IOs are like bread.
Recently I have been requested to project a precision positioning machine with 3 axis and a spindle all driven with closed loop ac servo system (SanyoDenki)
I came to the conclusion that it was the right time to add extra features to the expander, in order to have a multi-purpose device, that I could also use for future applications.
I am posting, for sharing with the forum members and guests, a zipped file which contains the following:
8+8 IO expander.pdf (user manual & schematics)
I2C_Expander_2.hex (I2C address device # 2)
I2C_Expander_3.hex (I2C address device # 3)
I2C_Expander_4.hex (I2C address device # 4)
Hope you will find it useful
Al.
1 Attachment(s)
Improved triangolar profile
The profile algorithm transforms the travel command (steps) into three vector quantities:
Vector A Acceleration from rest to fixed speed (vector slope defined by ramp)
Vector B travel at fixed speed from end of vector A to begining of vector C
Vector C Deceleration from fixed speed to rest at target point (Vector A inverted)
This technique is known as "TRAPEZOIDAL PROFILE".
When the travel command is equal or less than vector A + vector B
the algorithm convert the trapezoidal profile into "TRIANGULAR PROFILE"
calculating new vectors A & B with different slopes as function of the given travel command
For small travel command (few steps) the algorithm was yielding incorrect sharp slopes that
could stall the motor if requested to turn at high speed.
The bug has been found and removed!
Now the motor turns smootly also with few steps travel command at high speed setting.
The new version software (IO_Expander_new) is attached, as a zipped file, to this post.