9th week Assignment
Output Devices
Output Devices
First, it is neccesary to notice that exist different output devices. I found something very useful that help me understand at Lydia Kuo - Fab Academy 2023 Web Page. We decided to test a stepper motor functioning process considering that my classmate and I will use this device for our final projects.
In our case we choose to test a step motor available at FabAcademy Inventory and because it is considered a digital input-output device. A stepper motor (sometimes referred to as a step motor or stepping motor). This product offer a shaft motion consists of discrete angular movements of essentially uniform magnitude when driven from a sequentially switched DC power supply, such being describe at Electromate.com . It works with digital signals. One digital pulse to a step motor drive or translator causes the motor to increment one precise angle of motion. As the digital pulses increase in frequency, the step movement changes into continuous rotation. So we can test it at full motion. It has windings in the stator and permanent magnets attached to the rotor. It provides fixed mechanical increments of motion (referred as steps, and generally specified in degrees). They are considered ideal for applications that require quick positioning over a short distance, Allowing the use of an open-loop controller, which simplifies machine design and lowers cost compared to servo motor systems.
This device holds a NEMA denomitation, that accounts for the National Electrical Manufacturers Association acronym. This mean that is standirized motor size, including designations that can help as learn more about the size and capability of practically any particular motor. Step motors are categorized by NEMA frame size, such as "size 11" or "size 23" or “size 34”. NEMA 17 stepper motors are those that have a 1.8 degree step angle (200 steps/revolution) with a 1.7 x 1.7 inch faceplate. They typically have more torque than smaller variants, such as NEMA 14 and have a recommended driving voltage of 12-24V. These steppers are also RoHS compliant (acronym for "Restriction of Hazardous Substances." A European Union directive that regulates the use of certain hazardous substances in electrical and electronic equipment - EEE).
We use a variation of Neil's hello.stepper.bipolar board that control a step motor using Arduino. And was develop by our instructor Jorge Valerio in Fab Academy 2016, and is still functioning. This board present the following components:
For the test we have available a variable power supply from GwInstek - Model 3303D. The technical manual provides functioning information. It has three independent outputs: two with adjustable voltage level and one with fixed level selectable from 2.5V, 3.3V and 5V. It consists of the following:
The following photo provides basic information regarding the power supply source, and also shows the terminals where the wires need to be connected
The test process consist on selecting a voltage and current and connect the board to the chanel terminal. For our testing we choose Chanel 1, because we tested a stepper motor we need to set the power supply with the following characteristics:
To make the test we made the following connections:
For functional testing We write the following code in the Arduino IDE:
#include "Stepper.h"
.
const int stepsPerRevolution = 200;
change this to fit the number of steps per
revolution for your motor
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);
initialize the stepper library on
pins 8 through 11
int stepCount = 0;
number of steps the motor has taken.
void setup() {
initialize the serial port:
Serial.begin(9600);
};
void loop() {
step one step.
stepCount = Serial.read();
myStepper.step(stepCount);
Serial.print("steps:");
Serial.println(stepCount);
delay(500);
};
The following photo provides show all system connection to test. The Nema Motor have 4 pins and requieres 12V
The following video show the testing process. We set 1A as imput current and the consumption was 0.99A and 10V. Thus, we get 9.9W
With my instructor support, we review the components that I'm gonna need for my final project in order to decide which output could be the starting point. So I decide to start with a Servo motor that I'll probably use to open the hidden shelve. The following picture show the potential devices that I would use for my final project. I would use 2 Servo Motors, so the option could be to fabricate one or two boards. I decide to fabricate one.
By acknowledging that servo motors function with 5V and common power supply sources provide 12V, we select the following components for this main board. It consists of the following:
Regarding the Low Dropout Regulator, we review technical information here , and in summary its key technical characteristics are the following:
We select KiCad to design our board, taking into account that when working on schematics, we need to be careful with labeling each component in/out or GND adequately. Further we need to phycally recognise each component, because we made a mistake on regulator pins order, so when working on PCB editor traces were crossing, and took me sometime to understand the problem.
This is the schematic where you can see all the components. You can download Schematic design file and the PNG file here.
To obtain PCB design and fabricate it, we need to take the following steps:
Select the PCB Editor File
from the KiCad Principal Menu.
Update PCB from Schemnatic
option located at Tools Menu on PCB Editor.
Set track sizes (width) and appereance (material)
option located at Edit Board
SetUp Menu. Here we set 0.4 for traces width and 0.8 for ground and energy traces.
Setup constraints
option located at Edit Board SetUp Menu. The most important
it is to setup cleareance at 0.4 to no exceed the end mill diameterStart drawing the traces
selecting width and material correctlyThis is the pcb design where you can see all the components. You can download design file and the SVG files here.
To fabricate PCB design we use SVG files applying following steps within FabModules Software:
Upload SVG Board file
.
Convert SVG image
inverted it using 1000dpi.
Set mill traces (material)
using 1/64" end mill (select 2 as offsetting number).
Calculated Mill raster 2D
.Visualize the image
selecting width and material correctlySend file
as final stepApplied same steps for Cutting Edges
but use 1/32" End MillThe machining was made with a Modela MDX-20. I have got the following problems while machining:
To proceed with soldering I fix the PCB with double contact tape. Thus, we can avoid any movement when tin soldering
I have a major problem with the terminal, because when selecting the componnets at the schematic, I didn't choose the correct model, and the distance between pins was shorter. Thus, after perforating the PCB the connector didn't fit. Thus I decided to fold the pins and tried to solder them. However the space between the capacitor and terminal's pins was short, and while soldering the cooper layer sliced. The following photo registered the problem. Thud, I have to machine another board and use new components
For functional
testing I used a modified coding provided by Adrian Torres
and follow this Arduino IDE coding:
Open
Arduino IDE software.Connect
the serial port to the board.Copy
the original code provide by Adrian Torres.
#include
Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards
void setup() {
myservo.attach(3); // attaches the servo on pin to the servo object
}
void loop() {
int pos;
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
#include
see Source file inclusion, in this case identifies Servo.h file from
Arduino IDE
library which need to be compiled and link with the code.void setup
is a function that contains the initialization of the component that
I want to
control (output), or that will send me information (input)myservo.attach
, attach the Servo variable to the pin 3 setting it as an outputvoid loop
allows to repeat the code that follows over and over againint pos;
, it is creating a variable called position, which limits will be set in
the following
code linesfor (pos = 0; pos <= 180; pos +=1)
, for statement is used to repeat a block of
output behave
enclosed between curly braces. In this case, we are establishing position variable to move from
0° to 180°myservo.write(pos);
will call the variable set in the previous code line, in this
case to move in
relation to "for" statement from 0° to 180°delay (15)
will set the time that will took the servo movement to go from 0° to
180°
for (pos = 180; pos >= 0; pos -= 1)
In this case, we are establishing position
variable to return from 180° to 0°myservo.write(pos);
will call the variable set in the previous code line, in this
case to move in relation to "for" statement from 180° to 0°delay (15)
will set the time that will took the servo movement to go from 180° to
0°
The following photo shows all system connection to test. I used XIAO RP2040 from Week 8 to test the board and the output device (Servomotor)
The final test was made runing the conding Arduino IDE and using a variable energy source, like shown in the following video
You can get access to the servo code here.