Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Work #18

Merged
merged 4 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
49 changes: 48 additions & 1 deletion Documentation/using_Candle.md
Original file line number Diff line number Diff line change
@@ -1 +1,48 @@
TBD
# Using Candle

Candle controls the CNC machine directly over USB or by generating a Gcode file for running on a USB stick inserted in the CNC machine.

* Ensure Candle is connected to the CNC machine over USB by selecting "Service → Settings" and "Connection" in the pop-up window. The "Connection" drop-down should show a numbered COM option corresponding to the CNC machine - if not, verify the correct drivers have been installed.

* Close this window and observe the control panel, which may be configured by adjusting settings.
The 3018 Pro CNC machine is capable of making use of the probe and heightmap functions in Candle, which are critical to producing good quality PCB designs.

* In order to use the continuity probe, where the cutting tool making contact with the PCB surface triggers the probe stop, GRBL commands must be sent to the machine via the command terminal, and the tool head spindle must be connected to a "GND" pin on the control board, and the PCB must be connected to the "A5" pin on the control board. Some 3018 Pro machines shipped with different labelling on the control board - the pins may also be labeled "probe". Both types of control boards are present in the campus labs, so please be aware of this if you use different machines. These connections are easily made using alligator clips and pin headers. These connections must be removed when turning the spindle on - **be sure to always check and check again that these clips are removed from the spindle before turning the spindle on**.

* The GRBL commands that must be sent to properly set the homing cycle for continuity probing are `$22=1` (homing cycle enable) and `$23=0` (homing cycle direction). Additional GRBL commands are provided in the "GRBL_Settings_Pocket_Guide_Rev_B" document or at www.DIYMachining.com/GRBL.

* With the homing cycle configured, spindle off, and clips attached, use the control panel to raise the tool head and position the cutting tool over a corner of the PCB. Note the directionality of all controls, and observe the Candle graphical display of the tool head.

* The Z-probe button may be used to slowly lower the tool head until continuity is made and the tool head stops. Zero the machine in Candle by selecting the Zero X, Y, and Z buttons in the control panel.

* Load the Gcode file generated by FlatCAM by selecting "File → Open". Select the contour CNC job.

![Example Gcode File Loaded in Candle](./images/Candle_GCode_Output.png)

* Once a Gcode file is opened, Candle enables the Heightmap function. Select "Create" (or optionally apply the modeled heightmap that was developed for rapid prototyping using the fixture design included in this repository).

* Adjust the Heightmap settings to enclose the design shown in the graphical window, or select the "Auto" button to automatically set parameters.

* Select reasonable values for the Heightmap Probe Grid. Some parameters may be unfamiliar - "F" is the probe feedrate, "Zt" is the distance to raise the tool head when moving to the next point, and "Zb" is the distance to lower the tool head when probing. If the machine was zeroed previously, then a value of 1.50 for Zt with other values left as default is likely sufficient.

* Observe the arrangement of the graphical representation of the operation and visually verify that the machine will not crash before selecting "Probe". The routine will run until complete or stop if continuity was made at an unexpected point. If the Heightmap was not able to be completed, try adjusting the "Zt" or "Zb" parameters accordingly, or inspect for other issues, before trying again.

![Example Candle Heightmap Routine Being Performed](./images/Candle_Heightmapping.png)

* With the Heightmap complete, close the Heightmap mode by selecting "Edit", and select the checkbox "Use Heightmap".

* Raise the tool head slightly and reset alarms if necessary.

* Perform additional visual checks to verify the machine will be able to proceed with the milling operation unobstructed, and **remove clips attached to the spindle and PCB before turning the spindle on**.

***Note that the spindle rotates near 10,000 RPM, and the cutting bit could break and create a dangerous situation. Follow lab policies regarding safety and have faculty or senior students familiar with this process verify that everything is in order before turning on the spindle and running milling Gcode.***

* Turn the spindle on and select "Send" to run the operation. Observe the machine safely and while wearing safety glasses.

* The routine should complete and the PCB will be ready for hole drilling operations. Hole drilling operations should be completed without changing the machine zero positioning, or else alignment will be difficult to achieve accurately. The hole drilling operation should be straightforward so long as the tool bit is changed without losing the machine positioning.

