Week 11: Laboratory Goals

1. Wire up and test your circuits on the trainer.  Show the working circuits to your laboratory instructor.  Document each circuit with ORCAD.  These schematics are to be included in your final report.

Arduino IDE Lab:

1. Before opening the Arduino software, wire up the Arduino according to the circuits page using the 8MHz minimalist breadboard circuit. Call an Instructor over to check your work before powering the circuit.

2. Before doing the next step, check that it hasn't already been done by navigating to My Documents\Arduino\hardware and looking for a folder called breadboard. If it is there, skip the next step.

3. Go to the mae-server (Win+R, "\\mae-server\Micro\Software"), open the Arduino breadboard folder, copy the hardware folder into My Documents\Arduino.

4. Plug in your FTDI serial cable into a USB port on the front of your computer. Give it a few seconds to find the hardware.

5. Open the Arduino software (there should be a shortcut on the desktop). Ignore updates if your software is version 1.0.3 or newer.

6. Once open, go to Tools, Board, and select at the bottom "Atmega328 on a breadboard (8 MHz internal clock). Under the same Tools menu, go to Serial Port and select the FTDI serial port (number usually greater than 4, rarely 1 or 2). Now you are ready to upload a sketch (small user program).

7. Try modifying the Basic Blink example to flash on for 100msec and off for 1000msec. Call an Instructor over to brag about your accomplishment.

Assignments:

a) Write a program that changes the brightness intensity of an LED you wire up to "pin 11". How it changes brightness is up to you but it should be hands off. Be aware that pin 11 in the Arduino software is not physical pin 11 of the Atmega328p! Feel free to call over an instructor and show off. When doing this you might want to have your Oscilloscope connected and displaying the waveform.

b) Wire pin 8 to a data switch on your trainer and write a program that depending on the state of the switch, sets a servo position on pin 9 to either 0 or 180 (the servo library is necessary). Use your Oscilloscope to look at the servo signal. Call over an Instructor to again show off your mad programming skillz.

c) Using the serial monitor that is built into the Arduino IDE (Integrated Development Environment, aka desktop software), write a program that reads in a value and echoes back the same value. Note that it should not keep sending the last received value. It should only send once!

You are now ready to hookup the Arduino to your Vector board computer and communicate between them. The Vector board computer gets information from the signal sensor board (rest of the test stand) which can then be sent straight through to the Arduino to interpret. An example of this would be the train that is in the North block. Instead of just sending it to the TIL displays it can also be sent to the Arduino which you might be using to control switches or track power on sections of your project board.