- Posts: 3410
- Thank you received: 0
7i96 and L298N Spindle
5 years 9 months ago #195311
by BigJohnT
7i96 and L298N Spindle was created by BigJohnT
Trying to figure out how to connect up a L298N to a 7i96 to control a spindle motor with PWM
The ENA pin with the jumper removed gets PWM, the IN1 and IN2 set the direction of rotation so one or the other have to be high.
https://i0.wp.com/electronicshobbyists.com/wp-content/uploads/2017/08/word-image-13.png?w=750
With the 7i96 set to PWM type 1 PWM on Out0 and Direction on Out1 how would I get reverse?
JT
The ENA pin with the jumper removed gets PWM, the IN1 and IN2 set the direction of rotation so one or the other have to be high.
https://i0.wp.com/electronicshobbyists.com/wp-content/uploads/2017/08/word-image-13.png?w=750
With the 7i96 set to PWM type 1 PWM on Out0 and Direction on Out1 how would I get reverse?
JT
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 4
5 years 9 months ago #195312
by tommylight
Replied by tommylight on topic 7i96 and L298N Spindle
Enable on the 298 to PWM on 7i76
in 1 to direction
in2 to inverted direction
in 1 to direction
in2 to inverted direction
Please Log in to join the conversation.
5 years 9 months ago #195315
by BigJohnT
Replied by BigJohnT on topic 7i96 and L298N Spindle
I'm not following you, PWM is on Step 4 and Direction is on Direction 4 pins on the 7i96. I'm assuming that the Dir 4 pin is on for one direction and off for the other. If I try and use an I/O pin they are 24vdc and would fry the L298N I think.
JT
JT
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 4
5 years 9 months ago #195316
by tommylight
Replied by tommylight on topic 7i96 and L298N Spindle
Thought you were using the 26 pin header for that.
A transistor and two resistors can do the inverting for the other pin, but that requires soldering and other parts.
A 7404 has 4 inverters.
Still i would use the 26 pin header for that and invert the signal in hal.
A transistor and two resistors can do the inverting for the other pin, but that requires soldering and other parts.
A 7404 has 4 inverters.
Still i would use the 26 pin header for that and invert the signal in hal.
Please Log in to join the conversation.
- tommylight
-
- Offline
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 4
5 years 9 months ago #195317
by tommylight
Replied by tommylight on topic 7i96 and L298N Spindle
A two resistor voltage divider can take care of lowering the voltage.BigJohnT wrote: If I try and use an I/O pin they are 24vdc and would fry the L298N I think.
JT
Please Log in to join the conversation.
5 years 9 months ago #195320
by PCW
Replied by PCW on topic 7i96 and L298N Spindle
The LM298 inputs are TTL level so
7I96 PWM (STEP4-) to LM298 ENABLE
7I96 DIR4+ to LM298 IN1
7I96 DIR4- to LM298 IN2
You will have to invert the PWM output polarity in hal
I would add a 1K or so series resistor in the LM298 control lines
so if the LM298 blows, you dont kill the 7I96 output chip
7I96 PWM (STEP4-) to LM298 ENABLE
7I96 DIR4+ to LM298 IN1
7I96 DIR4- to LM298 IN2
You will have to invert the PWM output polarity in hal
I would add a 1K or so series resistor in the LM298 control lines
so if the LM298 blows, you dont kill the 7I96 output chip
Please Log in to join the conversation.
Time to create page: 0.091 seconds
