Group Assignment

Measure the power consumption of an output device

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.

The Output: Stepper Motor

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).

The Controller Board for the Stepper Motor

We use avariation 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:

  1. 02 A4953 drivers
  2. 02 Capacitor 0.1uF
  3. 02 Capacitor 10uF
  4. 03 Resistors 0 ohm (jumper)
  5. 02 Connector 2x1
  6. 02 Connector 4x1
  7. 01 Connector Molex 4x1
The A4953 is a Full-Bridge DMOS PWM Motor Drivers, is designed for pulse width modulated (PWM) control of DC motors capable of peak output currents to +/-2A and operating voltages to 40 V. Input terminals are provided for use in controlling the speed and direction of a DC motor with externally applied PWM control signals. You can review the technical manual here

The Variable Power Supply

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:

  1. AC input circuit
  2. Transformer
  3. Bias power supply including rectifier, filter, pre-regulator and reference voltage source
  4. Main regulator circuit including the main rectifier and filter, series regulator, current comparator, voltage comparator, reference voltage amplifier, remote device and relay control circuit

The following photo provides basic information regarding the power supply source, and also shows the terminals where the wires need to be connected

Testing

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:

  1. Current: 1A
  2. Voltage: 12 V

To make the test we made the following connections:

  1. Connect the Arduino1 module to a PC to run the Arduino Software
  2. Connect the Arduino 1 with the board (A4953) by plugin 5V and GND in the respective connectors.
  3. Connect the PWM Chanel 1 outputs.
  4. Connect an external source in the terminal (12V @ 1A)

The Programing

For functional testing We write the following code in the Arduino IDE:

  1. #include "Stepper.h".
  2. const int stepsPerRevolution = 200;change this to fit the number of steps per revolution for your motor
  3. Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); initialize the stepper library on pins 8 through 11
  4. int stepCount = 0; number of steps the motor has taken.
  5. void setup() { initialize the serial port:
  6. Serial.begin(9600);
  7. };
  8. void loop() { step one step.
  9. stepCount = Serial.read();
  10. myStepper.step(stepCount);
  11. Serial.print("steps:");
  12. Serial.println(stepCount);
  13. delay(500);
  14. };

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

Individual Assignment

Selecting the output device

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.

Board Components

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:

  1. One terminal block 2x1
  2. Regulator LDO 5V 1A
  3. Male connector header 2x3
  4. Male connector header 90° 1x3 (GND+2DIO)
  5. 2 Servo Motors
  6. Capacitor 1uf

Regarding the Low Dropout Regulator, we review technical information here , and in summary its key technical characteristics are the following:

  1. It has 4 pins (IN, GND, OUT)
  2. Requires an output capacitor to maintain stability
  3. Dropout Voltage 500 mV
  4. Max Input Voltage 26 V
  5. Max Operating Temperature 85 °C
In regard of the servomotor, a device similar to a direct current motor, has the ability to be located in any position within its operating range, remaining stable in that position. In this case I use a 0 to 180 degree servo.

Schematic Development with KiCad

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.

PCB Designing

To obtain PCB design and fabricate it, we need to take the following steps:

  1. Select the PCB Editor File from the KiCad Principal Menu.
  2. Update PCB from Schemnatic option located at Tools Menu on PCB Editor.
  3. 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.
  4. 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 diameter
  5. Start drawing the traces selecting width and material correctly

This is the pcb design where you can see all the components. You can download design file and the SVG files here.

PCB Machining Setting

To fabricate PCB design we use SVG files applying following steps within FabModules Software:

  1. Upload SVG Board file.
  2. Convert SVG image inverted it using 1000dpi.
  3. Set mill traces (material) using 1/64" end mill (select 2 as offsetting number).
  4. Calculated Mill raster 2D.
  5. Visualize the image selecting width and material correctly
  6. Send file as final step
  7. Applied same steps for Cutting Edges but use 1/32" End Mill

The machining was made with a Modela MDX-20. I have got the following problems while machining:

  1. I machined a previous used board, and it seems that it wasn't attached firmly and moved while milling, so I had to stop the machine to avoid a broken end mill (photo 1)
  2. I made a mistake while stablishing coordenates when cuting edge layer, and affect my traces (phot 2)

PCB Soldering

To proceed with soldering I fix the PCB with double contact tape. Thus, we can avoid any movement when tin soldering

  1. I started soldering the small components
  2. I kept as strategy was to fix one (pin) of each component and then the others
  3. At The final step I soldered the terminal block, because it needed pcb perforations

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

The Programing

For functional testing I used a modified coding provided by Adrian-Torres and follow this Arduino IDE coding:

  1. #include .
  2. Servo myservo;create servo object to control a servo
  3. void setup() {
  4. myservo.attach(29); ttaches the servo on GIO26 to the servo object
  5. };
  6. void setup() { initialize the serial port:
  7. void loop() { step one step.
  8. int pos;
  9. for (pos = 0; pos <= 180; pos += 1)goes from 0 degrees to 180 degrees in steps of 1 degree
  10. myservo.write(pos);tell servo to go to position in variable 'pos'
  11. delay(15);waits 15ms for the servo to reach the position
  12. };
  13. for (pos = 180; pos >= 0; pos -= 1) {goes from 180 degrees to 0 degrees
  14. myservo.write(pos);tell servo to go to position in variable 'pos'
  15. delay(15);waits 15ms for the servo to reach the position
  16. };
  17. };

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