Informatics Enlightened Station 2 Park distance control system

Similar documents
Informatics Enlightened Station 1 Sunflower

ET-REMOTE DISTANCE. Manual of ET-REMOTE DISTANCE

1. Arduino Board and Breadboard set up from Project 2 (8 LED lights) 2. Piezo Speaker

Luminaire installation box Surface-mounted box Ceiling installation box

Your EdVenture into Robotics You re a Controller

Module 4: Traffic Signal Design Lesson 1: Traffic Signal (Arduino) Control System Laboratory Exercise Grade 6-8

CBL Lab MAPPING A MAGNETIC FIELD MATHEMATICS CURRICULUM. High School. Florida Sunshine State Mathematics Standards

System Requirements SA0314 Spectrum analyzer:

LWC Series LWC-80. Design. LWC Series Laser Wire Counters. Product name: Accessories: LWC-80

Meet Edison. This is Edison, the programmable robot. What is a robot? A robot is a machine that can be made to do a task on its own.

SPACESCAN SERIES SS 02

Workshop III: Analog and Sensors

Operating Instructions

E X P E R I M E N T 1

MATLAB & Image Processing (Summer Training Program) 4 Weeks/ 30 Days

Tri-level Control HF Sensor

Motion detector theluxa P300 KNX Motion detector theluxa P300 KNX

Trial version. Analogue to Digital Conversion in Distance Measurement

Image Processing Using MATLAB (Summer Training Program) 6 Weeks/ 45 Days PRESENTED BY

Features/Specifications

Pinewood Derby Finish Line Detection System

Light Curtain Type LA

Operation/Reference Guide IRIS. Infrared/Serial Data Capture Unit. Control System Accessories

Training Note TR-06RD. Schedules. Schedule types

Lecture (04) Arduino Microcontroller Programming and interfacing. By: Dr. Ahmed ElShafee

PIXEL TOUCH PCB KEEP THIS MANUAL FOR FUTURE NEEDS

Electrical and Electronic Laboratory Faculty of Engineering Chulalongkorn University. Cathode-Ray Oscilloscope (CRO)

(Skip to step 11 if you are already familiar with connecting to the Tribot)

8000 Plus Series Safety Light Curtain Installation Sheet ( CD206A/ CD206B )

Lego Robotics Module Guide

9/23/2014. Andrew Costin, Tom Syster, Ryan Cramer Advisor: Professor Hack Instructor: Professor Lin May 5 th, 2014

Technical data. General specifications. Indicators/operating means

Orbit Marine LED Light with 24 hour Ramp Timer Pro LED Controller

Warranty Information

STX Stairs lighting controller.

Azatrax Model Railroad Track Signal Control - Single Track

OFC & VLSI SIMULATION LAB MANUAL

RADIO RECEIVER RGBW CONTROLLING LED STRIP COMMON ANODE

Wall Ball Setup / Calibration

127566, Россия, Москва, Алтуфьевское шоссе, дом 48, корпус 1 Телефон: +7 (499) (800) (бесплатно на территории России)

Lesson Sequence: S4A (Scratch for Arduino)

"shell" digital storage oscilloscope (Beta)

This module senses temperature and humidity. Output: Temperature and humidity display on serial monitor.

Lab experience 1: Introduction to LabView

TV Character Generator

Specifications. End-Point Linearity - ±5% F.S., when used with HACO SCR-speed control

