CNC

From Open Source Ecology
(Redirected from Computer to Microcontroller)
Jump to: navigation, search

Summary

Computer numerical control, a computer controller that reads instructions and drives a machine tool.

In modern CNC systems, end-to-end component design is highly automated using computer-aided design (CAD) and computer-aided manufacturing (CAM) programs. The programs produce a computer file that is interpreted to extract the commands needed to operate a particular machine via a postprocessor, and then loaded into the CNC machines for production. Since any particular component might require the use of a number of different tools-drills, saws, etc., modern machines often combine multiple tools into a single "cell". In other cases, a number of different machines are used with an external controller and human or robotic operators that move the component from machine to machine. In either case, the complex series of steps needed to produce any part is highly automated and produces a part that closely matches the original CAD design.

Cnctoolchain.svg

Use the Processing IDE to open the Gctrl GUI

Then you can send CAM Electrical Information from your Computer via its USB port to the Arduino Microcontroller

The Electrical Information will be interpreted by the GRBL software and then you will get processed Electrical Information as the output

You can configure the GRBL settings using the Arduino IDE's Serial Monitor

Modules

Processing

Gctrl

Arduino Uno R3 from Amazon

Arduino

RXTX

GRBL

GRBL Config

Notes

sudo apt-get install librxtx-java

arduino IDE Serial Monitor: carriage return

sudo apt-get install openjdk-6-jre


sudo ./arduino

sudo ./processing


Fedora Notes (for install of the Arduino development environment)

Type this command (without quotations) to install the development environment for the Arduino:

"sudo dnf install arduino"

To start the environment:

"arduino"

Controlling ultrasonic sensor from Arduino

Diginess's notes: I bought this: https://www.radioshack.com/products/radioshack-ultrasonic-range-sensor from Radio Shack ($30) - have some on order from Amazon, but ran out of time.

The wiring is very simple - I used a solderless prototyping board and followed the instructions on the manual (page 4): https://github.com/RadioShackCorp/2760342-Range-Sensor/blob/master/2760342_PM_EN.pdf

Note that the picture shows the view from the sensor's front - I initially wired it backwards, but there are only 4 wires. If you get 0s showing for distance measurements, you probably reversed the signal wire and ground.

Here's the code to paste in the development environment: https://github.com/RadioShackCorp/2760342-Range-Sensor/blob/master/UltrasonicRangeSensor.ino

Plug the Arduino into your computer with a USB A-B cable. Wait for initialization on the Arduino.

From the environment (after code has been pasted), go to the File menu and select Upload. Wait for the LEDs on the Arduino to stop flashing, indicating code upload is complete.

Next, go to the Tools menu option, and select "Serial Monitor". The code will immediately be ran on the Arduino, and you will see a scrolling log of the results (distance to object in front of the sensor).


Research

Product Ecology

3D Printer 3D Printer CNC Circuit Mill CNC Circuit Mill Multimachine Multimachine CNC Torch Table CNC Torch Table

See Also