Giter Club home page Giter Club logo

Comments (18)

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024 1

Thank you Terjeio. We reflashed it and it is working fine now. Not sure what the issue was before.

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

PWML6 B. I do not know what the pwm6l b is.

It is the Due MCU PWM timer/perihpheral used used to generate the pin output. The Mega map references OCR4C which I assume is a register, this does not exist in the Due MCU.

Possible solution Could I just take the mega map I have and open the due mega map delete it all and paste in the mega map I know works?

The Mega map from legacy Grbl? That cannot be used for the Due since the MCU register/pin designations are not the same.

When I test the driver PWM output is at pin 7 as it should, this is the same pin as used in the legacy Grbl map.
Which breakout board do you use?
And are you running legacy Grbl on the Mega board, not some other fork with a different map?

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

Pin 7 is a PWM output, not a simple on/off. The pulse width (and thus the measured voltage) is controlled by the S value.
S = 0 -> no output, S = $30 setting -> 100% output. Set $32=1 for laser mode. This will require cutting motion (G1/G2/G3) to turn the laser on.
Do you have a multimeter and thus can measure the output?

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

yes I do I can try all of this and send you results. For my software lightburn the s value is set for the max rpm. Which I have set at 10000. Maybe I am just not understanding something as I am not a coder just a guy that tinkers with stuff. $32 is set to 1. I can get a print out of my gcode settings if this would help. I can do any and all test you would like me to do. I even have an oscilloscope.

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

my $30-32 are all the same from the mega to the due

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

maybe I should just reflash it? Maybe I didn't flash it correctly.

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

I even have an oscilloscope.

Ok, then set $32 to 0 and check the output on the pin after enabling output with M3 and then sending different S-values. E.g. S5000 should result in a 50/50 duty-cycle square wave (assuming $30 is set to 10000). FYI the default $33 setting for grblHAL is 5000 Hz, IIRC legacy Grbl uses 1000 Hz - this might be an issue so best to leave it at 5000 Hz. Higher is often better when doing gray scale engraving since the laser power response time will typically decrease a bit.

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

maybe I should just reflash it? Maybe I didn't flash it correctly.

Since you can communicate with the board it is likely ok. What you should do is to check the $I output to validate that the board map is for the Mega. You can also check the pin assignments with the $pins command.

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

ok I did the pin out and it does not look like anything I understand sorry. I also did voltage test and it is at 3.3v on pin 7 just plugged into the computer and 3.3v with lightburn on.

[PIN:A.0,Probe]
[PIN:B.17,Reset]
[PIN:B.18,Feed hold]
[PIN:B.19,Cycle start]
[PIN:C.29,X limit min]
[PIN:D.7,Y limit min]
[PIN:D.8,Z limit min]
[PIN:A.15,X step]
[PIN:D.0,Y step]
[PIN:D.1,Z step]
[PIN:D.9,X dir]
[PIN:A.7,Y dir]
[PIN:D.10,Z dir]
[PIN:B.27,X enable]
[PIN:C.24,Spindle on]
[PIN:C.25,Spindle direction]
[PIN:C.22,Flood]
[PIN:C.21,Mist]
[PIN:A.8,RX,Primary UART]
[PIN:A.9,TX,Primary UART]
[PIN:C.23,Spindle PWM]

well now looking at the code I understand that spindle pwm is the pin 7 but I have power to it.

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

this is my welcome screen. I also tried the due with out any hat at all and still getting 3.3 v on pin 7

GrblHAL 1.1f ['$' or '$HELP' for help]
ok
[VER:1.1f.20231005:]
[OPT:VNMSL,35,1024,3,0]
Target buffer size found
[AXS:3:XYZ]
[NEWOPT:ENUMS,RT+,SED]
[FIRMWARE:grblHAL]
[NVS STORAGE:*FLASH]
[DRIVER:SAM3X8E]
[DRIVER VERSION:230926]
[BOARD:Mega 2560]
ok

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

even with the $32 set to 0 it is still giving me a 3.3v on the pin 7

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

I think I have it working now. I have to test in the laser tomorrow. The $32 can't be 10000. It did not give me a nice sign wave at all with it at that. So I put it to 1000 and it looks a lot better.

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

Nothing I tried worked. I am not sure why there is always power to this pin. I do know that my limit switches are normal closed as well and will not change to normally open. I am thinking I do not have the right config for some reason. I had a very had time flashing this to my due. I figured a lot out on the fly like having to adjust the file to only program the mega pin out instead of all of them. Is there a simple way for us tinker people to just pull the grblhal with the mega pin out only?

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

Nothing I tried worked. I am not sure why there is always power to this pin.

Perhaps a broken MCU then? I have managed to destroy a single pin a few times with different MCUs.

I am thinking I do not have the right config for some reason.

When I compile with the Mega map provided it works for me.

I figured a lot out on the fly like having to adjust the file to only program the mega pin out instead of all of them. Is there a simple way for us tinker people to just pull the grblhal with the mega pin out only?

Not really, it migh be easier to just write a short .ino (sketch) to test the pin?

You may try to measure the voltage with the reset button pressed - if I am not mistaken this should put the pin in high Z mode and if you pull the pin to ground with a resistor, say 1K or so, it should measure close to or 0V.

from sam3x8e.

enjoylife1024 avatar enjoylife1024 commented on September 26, 2024

THANK YOU AGAIN AS ALWAYS. I have a guy here at work that is going to help me diagnose this. I will show him what you suggested. I am not sure what it could be but we will diagnose this week and I will let you know what we found.

When I compile with the Mega map provided it works for me.
What I did was comment out all the other maps. I am not sure if this is what I should have done. I think maybe I did something wrong here. I did not do the web compiler.

from sam3x8e.

terjeio avatar terjeio commented on September 26, 2024

I can confirm that the pin goes high Z when the reset button is pressed. If you still get 3.3V on the pin when pulled down then the pin is destroyed (shorted to 3.3V). I get 0.15V when pulled down with 4K7 (reset pressed, suggesting the pin has a ~100K pullup internally) and 0V when grblHAL is running without enabling the spindle.

from sam3x8e.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.