Digital Signal Acquisition / TINAH Intro To acquire digital information INTO the TINAH Board from external digital sensors. NB: Though your lab books will not be handed in, it is essential that you keep good notes to help you later when you are building your robots. Keep detailed records of your code, your circuits, and what worked and what didn’t. We may ask to see your notes to evaluate part of your grade in the course. Make sure you show a TA / Instructor that you have completed the Milestones, and that they have marked you off on the Master List at the front of the lab. Completion of Milestones will count for marks. 1. Connect your PC to the TINAH /Wiring Board and Download a program. You are free to use either the lab PCs or your own laptops. Follow the directions on the course website for setting up the programming environment and downloading a simple program onto the TINAH board, as described in the Getting Started section on the TINAH page. The lab PCs run Windows 7, and have the Arduino software and TINAH files installed. 2. Connect a switch to one of the TINAH’s digital inputs. Write a short program to display the status of the switch (open / closed) on the LCD display of the board. The TINAH board uses a three-conductor connector for plugging in sensors. The +5V pin may be used to power a sensor. The sensor signal pin (top row) is the input to the TINAH Board (this must be in the range of 0 to 5 volts). Finally, the ground pin (bottom row) connects to the system ground. Figure 1: digital IO header pins on TINAH board. Things to watch out for: 3. Converting an analog signal to a digital signal using a comparator. Read through all of the steps below first, then DRAW OUT ALL CIRCUITS ON PAPER FIRST. This will hopefully solve many of your problems before you try to build your boards, and allows TAs/instructors to give you better help! Wire up the QRD 1114 reflective sensor as described in this online reference page, but do not solder it. Instead, mount it on your solderless breadboard. Mount a comparator (LM311) on your solderless breadboard, and use the output of the QRD1114 as one input to the LM311, and the output of a voltage divider using a potentiometer for the other input (see LM311 application notes and class notes). In this way, the LM311 is used to compare the two voltage levels. As discussed in Lecture 1, the output of the LM311 is open collector (see data sheet or read up on open collector outputs) which means that it will float at an undetermined value unless it is pulled up to the logic voltage. Fortunately, the TINAH Board’s inputs are set up with internal 47kΩ pull-up resistors to handle open collector sources. Examine this effect by measuring the voltage at the output of the LM311 under these conditions: Wire the output of the LM311 to the TINAH Board and use the program you wrote for the microswitch to report the status of the optosensor on the LCD display. Use black electrical tape on a white sheet of paper to generate a signal from the optosensor. Use the oscilloscope or voltmeter to measure the signal and help you set a reference voltage with the potentiometer. Experiment with distance of the optosensor from the tape to get the best contrast (signal level over the tape vs. signal level over the bench surface). This is a similar setup to what you will use for tape-following for your robots. 4. Frequency counting – Write a short program to measure the frequency of a square wave. Set up the function generator to produce a square wave in the range of 0 to 5 V. Run the signal through a LM311 comparator and wire the comparator output to one of the digital inputs of the TINAH Board. Do not run the Function Generator directly into the TINAH board! This is protection of the digital inputs to the TINAH, and is good practice to learn about buffering your active input signals. Write a short program to measure the frequency of this square wave. Explore different frequencies to find the TINAH board’s limit at frequency counting. Optimize your program to have as few instructions as possible. This may help raise the maximum frequency that the TNAH board will count. Take advantage of the variety of functions you can find in the Arduino environment 5. Examine the input voltage limits of the comparator. Note what happens to the output voltage as the input voltage gets close to the power rails values of the comparator. See whether you continue to get the expected value, or whether it ends up generating unexpected values. Note that regardless of whether you get an expected or unexpected output, you cannot rely on electrical components operating as desired once you exceed their operating parameters – it is only luck if you continue to get your expected values! 6. Sending info back to the Computer. Use the “Serial.print” command to stream the output to the computer rather than the LCD screen (the instructions are here – they are very similar to outputting to the LCD screen). Use the “Serial Monitor” feature described in the Arduino environment. (This will be highly very useful for your ENPH 257 Thermo Lab, where you will likely want to record data to your computer using an Arduino board and an amplified signal from a thermocouple through an instrument amp circuit. You will be using the INA2126, you can find the datasheet in the Downloads section) Show your TA/Instructor the following: End of page.Objective
References
Pre-Lab
Lab Discussion (to be discussed at start of lab session)
Zendai Anthony for a few weeks )
Lab
Milestones
Hints
- Home
- ProjectLab
- ENPH 479 (Fall 2019)
- ENPH 459 (Fall 2019-Spring 2020)
- ENPH 353 - 2019 Term 2
- ENPH 253 (Summer 2019)
- Guides for 459/479
- ENPH 480/481
- Info for Project Sponsors
- Available Projects
- Hennings 115
- Lab Resources
- Student Awards
- Sign-Up Page
- Jobs
- Events and Talks
- Course Archive
- APSC 278 - 2018March
- ENPH 259 - presentations (2017 Nov)
- Sign-Up Page (APSC 101)
- Arduino (CUEBC 2016)
- COMM 386p (fall 2016)
- COMM 386p (Spring 2016)
- BAEN 580B (2015)
- BAEN 580B (2014)
- BAEN 542 (2013)
- Arduino Hands-On (2015)
- APSC 150 (Feb 2015)
- APSC 150 (Sept 2014)
- APSC 150 Tut 1.4 (Jan 2013)
- ENPH 459 (fall 2014)
- APSC 150 - electronics (2013)
- APSC 150 - Hand Tools (2013)
- IGEN 230 - mini-bootcamp (2012)
- PHYS 350 - projects (2017Jan-Apr)
- ENPH 479 (fall 2017)
- ENPH 479 (fall 2016)
- ENPH 479 (fall 2015)
- ENPH 479 (fall 2014)
- ENPH 479 (2013)
- ENPH 479 (2012)
- ENPH 479 - 2011/12
- APSC 479 - 2010/2011
- APSC 479 - 2009/10
- ENPH 459 (Fall 2018-Spring 2019)
- ENPH 459 (fall 2017)
- ENPH 459 (fall 2016)
- ENPH 459 (fall 2015)
- ENPH 459 (2013)
- ENPH 459 (2012)
- ENPH 459 - 2011/12
- APSC 459 - 2009/10
- APSC 459 2010/2011
- ENPH 253 (2018)
- ENPH 253 (2017)
- ENPH 253 (2016)
- ENPH 253 (2015)
- ENPH 253 (2014)
- ENPH 253 (summer 2013)
- ENPH 253 - 2012
- Phys 253-2011
- PHYS253 - 2010
- Phys 253 2009
- MINE 432 - Fall 2014
- PHYS 350 - projects (2011/12)
- MINE 432 - Fall 2010