QTI Line Follower AppKit for the Boe-Bot (#28108)

Prototyping & Engineering Electronics Kits Magic Mandala Kit Guide

User Manual CC DC 24 V 5A. Universal Control Unit UC-1-E. General Information SET. Universal Control Unit UC-1 Of Central Lubrication PAUSE CONTACT

LinTronic. BeoSystem control of non-b&o TV, screen or projector CINEMA MODE. Updated: BeoSystem control of non-b&o TV, screen or projector

Absolute volume control is also possible with SP Controls option Audio Follow Video Preamplifer.

Physics 217A LAB 4 Spring 2016 Shift Registers Tri-State Bus. Part I

Experiment 9A: Magnetism/The Oscilloscope

Chapter 4. It Began with a Dripping Faucet

Data Sheet SPECTRO-3-SLU-BA-ANA + SI-SLU-16. Receiver optics incl. 3-color filter detector (True Color), scratch-resistant optics cover made of glass

Experiment 0: Hello, micro:bit!

Your EdVenture into Robotics You re a Programmer

Writing Programs INTRODUCING THE BASIC STAMP EDITOR 2 SCRIBBLER HARDWARE PROGRAMMING CONNECTIONS 8 BLINKING THE LIGHTS WITH PROGRAM LOOPS 9

OWNER S MANUAL MOTORIZED 7 WIDE TFT LCD COLOR MONITOR CNT-701

INC 253 Digital and electronics laboratory I

CM-T10-PRO and PRO-E. Wireless Control for ColorMaker Series LED Fixtures with ColorRoll Technology User s Manual

Ginger Bread House

VNS2200 Amplifier & Controller Installation Guide

RF Detector with Real Time remote Monitoring Capability Protect from RF Audio/Video Transmitters and Laser Monitoring System USER MANUAL rev.

EDUCATIONAL TUTOR FOR MENTALLY DISABLE STUDENTS

Experiment 13 Sampling and reconstruction

Using an oscilloscope - The Hameg 203-6

CM-392-Video to HDMI Scaler Box ID#481

L, LTC, LTM, LT are registered trademarks of Linear Technology Corporation. Other product

45 mm : all channels. Output indicator Yellow LED System status indicator Light source Infrared (880 nm) Opening angle +/ 4 Emission angle +/ 5

ENGR 40M Project 3b: Programming the LED cube

RADIO RECEIVER RGB CONTROLLING LED STRIP COMMON ANODE

Pole Zero Correction using OBSPY and PSN Data

VNS2210 Amplifier & Controller Installation Guide

ORM0022 EHPC210 Universal Controller Operation Manual Revision 1. EHPC210 Universal Controller. Operation Manual

SPECTRO Series SPECTRO-3-50-UV-JR. Aufbau. SPECTRO-3 Series True Color Sensors. Product name: SPECTRO-3-50-UV-JR (incl. software SPECTRO3-Scope)

STSW1001T STSW1001R STSW1001 INSTALLATION / USER'S MANUAL

Contents: 1 LANsmart Pro Main Unit 4 Remote Unit: ID1, ID2, ID3, ID4

B. The specified product shall be manufactured by a firm whose quality system is in compliance with the I.S./ISO 9001/EN 29001, QUALITY SYSTEM.

2000 W, 2450 MHz Microwave Generator GMP 20K SM 56M230 FST 3 IR

Netzer AqBiSS Electric Encoders

Working with CSWin32 Software

Troubleshooting. 1. Symptom: Status indicator (Red LED) on SSR is constant on. 2. Symptom: Output indicator (Yellow LED) on SSR is flashing.

All real signals have scale factor 10. Integer, Index and Logic has always scale factor 1.

DESIGN AND DEVELOPMENT OF E-SAVING METER TO PREVENT THE WASTAGE OF ELECTRICITY

RF4432 wireless transceiver module

Sensopress LCD Special English

B2 Spice A/D Tutorial Author: B. Mealy revised: July 27, 2006

SPECTRO Series SPECTRO-3-30-UV-ANA. Design. SPECTRO-3 Series True Color Sensors. Product name:

Lip Sync of Audio/Video Distribution and Display

SPECTRO Series SPECTRO-3-50-COF-...-CL. Design. SPECTRO-3 Series True Color Sensors. Product name:

Introduction. Introduction

LEVEL CROSSING MODULE FOR LED SIGNALS LCS2

VHF & UHF REMOTE RECEIVERS INSTALLATION AND PROGRAMMING INSTRUCTIONS MODEL NUMBERS TMP-5414 & TMP 5428

SPECTRO Series SPECTRO-3-20-COF. Design. SPECTRO-3 Series True Color Sensors. Product name: Accessories: (p. 9)

Analogue Inputs Resolution Assignment

NENS 230 Assignment #2 Data Import, Manipulation, and Basic Plotting

Workshop 4 (A): Telemetry and Data Acquisition

Wireless 5.8GHz AV Sender With Built in Remote Control Extender

A MISSILE INSTRUMENTATION ENCODER

Transcription:

Those of you who will get their driver s license soon will have to deal with one huge nightmare: parallel parking! You move your car back and forth, but in the end, you re still not in the right spot and you never move your eyes away from the mirrors, because you fear you might bump into the car behind you. Thank goodness that most modern cars come with an integrated park distance control system, which keeps you from bumping into other cars with the help of loud, increasingly fast beeping. Fig. 1: Parking assist by Nozilla But how does such a control system work? How does the car know the distance? And how does distance become a warning signal? The answer is hidden: invisible light! Or rather infrared light, which you know from infrared remote controls. Light in the infrared spectrum is invisible to the human eye. It is sent by a sensor, reflected on a surface, and then registered by a receiver. You will learn how to measure distance und how to create warning signals with the help of the Arduino microcontroller. That way, you will hopefully prevent any bumps in the buffer-bar of our test car ;-) The structure of your wiring Necessary devices The wiring of the infrared park distance control system is not complicated, besides the Arduino and the patch panels, all you need is:... 2 cables (red and blue), a Piezo-signaler and an infrared distance measuring sensor. 1

