Mechatronics I Lab Report 2 Arduino Morse Encoder

8m ago
6 Views
1 Downloads
947.16 KB
18 Pages
Last View : 28d ago
Last Download : 3m ago
Upload by : Abram Andresen
Transcription

Mechatronics I Lab Report 2 Arduino Morse Encoder Instructor: Joseph Timothy Foley Axel Bender & Elías Marel September 27, 2012

Contents Contents 1 1 Introduction 1.1 Background 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Design 2 3 2.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 Limitations 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Testing 8 4 Usage 8 4.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4.2 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5 Results and Discussion 9 6 Conclusion 9 6.1 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 7 References 11 8 Appendix 12 8.1 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 8.2 Tests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1

1 Introduction Communication issues between di erent types of software is a problem every software and mechatronic engineer must face. It is often necessary to translate information between platforms, be it via analog or digital signals, and make it understandable for di erent types of hardware. In this lab exercise we are forced to deal with this well known issue to learn about it rsthand. Another big factor of this experiment is to dive into real world implementation of functional programming. The design and development of the project will be implemented using ideas and concepts of Test Driven Development (TDD). A Morse code encoder will be designed using an Arduino Uno that is connected to a laptop via a serial USB cable. The serial monitor of the Arduino development environment called Arduino 1.0.1 will be used to feed a message containing letters and symbols from a keyboard to the Arduino. The Arduino will then translate the message, if possible, and send it out in morse code by blinking a LED. 1.1 Background Morse code was in it's day the preferred method for long distance communication. Before men were able to transmit voice, radio transmissions were in the form of clicks, pulses and silences. Morse code grew to popularity over many other transmission methods due to many qualities, including the fact that one of it's creators, Alfred Vail researched the frequency of use for each letter in the English language and designed the code for optimum transmission speed. Samuel Morse only included numerals in his original morse code which dated back to the 19th century. Morse proved in 1835 that signals could be transmitted through wires after experimenting with using electric current to move an electromagnet attached to a marker to write dots and dashes on a piece of paper [1]. His partner Alfred Vail added the English alphabet to the code and eventually morse code would be used in the rst radio transmissions. Even after vocal radio transmissions were possible morse code remained useful, especially in military purposes. During World War II, for example, communication between ships and over long distances was performed with morse code radio transmissions since voice radio had very limited range. Today morse code is mostly used for emergency communication, mainly in air tra c. The main reason for morse code's survival to date is that no special technology is needed to communicate in Morse code with a skilled listener, signals can be sent as blinking lights, knocks or other sounds. Interestingly, morse code has been used by musicians to hide secret messages in their music. One example is The Strangler's 1978 song Enough Time which features traditional morse code beeps that translates to: "SOS this is planet Earth - we are fucked - please advise". The main guitar ri in the Canadian Prog rock band Rush's instrumental song YYZ translates to Y Y Z in morse code. And one of the most famous morse code messages in music is the start of Beethoven's fth symphony which incidentally spells out V in morse code, V being the Roman numeral for 5. This is mostly interesting because Beethoven wrote his fth symphony in 1804 - 1808, years before morse code even existed. The opening to the fth symphony became the symbol of allied victory in WW2 because of this, V being the radio transmission meaning "Victory" after a battle. [2] 2

Figure 1: A circuit diagram of the morse encoder. 2 Design We started out developing a simple circuit design to convert the morse code, that would eventually be encoded by software written in C for the arduino, into the physical world. Our design consisted of an Arduino Uno to write our code on, a breadboard to build the circuit on, a potentiometer to control the frequency of the morse signal, a green LED to display our morse code with and some wires to connect the components to the arduino's output. We examined the available outputs on the arduino and decided that pins 12 and 13 were optimal to use for our outputs, for they are completely controllable. The idea for this setup came from both the lab instructions and further research into how the arduino sends signals to a circuit. Upon some experimentation with the build of the circuit we came to the conclusion that in order to get the desired 50 mA current through the circuit we would need to implement some resistors into the design. This is done to protect the Arduino unit. Next we built a separate circuit with a button to manually override the encoding software, using a switch to go from auto to manual. At this point in the development of the project we decided that we wanted to implement sound to our circuit build, which we did by adding an electronic buzzer to the circuit in parallel with the green LED. The last addition to the design came when we had started writing the encoder and had decided to include an error function, so when the user inserts any letters or symbols outside the parameters we had set it would display an error. We connected a red LED to the circuit to display when the encoder ran into an error. The nished circuit can be seen in gure 1. 2.1 Requirements The requirements for our system is that it accepts a string input through the Arduino software's serial monitor and then systematically break it down into individual char variables that are then translated into pulses of appropriate length. The pulses will be fed into our circuit and displayed via a green LED and sound from an electronic buzzer. The speed of the output 3

