Total Novice wanting to make a start

Hi Folks…
I feel I need to apologies in advance for firstly my total inexperience and second not knowing the correct terms to use… but trusting that at some stage we were all novices (so be gentle) but here goes…

My goal…
I want to move a camera along a C Channel section …approx. 1500mm long. I have the carriage built and have the stepper motor, and a MKS DLC V2.0 (I also have MKS SGEN_L V1.0 and a few Raspberry Pi’s which I am sure are an overkill for a simple x axis single movement operation I am looking for)
I don’t know if it is relevant but I work on Mac. not PC
I would like someone to point me in a direction to find some tutorials for absolute beginners. I don’t even know what program (I think it would be a GBRL) to download and even plug in the board. I need to have the camera slide along the channel, hit a limit switch and either return until it meets the other limit switch…It is critical to me that I am able to control the speed with precision.
If you have got this far reading and not fallen off your chair laughing I thank you…
Any Ideas?
Regards
John Marc

1 Like

A few questions to get started… This will help understand whether you are really asking what is the easiest way to connect this to a computer and pretend you have a weird one-dimensional 3d printer that doesn’t print, or want to learn how to program something more specific to your purpose.

Is it critical that it be controlled by two limit switches, or is one limit switch at the starting position and run a known length sufficient? Do you want to move the limit switches to set different limits without making any other change?

Do you have programming skills?

Is this just a task you want to complete, or is this an excuse to learn more? :slightly_smiling_face:

1 Like

Thank you for coming back to me , Okay so I am one of those horrible people that absolutely wants to learn everything there is to know about everything. Ultimately I want to build a number of projects, but the leaning is almost as important to me as the finished project.

This project is simply wanting to move my camera along a track (it is the Obspot self tracking) so the only movement I am looking for is to move it along the track (the C Channel extrusion which I already have constructed with the belt and stepper motor) wanting to be able to repeat the exact same shot (ie. repeat the exact same motion) moving the carriage (supporting the camera) from left to right and back again controlling the time it takes and of course the extent of the movement. Having said that yes your one limit switch suggestion (which I assume would be the home position) is of course more than adequate…
The limit switch would be in a fixed position (ie. I assume that would be homing or starting point)
I have (albeit very limited) programming skills.
Lastly definatly an excuse (or starting point) to learn a heck of a lot more…

Learning through doing is great. Not horrible.

As long as you don’t want to do this by moving limit switches, it’s easy enough to pretend that this is a 3D printer X axis and write gcode that commands the motions you want. You could send commands like this from a “gcode sender” program on a computer connected to the DLC you bought:

G28 X
G0 X0
G1 F1500 X1400
G1 X0