IR distance measuring sensor The infrared distance measuring sensor Sharp GP2Y0A21YK is a complex device with an integrated connection that can measure distances between 10 and 80cm pretty accurately. light sensitive receiver sender (infrared LED) The sensor has two eyes, a sender and a receiver. The sender sends an infrared light, which is reflected by a surface and then hits the receiver always in a different angle depending on the distance. With this information the device can calculate the distance with a particular mathematical method. The sketch on the left shows you how it s done. Fig 2. Infrared distance measuring sensor Piezo-signaler The acoustic Piezo-signaler is a so called buzzer or beeper, a small device that is controlled electronically to play a particular sound so it is an acoustic display. They are used everywhere that warning signals or notification in the form of sound is needed for example in smoke detectors, in microwaves or as beeping in a park distance control system. Fig. 3: Piezo-signaler Now we can start the construction These steps will help you with your wiring (the patch panels will not be needed for that) 1. With the help of the blue cable, connect the minus pole (the shorter leg!) of the signaler with one of the GND pins of the Arduino (at the digital pins). 2. With the help of the red cable, connect the plus pole (the longer leg!) with one of the digital pins [e.g. 8], which you will use to control the output. [Note: Pins 0 and 1 cannot be used for this.] 3. The IR-distance-senor is directly connected to the Arduino. Use the black cable to connect it to GND (at the analog pins), the red cable to connect it to 5V and the white cable to connect it to one of the analog pins [e.g. A0], which you will use as the input pin to measure the distance. 2

[Note: Your wiring can look different from the picture on the next slide (for example the choice of the pins). That s absolutely fine, there is not only one solution!] Analog Pins So far, you ve only got to know digital pins, which you used to connect an LED. These pins can only read in and out binary values so like on/off, 0/1 or the values that you already know HIGH and LOW for high or low voltage. A distance sensor on the other hand can receive more than just two values, it measures many different interim values in the minimum and maximum value range. This is detected by the analog pins on the Arduino (A0 to A5), which is used to measure whole regions. Fig. 4.1 Complete wiring Fig. 4.2 Complete wiring (Fritzing image) 3

Manual distance measurement First, you will read in the data that the infrared sensor measures with the help of a little program and then display them in the serial monitor. So your first assignment is to use the IR-sensor to measure the distances and fill in the different centimeter values into the table on page 7. You have to do that so that you know which values match the different centimeter distances. Fig. 5: Output values of the IR distance measuring sensor between 10 and 80cm The analog input pins of the Arduino will always give you a value between 0 and 1023, so we need to be able to translate that to centimeters. But that s actually not that simple, there is no quick mathematical formula to do this conversion (I mean, the graph does look pretty weird). [Note: You will later get a formula, which you can use to compare the data that you ve filled into the table!] In this first step, you will learn how to read in the sensor values using an analog pin and display those values on the serial monitor. Your to-do s 1. Open a new Arduino sketch and save it under a reasonable name. 2. Create the default structure, which you know from the introduction. 3. Before you can start working on and you have to define (just as in the introduction) an the pin. variable for the analog input pin and assign it the correct number of [Note: Even though the pins are called A0, A1, etc., you only use the number in your sketch!] 4

4. Now, you have to declare a second variable, where you will save the senor data, so that you can use them any time you need. Don t forget to use appropriate names! 5. Let s do : a. How do you start the transmission of the serial monitor? 6. Now, let s do : Which command you learned in the introduction does that again? a. The most important step is the reading of the sensor values. Different from setting the voltage at a digital pin to HIGH or LOW, you need to use this command to read in the sensor values. So assign the values to the variable from step 4 with the help of the = -symbol and choose the correct pin. = ( ); b. Now, we need the display on the serial monitor, which will be initiated with. Include a short description of what should be displayed. Don t forget to use inverted commas. c. Add a second ouput, which should include the variable of the sensor values in the brackets. This time don t use inverted comma, because you only need those for texts! But in this case, we want to display the sensor values, which are saved in the variable. d. Add a at the end of the command, which updates the values every one or two seconds. Otherwise, the values will be displayed lightning fast in the serial monitor. 1 second = 1000 milliseconds 7. It s time to test your sketch! Connect the Arduino again, run the program and watch the sensor values. You will soon notice that the distance values are not between 10 and 80cm. min = max = What are the minimum and maximum values the sensor measures in the range between 10 and 80cm? It s not enough just knowing the minimum and maximum values, we want to know how those values translate to the distances between 10 and 80cm. For that, you need a piece of paper and 5

a ruler to determine which values are displayed for 10, 20, 30 cm, etc. Fill in these values in the table! [Hint: The IR sensor measures most accurately, if you use a white piece of paper to reflect the infrared light!] distance 10 cm 20 cm 30 cm 40 cm 50 cm 60 cm 70 cm 80 cm sensor values Don t get frustrated! Even if you hold the sensor very steady, it still might give you different values for the same distance. Just use the average of the values you got. A simple warning signal What do you notice about distances under 10cm? Let s get back to programming. For now, the sensor measures the distances, but we don t have a warning signal yet. For that, you have to use the second device, the Piezo signaler. In the next step, you will learn how to include and control the Piezo signaler in your sketch and how to create an acoustic signal relative to the sensor values. Your to-do s 1. Save your Arduino sketch under a different name ( Save under ). From now on, you will expand, change and adjust your program again and again. 2. Come up with a new variable for the Piezo signaler and assign it the digital pin which you used to connect it to the Arduino. 3. (): Here, you have to define the Piezo signaler as output (since it creates a sound) just like you did for the LED in the introduction. 6

4. In you need the good, old - command you know from the introduction. - -command If you want to define in your sketch that something should happen given a certain condition for instance creating a beeping sound, if the distance is too small you can use the so called - -command. This is how it is used: If the condition is true, the first command is executed, if it is false, the second command is executed. You usually use mathematical comparisons (>, <, >=, <=, ==) for such a condition. There is also the logical operator && [and] to check whether two conditions are true at the same time: a. Now we have to use such an - -command. Set up a structure for that, just like the one in the box. b. You want the Piezo signaler to beep create a continuous sound if the distance to the infrared sensor is too small (here under 40 cm). So, which variable do you need to come up with the correct condition? Have another look at the table: Which boundary value do you have to compare it to? c. If your condition is true, so the distance is too small, a continuous sound should be created. For that, you need to set the digital output pin to HIGH (just like you did for the LED). d. In any other case, there shouldn t be any sound. Think about what command you have to include in your - -command, so that the Piezo signaler is switched off again. Write down your thoughts in this schema: 5. Done! Transfer the sketch to the Arduino and test it. Are you happy with the distance you set? Do you hear the sound too early/too late? 7

What now?! Do you have some other ideas or suggestions for improvements? Discuss them in your group and write them down below! In the next two sections, you will keep on improving your park distance control system. Keep on experimenting and programming! We wish you a lot of fun!!! Notes: Beep, Beep! Or not.. So far, your control system makes one continuous sound, if the distance is too small. But a driver wants to know how much space he has left, if he s already too close or if he has nothing to worry about! All that can also be done with the help of the Piezo signaler, it can just beep again and again. Do you have any suggestions how you can do that? (Think about the introductory project..) In this improvement, you will learn how to set up distance intervals with the help oft he sensor values and create a beeping sound using and. Your to-do s 1. You ve got everything set up, so you can get started right away by saving our old sketch under a new name! 2. You will only need to change the, or rather just the - -command: a. Have a look at your table on page 6 and think about an appropriate interval of sensor values and centimeters in which no sound is necessary and two others in which there should be beeping of different speeds. 8

Interval 1 - no danger - Interval 2 - car is approaching obstacle- Interval 3 - danger - centimeters > - < sensor values < - > b. Now you just have to adjust your if- -command a little bit, by adding these intervals you ve just come up with. You have to change your one - - command (which can only distinguish between two intervals) to three ifcommands. [Hint: Use the mathematical comparisons and especially the logical && [and] and change the speed of the beeping with the help of delays.] For each of the three intervals you need a separate -command like this: 9

3. Now, you re ready for the testing phase! Transmit your sketch and test your improvements. Change the intervals if need be, until you re happy with the result. Done?!? Congratulations! You did it! The test car can now be parked with ease just because of you If you like, there is another challenge for you Just ask your instructor for the bonus assignment! List of references: Fig. 1 Source: Nozilla Parking assist under license CC BY-SA 3.0 / altered original Fig. 2, 3, 4.1, 5 Source: InfoSphere Fig. 4.2 Source: Screenshots of the Fritzing-Software (http://fritzing.org) All other graphics/icons Source: InfoSphere 10