Figure 2: International morse code as de ned by ITU-R [3]. Figure 3: A ASCII table. signal must be controllable even though the program is running. It must also include a manual override that can be operated by a human and disregard anything the program is doing. The Radiocommunication Sector of The International Telecommunication Union (ITU-R) issued a recommendation booklet about the proper use of morse code in 2009. The de nition of morse code that is listed in this document is used in this project. This version of the international morse code includes the English alphabet, Arabic numerals and a few punctuation marks. The document also lists morse code for various transmission signs such as "Understood", "Wait" and "End of work" that are not in the scope of this project since we are only dealing with letters and symbols. We made a table where all the letters and symbols encodable with the device are listed along with their morse code as de ned by ITU-R [3]. The table can be seen in gure 2. To encode theses letters and symbols we referred to the ASCII table [4] which the computer and therefore the Arduino 1.0.1 software use to represent letters and symbols. The table can be seen in gure 3. If the input is lower case letters, they will be automatically converted to upper case letters and then translated. If the input is a symbol that is not in the table in gure 2 it will not be translated and a error will be displayed, both in the serial monitor of the Arduino 1.0.1 software and via a red LED in the circuit. 4

Figure 4: A Modular Dependency Diagram of the program. To do this we need to create an array with char variables to use as a library to compare our input string with. This array will span symbols in the ASCII table from the value 34 to 90. Then we have to create a function that loops through the input string and analyses each char variable, to be able to convert each letter to a series of short and long pulses. Depending on how each letter corresponds to short and long, we make the loop function go into the desired function to create the pulses and send as output from the arduino into our circuit. In order to be able to control the frequency of the morse code while it is running we have to have the arduino emit a 5 V controlling voltage to the potentiometer and accept a changing analog signal to an input. 2.2 Software This assignment is very software demanding. Therefore we focused our main attention on writing the code for the system. A Modular Dependency Diagram of the program can be seen in gure 4 and below is a pseudocode describing the program step by step. The actual C code can be found in section 8.1, Appendix. Decleration of variables Set greenled and redled as output variables 12 and 13. Set minpulse 50, the minimum pulse length (50 ms) Set scaleofpulse 6, this controls the scale of the potentiometer. Set pot A0, assigns an input variable for the potentiometer. Set serialinput 0, giving variable an initial value. Set rounder 0, to use with Serial.print to print out the letters we are turning into morse code. Set errortime 500, to control the time of the error display. Set timer as an unsigned long variable, this will be used to count time for the error function. Create morselib, a reference library which holds the corresponding morse code for the letters we want to translate. 5

