ThomasHeb / 2AxisLaserCutter

Arduino based CNC laser cutter with display and SD-Card
6 stars 2 forks source link

not working #4

Closed melodic16 closed 1 year ago

melodic16 commented 1 year ago

Hey Thomas,

this is my setup, as you can see on the monitor I already upload the sketch,, but nothing happen.

IMG_20230106_115308.jpg

if need more photos pls let me know.

ThomasHeb commented 1 year ago

Good morning! The display enclosure looks really good. I see on your picture, that you connected DIR-, ENA- and PUL- to GND on the Arduino. This should work. So I think, we should work through firmware and hardware to get the driver working.....

You will need the small button on the display next to the buzzer. you have a hole inside your enclosure. This button is the back button. The wheel on the display has a button, too.... this is the ok button.

Test 1: Moving the stepper from the display I am not sure, if you understood my operating procedure on the display, so please let me explain:

Sorry, it is complicated with only one wheel and two knobs. The stepper should move a bit..... IMG_0470

Test 2: Moving the stepper via gcode You can connect your laptop and start the Serial Monitor in the Arduino IDE. Select 115200 baud and the Com-Port (you will get a reset of the arduino... that is ok) Moving the Laser in the POSITION Menu should send "ok" over the Com-Port

You can send code commands via the Serial Monitor, too:

Test 3: Hardware

Test 4: Holding connect the motor to back to the driver, power everything up. are you able to turn the motors? At least, the motors should require much more force to rotate, while they are powered/controlled from the arduino.

Test 5: Settings can you upload the config.h and defaults.h file? best pack them in a zip and attach it here

P.S. how big do you plan your laser?..... I used the smallest NEMA17 motors ;o)

Best Regards Thomas

ThomasHeb commented 1 year ago

Hi, I checked your picture again. and it seems, that you connected the driver to the wrong "positions" on the Ramps 1.6 board. you need to use the positions which are marked with E0 and E1. Bildschirmfoto 2023-01-06 um 11 48 40 Bildschirmfoto 2023-01-06 um 11 49 34

Best Regards Thomas

melodic16 commented 1 year ago

Hello

Good morning! The display enclosure looks really good. I see on your picture, that you connected DIR-, ENA- and PUL- to GND on the Arduino. This should work. So I think, we should work through firmware and hardware to get the driver working.....

You will need the small button on the display next to the buzzer. you have a hole inside your enclosure. This button is the back button. The wheel on the display has a button, too.... this is the ok button.

Yes, I have that button maybe to small on the pic so it's like hole

Test 1: Moving the stepper from the display I am not sure, if you understood my operating procedure on the display, so please let me explain:

  • go to the POSITION menu, as on your picture
  • on the lower end of the display, you see: "> Set laser dot on/off"
  • turn the wheel to the right.... the text will disappear and you get a curser "^" under the Y-coordinates... see picture below.
  • keep turning until the curser is on the mm position.
  • press the wheel to select
  • turn the wheel to change the position value

Sorry, it is complicated with only one wheel and two knobs. The stepper should move a bit..... IMG_0470

Yes I understand and don't say sorry you are already helping me alot. I already try this but my motors not moving

Test 2: Moving the stepper via gcode You can connect your laptop and start the Serial Monitor in the Arduino IDE. Select 115200 baud and the Com-Port (you will get a reset of the arduino... that is ok) Moving the Laser in the POSITION Menu should send "ok" over the Com-Port

You can send code commands via the Serial Monitor, too:

  • G91 this sets to relative position mode
  • X1 this moves the X-Axis 1mm After each command you should get an "ok"

Ok I will try this

Test 3: Hardware

  • please check the GND connection to DIR-, ENA- and PUL- to GND from the Arduino GND
  • please check the supply voltage to the driver
  • please check the motor connections. remove the connector from the driver.... you should be able to turn the motor. connect A+ and A- from the motor, you should not be able to turn the motor anymore

Test 4: Holding connect the motor to back to the driver, power everything up. are you able to turn the motors? At least, the motors should require much more force to rotate, while they are powered/controlled from the arduino.

Test 5: Settings can you upload the config.h and defaults.h file? best pack them in a zip and attach it here

Ok

