Mechanical Design

cnc

Group assignment

The group's tasks: design a machine that includes mechanism+actuation+automation+application and build the mechanical parts and operate it manually fablab website.

General Objective

The objective of this week is to make a CNC machine among all the members of the team. After a meeting, we distribute the tasks and my part will be to work on the electronics of the machine, both to drive the motors and the effector part.

Once my colleagues assembled the machine, it was my time to take action. Everything is ready for the movement of the axes to be carried out with stepper motors, so that's what we'll do.

To carry out the movement of the axes, the type of motor could have been selected, but stepper motors are the ones selected par excellence for CNC developments, due to their ease of use, their good precision and their widespread applications on the web. Stepper motors use a gear wheel and electromagnets to rotate the wheel one "step" at a time. As can be seen in this gif taken from lastminuteengineers

Our system, unlike other CNC developments based on the very popular Ramps shields, aims to be completely modular, so each Axis will have its own microcontroller with its corresponding independent USB output. Therefore, we believe that it will be much easier to incorporate new modules and continue their development in the near future.In this link you can find the design.

To use and control which motor, a power interface is necessary, an electronic device that translates the logic values produced by the microcontroller into high voltage and current values necessary to drive the motor. In the market there are simpler and more complex solutions depending on the demands of the project, in our case we choose the Driver par excellence for this type of projects.

For single-stepper-motor applications, a driver like the L298N is fine, but if you want to construct your own CNC machine or 3D printer, you’ll need a dedicated stepper motor driver like the A4988. Due to the simplicity of the step motor control and the variety of stepping modes provided by the A4988 driver, it is an ideal solution for building applications that require precise and reliable stepper motor control, such as the movement control of beds, heads, and assemblies in various CNC plotting, milling, and 3D printer designs. The fact that it only requires two pins to control the speed and direction of the bipolar stepper motors like the NEMA is pretty neat, too.

With nothing more to define, create a small PCB for each motor, to do this use the Kicad PCB design software, already worked on in previous weeks and which has turned out to be very useful.

To test the PCB, use the following code fragment without libraries to check its operation, what it does is turn it for 2 seconds to one side and then 2 seconds to the other

Effector

Servos are motors that allow you to precisely control physical movement because they generally move to a position rather than continuously rotating. Servos contain a small DC motor connected to the output shaft through gears. The output shaft drives a servo horn and is also linked to a potentiometer (pot). Due to this simplicity, the servos can be controlled without the need for drivers, just with a PWM PIN.As can be seen in this gif taken from lastminuteengineers

In addition to the movement in this module, we wanted to include the possibility of self-leveling for when the head was changed, to correct small unevenness in the work table or for future developments, finally, after evaluating different options we opted for the VL6180 sensor.

Once again for the PCB design we will use Kicad. In this case the connection will be to LEDs to indicate states, a servomotor to raise and lower the effector, and a sensor to measure the distance from the effector to the base.In this link you can find the design.

Finally, to test the sensor I used the native Arduino library but I didn't get good results, so I used an example from a third-party library called SparkFun_ToF_Range_Finder-VL6180_Arduino_Library-master

Results

The machine was a success, great teamwork and the quality left us all amazed.