Output Devices

Add an output device to a microcontroller board you've designed and program it to do something.

About my board

For this week's assignment I experienced with designing and programing a board which operate a project called Tiny CNC the Mini 3-Axes CNC v0.29 by MakerBlock. I hope this experience will provide me a backround for my final project later development.

The tiny CNC device with X, Y and Z axes, includes three micro Servo motors and some 3D printable plastic parts you can download from the linked above Thingiverse page. I deal with only the X and Y axes. Handling with programing a microcontroller board to move a point on two axes by rotating the Servos.

Experiencing with Arduino

After assembling the prehead TinyCNC device I followed the instructions I found on this page.

Working process:
  1. wiring the Servos to the Arduino board.
  2. downloading these files.
  3. opening the MiniCNC code (located inside the MiniCNC folder) on Arduino IDE.
  4. checking my wiring compatible with the code.
  5. uploading the code to the Arduino board
  6. opening the serial monitor, matching the baund definition to the code and receiving an answer.
  7. typing a coordinate making the ‘header’ moving on the X axis following by the Y axis.

Fabricating my own board

After succeeded with programing an arduino and operating the TinyCNC I turn to designing my own board. I based my design on the Hello Servo board For a better understanding about the structure of the board and the use of the regulator I turn to compare between the microcontroller and the servo motor operating voltage through their datasheet:

working process through Eagle:
  1. redesigning the Hello Servo board schematic
  2. Adding component to the schematic
  3. Naming, labeling and linking the component
  4. Placing the components over the brd
  5. Tracing+Design rules
The board's BOM:
  1. 1x ATtiny44
  2. 2x 2x3 pin header
  3. 1x 20MHz resonator
  4. 1x 2x2 pin heade
  5. 1x 10kΩ resistor
  6. 1x 22uf capacitor
  7. 1x regulator IC2 5V 1A
The board's files:
download SCH download BRD
Milling with Othermill & Stuffing

Setting parameter over Otherplan and the stages to complete:

  1. The current tool, when changing the tool test for the Z facto
  2. Material: kind, size and placement
  3. Plans: File to upload and placement
  4. Milling tools:
    1. 1/32in for surface cleaning
    2. 1/64in for traces milling
    3. 1/32in for cutout

Otherplan alerts you if there are areas which needs a smaller tool.

Programing the Board

After completing the assignment of week eight, embedded programing, the programing went smoothly. I downloaded the files from the lecture page:

  1. C (two-channel, software PWM)
  2. Makefile

Then I located them inside a pre made folder on my computer. I navigate over the terminal to the folder and ran the make -f filename and the make -f filename program-usbtiny commands. After burning the program on my board I wired both of the servos motors and connected the board to Arduino Uno as my power supply. After completing wiring I supplied power to the Arduino Uno and it worked!!

Editing the code

Over the datasheet of the servo I found explanation about what ‘ms’ stand for. I’ve wanted to create a sketch for the TinyCNC that will draw a square. First I located both X and Y axes over point 0,0 (-90° to the left). Then I moved the X axes all length that the servo unable (90° to the right). After I moved the Y axes the full length (90° to the right). For the third side I moved the Y axes back to point 0 (-90° to the left) and at last the X axes back to point 0 (-90° to the left).

download c.file download make.file