P.S. how big do you plan your laser?..... I used the smallest NEMA17 motors ;o)

I use nema34, it is quite big, the length of X axis is 5meters and Y axis is 2meters I am not add the laser yet, just want to see the axis work 1st

Best Regards Thomas

sorry about your 2nd comments, so I should connect the driver to X axis to E0 and Y axis to E1?

ThomasHeb commented 1 year ago

Good morning! X axis goes to E0, Y axis goes to E1.

Sorry this may be a bit confusing from the hardware connection perspective. This is a result of the shared code with the foam cutter. I am a bit afraid of changing the code, because I would need to do all the tests on both devices (laser and foam) again….. you know… never change a running system.

I would ask you to change the connection to E0 and E1.

You do not need to worry from the software side or from the gcode perspective. axis are controlled with X and Y and I did a successful test with light burn software, too.

Your dimensions are amazing. I would appreciate, if you share some pictures. All the best for your project.

Best Regards Thomas

melodic16 commented 1 year ago

Hello Thomas,

Good morning! X axis goes to E0, Y axis goes to E1.

and if I want add limit switch I put on the default location? IMG_20230109_112856.jpg

Sorry this may be a bit confusing from the hardware connection perspective. This is a result of the shared code with the foam cutter. I am a bit afraid of changing the code, because I would need to do all the tests on both devices (laser and foam) again….. you know… never change a running system.

I would ask you to change the connection to E0 and E1.

You do not need to worry from the software side or from the gcode perspective. axis are controlled with X and Y and I did a successful test with light burn software, too.

Done, okay now my motors working. But somehow its skipping step/stalling at the start and the end of the rotation. https://user-images.githubusercontent.com/122068445/211240495-84a9e661-aca4-405d-bc6a-c981f6cbfdd3.mp4 Sorry motor so rusty I am very newbie on this kind of thing here the setting of the driver IMG_20230109_111400.jpg

Your dimensions are amazing. I would appreciate, if you share some pictures. All the best for your project.

IMG_20230109_113305.jpg here you can see my project

Best Regards Thomas

thank you

melodic16 commented 1 year ago

Hello Thomas

I already fix the skipping step/stalling at the start and the end of the rotation. I put the wrong cable on the driver, my bad.

ThomasHeb commented 1 year ago

Hello,

for the Limit switches check out the Hardware chapter https://github.com/ThomasHeb/2AxisLaserCutter/tree/main/02_Hardware

The idea of the limit switches are to position the machine to a well defined 0,0 position. If you wand to use position switches also on the max, max positions, you need to connect them in series:

due to your machine dimensions I would recommend to use the 100nF capacitors as in section hardware shown. Maybe you need a shielded cable, too. connect shield to GND or - of the Arduino. But it is worth to do a test just with the 100nF.

Best Regards Thomas

melodic16 commented 1 year ago

Hi Thomas, sorry for late reply, I just work on another project.

I just add the 100nF IMG_20230124_091231.jpg

I operate the homing cycle, and if the limit switch triggered, arduino restarting. is that correct?

ThomasHeb commented 1 year ago

Helle, this is not correct. In homing cycles a Limit Switch should stop the motor and lead to some position movements. Please trigger the limit switch manually and check if your 5V is stable. if your board resets, you have a short circuit from 5V to GND somehow.

the limit switch should connect GND (-) to the signal line (S).

melodic16 commented 1 year ago

Hello

I am using this IMG_20230125_170039.jpg

IMG_20230125_170023.jpg

I try press manually the limit switch, the board restarted

ThomasHeb commented 1 year ago

Hello, I don't have these limit switch pcbs from makerbot here for testing. but never the less, the schematic should be like this. Bildschirmfoto 2023-01-25 um 17 24 24 with this wiring and connection on your board, you connect black to green, when triggering. this means + / - or 5V and GND are connected directly.... this causes the voltage drop and CPU will restart after releasing the limit switch (please do not do this, this may damage your voltage regulator on the arduino board).

these limit switches operate as normal open (NO).... the firmware requires NC. if you have a broken cable, NO limit switch would not detect a limit/trigger, because of that safety reason I only use (and implemented) NC.

you can modify your limit switches in two ways: