WEEK 9 - OUTPUT DEVICES

hero shot


final working

this week i am planning to start with my final project.i need to find and test the motor need to be used for my #SLOT-MACHINE.options in mind are stepper motor or dc motor with encoder. i am building a motor driver board ot test both dc and stepper, make a comparison about it this week

assignment

individual assignment

  • add an output device to a microcontroller board you've designed, and program it to do something
    group assignment:
  • measure the power consumption of an output device

about the motors

dc motor

A DC MOTOR IS AN ELECTRIC MOTOR THAT USES A DIRECT CURRENT TO GENERATE TORQUE. IT HAS A ROTOR THAT SPINS INSIDE A STATOR, AND THE ROTATION IS CAUSED BY THE FLOW OF ELECTRICAL CURRENT THROUGH THE MOTOR.

brushed-vs-brushless-motor-1-1200x579-960w.png.jpg

difference between brushed and brushless dc motors

dc motors are more EFFICIENT compared to stepper motors.

stepper motor

stepper motor is one most identifiable motor i saw on on fablabs. because they are avidly used in cnc and 3d printers. they are heavy and high TORQUEY can CONTROL steps or angles.

IMG_7890.jpg

IMG_7892.jpg

BUT STEPPERS CAN'T REVOLVE FAST AND AREN'T EFFICIENT.

making the board

i am using two a4953 with a attiny 1614 to make a MOTOR DRIVER board that can control both dc and stepper motor. thsi design is inspired from #NEILGERSHENFELD board

hello.stepper.bipolar.44.jpg
neil's hello stepper board

i made a schematics usig kicad which documented in WEEK 8 - ELECTRONICS DESIGN.

Pasted image 20240402122903.jpg

final schematics

then i routed the board.while routing the board i have give 0.6mm traces for 12 v lines to avoid potential short circuits and electrical breakdown.

Screenshot 2024-03-26 at 3.20.26 PM.jpg

in order to do this you need to add sizes in PREDEFINED sizes in board settings.

Screenshot 2024-03-26 at 3.24.55 PM.jpg

Screenshot 2024-03-25 at 8.10.04 PM.jpgbill of materials exported from kicad

after routing i milled the board after several tries of not getting milled properly because of bed level issues. milling is documented in WEEK 4 - ELECTRONICS PRODUCTION

IMG_7885.jpg
milled board. i named it "dumotod"

i made a mistake by removing pad under a4953 chip to ease routing but now i have to insulate the tracks under it.

IMG_7887.jpg
insulating track to avoid shorting

and i soldered the board.

IMG_7889.jpg

connecting the stepper

SerialUPDI
UPDI programming for Arduino using a serial adapter
Based on pymcuprog, with significant modifications
By Quentin Bolsee and Spence Konde
Version 1.2.3 - Jan 2022
Using serial port /dev/cu.usbmodem413B84523 at 57600 baud.
Target: attiny1614
Set fuses: ['0:0x00', '1:0x00', '2:0x02', '5:0b11000100', '6:0x04', '7:0x00', '8:0x02']
Action: write
.10/tools/libs/pymcuprog/serialupdi/link.py", line 44, in init_datalink
    raise PymcuprogError("UPDI initialisation failed")
pymcuprog.pymcuprog_errors.PymcuprogError: UPDI initialisation failed
Failed to burn bootloader: uploading error: exit status 1

debugging the board

the board had many issues including

IMG_7660 2.jpg

  1. I had to place a jumper and a diode between the voltage regulator to avoid interference and ensure smooth operation.
  2. I removed the ground under-padding behind the A4953 motor driver and rewired underneath it. To prevent shorting, I had to add insulation between the motor driver and the board.
  3. I initially forgot to include pull-up resistors for the I2C lines, which I later added to the board.
  4. I also forgot to connect a power wire to the motor driver, so I had to use a zero-ohm resistor to bridge it.

This board earned the distinction of being the "ugliest" board I've made so far. However, I learned a lot from the experience. [Saheen]((https://fabacademy.org/2021/labs/kochi/students/saheem-palayi/about_me.html) was incredibly helpful throughout this journey, assisting me with debugging the board.

group assignmnet

You can find our group page here and this week is here

graph.jpg

power consumption pattern analysis of stepper motor

To determine the power consumption of the NEMA 17 stepper motor, we adjusted the voltage and current settings on the DC power supply, recorded the power consumption (Power = Voltage * Current), and observed how power varied with changes in voltage and current. This involved careful observation, documentation, and calculation of efficiency based on operational modes, speeds, and loads.

final result

the ocde generated using chat gpt by modifying niels output week code and is added in files.programming is done using updi and DOCUMENTED by adrain in QUENTORRES


dc motor test

IMG_7652.jpg
the setup


finally stepper motor is working