Setup function { Set pin 12 as output Set pin 13 as output Assign the serial port, speed 9600 bit/s } Main looping function { If the error timer is nished. { Turn o the signal to redled to stop the error display. } If text is available for encoding. { serialinput accepts data from the serial port Print out the letter we are converting and corresponding morse code. Calls for the translator function with serialinput as input variable. Test: prints out the length of short and long morse outputs. } } Translator function { Set index variable which selects the corresponding morse code from the morselib, relative to which letter is being encoded. If the symbol being translated is a space { Calls for the space function } If the symbol being translated is not within the parameters of morselib { Calls for the error function } Loops through each element of the character being encoded within the morselib { If the element is for a short output { Calls for the short function } If the element is for a long output { Calls for the long function } If the symbol being encoded is not accepted by the morselib { Calls for the error function } } 6

Calls for the letterspace function } Short function { Set pulse variable, controls the length of the delay. Print out " Short " on the serial window. Turns on the signal to greenled for the duration of pulse. Turns of the signal to greenled and waits for the duration of pulse. } Long function { Set pulseon variable, controls the length of the delay. Set pulseo variable, controls the length of the delay time after shutting o . Print out " Long " on the serial window. Turns on the signal to greenled for the duration of pulseon. Turns of the signal to greenled and waits for the duration of pulse. } Error function { Set pulse variable, controls the length of the delay. Print out " Incorrect input " on the serial window. Turns on the signal to redled. Starts the timer counting in milliseconds. } Letterspace function { Set pulse variable, controls the length of the delay. Delays for the duration of pulse. } Space function { Set pulse variable, controls the length of the delay. Delays for the duration of pulse. } 2.3 Limitations This project has its limitations as one might expect. To start o our system only accepts certain type of input variables, both lower and higher case letters and a handful of symbols. Now in order to avoid a system failure when the user picks a symbol not accepted by the program we used defensive programming to included an error function. Whether the symbol is not within the parameters of the morselib array or it is an illegal symbol within the array the system defaults to an error function. The function sends a signal to a red diode on the circuit board for a duration equal to a normal white-space so not to o set the system. In short no environmental factors limit the usage of the device. Although it is advised to be indoors and 7

keep food and beverages away from the arduino at all times. Another thing to consider is that the system needs to be connected to a computer at all times. It would be optimal to have an external power supply mounted to system as well a way to input data or text to be encoded. 3 Testing While developing the software we relied heavily on test driven programming. Before starting our project we had to make sure that the Arduino Uno unit was not defective. To do this we uploaded the example Blink function to the arduino unit which resulted in a light on the unit to blink indicating that it was working correctly. Our rst objective was to program the arduino to send a steady signal through a selected output to the circuit. To test this we placed a diode in the circuit we had built, uploaded the code we had written for this purpose and when the diode lid up we had con rmation that this section was functional. Next section of the project that needed to be tested was whether or not we are able to accept a string input and break it up to be analysed and encoded later. To do this we print out the letter being encoded and the corresponding morse code. Each time the void loop goes through a cycle. We performed the same test on a string including every available variable in the morselib array along with some illegal symbols to see if our encoder was working as intended. Results can be seen in section 8.2 in the appendix. The last test we had to perform was to test if the length of the morse code pulses was accurate. To do this we wrote a separate code that reads the output of our program on a second arduino and measures the time from a high to a low, i.e. times the pulses. Then we compare the short and long signals to see if the ratio is correct. See section 8.1 in the appendix. Upon testing we discovered that it was crucial to connect both arduino units used for this test to mutual ground to get uncorrupted read on the signal from the encoder. 4 Usage The device is useful for people who for some reason need to communicate in morse code but are not trained in transmitting morse code. be able to transmit code so it can be understood takes a lot of training so not everyone who needs to transmit morse code has the ability to do it, at least straight away. In order to use the device some steps must be taken in assembly and software installation. 4.1 Installation To be able to use the device it is necessary to have the Arduino 1.0.1 software installed. If it is not installed on the computer the device is to be used with it can be downloaded and installed from Arduino's homepage [5]. 1. Turn on the computer and start an operating system. 8

2. Open a web browser and go to Arduino's homepage [5]. 3. Download and install Arduino 1.0.1. by following the instructions on Arduino's homepage. 4. Install the serial driver for the Arduino Uno. 5. Connect the arduino to a working USB port. 6. Construct the circuit as described above. The circuit can be seen in gure 1. 7. Open the Arduino 1.0.1 software and open the morse encoder software, either by cutting and pasting into a new sketch or by downloading the program here: dropbox.com/u/2086034/morse encoder.ino. https://dl. This is an open download link hosted by dropbox.com. 8. Upload the program to the Arduino Uno. 4.2 Instructions 1. Open the serial monitor. 2. Type in the message to encode and press Enter. 3. If an invalid letter or symbol is entered an error display will let you know. 5 Results and Discussion By implementing test driven development we were successfully able to limit the amount of time and energy lost to bugs and errors in the programming. This was done by cutting the program up into objects or seperate functions that each have a restricted and well de ned purpose and testing each step of the way. Naturally some problems occurred, but none of them stopped the programming for long. The circuit was built without any major hitches, experience in electric circuits came to good use there. Testing proved the function of the device as can be seen in sections 5 and 6 6 Conclusion The product of this lab report is a working morse decoder that can handle all the letters and symbols in international morse code as de ned by ITU-R [3]. It displays the translated message using a blinking green LED along with an electric buzzer and printing the result out in the serial monitor. The speed of the transmission can be altered while the program is running, a error displays when an invalid character is entered, both via a red LED and in the serial monitor of the development software. A manual override was implemented that can be turned on and used by a human in spite of what the encoder is trying to display. The objectives set in the beginning of the project have all been met and some additional functions have been added over the course of the project. Possible costumers for the device include radio amateurs that are honing their skills at morse code transmissions. The device is very useful as a learning tool for people who are learning morse code and want a safe and sure way to transmit morse code. 9

6.1 Future work A way to take this project further would be to develop a decoder capable of translating the whole library for any given frequency. This addition would be make morse code translation capable for people with little or no knowledge of the code. The system might also be used as a learning tool for people interested in morse code to learn how to decipher it. 10

7 References [1] M. Bellis, The History of the Telegraph, September 2012. [Online]. Available: /a/telegraph.htm [2] G. Stanley, The Cambridge Companion to Beethoven. [3] Recommendation ITU-R M.1677-1 ber 2012. [Online]. Available: (10/2009), Cambridge University Press, 2000. International Morse Code, Septem- http://www.itu.int/dms pubrec/itu-r/rec/m/R-REC-M. 1677-1-200910-I!!PDF-E.pdf [4] ASCII Table and Description, September 2012. [Online]. Available: http://www.arduino. cc/ [5] Arduino homepage, September 2012. [Online]. Available: http://www.asciitable.com/ 11

