"Input Devices"
This week our assignment was to "measure something: add a sensor to a microcontroller board and read it."
First of all I would like to thank:
- Moritz Kassner
- Rob Hemsley
- Ed Baafi
- Tiffany Tseng, and
- Dan Novy
for their time, assistance, and being there when I asked for help. This would be impossible without you. ;-).
I decided to do light and sound for input for my devices this semester. So I built two (2) boards. My goal was to program my boards with ModKit, a graphical programming environment for microcontrollers. I have high hopes for this program as I am no programmer; and C and Arduino are difficult to write if you have never done programming before. The sooner you get acquainted with ModKit, or find someone committed to helping you learn another programming environment, the better... otherwise, you will be in trouble!
After building the two boards, I had to make another Fabkit/ Fabduino Board because it got burned.
Burning Bootloader:
When all boards were set and ready, I now had to burn the bootloader onto the Fabduino using the USBTiny. The burn bootloader command configures the fuses of ATmega168 for an internal 8 MHz clock. Be sure to keep the button pushed down on your Fabduino while the bootloader is burning.
It will blink several times and tell you when the bootloader has finished loading.
Testing:
To test the correctness of my Fabduino, I used the Arduino "Blink" code... and it worked!
After that I tried teaching myself Arduino to program my board, but was unsuccessful. The environment was not user-friendly for me... and help was limited, so I had to find another way...
Modkit:
I met with Ed Baafi (ModKit guru) to learn how to program my boards using it. Here I thought it was just a matter of connecting the new boards (light and sound) that I built to it... no, no, no.
The Fabduino board already has its microprocessor (ATmega168), and what I would need to do is design another board without the microprocessor and its supporting components, and design a board only with those needed to run the phototransistor (and/ or the microphone). Yikes!!!
Ed explained to me how the designing of these separate boards to plug into the Fabduino should work. Mighty helpful. Now all I need to do is learn electrical design I guess... I'll try bit by bit.
We made "Mac Gyver" looking contraptions to test the components and connections needed for the light sensor to work. Using Modkit it worked!!! then the board was designed in Eagle.
Milling and Stuffing:
After exporting the design from Eagle to png files I went to mill them on the Roland Modella. That was another issue, but in the end, with Novy's help, I made my boards and soldered my components.
Programming with Modkit & Arduino:
When I got home I checked and programmed my boards using Modkit and Arduino and they both worked. See images for the results.
I still have to design the layout for the microphone to be able to use it with the Fabduino. I hope to get the time to try that because I know it will help me.
Lessons Learned:
1. Modkit is a great place to start for non-programmers.
2. Be sure you have someone to count on to help you when you need it... and do the same for someone else.
3. Have a Plan B, and C.
Resources:
1. Txt file to myself on procedure for uploading material to site.
2. Eagle files (board) and (schematics).
3. Board trace and outline.
Links:
ModKit: http://www.modk.it/
Website: http://www.vernellenoel.com/
Blog: http://thinkinginsomniac.wordpress.com
Flickr: http://www.flickr.com/photos/thinkinginsomniac/
|