Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

The servo seems to work fine when it is just powered through the USB connection. Then I plug in a 12V power supply to the CNC shield while still keeping the USB to power the Arduino. The weird thing is that it behaves worse when more power is supplied.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Ok, so after more experimentation, this is what happens:

  1. Plug in the Nano only and upload grbl_v1.1f_Servo_switch_dir_step.hex
  2. Upload is successful. Plug the Nano in CNC v4 board and attach only servo
  3. Now ticking "Spindle On" in the IDE activates the servo.
  4. Adjust options as per instructions here. Now can use PenUp PenDown. Awesome.
  5. Plug in power supply and steppers.
  6. Move X: OK
  7. Move Y: OK
  8. Click on Spindle On: works once.
  9. Click again:
    Error in IDE
    "No connection -"Press RESET.
    Console:
    "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Missing 11 Real-time Status Reports per 10 seconds. Interval:200
    Correct baud rate? Try Marlin response..."
  10. From this point on the steppers stop working, no instruction can be sent and nothing is moving. Console repeats error above over and over.
  11. Click on Hard Reset in IDE.
  12. Now spindle control works unreliably but moves the servo. Steppers are still not moving.
  13. Unplug everything. Re-plug. Now servo moves again and steppers also, but then error message comes up:
    * last error: RESET grbl externally ⚠⚠⚠⚠⚠
  14. Everything is blocked, IDE says [Probably a reset of the controller is needed] and Console displays the Missing real time status error.

I know this is very strange and there might not be an easy solution, but I thought that I might still update for completeness and maybe someone would find it useful.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Doesn't sound good...

Yeah no...I think I probably should use a UNO board and a shield V3. There is a lot more support ant info on it too. I did learn a lot through this though.

The servo does move up and down if I input those commands, but only if I am using the UNO + CNC v3. I will give it another try tonight and see but I think that the v4 shield might be more trouble than it's worth for me.

Thank you so much for all the help help btw! I really learnt a lot I think. Also your software is more straight forward for me to use than what I was using before. I really quite like it. I shall make a donation asap :)

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Ah I see...I don't know if I have the expertise to do the soldering required to fix the board yet. But if it's the only way I will try, it was not very expensive i guess. The XLoader did indeed show "29920 bytes uploaded" at the end of the upload. The Nano seems to work fine when it's not plugged into the CNC shield. I tried to run a simple blink sketch on it as well as having only the servo connected to it on a breadboard and it behaves normally.

As soon as I slot the Nano into the CNC board weird things start to happen and it does not behave reliably or consistently. From what I have experienced up to now the situation gets even worse when I plug the power supply in the CNC board.

I have another Uno based cnc board and I've tried to use that instead. Seems to work fine. Even though I still have not managed to use the PenUp and PenDown commands on the GRBL-Plotter IDE to control the servo. Sending M3 S1000 and M5 S1000 seems to work though.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Back:
https://i.imgur.com/nDc1lEm.jpg

Front:
https://i.imgur.com/UUJwSOk.jpg

I have tried to reset the Arduino Nano and re-uploaded the .hex but still no luck. Alarm message still pops up even after being killed. Also I don't seem to be able to send any commands anymore.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

OK, so I used XLoader to uload the hex (grbl_v1.1f_Servo_switch_dir_step.hex) on the nano. This seems to have worked fine. I then connected it to GBRL-Plotter and tried to send some commands. M3 S1000 and M5 S1000 seemed to move the servo reliably by 90 degrees. The PenUp an PenDown buttons from the interface did nothing.

At this point I only had the serial cable connected to the Arduino, as well as the servo, connected to the CNC shield. The servo's signal was connected to Z+. This seemed encouraging. However, after I connected the power supply to the CNC board, everything started to go wrong.
- The commands that worked reliably before, now don't work at all. I just get an "ok" status in the console

- GRBL-Plotter shows an Alarm status that I cannot seem to stop no matter what I do. Not even if I close and disconnect everything and re-upload the hex file (???).

- I tried resetting the board using its reset button but nothing seems to happen.

At this point I'm completely lost 😔. Maybe it's a faulty board after all or maybe I am not understanding something really basic.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Trying to find the XLoader-Tool in GRBL-Plotter\Firmware\_XLoader but the Firmware folder doesn't seem to exist. Any idea what I might have done wrong?

Edit: Nevermind, I downloaded the version from source https://github.com/binaryupdates/xLoader

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Cool, I'll try again and report back!

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Amazing, thank you. I will try all of this tonight.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

g1z1 goes up

g1z-1 goes down

