12. Output devices

This week I will:

  • Measure the power consumption of an output device (group project)
  • Add an output device to a microcontroller board I’ve designed and program it to do something (individual project)

Research

  • Went through the electronic parts inventory to review what was available for the “displays” project listing. I intended to use the LCD display to prepare for its use in my final project. All parts are available.

  • Measured the power consumption of incandescent (100%), fluorescent (50%), and LED (25%) light bulbs.

  • incandescent (100% - 24 watts)

  • fluorescent (50% - 12 watts)

  • LED (25% - 6 watts)

Results

  • Description: Complete assignments and produce outcomes of Week 12 Output devices.

  • Requirements: Show how I made and programmed the board; explained any problems and how I fixed them; include a ‘hero shot’ of my board

  • Planning: Setup the Roland SRM-20 mill for board production.

  • Materials: Using current laptop, internet connection, and Roland SRM-20 mill. Used acrylic boards to make a sacrificial platform. Solder station and supplies. Microcontroller: 1x ATTiny 44 microcontroller; Discrete devices: 1x Resonator 20MHz; 1x Resistor 1k ohm; 1x 10k ohm resistors; 1x Resistor 100k ohm; 1x IC 5.0v 100mA LDO Voltage Regulator; 1x Capacitor 1uF; 1x 2x2 pin header; 1x 2x3 pin header; 1x 2x5 pin header; 1x LCD Module

  • Problems: I made 2 test boards; 1 successful and 1 failed due to crashed 1/64 endmill in the process; I believe it was end of usefulness. The copper trace pulled away on the J2 power connector.

  • Corrections: Used the successful board. Only used the 2 pins for power.

  • Workflow: I used the mods to produce the LCD board. No problems in the use. Mods makes it so easy. Thank you, Neil!

  • Success: I made 2 boards. The second one had the endmill failure.

Code Example

jimhart@jimhart-Xubuntu2:~/display/displaytemp$ sudo make -f hello.video.44.make program-usbtiny
[sudo] password for jimhart: 
avr-gcc -mmcu=attiny44 -Wall -Os -DF_CPU=20000000 -I./ -o hello.video.44.out hello.video.44.c
avr-objcopy -O ihex hello.video.44.out hello.video.44.c.hex;\
avr-size --mcu=attiny44 --format=avr hello.video.44.out
AVR Memory Usage
----------------
Device: attiny44

Program:     470 bytes (11.5% Full)
(.text + .data + .bootloader)

Data:          1 bytes (0.4% Full)
(.data + .bss + .noinit)


avrdude -p t44 -P usb -c usbtiny -U flash:w:hello.video.44.c.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9207 (probably t44)
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.video.44.c.hex"
avrdude: input file hello.video.44.c.hex auto detected as Intel Hex
avrdude: writing flash (470 bytes):

Writing | ################################################## | 100% 0.79s

avrdude: 470 bytes of flash written
avrdude: verifying flash memory against hello.video.44.c.hex:
avrdude: load data flash data from input file hello.video.44.c.hex:
avrdude: input file hello.video.44.c.hex auto detected as Intel Hex
avrdude: input file hello.video.44.c.hex contains 470 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.90s

avrdude: verifying ...
avrdude: 470 bytes of flash verified

avrdude: safemode: Fuses OK (E:FF, H:DF, L:62)

avrdude done.  Thank you.