emcoturn 120 / 220 tool turret hal outputs

More
31 Jul 2019 18:25 #141024 by Erikcnc

Did you look at the pin and parameter list from my previous post?
That has the correct names

(its much easier to list the actual names and copy/paste them into the hal file rather than attempt to type them in correctly)


yep, it was a typo. a _ instead of a -

so i was getting the error that hm2_7i76e.0.pwmgen.00.enable al; ready was linked to Xen
i thought tis was the right one and it works. can you confirm?
net pwmgen_value hm2_7i76e.0.pwmgen.00.enable <= emcochanger.setpwm

to
net pwmgen_value hm2_7i76e.0.pwmgen.00.value <= emcochanger.setpwm

now its time to connect the L298n to the dir + and Step + right?

finger crossed for no magic smoke

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

More
31 Jul 2019 18:50 - 31 Jul 2019 18:51 #141027 by PCW
Umm I would not connect _ANYTHING_ until you verify
that the idle states of the pins (before LinuxCNC starts)
and PWM polarity are correct.

And even then, power the LM298 from a low voltage current limited supply
Last edit: 31 Jul 2019 18:51 by PCW.
The following user(s) said Thank You: Erikcnc

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

More
31 Jul 2019 18:54 - 31 Jul 2019 18:56 #141028 by Erikcnc

Umm I would not connect _ANYTHING_ until you verify
that the idle states of the pins (before LinuxCNC starts)
and PWM polarity are correct.

And even then, power the LM298 from a low voltage current limited supply


hmm okay...i already wirred it though..nothing weird happend yet. board runs from 24v and its active.
so, what is your advice to messure this?

i can try to run the L298n from 12v first
Last edit: 31 Jul 2019 18:56 by Erikcnc.

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

More
31 Jul 2019 19:02 - 31 Jul 2019 19:05 #141029 by PCW
1. What is the active polarity of the LM298 inputs? (the idle state must be the inactive state)
2. You can measure the idle state of the output pins with a voltmeter
3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)
4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal
Last edit: 31 Jul 2019 19:05 by PCW.
The following user(s) said Thank You: Erikcnc

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

More
31 Jul 2019 19:16 #141030 by Erikcnc

1. What is the active polarity of the LM298 inputs? (the idle state must be the inactive state)
2. You can measure the idle state of the output pins with a voltmeter
3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)
4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal



allright, the story continues


i messured the step and dir outputs before linuxcnc started/
i am reading 5v from them.

for the L298n, dont know where to start.

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

More
31 Jul 2019 19:30 #141032 by PCW
Note: there are 2 outputs per signal (STEP+ and STEP-, DIR+ and DIR-)
The - pins should be in a low state before LinuxCNC starts
The following user(s) said Thank You: Erikcnc

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

More
31 Jul 2019 19:48 - 31 Jul 2019 19:56 #141033 by Erikcnc

Note: there are 2 outputs per signal (STEP+ and STEP-, DIR+ and DIR-)
The - pins should be in a low state before LinuxCNC starts


measured between ground and step- / dir- and reading 0v

about the connection.
in the video on youtube, he has connect IN1 and IN2 to step+ and Dir+
I dont know where the pwm (ENA) goes. Not to the mesa board though. i could set it to 5v with a jumper.
Last edit: 31 Jul 2019 19:56 by Erikcnc.

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

More
31 Jul 2019 20:32 #141037 by Erikcnc
I checked the 5v outputs in my version of the L298n board.
also this one doesn't give 5v if the voltage is above 12v.

so i will use the V5 power from the mesa to enable the ENA pin on the motor driver board.

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

More
01 Aug 2019 09:07 - 01 Aug 2019 10:50 #141082 by Erikcnc
My apologies if i sounding dumb. I just want to have this right, and done. And, i don't do this daily. Machining is my day job.

1. What is the active polarity of the LM298 inputs? (the idle state must be the inactive state)


So, i dont understand this correctly (English is not my main language).

What i know, from the schematics, is that if both IN1 and IN2 are low or high, the motor is standing still.
If one of those pins are high, the motor will rotate CW or CCW.
The ENA pin controlles the speed of the motor. In this case i will set 5v (max rpm) to this pin. It is not controlled in this case.

2. You can measure the idle state of the output pins with a voltmeter


I think i have done this right.....

3. You can measure the PWM % with a voltmeter also (the step/dir pins should be at 2.5V at 50%PWM)


How do i know its at 50%?

4. If I assume the LM298 inputs are active high you will want to use the negative step/dir pins and invert those pins in hal


And i invert the pins by change the output-type in hal?


Thanks for all the afford and support. I really appreciate it.
Last edit: 01 Aug 2019 10:50 by Erikcnc.

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

More
01 Aug 2019 13:08 #141103 by PCW
OK change of plans... if PWM on the enable signal is what you want, then

Set the PWM output type to 1

connect IN1 to DIR+
connect IN2 to DIR-
connect ENA to STEP-

invert the step pin (now PWMgen out0)

How you invert the PWMGen depends on the LinuxCNC version
What version are you running?
The following user(s) said Thank You: Erikcnc

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

Time to create page: 0.161 seconds
Powered by Kunena Forum