Translated:

  • Home the X axis (your stepper hooked up to the X axis, and your home position limit switch connected to the X axis min limit switch
  • Go to the X0 location as fast as allowed by machine settings
  • Go to 1.4 meters at 1500mm/minute (as modified by maximum acceleration and “jerk” settings)
  • Go back to X0 at the same speed set in the previous command

If you want to program this so that you are instead pushing a button to move, you would need to learn more. We can give pointers there, too!

1 Like

Wow yes thanks for that, but the very basics (and I did warn you) I am talking about is what program do I download to connect to my MKS DLS V2.0… am I connecting to my laptop through the printer port cable on the board and then naturally the USB on my Mac

There are a lot of them. Universal Gcode Sender is one that is widely used.

1 Like

There’s some stuff to do in between, like setting the proper steps/mm settings for the belts and pulleys you are using, and tuning acceleration parameters. That’s basically the same as any 3d printer.

yup thanks …comp busy downloading will connect up (tomorrow at workshop…I am in South Africa so calling it a day) and see where I go from there. Thanks so much for your help so far…

Refreshing my memory… I believe that board uses Grbl_Esp32. You’ll want to look at the settings. I think that the Grbl_Esp32 settings are documented here:

I see that it uses $HX instead of G28 X to home the X axis.

It also means that you don’t actually need to use a sender like Universal Gcode Sender — it has a web server built in. I don’t know whether these general instructions will help with the board you have: GRBL settings – MakerFr

Anyway, you’ll at least need to set:

  • X/StepsPerMm ($100) should be steps per revolution times number of teeth on driving gear divided by number of mm per tooth
  • X/MaxRate ($110) you can set to the fastest rate in mm/sec you want it to travel, regardless of what commands you send
  • X/Acceleration ($120) you will want to play with — I’d say to start, put the heaviest load you plan to support, increase it until attempting to move it causes bad noises and incomplete movement (missed steps), then set it to half that amount. But chances are good that something like 1000 will be fine.
  • X/MaxTravel ($130) gives you a virtual endstop at the far end from where you homed to.
  • X/Current/Run ($140) depends on the stepper motor you have
  • X/Current/Hold ($150) can be less; typically half or less of X/Current/Run
  • X/Microsteps ($160) you almost certainly want the default 16
  • Sta/SSID is your WiFi network name
  • Sta/Password is your WiFi password

Some of those assume you have trinamic stepper drivers. You want those for this application.

Is an ATmega328 based board, no WiFi and the Link above is not for this chip: try

Oh, I was not paying enough attention.

@johnmarc100@easytarget has this right. I read DLC V2 as DLC32 :sob:

That’s the original grbl, so all those readable names for configuration values aren’t available, and you will need the gcode sender you downloaded.

You’ll want to see what version of grbl is installed on it and use the corresponding configuration documentation in the grbl wiki:

I dont see any mention of how fast/slow you want the camera to be moving. Be aware that if you are using GRBL to do the movement it has issues at very low speeds: 0.9i - Min feedrate appears to be around 40-45mm/min · Issue #742 · grbl/grbl · GitHub

There are ways to mitigate this (raise microstepping, disable adaptive smoothing, as discussed in the issue) but if you are looking to do time-lapses you may need a different approach.

edit: The easy workaround is to generate GCode that makes each step of the movement for you with a pause (dwell) between each new position that matches your framerate. It should be easy to write a script (python?) that can generate such a gcode file.

1 Like

If you have a handful of components and you want to do something clever with them and learn microcontroller programming and control while doing it then ignore this message.

Otherwise, I think that this project may benefit from a little bit more thought about the desired outcomes and the constraints. The requirements from the construct seem pretty simple: travel along a track at a constant speed carrying a small payload and return or stop at the end of the track.

Have you thought of using a variable speed DC motor or servo to drive a carriage that is fitted with the limit switches? No need for GRBL or GCODE belts or even microcontrollers or computers. DC motors are cheap and relatively easy to control. The length of travel can be adjusted by adjusting the position of physical stops along the track, so you can have a 2m track and only use a small part of it, or you can daisy chain sections of track to increase the distance of travel.

Happy building!

1 Like

@NotTheMama, was thinking the same way.
A basic track, motor, and end stops are the simplest.

Next up is the same idea but with more control.

  • A linear track
  • A stepper or RC servo motor
  • Stepper driver
  • Ardu something u-processor
  • Power supply
  • Firmware. This is simple enough to be a great way to start programming
  • This would also teach some of the same fundamentals used in most CNC applications

I look here first for the mechs for this kind of thing:

They provide step files for their parts wich makes CAD modeling easier.

2 Likes

@donkjr , @johnmarc100 , @mcdanlj

Some years ago I built an obstacle avoidance robot using wheels attached to two “360 degree” servo motors and an ultrasonic echo distance sensor as the obstacle detector. My version has since given up its parts for other projects (sorry no pictures or video), but here is a link to a version that uses DC Motors (which I think may be better for this application) rather rather than Servos

Arduino Based Obstacle Avoiding Robot Project with Code and Circuit Diagram (circuitdigest.com)

Building that project improved knowledge of CAD design, 3D printing, and C++ programming, and it was fun!!!.

It strikes me that the components in this this type of robot could easily be reconfigured to run on a track as required by John. You would only need one motor, and instead of the sensor I would fit two limit switches to the cart.

If you are clever you could have the car deaccelerate to a stop (rather than stop abruptly) once the limit switch is tripped.

And if you are really really clever you can use a wireless or blue-tooth capable microcontroller so you can use your phone as a remote!!


It just occured to me that you COULD also use the obstacle avoidance robot exactly as it is, with two driven wheels and use the echo sensor configured as a limit switch… When the sensor records that its about to reach the end of the track it can be made to decelerate to a stop, and then go back. With two sensors the car can be made to go backwards and forwards indefinitely. The track could simply be single slot or rail with a mating component mounted to the underside of the robot.

1 Like