WEEK 10 (29 March 2017)
[Output Devices]
This week’s assignment was to add an output device to a microcontroller and program it to do something.
In this case I chose a board to make a circuit, and to be used in my final project through a stepper motor.
STEP 1: MANUFACTURING THE BOARD
The Hello stepper 44 board...
The circuit board uses 4 Integrated Circuits:
IC1: Microcontroller Attiny44
IC2: Power (voltage) regulator, limiting 5 V for Attiny44.
IC3 and IC: Mosfet bridge (to power the stepper motor)
My Schematic (TB 2017):
Once the design was finished and checked I exported PNG files of my board design:
Work in progress, verifying circuit, selecting components and soldering:
Assembled circuit board:
STEP 2: PROGRAMMING THE BOARD (HELLO STEPPER 44 BOARD)
The programming was made in UBUNTU:
Hardware:FabISP programmer and hello.stepper.bipolar circuit board and stepper motor (bipolar).
1º Copy the hello.stepper.bipolar.44.full.make and hello.stepper.bipolar.44.full.c files to Desktop;
2º Go to Ubuntu Terminal and move to Desktop;
3º Type: sudo make -f hello.stepper.bipolar.44.full.make program-usbtiny
Will be create more two files *.hex and *.out
This is the Terminal output produced:
estg@estg-A7C:~/Desktop$ sudo make -f hello.stepper.bipolar.44.full.make program-usbtiny
[sudo] password for estg:
avr-objcopy -O ihex hello.stepper.bipolar.44.full.out hello.stepper.bipolar.44.full.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.stepper.bipolar.44.full.out
AVR Memory Usage
----------------
Device: attiny44
Program: 496 bytes (12.1% Full)
(.text + .data + .bootloader)
Data: 3 bytes (1.2% Full)
(.data + .bss + .noinit)
avrdude -p t44 -P usb -c usbtiny -U flash:w:hello.stepper.bipolar.44.full.c.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "hello.stepper.bipolar.44.full.c.hex"
avrdude: input file hello.stepper.bipolar.44.full.c.hex auto detected as Intel Hex
avrdude: writing flash (496 bytes):
Writing | ################################################## | 100% 0.27s
avrdude: 496 bytes of flash written
avrdude: verifying flash memory against hello.stepper.bipolar.44.full.c.hex:
avrdude: load data flash data from input file hello.stepper.bipolar.44.full.c.hex:
avrdude: input file hello.stepper.bipolar.44.full.c.hex auto detected as Intel Hex
avrdude: input file hello.stepper.bipolar.44.full.c.hex contains 496 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.14s
avrdude: verifying ...
avrdude: 496 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
STEP 3: ADDING OUTPUT DEVICES
Finally, I connected the stepper motor and it runs very well
Watch the video:
I used Neil's program hello.stepper.bipolar.44 , and I'll use this stepp motor for my final project. I have to study how to change the code in order to make the moves needed for the cat feeder.
I definitely believe that this task has been very helpful . With the programs we have been given hope I research and learn more about the language C parameters, to modify and customize the program according to the ouput devices I will need for my final project.
Files:
- Files : schematic - png - rml