Week 6: Embedded Programming

PART I | Testing Equipment

  1. testing oscilloscope

    I went to Harvard Science Center, where they taught us how to use digital multimeter and oscilloscope to troubleshoot our boards.

    The DMM can check voltage, resistance and current at different parts of the board to see if there is any short ciucuit or signal problems. The oscilloscope produces graphic representation of the actual pulses going through certain points in the circuit.

  2. button

    The board we used to test these equipments is designed in its simplest way that only one button is present (controlling the LED light). It is programmed differently than our previous board. It is a one-time board, with no option to reprogram.

PART II | Design and Making

  1. reference

    Based on my past experience of failing, I decided to shadow and collaborate with one of my classmates this time.

    Paohao is trying to make a board that convert electrical pulses into sound waves through the addition of a speaker, so I did this experiment with him.

    We did not start from scratch since there is already many available sources online.

    Here is a link to a project that we based ours on.

    Also, we went to Erik's office hour and consulted him about the design and conversion into sound frequency through coding.

  2. board

    The design is done in Eagle. A resistor was added in series with the speaker so that the current across the speaker will not overflow and blow up the microcontroller (ATtiny45).

    Then it was milled on CNC.

  3. set up

    Components were soldered onto the board, with the speaker standing vertically rather than laying down as indicated in the drawing. And we realized that the speaker is actually directionless(speculation).

    Also, during the recitation, I learned that it is actually possible to power the board directly through ground with wire if there is a power supply control.

    We connected the board to the power sypply and turned it on(gradually dial it from 0V to 3.3V).

    The blue LED light is ON!!!!!

    Then, we connected our board to a commercial programmer (avrispmkII), which is then connected to the computer with USB cable.

    The programmer shined green light, which means it is powered and connected correctly in terms of direction.

  4. program it

    We downloaded and prepared all the necessary files, including make and hex files.

    However, error started to pop up when we tried to 'make flash' in the terminal.

    We are a bit confused and decided to test our equipment with DMM to make sure the microcontroller gets powered.

    The voltage is showing up around 3V, which is normal, so nothing significantly wrong with the board.

    We researched more online about how to use a avrispmkII to program ATtiny45, and some useful info pop up.

    Here is a link for this helpful website.

    It seems like there is some problem with identifying the usb port that the programmer is connected to.

    We got stuck at this point and run out of time to get this board properly programmed.