![Example Drill Gcode File Loaded in Candle](./images/Candle_GCode_Drl_Output.png)

The routine should complete and the PCB will be ready for final processing or cutting operations.

![Example Populated PCB Rendered in KiCAD](./images/KiCAD_Render.png)
52 changes: 51 additions & 1 deletion Documentation/using_FlatCAM.md
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
TBD
# FlatCAM

* In FlatCAM, open the Gerber and the Excellon files to add them to the FlatCAM project.

![FlatCAM Open Dialogue](./images/flatcam_open.png)

* These objects may be placed far from the origin, so select all using the "Ctrl + A" shortcut, and Move to Origin using the "Shift + O" shortcut. It is important to select all objects to move them as a group, otherwise the drill objects will not be aligned to the contour objects.

![FlatCAM Opened Objects](./images/flatcam_opened.png)

## Generating Trace GCode

* Double-click the Gerber in the project tree side panel, then select "Isolation Routing".

![FlatCAM Side Panel](./images/flatcam_project_sidepanel.png)

* Right click the #1 tool in the Tools Table and delete it. We must set up a new tool to mill at the 0.1mm depth of cut using the lab's V-cutter bits.

* Use the "Ctrl + D" shortcut to open the Tools Database. You may create a new tool here, but it is recommended to import the database provided in this repository. Select "Import DB" and select the [Tools_Data_Base.TXT](../FlatCam_Tools_Database/Tools_Data_Base.TXT) file to import the V-cutter tool.

* Select "Pick from DB" in the sidebar, select the "V-Cutter" tool, and select "Transfer the Tool" to apply to the Isolation Tool operation.

* Change "Tool Dia." to match the 0.0354 diameter, and select "Generate Geometry".

* Change the Preprocessor to 'grbl_11', followed by "Generate CNCJob Object".

![FlatCAM Preprocessor](./images/FlatCAM_preproc.png)

* The contour job is complete, select "Save CNC Code" or right click the CNC Job in the project tree side panel to save the Gcode for access with Candle later.

## Generating Drill GCode

* The drill job can now be created. This operation may vary depending on your requirements. For example, the provided design uses two different size vias, and these can either be combined to one size or retained as two different drill operations. Depending on drill bit availability and prototyping requirements, you may opt to simplify this operation to use the smallest size drill, otherwise it is recommended to use the Tool Change option to provide for drill changing.

* Double click the Excellon drill file in the project tree side panel, and select "Excellon Editor" to make changes to the drills this operation will apply to. For example, edit all sizes to the same value to combine drills.

![FlatCAM Excellon in Side Panel](./images/flatcam_select_excellon.png)

![FlatCAM Excellon Editor](./images/flatcam_excellon_editor.png)

* Exit the editor and save changes. Select "Drilling Tool" and edit parameters accordingly. Since this is a separate operation from the contour, it will be critical that the CNC machine retains its positioning to ensure alignment. Keep this in mind when setting parameters for tool changes, if this option is selected.

* It is recommended to reduce Feedrate Z to 60 (300 may be too high and could cause damage to the board). Adjust Cut Z to a value that will completely drill through the board. If using the provided fixture, there will be ample clearance under the board.

* Select "Generate CNCJob Object" and save in the same manner as the contour operation.

![FlatCAM CNC Jobs](./images/flatcam_gcode_objs.png)

These Gcode files may be opened directly in Candle for heightmap generation and running the machine.

Next Tutorial: [Using Candle](./using_Candle.md)
30 changes: 30 additions & 0 deletions Documentation/using_Inkscape_JSCut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Inkscape & jscut
Each SVG file can be opened in Inkscape to make these files compatible with jscut. This process is brief, and consists of converting all objects present in the SVG into path objects. Select all objects in the graphic area and select the "Path → Object to Path" menu option, followed by the "Path → Stroke to Path" menu option. Exporting this as an SVG with a transparent background is sufficient to progress to jscut. It is helpful to reduce the page size as well. Keybindings make the Inkscape process easy and fast:

"Ctrl + A" - Select all

"Shift + Ctrl + R" - Resize page to selection

