Home › Forums › TinyG › TinyG Support › External stepper step pulse width
Tagged: pwm external motor4
- This topic has 5 replies, 3 voices, and was last updated 4 years, 4 months ago by pereira.newton@ymail.com.
-
AuthorPosts
-
November 23, 2018 at 2:23 pm #11204dscherbarthMember
Hi,
I am using a tinyg to drive external stepper drivers that have a required minimum pulse width of 2.5 uS. Motor 1,2 and 3 (mapped to x,y and z) all work fine, motor 4 (mapped to A) does not seem to drive the stepper. i am converting the 3.3v tinyg outputs to low impedance 5v since the steppers have opto isolated inputs that need 5 ma at 5v.
When I scope the tinyg outputs, 1,2 and 3 all have a pulse width of about 2.6 uS but 4 has a pulse that is only about 1.6 uS wide. Any thoughts on why/what i can do to increase the width by configuration or do I need to add some pulse stretching to the level conversion.
tinyg configuration below.
Thanks
Doug[fb] firmware build 440.20
[fv] firmware version 0.97
[hp] hardware platform 1.00
[hv] hardware version 8.00
[id] TinyG ID 5W3249-PJM
[ja] junction acceleration 100000 mm
[ct] chordal tolerance 0.0100 mm
[sl] soft limit enable 0
[st] switch type 1 [0=NO,1=NC]
[mt] motor idle timeout 2.00 Sec
[ej] enable json mode 0 [0=text,1=JSON]
[jv] json verbosity 2 [0=silent,1=footer,2=messages,3=configs,4=l]
[js] json serialize style 1 [0=relaxed,1=strict]
[tv] text verbosity 1 [0=silent,1=verbose]
[qv] queue report verbosity 1 [0=off,1=single,2=triple]
[sv] status report verbosity 1 [0=off,1=filtered,2=verbose]
[si] status interval 250 ms
[ec] expand LF to CRLF on TX 0 [0=off,1=on]
[ee] enable echo 0 [0=off,1=on]
[ex] enable flow control 2 [0=off,1=XON/XOFF, 2=RTS/CTS]
[baud] USB baud rate 5 [1=9600,2=19200,3=38400,4=57600,5=115200,6=]
[net] network mode 0 [0=master]
[gpl] default gcode plane 0 [0=G17,1=G18,2=G19]
[gun] default gcode units mode 1 [0=G20,1=G21]
[gco] default gcode coord system 1 [1-6 (G54-G59)]
[gpa] default gcode path control 2 [0=G61,1=G61.1,2=G64]
[gdi] default gcode distance mode 0 [0=G90,1=G91]
[1ma] m1 map to axis 0 [0=X,1=Y,2=Z…]
[1sa] m1 step angle 1.800 deg
[1tr] m1 travel per revolution 5.0000 mm
[1mi] m1 microsteps 2 [1,2,4,8]
[1po] m1 polarity 1 [0=normal,1=reverse]
[1pm] m1 power management 2 [0=disabled,1=always on,2=in cycle,3=when m]
[2ma] m2 map to axis 1 [0=X,1=Y,2=Z…]
[2sa] m2 step angle 1.800 deg
[2tr] m2 travel per revolution 5.0000 mm
[2mi] m2 microsteps 2 [1,2,4,8]
[2po] m2 polarity 1 [0=normal,1=reverse]
[2pm] m2 power management 2 [0=disabled,1=always on,2=in cycle,3=when m]
[3ma] m3 map to axis 2 [0=X,1=Y,2=Z…]
[3sa] m3 step angle 1.800 deg
[3tr] m3 travel per revolution 4.0000 mm
[3mi] m3 microsteps 2 [1,2,4,8]
[3po] m3 polarity 1 [0=normal,1=reverse]
[3pm] m3 power management 2 [0=disabled,1=always on,2=in cycle,3=when m]
[4ma] m4 map to axis 3 [0=X,1=Y,2=Z…]
[4sa] m4 step angle 1.800 deg
[4tr] m4 travel per revolution 5.0000 mm
[4mi] m4 microsteps 2 [1,2,4,8]
[4po] m4 polarity 1 [0=normal,1=reverse]
[4pm] m4 power management 2 [0=disabled,1=always on,2=in cycle,3=when m]
[xam] x axis mode 1 [standard]
[xvm] x velocity maximum 6000 mm/min
[xfr] x feedrate maximum 6000 mm/min
[xtn] x travel minimum 0.000 mm
[xtm] x travel maximum 575.000 mm
[xjm] x jerk maximum 35 mm/min^3 * 1 million
[xjh] x jerk homing 40 mm/min^3 * 1 million
[xjd] x junction deviation 0.0500 mm (larger is faster)
[xsn] x switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[xsx] x switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[xsv] x search velocity 500 mm/min
[xlv] x latch velocity 100 mm/min
[xlb] x latch backoff 5.000 mm
[xzb] x zero backoff 1.000 mm
[yam] y axis mode 1 [standard]
[yvm] y velocity maximum 7000 mm/min
[yfr] y feedrate maximum 7000 mm/min
[ytn] y travel minimum 0.000 mm
[ytm] y travel maximum 360.000 mm
[yjm] y jerk maximum 45 mm/min^3 * 1 million
[yjh] y jerk homing 40 mm/min^3 * 1 million
[yjd] y junction deviation 0.0500 mm (larger is faster)
[ysn] y switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[ysx] y switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[ysv] y search velocity 500 mm/min
[ylv] y latch velocity 100 mm/min
[ylb] y latch backoff 5.000 mm
[yzb] y zero backoff 1.000 mm
[zam] z axis mode 1 [standard]
[zvm] z velocity maximum 5000 mm/min
[zfr] z feedrate maximum 5000 mm/min
[ztn] z travel minimum -120.000 mm
[ztm] z travel maximum 0.000 mm
[zjm] z jerk maximum 40 mm/min^3 * 1 million
[zjh] z jerk homing 40 mm/min^3 * 1 million
[zjd] z junction deviation 0.0500 mm (larger is faster)
[zsn] z switch min 0 [0=off,1=homing,2=limit,3=limit+homing]
[zsx] z switch max 1 [0=off,1=homing,2=limit,3=limit+homing]
[zsv] z search velocity 400 mm/min
[zlv] z latch velocity 100 mm/min
[zlb] z latch backoff 5.000 mm
[zzb] z zero backoff 1.000 mm
[aam] a axis mode 1 [standard]
[avm] a velocity maximum 3000 deg/min
[afr] a feedrate maximum 3000 deg/min
[atn] a travel minimum 0.000 deg
[atm] a travel maximum 500.000 deg
[ajm] a jerk maximum 40 deg/min^3 * 1 million
[ajh] a jerk homing 40 deg/min^3 * 1 million
[ajd] a junction deviation 0.0500 deg (larger is faster)
[ara] a radius value 0.1989 deg
[asn] a switch min 1 [0=off,1=homing,2=limit,3=limit+homing]
[asx] a switch max 0 [0=off,1=homing,2=limit,3=limit+homing]
[asv] a search velocity 600 deg/min
[alv] a latch velocity 100 deg/min
[alb] a latch backoff 5.000 deg
[azb] a zero backoff 2.000 deg
[bam] b axis mode 0 [disabled]
[bvm] b velocity maximum 3600 deg/min
[bfr] b feedrate maximum 3600 deg/min
[btn] b travel minimum -1.000 deg
[btm] b travel maximum -1.000 deg
[bjm] b jerk maximum 20 deg/min^3 * 1 million
[bjd] b junction deviation 0.0500 deg (larger is faster)
[bra] b radius value 1.0000 deg
[cam] c axis mode 0 [disabled]
[cvm] c velocity maximum 3600 deg/min
[cfr] c feedrate maximum 3600 deg/min
[ctn] c travel minimum -1.000 deg
[ctm] c travel maximum -1.000 deg
[cjm] c jerk maximum 20 deg/min^3 * 1 million
[cjd] c junction deviation 0.0500 deg (larger is faster)
[cra] c radius value 1.0000 deg
[p1frq] pwm frequency 2500 Hz
[p1csl] pwm cw speed lo 1000 RPM
[p1csh] pwm cw speed hi 2000 RPM
[p1cpl] pwm cw phase lo 0.010 [0..1]
[p1cph] pwm cw phase hi 0.990 [0..1]
[p1wsl] pwm ccw speed lo 1000 RPM
[p1wsh] pwm ccw speed hi 2000 RPM
[p1wpl] pwm ccw phase lo 0.010 [0..1]
[p1wph] pwm ccw phase hi 0.990 [0..1]
[p1pof] pwm phase off 0.000 [0..1]November 24, 2018 at 5:08 am #11207cmcgrath5035ModeratorHere is an old thread on similar topic
TinyG with external drivers: J19 (motor3) and J20 (motor 4) don't work
It confirms your observations, not clear if the build parameter tweaks identified actually yielded a working solution.
You could try tinyG Edge build, available here:
http://synthetos.github.io/binaries/tinyg-edge-449.01.hex
Not clear that 449.01 would help here, but does represent the most up to date tweaks in various areas of the code.
- This reply was modified 5 years, 11 months ago by cmcgrath5035.
- This reply was modified 5 years, 11 months ago by cmcgrath5035.
November 24, 2018 at 7:31 am #11210dscherbarthMemberThanks for the thread link, that does look like what i am seeing. I am now at 449.01 and re-configured, but the motor 4 pulse width has not changed.. I’m not sure i like th spinning delay solution, but i may mess with some coding changes. Can you point me to build instructions for this platform?
November 25, 2018 at 9:17 am #11211cmcgrath5035ModeratorNovember 26, 2018 at 12:35 pm #11212dscherbarthMemberYes! Thanks
I decided to try the latest Atmel studio (7.0). Builds and simulates, i’ll let you know how the load/debug on the tinyg goes.
July 18, 2020 at 8:55 am #11845pereira.newton@ymail.comParticipantHi @dscherbarth,
Please can you let me know if you were successful?
Im facing the same issue where J20 doesn’t seem to be working while the rest are working.
I will give build 449.01.hex a try, but not sure it would work based on your experience.
If you can share the code changes you have done to get this working or even the hex file that I can upload into my Tinyg it would be really helpful.
Looking forward to your response.
-
AuthorPosts
- You must be logged in to reply to this topic.