8 8.1 Appendix Code 1 Encoder : 3 // V a r i a b l e d e f i n i t i o n s . 5 i n t greenled 12 , redled 13; i n t m i n p u l s e 5 0 ; // S e t s t h e minimum p u l s e l e n g t h a s 50 ms . I f m i n p u l s e 50 and s c a l e o f p u l s e 6 t h e dot l e n g t h can be changed from 50 ms t o 220 ms by a d j u s t i n g t h e p o t e n t i o m e t e r w h i l e t h e program i s r u n n i n g . i n t s c a l e o f p u l s e 6 ; // S e t s t h e d i v i d e r v a l u e f o r each p u l s e , This c o n t r o l s t h e s c a l e o f t h e p o t e n t i o m e t e r . I f m i n p u l s e 50 ms , d i v i s i o n by 2 means t h e l o n g e s t p u l s e w i l l be ( 1 0 2 3 ms / 2 ) 50 ms 562 ms . i n t pot A0 ; // A p o t e n t i o m e t e r i s used t o r e g u l a t e t h e s p e e d o f t h e e n c o d e r . i n t s e r i a l i n p u t 0 ; // I n t i t a l v a l u e f o r t h e s e r i a l i n p u t s e l e c t e d a s 0 . i n t r o u n d e r 0 ; // Makes S e r i a l . p r i n t p r i n t out l e t t e r s and symbols i n s t e a d o f t h e ASCII v a l u e . u n s i g n e d l o n g e r r o r t i m e 50UL ; // S e t s t h e d i s p l a y time f o r t h e e r r o r f u n c i t o n t o 50 ms . UL i s t o s p e c i f y t h a t t h e v a r i a b l e type i s u n s i g n e d l o n g . u n s i g n e d l o n g t i m e r ; // D e c l a r e t h e t i m e r v a r i a b l e used t o s t o p t h e e r r o r displaying . 7 9 11 13 15 17 // A r e f e r e n c e a r r a y o f p o i n t e r s r e p r e s e n t i n g t h e ASCII v a l u e s from 34 f o r t h e symbol " t o 90 f o r t h e l e t t e r Z . The s t r i n g s i n t h e a r r a y r e p r e s e n t t h e Morse code f o r each l e t t e r o r symbol . I f t h e l e t t e r i s not i n Morse code a " i " f o r ignore sets off a error . char morselib [ ] {" s l s s l s " , " i " , " i " , " i " , " i " , " s l l l l s " , " l s l l s " , " l s l l s l " , " i", "slsls", " llssll ", "lssssl", " slslsl ", "lssls", " lllll ", " sllll ", " sslll " , " sssll " , " ssssl " , "sssss" , " lssss " , " llsss " , " l l l s s " , " l l l l s " , " l l l s s s " , "i " , " i " , " l s s s l " , " i " , " s s l l s s " , " s l l s l s " , " sl " , " lsss " , " l s l s " , " lss " , "s" , " s s l s " , " l l s " , " ssss " , " ss " , " s l l l " , " l s l " , " s l s s " , " l l " , " ls " , " l l l " , " s l l s " , " l l s l " , " sl s " , " sss " , " l " , " ssl " , " s s s l " , " s l l " , " l s s l " , " l s l l " , " l l s s " }; // Legend : """ "#" " " "%" "&" " '" "(" ") " " " " " " ," " " "." "/" "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" ":" " ; " " " " " " " "?" "@" "A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z" 23 void setup ( ) { pinMode ( g r e e n l e d , OUTPUT) ; // A s s i g n s output 12 f o r g r e e n LED f o r morse display . pinMode ( r e d l e d , OUTPUT) ; // A s s i g n output 13 f o r r e d LED f o r e r r o r d i s p l a y . S e r i a l . b e g i n ( 9600 ) ; // S e t s up s e r i a l p o r t t o communicate with arduino , s p e e d 9600 b i t / s . } 25 // S e r i a l l i s t e n e r , must be c a l l e d " l o o p " . 27 void loop ( ) { i f ( m i l l i s ( ) t i m e r e r r o r t i m e ) // S t o p s t h e e r r o r d i s p l a y a f t e r t h e t i m e r has f i n i s h e d . { d i g i t a l W r i t e ( r e d l e d , LOW ) ; } 19 21 29 31 12

33 35 37 39 41 i f ( S e r i a l . a v a i l a b l e ( ) 0 ) // I f t h e r e i s something t o t r a n s l a t e , t h e symbol i s t r a n s l a t e d and d i s p l a y e d on t h e s e r i a l monitor . { s e r i a l i n p u t toupper ( S e r i a l . read ( ) ) ; S e r i a l . p r i n t ( " \n T r a n s l a t i n g : " ) ; S e r i a l . p r i n t l n ( s e r i a l i n p u t , 0) ; S e r i a l . p r i n t ( " Morse code : " ) ; translator ( serialinput ) ; S e r i a l . p r i n t ( " \nDot l e n g t h i n ms : " ) ; S e r i a l . p r i n t l n ( ( analogRead ( pot ) / s c a l e o f p u l s e ) minpulse , 1 ) ; // D i s p l a y s t h e l e n g t h o f each dot , t h e l o w e s t p u l s e l e n g t h . } 43 } 45 // T r a n s l a t o r from s e r i a l i n p u t t o ASCII v a l u e s . ASCII t a b l e found h e r e : h t t p : / /www. a s c i i t a b l e . com . v o i d t r a n s l a t o r ( c h a r symbol ) { i n t i n d e x symbol ' " ' ; // L o c a t e s t h e c o r r e c t a r r a y e l e m e n t by s u b t r a c t i n g t h e ASCII v a l u e 34 f o r " from t h e symbol ' s ASCII v a l u e . c h a r e n c o d e r m o r s e l i b [ i n d e x ] ; // C o p i e s a s t r i n g from t h e m o r s e l i b r e f e r e n c e array 47 49 51 53 55 57 59 61 63 65 67 69 71 73 75 77 i f ( symbol ' ' ) // When a s p a c e between words i s e n t e r e d i n t h e s e r i a l monitor t h e f u n c t i o n s p a c e ( ) c r e a t e s a d e l a y f o r 6 d o t s . The d e l a y a f t e r each s h o r t o r l o n g i s 1 dot l o n g t o make t h e d e l a y between words 7 d o t s long . { space () ; return ; } e l s e i f ( i n d e x 0 i n d e x 56 ) // Makes s u r e o n l y t h e s c o p e o f t h e m o r s e l i b r e f e r e n c e a r r a y i s used , from t h e ASCII v a l u e s 34 t o 9 0 . O t h e r w i s e a error i s displayed . { err () ; return ; } f o r ( i n t i 0 ; i s t r l e n ( e n c o d e r ) ; i ) // A f o r l o o p t h a t walks through each e l e m e n t o f t h e s t r i n g taken from t h e m o r s e l i b r e f e r e n c e a r r a y . { i f ( e n c o d e r [ i ] ' s ' ) // I f t h e s t r i n g e l e m e n t i s s t h e v o i d f u n c t i o n sh ( ) i s s t a r t e d t o d i s p l a y a dot ( a s h o r t s i g n a l ) . { sh ( ) ; } e l s e i f ( e n c o d e r [ i ] ' l ' ) // I f t h e s t r i n g e l e m e n t i s l t h e v o i d f u n c t i o n l o ( ) i s s t a r t e d t o d i s p l a y a dash ( a 3 dot l o n g s i g n a l ) . { lo () ; } else { e r r ( ) ; // I f t h e l e t t e r i s marked with a i f o r i g n o r e a e r r o r i s d i s p l a y e d . } } l e t t e r s p a c e ( ) ; // Makes t h e s p a c e between each l e t t e r 3 d o t s l o n g by adding 2 d o t s o f s p a c e a f t e r t h e one dot i n sh ( ) and l o ( ) . 13

} 79 81 83 85 87 89 91 93 95 97 99 101 103 105 107 109 111 113 115 // D e f i n i t i o n o f f u n c t i o n s v o i d sh ( ) // D i s p l a y s a s h o r t p u l s e ( dot ) . { i n t p u l s e ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ; // This v a r i a b l e c o n t r o l s the space length . S e r i a l . p r i n t ( " Short " ) ; d i g i t a l W r i t e ( g r e e n l e d , HIGH ) ; delay ( pulse ) ; d i g i t a l W r i t e ( g r e e n l e d , LOW ) ; delay ( pulse ) ; } v o i d l o ( ) // D i s p l a y s a l o n g p u l s e ( dash ) . { i n t p u l s e o n ( 3 ( ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ) ) ; i n t p u l s e o f f ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ; S e r i a l . p r i n t ( "Long " ) ; d i g i t a l W r i t e ( g r e e n l e d , HIGH ) ; delay ( pulseon ) ; d i g i t a l W r i t e ( g r e e n l e d , LOW ) ; delay ( p u l s e o f f ) ; } v o i d e r r ( ) // D i s p l a y s a e r r o r message and l i g h t s a r e d LED. { i n t p u l s e ( 1 ( ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ) ) ; S e r i a l . print ( " I n c o r r e c t input " ) ; d i g i t a l W r i t e ( r e d l e d , HIGH ) ; t i m e r m i l l i s ( ) ; // S t a r t s a t i m e r t h a t c o u n t s u n t i l t h e e r r o r t i m e p r e s e t i s reached . } void l e t t e r s p a c e ( ) { i n t p u l s e ( 2 ( ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ) ) ; delay ( pulse ) ; } 121 void space ( ) { i n t p u l s e ( 6 ( ( analogRead ( pot ) / s c a l e o f p u l s e ) m i n p u l s e ) ) ; delay ( pulse ) ; } 123 // End o f program 117 119 14

1 3 5 7 9 11 13 15 17 19 Decoder : int readpin 12; unsigned long duration ; void setup ( ) { pinMode ( r e a d p i n , INPUT) ; S e r i a l . begin (9600) ; } void loop ( ) { d u r a t i o n p u l s e I n ( r e a d p i n , HIGH, 3 5 0 0 0 0 ) ; i f ( duration 20000) { S e r i a l . p r i n t ( " \n P u l s e [ us ] : " ) ; S e r i a l . print ( duration ) ; } } 8.2 Tests 1 Test1 : 3 This i s w r i t t e n i n t o t h e s e r i a l monitor : "# %&'() , ./0123456789:; ?@ABCDEFGHJKLMNOPQRSTUVWXYZ See results in the gures below: Test2 : 2 4 6 8 10 12 We typed SOS i n t o t h e s e r i a l p o r t o f t h e e n c o d e r and t h i s i s what we r e a d from t h e s e r i a l p o r t on t h e d e c o d e r : Pulse Pulse Pulse Pulse Pulse Pulse Pulse Pulse Pulse [ us ] : [ us ] : [ us ] : [ us ] : [ us ] : [ us ] : [ us ] : [ us ] : [ us ] : 49743 49744 49746 149224 149228 149230 49743 49746 49746 15

Figure 5: 16

Figure 6: 17

A Morse code encoder will be designed using an Arduino Uno that is connected to a laptop via a serial USB cable. The serial monitor of the Arduino development environment called Arduino 1.0.1 will be used to feed a message containing letters and symbols from a keyboard to the Arduino. The Arduino will then translate the message, if possible .

Related Documents:

Texts of Wow Rosh Hashana II 5780 - Congregation Shearith Israel, Atlanta Georgia Wow ׳ג ׳א:׳א תישארב (א) ׃ץרֶָֽאָּהָּ תאֵֵ֥וְּ םִימִַׁ֖שַָּה תאֵֵ֥ םיקִִ֑לֹאֱ ארָָּ֣ Îָּ תישִִׁ֖ארֵ Îְּ(ב) חַורְָּ֣ו ם

Chapter 1 - Introduction to Mechatronics Questions 1.1 What is mechatronics? Mechatronics is the field of study concerned with the design, selection, analysis and control of systems that combine mechanical elements with electronic components as well as computers and/or microcontrollers. Mechatronics topics involve elements from

A multi-disciplinary mechatronics (and material handling systems) course was create d that allows students to learn and experience mechatronics engineering within the context of material handling systems. As shown in Figure 1, mechatronics incorporates aspect s from different engine ering fields such that product teams are

Mechatronics is also known as a way to achieve an optimal design solution for an electromechanical product. Key mechatronics ideas are developed during the . You can achieve this by simply making digital test and simulation an integral part of the digital design phase. As mechatronics systems become more complex, the challenges associated .

Biology Lab Notebook Table of Contents: 1. General Lab Template 2. Lab Report Grading Rubric 3. Sample Lab Report 4. Graphing Lab 5. Personal Experiment 6. Enzymes Lab 7. The Importance of Water 8. Cell Membranes - How Do Small Materials Enter Cells? 9. Osmosis - Elodea Lab 10. Respiration - Yeast Lab 11. Cell Division - Egg Lab 12.

Contents Chapter 1 Lab Algorithms, Errors, and Testing 1 Chapter 2 Lab Java Fundamentals 9 Chapter 3 Lab Selection Control Structures 21 Chapter 4 Lab Loops and Files 31 Chapter 5 Lab Methods 41 Chapter 6 Lab Classes and Objects 51 Chapter 7 Lab GUI Applications 61 Chapter 8 Lab Arrays 67 Chapter 9 Lab More Classes and Objects 75 Chapter 10 Lab Text Processing and Wrapper Classes 87

92nd Senate approved Courses Scheme & Syllabus for BE (Mechatronics) 2017 B.E. (Mechatronics) 2017 –Course Scheme and Syllabus (1st - 4th Year) SEMESTER – I (GROUP-A) SR. NO. COURSE NO. TITLE L T P CR 1 UPH004 AP

Sector Masonr Certi cate Massage Therap Mechanical Engineering Technology Mechatronics I Mechatronics II Mechatronics Technolog Medical Assistant eM dac il CaceelMil drac l Laboar tenohTc or ol g Me dac il Scbi re Sort oceassipiti