7i96 and L298N Spindle

More
14 Jan 2021 12:48 - 14 Jan 2021 13:23 #195311 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
Last edit: 14 Jan 2021 13:23 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
14 Jan 2021 13:29 #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

Please Log in or Create an account to join the conversation.

More
14 Jan 2021 13:55 #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

Please Log in or Create an account to join the conversation.

More
14 Jan 2021 14:12 #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.

Please Log in or Create an account to join the conversation.

More
14 Jan 2021 14:13 #195317 by tommylight
Replied by tommylight on topic 7i96 and L298N Spindle

If I try and use an I/O pin they are 24vdc and would fry the L298N I think.

JT

A two resistor voltage divider can take care of lowering the voltage.

Please Log in or Create an account to join the conversation.

More
14 Jan 2021 14:59 - 14 Jan 2021 15:01 #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
Last edit: 14 Jan 2021 15:01 by PCW.
The following user(s) said Thank You: BigJohnT, tommylight

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.111 seconds
Powered by Kunena Forum