-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attiny85 pins #41
Comments
OPTION 1: Motor pwm1 and pwm2 go to In1 and in2 signals of an h-bridge (which is supposed to be enabled). OPTION 2: Alternately, you could use in1/in2 pins for direction and a single PWM signal on the enable pin.
Encoders have two signals so not only steps can be measured (angle) but also the direction of it (sign). |
should there be a resistor somewhere beween the encoder pins and the attiny85? |
Check this video:
https://m.youtube.com/watch?v=a55EwMSIy2w
…On 4 Jan 2018 03:21, "pbbob" ***@***.***> wrote:
how do i determine the pinouts for a 6 pin encoder?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACPMY-ztArf_mFgTh53Z8qIIrcfA8_OWks5tHDW3gaJpZM4RRBAR>
.
|
I strongly recommend to tune and setup your encoder+motor driver using
arduino first and only when fully working and pid id ntified, upload the
final version to attiny. Due to lack of pins on the package, re-programming
is quite painfull and you will have to use 12V reset every time.
These days you can get full arduino nano board for pennies from China that
saves a lot of headache comparing to attiny...
…On 4 Jan 2018 04:53, "pbbob" ***@***.***> wrote:
should there be a resistor somewhere beween the encoder pins and the
attiny85?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACPMY5NzcLbleqOwJlfDWoxFnZV9p3I7ks5tHEscgaJpZM4RRBAR>
.
|
what is the best h bridge to use, and also, where can i find a good tutorial on how to use h bridges/how they work? |
@misan "Encoders have two signals so not only steps can be measured (angle) but also the direction of it (sign)" |
Have a look at these blog entries
http://www.modularcircuits.com/blog/articles/h-bridge-secrets/h-bridges-the-basics/
…On Thu, Jan 4, 2018 at 4:40 PM, pbbob ***@***.***> wrote:
what is the best h bridge to use, and also, where can i find a good
tutorial on how to use h bridges/how they work?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAccyE-t45pYuwLLqpXRKHY8sCqW3dXoks5tHPDngaJpZM4RRBAR>
.
|
No matter how careful you are, there are two cables that can be inverted:
DC motor power wires
Encoder AB wires
My advice is to connect them first at random and check if servo seems to
want to keep the motor shaft at the original location (it fights you back
if you try to move the shaft by hand). If that is the case, then please
write down the right color/signal for each pin.
But 50% of the time following the above advice will lead you to your motor
rotating full-throttle and never stopping. This is because there encoder
and motor are not in phase. Simpler solution? just swap motor cables. And
now you should see the servo works (if not there are some problems with
your hardware).
…On Thu, Jan 4, 2018 at 5:52 PM, pbbob ***@***.***> wrote:
@misan <https://github.com/misan> "Encoders have two signals so not only
steps can be measured (angle) but also the direction of it (sign)"
when connecting encoder a and encoder b to the attiny(or arduino)am i
correct that it doesnt matter which encoder is connected to atttiny 3 -
encoder A and attiny 4 - encoder B?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAccyCatU8zQvif8PwRN1rO7ObQgEgj0ks5tHQHJgaJpZM4RRBAR>
.
|
@misan so it is okay, or not okay for the dc motor power wires and the encoder ab wires to be inverted? |
You need to figure that out. It depends on the motor.
…On Thu, Jan 4, 2018 at 9:52 PM, pbbob ***@***.***> wrote:
@misan <https://github.com/misan> so it is okay, or not okay for the dc
motor power wires and the encoder ab wires to be inverted?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAccyC8mZGkAnQVQqKbE9m8vf1J7TAB4ks5tHTn7gaJpZM4RRBAR>
.
|
does motorpwm1 and 2 go to the h bridge? also, how do i get the P, I, and D values for tuning? why are there 2 encoders(a and b)?
The text was updated successfully, but these errors were encountered: