summary
Introduction To ARDUINO Microcontrollers
Arduino Products, <http://www.arduino.cc/en/Main/Products>
What is a Microcontroller?
A small, low cost computer that exists on a single integrated circuit
Central Processing Unit (CPU)
Data/program storage capacity
RAM and/or ROM
Programmable Inputs & Outputs (I/O)
Designed to perform one dedicated function/program
Usually embedded into the desired system
Arduino UNO Rev.3
I/O pins
14 digital input/output pins (6 PWM pins)
6 analog inputs
USB connection
Programming and powering the board (during programming and testing)
External power jack
AC-to-DC adapter or battery operation
O.D. 5.5 mm and Center Positive 2.1 mm
Supported Arduino documents on their website
Arduino Software (or Arduino IDE)
Arduino Integrated Development Environment
Can be downloaded from their site (https://www.arduino.cc/) for FREE!!!
Open-source software
Availability of resources!
Compatible with Windows, Mac OS X, and Linux
Arduino Playground (wiki contribution from Arduino users)
Arduino programming = C language
Opening & Setting up an Arduino IDE
Double click on the “Arduino” icon to open the program
The first thing to check is under “Tools” (from the top menu)
Under the “Tools” Tab check to see that “Board:” is set to “Arduino/Genuino Uno”
Setting up an Arduino IDE
Under the “Tools” Tab check that “Port”
Set to “COM## (Arduino/Genuino Uno)”
Note: COM number may change depending on the computer
Part 1 – Definitions and Declarations
Part 2 – Setup Function
Part 3 – Loop Function
Serial Monitor:
Opens Serial Monitor Window
Review: Breadboard Layout
Images provided by:
http://computers.tutsplus.com/tutorials/how-to-use-a-breadboard-and-build-a-led-circuit--mac-54746
Other “Arduino” family members
SainSmart UNO R3
OLIMEXINO-328
Freeduino
The Ruggeduino
Control Structure Conditional “if” Statement
Description – if…else…
The if statement checks for a condition and executes the proceeding statement or set of statements if the condition is ‘true’.
https://www.arduino.cc/reference/en/language/structure/control-structure/if/
Bill Gates explains if & if/else statements
if (someCondition) {
// do stuff if the condition is true
}
Condition
#1 Simplest “if” statement
Statement(s)
End if
True
False
| Comparison Operators | Meaning |
| x == y | x is equal to y |
| x != y | x is not equal to y |
| x < y | x is less than y |
| x > y | x is greater than y |
| x <= y | x is less than or equal to y |
| x >= y | x is greater than or equal to y |
Note: Single (=) and double (==) are different.
Single equal sign is the assignment operator.
Double equal sign is the comparison operator.
Example
if (x > 120) digitalWrite(LEDpin, HIGH);
Note: The brackets ( {} ) may be omitted after an if statement. If this is done, the next line (defined by the semicolon) becomes the ONLY conditional statement.
if (x > 120){
digitalWrite(LEDpin1, HIGH);
digitalWrite(LEDpin2, HIGH);
}
if (x > 120){ digitalWrite(LEDpin, HIGH); }
if (x > 120)
digitalWrite(LEDpin, HIGH);
#2 if…else variation
if (someCondition) {
// do stuff if the condition is true
} else {
// do stuff if the condition is false
}
Condition
Statement(s)
End if
True
False
Statement(s)
#3 Nested if…else statement
if (Condition_1) {
// do stuff if the condition_1 is true
} else if (Condition_2) {
// do stuff only if the first condition is false
// and the second condition is true
} else {
// do stuff only if the first condition is false
// and the second condition is false
}
Condition_1
Statement(s)
End if
True
False
Statement(s)
Condition_2
True
False
Statement(s)
#3 Nested if…else statement
Example – Conditionals with Cards
if (CARD is lower than 5) {
if (CARD is BLACK) {
Award YOUR team the same
number of points on the card.
} else {
Award OTHER team 1 point.
}
} else {
if (CARD is HEARTS) {
Award YOUR team 1 point.
}
}
Conditionals with Cards
CARD is lower than 5
Award YOUR team the same number of points on the card.
End if
True
False
Award YOUR team 1 point.
True
False
CARD is BLACK
True
False
Award OTHER team 1 point.
CARD is HEARTS
Conditionals with Cards
#4 if statement and Logical operators
Evaluate 2 different conditions altogether
Logical (or Boolean) Operators
&& – Logical AND results in true only if both operands are true.
|| – Logical OR results in a true if either of the two operands is true.
! – Logical NOT results in a true if the operand is false and vice versa.
| x | y | x && y |
| true | true | true |
| true | false | false |
| false | true | false |
| false | false | false |
| x | y | x || y |
| true | true | true |
| true | false | true |
| false | true | true |
| false | false | false |
| x | !x |
| true | false |
| false | true |
Logical AND
[ x && y ]
Logical OR
[ x || y ]
Example – Refer to Example #1 (simplest)
if (digitalRead(2) == HIGH && digitalRead(3) == HIGH) {
// if BOTH the switches read HIGH
// statements
}
if (x > 0 || y > 0) {
// if either x or y is greater than zero
// statements
}
if (!x) {
// if x is not true
// statements
}
Note: In C/C++ language, the second argument is evaluated, only if the first argument is false. In other words, when the first argument is true, the second argument will not be evaluated. This is called the short-circuit evaluation (or minimal evaluation).
Example – Combining #3 and #4
if (temperature >= 70)
{
//Danger! Shut down the system
}
else if (temperature >= 60 && temperature < 70)
{
//Warning! User attention required
}
else
{
//Safe! Continue usual tasks...
}
Make sure the evaluation order does matter!!
If this expression is following…
else if (temp < 70 && temp >= 60)
Will you be able to see “Safe!” statement?
Additional Self Study Materials…
Arduino Code: Conditional Statements by SparkFun Electronics
Arduino Programming: Logical Operators by SparkFun Electronics
Create a flow chart in PowerPoint 2013 by Microsoft
https://support.office.com/en-us/article/af4e3f4c-3854-486a-88ff-eb35692663dc
3d Printing / Additive Manufacturing: Exploration of Form Feature and Geometry Limits
28
Traditional Machining Process
Stock Material-Metal
Drawing
Machining
Resulting part
29
CNC Machining Process
Stock Materia- Metall
Computer Aided Design (CAD) 3D Solid Model
G code file generated
Resulting Part
Computer Aided Manufacturing (CAM) Model- Tool Path Generation and Simulation
Computer Numerical Control (CNC) Machining
Tool Path Generation
30
3D Printing Process
Stock Material: PLA Plastic Filament spool
Resulting Part
MakerBot Desktop Software
MakerBot 3D Printing Machine
Computer Aided Design (CAD) 3D Solid Model- SolidWorks
STL file
31
History of 3D Printing
What is the difference between processes?
Making sense of the additive manufacturing “alphabet soup” (and exposing our industry’s dirty little secret): AM, 3DP, DMLS, SLM, DMLM, SLS….. OMG?
The Additive Manufacturing (AM) world loves acronyms.
The vast majority of metal printers in use today are based on Powder Bed Fusion Technology.
A layer of fine metal powder is spread across a machine bed.
The selected regions of the powder layer are then fused to the layer beneath them.
The process repeats layer by layer until the entire part is built within the powder bed.
Unfused powder is removed to reveal the finished parts on the build plate.
The melting is typically done with a high power laser.
With that background, here’s the secret: on today’s systems they all refer to the same process.
Common trademarked acronyms you will come across include Direct Metal Laser Sintering (DMLS), Selective Laser Melting (SLM), Direct Metal Laser Melting (DMLM), and Laser Cusing.
3D Printing Technologies
33
3D Printing Technologies
BJ- Binder Jetting
LM- Laser Melting
EBM- Electron Beam Melting
SL- Sterolithography
PJ- PolyJet Modeling
FDM- Fuse Deposition Modeling
LS- Laser Sintering
MJ- MutiJet Modeling
Each 3D printer is unique!!
Majority of the time, 3D printer comes with its special software (i.e., slicer and controller)
Cetus3D
UpStudio
MakerBot Replicator Series
MakerBot Print
Ultimaker
Cura
35
36
SHELLS AND INFILL
Print settings can dramatically change the strength, appearance, print time, and other properties of your printed parts.
Shells are the perimeter on each layer; they make up the walls of your part.
Infill is the internal structure of your part. You can set the infill of your part to be anywhere from 0% (hollow) to 100% (solid). Increasing the infill and number of shells will make your parts stronger, but will increase print time and filament use.
PRINTED PYRAMID
10% Infill / 02 Shells without supports
PRINTED PYRAMID
0% Infill
08 Shells
PRINTED PYRAMID
25% Infill
02 Shells
PRINTED PYRAMID
02% Infill
02 Shells
PRINTED PYRAMID
50% Infill
02 Shells
37
MINFILL OPTION
38
SUPPORTS AND RAFTS
Supports are printed scaffolding for overhangs. If your model has overhangs greater than 68 degrees (measured from the vertical axis) then you will need to print with supports. A raft helps the part adhere to the build plate by laying down an even, flat foundation to print on.
3D Model: The T model has overhangs greater than 68 degrees and needs support material. The Y model does not need support material.
Supports: After printing, the T will needs support material removed. Both printed with rafts.
Final Print: Final parts after removing supports and rafts.
Cost Estimation – 3D Printing Material (material only)
Q: How much does 3D printed part cost, if printed part is 7 gram?
Note: Using 1kg of $17 PLA filament
Ans. About 12 cents
Memo: In the actual manufacturing process, cost estimation is not only material itself and involves many other factors: human labor fee, machine running cost, other production costs…
Additive Manufacturing (AM) is a form of direct manufacturing which involves rapid prototyping.
Using AM, we can build functional, efficient, and effective components directly from CAD models.
AM uses computer controlled, layer-by-layer material deposition, which is a process that utilizes a laser to deposit a layer of material onto a substrate.
Many users, who had been experimenting AM are still using them for prototyping rather than production.
Educating companies on opportunities for creating a component by additive process is a hard challenge.
Additive Manufacturing
40
40
Additive Manufacturing Benefits[1]
41
Kinsella, Mary E., “Additive Manufacturing of Superalloys for Aerospace Applications”. March 2008
Additive Manufacturing - why?
Building parts with very complex geometries without any sort of tools or fixtures, and without producing any waste material
The geometrical freedom allowed to engineer/design the part as you envision it, without manufacturing constraints. This can be translated to extreme light-weight designs, reduced part counts
Lightness is critical in making aircraft. A reduction of 1 kg in the weight of an airliner will save around $3,000 worth of fuel a year and by the same token cut carbon-dioxide emissions. AM could help build greener aircraft.
Cost-effectiveness - a very energy-efficient and environmentally friendly manufacturing route
Application includes Medical Implants, Aerospace, Industry , & Automobile
42
Detailed Gas Turbine[2]
43
“Unison: A Leading Supplier, Engine Components & Systems”. http://www.unisonindustries.com/systems/index.html
Critical Components – Candidates for AM[3]
Augmentors, Combustors, Compressor Stators, Accessory Gearboxes, Drive and turbine shafts, ducts, fan and turbine frames, fan stator and diffuser cases
High-valued turbo-engine components like casings and vanes as well as rotating parts like blades, rotors, disks and BLISKs (BLade Integrated DiSKs).
44
Use of 3D Rapid Prototyping for University of Hartford UAV Project
Gallery of Sub-Assembly Photographs / Drawings
Prototype parts were fabricated at the University of Hartford with our 3D Rapid Prototype System
Tail assemblies and many of the metal parts were fabricated at BML Machine Tool in Monroe CT, a shop that already had ARDEC and Picatinny contracts.
Use of 3D Rapid Prototyping for University of Other Hartford Projects
Material Testing
BE260W Biomed Engineering Materials
Tension and compression tests
PLA (Polylactic Acid) samples
Biodegradable thermoplastic
Processed from corn starch, sugarcane, or other plants that can create starch
Based on the preliminary test in D129 and simple assessment:
PLA with 20% infill density: EPLA 20% = 167,309 psi ≈ 167 ksi
PLA with 99% infill density: EPLA 99% = 226,796 psi ≈ 227 ksi
Both reasonably within the range of MatWeb’s data (from 12.3 to 2,000 ksi)
Rapid prototyping – I beam design
Once simple parametric model is developed and 3D-printed, you can see, touch, and feel it
https://www.engineeringtoolbox.com/american-wide-flange-steel-beams-d_1318.html
Rapid prototyping – Airfoil design
Import mathematically determined airfoil design using a CSV data file
http://airfoiltools.com/plotter/index
Rapid prototype – Skyline Diffuser
mh-audio.nl/Acoustics/DiffusorCalculator.asp
Rapid prototype - Enclosure
Example – Topological Model
Questions
????
Additional Material
57
58
PREPARE FILES FOR PRINTING WITH MAKERBOT PRINT
MAKERBOT PRINT
MAKERBOT PRINT
Select Printer: Click on the printer menu to view your active printers. Select add a printer to add a new printer to your list.
Add a network printer to browse from printers already on your network via WiFi or Ethernet.
Connect via IP address to add a printer using its IP, this can be found on the MakerBot Replicator+
onscreen menu. Add an unconnected printer if you
plan on transferring files to your printer via USB stick.
Insert Files: Open the project panel and select add models. Alternatively, you can drag and drop files directly into MakerBot Print’s main window from your computer.
File Types: Both Mac and PC users can import .STL files. PC users can import native CAD files from
programs like SolidWorks® and Autodesk Inventor ®.
59
PREPARE FILES FOR PRINTING WITH MAKERBOT PRINT
MAKERBOT PRINT
TIP: Place models as close to the center of the build plate as possible. Group models as close together as possible without
overlapping, arrange build plate is useful for arranging lots of models.
TIP: Print modes are a set of recommended print settings. For more advanced control, select the
add a custom setting button to create your own custom print modes.
MAKERBOT PRINT
Settings: Select your print mode, extruder type, and toggle support material on/off. Print settings will affect the strength, surface quality, weight, print time, and other properties of your printed
parts. We recommend always printing with rafts on.
Layout: Arrange models on your build plate(s) using the arrange, orient, and scale menus. Rotate your models so that the largest flat surface is touching the build plate. Try using place face on build plate
in the orient menu to help.
60
MAKERBOT PRINT
TIP: Place models as close to the center of the build plate as possible. Group models as close together as possible without
overlapping, arrange build plate is useful for arranging lots of models.
TIP: Print modes are a set of recommended print settings. For more advanced control, select the
add a custom setting button to create your own custom print modes.
MAKERBOT PRINT
Settings: Select your print mode, extruder type, and toggle support material on/off. Print settings will affect the strength, surface quality, weight, print time, and other properties of your printed
parts. We recommend always printing with rafts on.
Layout: Arrange models on your build plate(s) using the arrange, orient, and scale menus. Rotate your models so that the largest flat surface is touching the build plate. Try using place face on build plate
in the orient menu to help.
PREPARE FILES FOR PRINTING WITH MAKERBOT PRINT
61
SHELLS AND INFILL
Print settings can dramatically change the strength, appearance, print time, and other properties of your printed parts.
Shells are the perimeter on each layer; they make up the walls of your part.
Infill is the internal structure of your part. You can set the infill of your part to be anywhere from 0% (hollow) to 100% (solid). Increasing the infill and number of shells will make your parts stronger, but will increase print time and filament use.
PRINTED PYRAMID
10% Infill / 02 Shells without supports
PRINTED PYRAMID
0% Infill
08 Shells
PRINTED PYRAMID
25% Infill
02 Shells
PRINTED PYRAMID
02% Infill
02 Shells
PRINTED PYRAMID
50% Infill
02 Shells
62
MINFILL OPTION
63
SUPPORTS AND RAFTS
Supports are printed scaffolding for overhangs. If your model has overhangs greater than 68 degrees (measured from the vertical axis) then you will need to print with supports. A raft helps the part adhere to the build plate by laying down an even, flat foundation to print on.
3D Model: The T model has overhangs greater than 68 degrees and needs support material. The Y model does not need support material.
Supports: After printing, the T will needs support material removed. Both printed with rafts.
Final Print: Final parts after removing supports and rafts.
64
MAKERBOT PRINT
MAKERBOT PRINT
Print: Use the print button to print directly to connected printers or to export files for offline
printers (this will appear as export if you’ve selected an unconnected printer).
Monitor your print progress by navigating to the
printer menu and watching the live camera feed. You can also monitor via the MakerBot ® Mobile™ app.
PREPARE FILES FOR PRINTING WITH MAKERBOT PRINT
65
PRE-PRINT CHECKLIST
SOFTWARE
HARDWARE
01. Add Files: Click File >
Insert File or drag and drop right onto the build plate
05. Install Build Plate: Load your build plate onto the Z-stage and confirm
it’s snug
02. Arrange: Organize objects by dragging or
using Arrange Build Plate
03. Print Settings: Adjust your print settings to change print speed
and quality
04. Print Estimates and
Preview: Double check print time and material usage by checking Print Preview.
06. Attach MakerBot
Smart Extruder+: Confirm that the Smart Extruder+
is attached properly
07. Calibrate MakerBot Smart
Extruder+: If you’ve just attached a Smart Extruder+, run a Z Calibration. On the printer, select Settings >
Calibration > Calibrate Z Offset
08. Load Filament: Select Filament
> Load Filament. Then, ensure that the filament is seated in the drawer, fed through the guide tube, and securely inserted into the Smart
Extruder+ when prompted.
66
POST-PRINT CHECKLIST
09. Remove Build Plate: Slide the build plate toward you to
remove it from the Z-stage
10. Remove Parts from Build Plate: Gently flex the build plate or use a thin craft spatula to
remove parts
11. Discard Rafts and Support: Use your hands or tools to gently remove the raft and
support materials from parts
Quick Guide of Cetus 3d Printer in the Maker Space (UT 320)
Basic Steps
Connect to the printer with a long USB cable from your own computer or the Makerspace Desktop
You can disconnect once the print has begun
Turn on the printer by hitting the on/off switch on the left of the Cetus3D
Set up 3D print file in UpStudio
Select position on plate, infill density, raft, etc…
Print file
ALWAYS REMEMBER
Initialize the Cetus3D printer before each print
Gently wipe down the print plate with a paper towel and 70% isopropyl alcohol before and after print
Remove with metal spatula positioned flat and flush against print plate by pressing firmly but gently against the print
Find “UPStudio” icon on desktop: 3D printing software for the Cetus 3D printer
Software should recognize connected printer, but if not, go to setting section
Check printer serial number here and on the printer
Click “UP” icon: moving into 3D print setting screen
Scale
Add
Initialize
Print Status
Home
Rotate
Move
Maintenance
Calibration (No need for students’ general printing)
Empty 3D printing space…
Import your 3D object file in STL
Select your model in STL format
Depending on the model, it may need some printing tweaks!!
Many cases, relationship between Y-axis and Z-axis are changed, which is caused by a mismatch of coordinate setting in SolidWorks/Fusion and UPStudio. Also, scaling could be off, but it can be fixed by definition of 1 in = 25.4 mm.
Rotate
Think about the best orientation for 3D printing!
Move
Scale
Once 3D object is set properly, move on to “Print Settings”
Inside of object
Raft
When preview is promising, click “Print” to manufacture a part
Automatically printing file will be transfer and start warming up the nozzle heater
Printing will be started, when the nozzle temperature reaches at 210°C
See Cetus3D Quick Start Guide: https://www.cetus3d.com/quick-start-guide/
Note: Printer and nozzle height have already been calibrated for general 3D printing.
Check the progress of printing and get a print-finish time (estimation)