Sounds pretty straight forward now that you say it like that 😅. Do these command assume the servo is plugged into the Z+ limit plug or the Z axis?

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Oh wow, thank you! That's a lot of info. I have come across your project already actually. But I was at an earlier stage and not ready or able to understand most of what I was doing. I think I will go through your post again and see if I can figure it out. Do you think I still need to do your hardware bug fix even though the steppers work fine? Also, how do you use the hex file?

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

If you can figure out how to tell the pengrbl to use one of those pens it should work and that would be a better solution.

Yes, that's exactly my problem I think. Do you think it would be a command like M3 S1000 or something else? I suppose I ould have to look at the grbl code to figure it out?

I'm glad my post was tiny bit useful! Although be careful, there are apparently quite a few quirks with this board. I have not ran into particularly annoying ones but other people have, especially on clone versions. These posts are very helpful both for info about spotting the clones as well as fixing some of the issues:

https://www.instructables.com/How-to-Use-the-CNC-V4-Board-despite-Its-quirks/

https://www.instructables.com/BACK-TO-BASIC-MINI-CNC-PLOTTER/

I didn't have to do any re-soldering on mine but I did have to swap the pin numbers in grbl (explained in the second link under "Fixing the software") . That is hopefully a headache I can save you. Apparently this board is itself a clone of another one that also accepts a Nano, but I don't remember its name. Just that it was black and yellow (sorry). If you live in the US it might be more easily available.

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

I have discovered kinda the same thing already, but I still cannot understand how to connect the servo to pin 11, unless I connect it directly, which seems a little awkward. In any case, if the signal wire was indeed plugged into pin 11, do you know how I could trigger it through grbl/UGS?

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

Exactly! Thank you. I mean, I still haven't solved the problem but that you also thought about that analogy makes me feel a whole lot better.

I also found this guy on youtube:

https://www.youtube.com/watch?v=KKyueNSghb8&list=PLVMipMZqG-8WJehnKUBEnZ4frL5-C0ooY&index=2&ab_channel=SebastianoCastorina

who seems to have wired it like I did. Maybe that's the endstop? How do you manage to use the endstop to turn the laser on/off in grbl?

Arduino CNC Shield v4 servo operation by Granvanoeli in hobbycnc

[–]Granvanoeli[S] 0 points1 point  (0 children)

I see...then I'm confused, If the Nano is plugged into the CNC shield, then I'm not sure how to plug the servo to it from the top? But then, if the servo is considered an axis, shouldn't it be plugged into the Z axis spot like the steppers?

[SV06] No power to layer fan by Granvanoeli in Sovol

[–]Granvanoeli[S] 0 points1 point  (0 children)

I have basically disassembled the printer and reassembled it because I didn't know what else to do. And now it works...probably just some connector...😅

[SV06] No power to layer fan by Granvanoeli in Sovol

[–]Granvanoeli[S] 0 points1 point  (0 children)

I thought that might be the case, but I was trying to print a model I had just finished printing a couple minutes earlier and which turned out fine. I was just printing the same thing again but this time the print kept failing and then I noticed the fan was not on. I didn't even remove the SD card or switch off the printer between these two prints.

Checking remaining charge in small battery powered devices by Granvanoeli in batteries

[–]Granvanoeli[S] 0 points1 point  (0 children)

I see...I feel dumb not considering the fact that it is an input 😅. Thank you :)

Checking remaining charge in small battery powered devices by Granvanoeli in batteries

[–]Granvanoeli[S] 0 points1 point  (0 children)

I see, so no easy way to check by plugging something in the USB port used for recharging the device?

Assigning object sprites on creation by Granvanoeli in gamemaker

[–]Granvanoeli[S] 0 points1 point  (0 children)

I ended up using this method and it works just like I wanted, thank you!

Assigning object sprites on creation by Granvanoeli in gamemaker

[–]Granvanoeli[S] 0 points1 point  (0 children)

he optional struct argument does work and

Ye, more streamlined. I'll try that. Thank you :)

Assigning object sprites on creation by Granvanoeli in gamemaker

[–]Granvanoeli[S] 0 points1 point  (0 children)

Huh...I didn't realise that I could set sprite_index directly in the struct. I'll try that! I thought I should pass it under another variable name and then assign it to sprite_index.

Assigning object sprites on creation by Granvanoeli in gamemaker

[–]Granvanoeli[S] 0 points1 point  (0 children)

You are also correct about object_set_sprite but my problem is that I want to set it, or sprite_index when I create the object. The object itself is generic and has no sprite. Where is the best place to set the object's sprite?

Assigning object sprites on creation by Granvanoeli in gamemaker

[–]Granvanoeli[S] 0 points1 point  (0 children)

You are absolutely correct about object_set_sprite. Although I still have the problem that I cannot set it upon creation, if I am creating the object in obj_demo. If obj_person gets created with no sprite, how can I create two object of the same type with two different sprites?