Logo academy

WEEK 10

OUTPUT DEVICES

Fab Academy 2017 at Fab Lab Barcelona By Trinidad Gomez Machuca

Learning outcome W10

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

Stepper Motor

For this assignment I decided to make the stepper motor microcontroller because I would like to apply it in my machine design assignment, my team want to design a solar tracker and for that we need to control two stepper motors. So I followed Niel's board Niel's board for programming a stepper motor

Niel's Board

Eagle

Depending on the components, I followed the same process for designing my microcontroller, I made a schematic and then the board, exported the .eps file to made the traces and outlines .png, respecting the scale in order to process the files in the fab modules.

Schematic Schematic Board

Fab Lab Modules

I followed the same process for fab modules respecting the information for every setting.

Schematic

Soldering

Follow the components from the niel's boards in the page

COMPONENTS

A 4953

3 Capacitors 1uf

2 Capacitors 10uf

Resistor 10 k

2 Four Pin Header

1 Six Pin Header

Bridge 5V

Schematic

Solder all the components and when you finished you have to check with the voltmeter every trace, all the path of VCC, ground, Mossi, etc. Another important thing is to solder very carefully every component and before milling, check twice your Eagle file; I made 4 times this board because I always had some of the above mentioned problems. Make this microcontrolers is very easy, if you do it very carefully.

Schematic

Connections

After checked that all the components of your board are ok with the voltmeter, connect it to the AVR programmer, then connect the energy (in my case the stepper motor works only with 12V,) and finally connect to the motor. Note: If you only connect the programmer the light will be red because needs the 12V to work, when you connected the two at the same time, it should be green.

1. Here goes the energy, be careful, make sure wich one is VCC and Ground, otherwise you can burn the Attiny44. Follow your schematic.

2. Here goes the AVR programmer. Make sure which one is GND.

3. Here goes the stepper motor.

Schematic

Program it

Download the make file, just be sure that the file is for the Attiny44; after this, open your terminal and make the program. If you have something like the image, it means that your board has been programed.

Schematic

Honestly I'm not sure about the code in C, in general i understand that the motor will be prepared in the ports for receiving instructions for the direction of the output and then set 20 steps per every 100 cycles.

Like i said before I'm not sure about the code in C, that's why I used a basic example of how to control the stepper motor with the Arduino, it is very important to follow also the diagram of the conecction, the mayority of time this diagram are made in fritzing, and also read the datasheet of the pins of the driver, but more less with this example you can understand and control the stepper motors, they ar easier than i thought.

After 4 boards, it finally works!

After fixing all my soldering, traces, components and milling problems, mi microcontroller finally worked for the stepper motor. I connected it to a two different stepper motors, one in the solar tracker machine that I made for the assignment of Machine Design, and the other that I thought didn't work. For this assignment I did it in the week of output device but it didn't work, and I did it again after the machine design, while I was doing the solar tracker, I learnt a lot about stepper motors, in a manually way on Arduino. First I tried to do it with a CNC shield but it was too limitated for what I wanted to do, then I used drivers, it was difficult but easier than the CNC shield. What I learnt in the output device, is that making your own board is easier than use Arduino Hardware because is more simple. I used to believe that the stepper motors was one of the most difficult exercises for this week but it is not, the only thing you need is to understand the architecture of the Attiny 44, connect to the digital pins of the two drivers and program it.

SOFTWARE USED

//Arduino

//Eagle

Links for the Assignment

Output Devices

Output Devices Class

Output Devices Assignments and Assessment

Information about the Output devices

Stepper motorBoard

Stepper motorComponents

DOWNLOAD

Files for Output device


Fab Academy 2017 Fab Lab Barcelona Trinidad A. Gomez Machuca
IAAC trinidad.gomez@iaac.net