"Shift + Ctrl + C" - Object to path conversion

"Ctrl + Alt + C" - Stroke to path conversion

"Ctrl + S" - Save SVG

![Example SVG Output from Inkscape](./images/Filter_DualOp-F_Cu.png)

jscut ingests an SVG file and allows configuring various types of toolpaths followed by export to Gcode. Since the PCB milling operation is a single pass at 0.1mm depth-of-cut (and potentially a second operation for pad and via holes), many settings are unused.

* It is recommended to select "Make all mm", set Tool Diameter to 0.1mm, set Pass Depth to 0.1mm, set Rapid to 1000mm/min, and set Plunge and Cut to 100mm/min, before moving on to Operations.

* Select "Open SVG → Local" to open the SVG file exported from Inkscape. If the copper layer graphic does not appear as expected, or appears incomplete or cut off, adjust Inkscape export settings accordingly.

* If all appears as expected, begin selecting path objects in the graphic to create Operations. Multiple Operations can be created per group of objects selected, for example, select all pad and via holes and select "Create Operation", followed by the "Pocket" drop-down option, and a value of "0.1" for the Deep field. The Operation can be expanded to access additional options, such as boolean operations, margin setting, and milling direction.

* After the Pocket Operation, select all copper objects such as pours, pads, vias, and traces (this may take some time with complex designs), then select "Create Operation", followed by the "Outside" drop-down option, and again a value of "0.1" for the Deep field. The Pocket and Outside Operations are sufficient for most designs using through-hole or even surface mount components, but there is potential for more advanced toolpathing as well.

* Select "Simulate GCODE" to verify toolpathing and observe Operation behavior and order.

* Select "Save GCODE" to save the Gcode file.

![Example Toolpath Output from jscut](./images/JSCut.png)
15 changes: 14 additions & 1 deletion Documentation/using_KiCAD.md
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
TBD
# Using KiCAD
Designs start in a KiCAD project. It is possible to start immediately within the PCB editor, however there are advantages to working within a project file and creating a schematic first.

The schematic editor looks and functions similarly to SPICE software, with usability improvements as well as functionality beneficial to full-stack design work. Components may be added to the KiCAD library, but the existing library is sufficient for intermediate designs. Components can be assigned a footprint, which also often includes a 3D model for rendering visuals and checking 3D space conflicts. Python script support extends functionality and allows for some automation, but is not necessary to produce competent results.

![Example Schematic Design in KiCAD](./images/KiCAD_Schematic.png)

The PCB board editor can be entered from the schematic editor. The two documents are linked, and components in the schematic will be inserted into the board editor as footprints. Use the hotkey "F8" or select "Tools → Update PCB from Schematic", this will place missing footprints. Circuit nets are also shared between the documents. It is possible to auto-place footprints, but it is recommended to manually adjust and rotate components accordingly to make routing easier. The board editor has many layers to manipulate. Most important for prototyping purposes are the top copper layer and the edge cuts layer. The bottom layer and multiple layers beyond this are also accessible (board stackup settings may be edited at any time). Additional vias and PCB specific components that are not typically present on a circuit schematic can be placed in the same manner as in the schematic editor, with a large default library to explore. Pin headers, I/O vias and pads, connectors, and even active trace elements such as Bluetooth or tuned antennae are present and waiting for application in student projects!

![Circuit Board Design in KiCAD](./images/KiCAD_PCB.png)

Once a board design is ready to export, _the process will diverge depending on whether you are ingesting **gerber fabrication files with FlatCAM**, or **SVG files with Inkscape and jscut**. Both are effective for prototyping, though the SVG method tested poorly among students. If you opt to go this route, export your copper layer in color, select only the board area, and include edge cuts if you need those outlined in the milling operation. Otherwise, select "File → Fabrication Outputs → Gerbers" and select the layer you are working with. Default settings were found to work well. Select "Plot to create the Gerber file, and then select "Generate Drill Files" (being sure "Drill Units" is set to millimeters) to create the drill Excellon file. Default settings here were also found to work well. Several files are created, however we will only use two in FlatCAM.

Next Tutorial: [Using FlatCAM](./using_FlatCAM.md)
Loading
Loading