ebook img

Arduino-Based Embedded Systems: Interfacing, Simulation, and LabVIEW GUI PDF

331 Pages·2018·46.83 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Arduino-Based Embedded Systems: Interfacing, Simulation, and LabVIEW GUI

Arduino-Based Embedded Systems Arduino-Based Embedded Systems Interfacing, Simulation, and LabVIEW GUI Rajesh Singh Anita Gehlot Bhupendra Singh Sushabhan Choudhury CRC Press Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Boca Raton, FL 33487-2742 © 2018 by Taylor & Francis Group, LLC CRC Press is an imprint of Taylor & Francis Group, an Informa business No claim to original U.S. Government works Printed on acid-free paper International Standard Book Number-13: 978-1-1380-6078-4 (Hardback) International Standard Book Number-13: 978-1-315-16288-1 (ebook) This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged. Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. Library of Congress Cataloging‑in‑Publication Data Names: Singh, Rajesh (Electrical engineer), author. | Gehlot, Anita, author. | Singh, Bhupendra, author. | Choudhury, Sushabhan, author. Title: Arduino-based embedded systems : interfacing, simulation, and LabVIEW GUI / Rajesh Singh, Anita Gehlot, Bhupendra Singh and Sushabhan Choudhury. Description: Boca Raton : Taylor & Francis, CRC Press, 2018. Identifiers: LCCN 2017029926 | ISBN 9781138060784 (hardback : alk. paper) | ISBN 9781315162881 (ebook) Subjects: LCSH: Embedded computer systems--Programming. | Arduino (Programmable controller)--Programming. | LabVIEW. Classification: LCC TK7895.E42 S548 2018 | DDC 006.2/2--dc23 LC record available at https://lccn.loc.gov/2017029926 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com and the CRC Press Web site at http://www.crcpress.com Contents Preface ...................................................................................................................xiii About the Authors ................................................................................................xv Section I Introduction 1. Introduction to Arduino ................................................................................3 1.1 Arduino Uno ..........................................................................................3 1.2 Arduino Mega .......................................................................................4 1.3 Arduino Nano .......................................................................................5 CRC Press 2. Steps to Write a Program with Arduino Integrated Taylor & Francis Group 6000 Broken Sound Parkway NW, Suite 300 Development Environment ..........................................................................7 Boca Raton, FL 33487-2742 2.1 Steps to Install Arduino Integrated Development Environment .....7 © 2018 by Taylor & Francis Group, LLC 2.2 Basic Commands for Arduino ..........................................................11 CRC Press is an imprint of Taylor & Francis Group, an Informa business 3. Steps to Design a Proteus Simulation Model .........................................13 No claim to original U.S. Government works Printed on acid-free paper 4. Introduction to LabVIEW GUI ..................................................................19 International Standard Book Number-13: 978-1-1380-6078-4 (Hardback) 4.1 Steps to Design LabVIEW GUI ..........................................................19 International Standard Book Number-13: 978-1-315-16288-1 (ebook) 4.2 Building the Front Panel ....................................................................22 4.3 Building the Block Diagram ..............................................................23 This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but the author and publisher cannot assume 4.4 Virtual Instrument Software Architecture .....................................24 responsibility for the validity of all materials or the consequences of their use. The authors and publishers 4.4.1 Components Used to Design LabVIEW GUI .....................25 have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint. 5. LabVIEW Interfacing with the Proteus Simulation Software ............29 5.1 Virtual Serial Port Emulator ..............................................................29 Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without written permission from the publishers. Section II Arduino and I/O Devices For permission to photocopy or use material electronically from this work, please access www.copyright. com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood 6. Arduino and Display Devices ....................................................................37 Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For organizations that have been granted a photocopy license by the 6.1 Arduino and Light Emitting Diode..................................................37 CCC, a separate system of payment has been arranged. 6.1.1 Circuit Diagram .....................................................................38 6.1.2 Program ...................................................................................40 Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to infringe. 6.1.3 Proteus Simulation Model ....................................................40 6.2 Arduino and Liquid Crystal Display ...............................................41 Visit the Taylor & Francis Web site at http://www.taylorandfrancis.com 6.2.1 Circuit Diagram .....................................................................42 6.2.2 Program ...................................................................................43 and the CRC Press Web site at http://www.crcpress.com 6.2.3 Proteus Simulation Model ....................................................44 v vi Contents 7. Arduino and Digital Input/Output Devices ...........................................45 7.1 Push Button and Light Emitting Diode/Liquid Crystal Display ................................................................................45 7.2 Push Button–Digital “LOW” .............................................................47 7.2.1 Circuit Diagram .....................................................................47 7.2.2 Program ...................................................................................49 7.2.3 Proteus Simulation Model ....................................................50 7.3 Push Button–Digital “HIGH” ............................................................51 7.3.1 Program ...................................................................................53 7.3.2 Proteus Simulation Model ....................................................54 7.4 Fire Sensor and Light Emitting Diode/Liquid Crystal Display ......55 7.4.1 Circuit Diagram .....................................................................57 7.4.2 Program ...................................................................................59 7.4.3 Proteus Simulation Model ....................................................60 7.5 Passive Infrared Sensor and Light Emitting Diode/Liquid Crystal Display ....................................................................................61 7.5.1 Circuit Diagram .....................................................................63 7.5.2 Program ...................................................................................63 7.5.3 Proteus Simulation Model ....................................................65 7.6 Alcohol Sensor and Light Emitting Diode/Liquid Crystal Display ....................................................................................67 7.6.1 Circuit Diagram .....................................................................69 7.6.2 Program ...................................................................................71 7.6.3 Proteus Simulation Model ....................................................72 8. Arduino and Analog Devices .....................................................................75 8.1 Ultrasonic Sensor and Liquid Crystal Display ...............................75 8.2 Ultrasonic Sensor—Serial Out ..........................................................76 8.2.1 Circuit Diagram .....................................................................77 8.2.2 Program ...................................................................................79 8.2.3 Proteus Simulation Model ....................................................80 8.3 Ultrasonic Sensor—PWM Out ..........................................................81 8.3.1 Circuit Diagram .....................................................................81 8.3.2 Program ...................................................................................83 8.3.2.1 Ultrasonic Sensor—PWM OUT ...........................83 8.3.3 Proteus Simulation Model ....................................................84 8.4 Temperature Sensor and Liquid Crystal Display ...........................85 8.5 Temperature Sensor-Analog Out ......................................................86 8.5.1 Circuit Diagram .....................................................................86 8.5.1.1 Temperature Sensor Analog Out .........................86 8.5.2 Program ...................................................................................88 8.5.2.1 Program LM35—Analog Out ...............................88 8.5.3 Proteus Simulation Model ....................................................88 Contents vii 8.6 Humidity/Temperature Sensor—Serial Out ................................90 8.6.1 Circuit Diagram .................................................................91 8.6.1.1 Temperature Sensor (Serial Out) ...................91 8.6.2 Program ..............................................................................93 8.6.2.1 Temp/Humidity Sensor—Serial Out ............93 8.7 Light-Dependent Resistor with Liquid Crystal Display .............94 8.8 Light-Dependent Resistor—Analog Out .......................................94 8.8.1 Circuit Diagram .................................................................96 8.8.2 Program ..............................................................................98 8.8.2.1 Light-Dependent Resistor—Analog Out ......98 8.8.3 Proteus Simulation Model ................................................99 8.9 Light Intensity Sensor—I2C Out ..................................................100 8.9.1 Circuit Diagram ...............................................................101 8.9.2 Program ............................................................................103 8.9.2.1 LDR TWI (I2C) Out ........................................103 8.10 Servo Motor and the Liquid Crystal Display ..............................103 8.10.1 Circuit Diagram ...............................................................105 8.10.2 Program ............................................................................107 8.10.3 Proteus Simulation Model ..............................................107 9. Arduino and Motors/Actuators ................................................................109 9.1 DC Motor .........................................................................................109 9.1.1 Circuit Diagram ...............................................................111 9.1.2 Program ............................................................................113 9.1.3 Proteus Simulation Model ..............................................114 9.2 Stepper Motor ..................................................................................115 9.2.1 Circuit Diagram ...............................................................117 9.2.2 Program ............................................................................119 9.2.3 Proteus Simulation Model ..............................................120 9.3 AC Motor with Relay ......................................................................121 9.3.1 Circuit Diagram ...............................................................122 9.3.2 Program ............................................................................124 9.3.3 Proteus Simulation Model ..............................................124 Section III Arduino and Wireless Communication 10. Arduino and Wireless Communication .................................................129 10.1 RF Modem (2.4 GHz) ......................................................................129 10.1.1 Circuit Diagram ...............................................................131 10.1.1.1 Transmitter Section .......................................131 10.1.1.2 Receiver Section .............................................132 viii Contents 10.1.2 Program ............................................................................134 10.1.2.1 Transmitter Program .....................................134 10.1.2.2 Receiver Program ..........................................134 10.1.3 Proteus Simulation Model ..............................................135 10.2 Global System for Mobile Modem ................................................136 10.2.1 Circuit Diagram ...............................................................138 10.2.2 Program ............................................................................140 10.2.2.1 Main Program ................................................140 10.2.3 Proteus Simulation Model ..............................................142 Section IV Projects 11. 2.4 GHz RF Modem-Based Security System for Restricted Area .....145 11.1 Introduction .....................................................................................145 11.2 Circuit Diagram ..............................................................................146 11.3 Program ............................................................................................149 11.3.1 Transmitter Section .........................................................149 11.3.2 Receiver Section ...............................................................150 11.4 Proteus Simulation Model .............................................................151 11.5 LabVIEW GUI .................................................................................152 12. Campus Fire Monitoring System with a 2.4 GHz RF Modem ..........155 12.1 Introduction .....................................................................................155 12.2 Circuit Diagram ..............................................................................156 12.2.1 Transmitter Section .........................................................156 12.2.2 Receiver Section ...............................................................157 12.3 Program ............................................................................................158 12.3.1 Transmitter Section .........................................................158 12.3.2 Receiver Section ...............................................................159 12.4 Proteus Simulation Model .............................................................160 12.5 LabVIEW GUI .................................................................................161 13. Light-Dependent Resistor-Based Light Intensity Control System .......165 13.1 Introduction .....................................................................................165 13.2 Circuit Diagram ..............................................................................167 13.2.1 Transmitter Section .........................................................167 13.2.2 Receiver Section ...............................................................167 13.3 Program ............................................................................................168 13.3.1 Transmitter Section .........................................................168 13.3.2 Receiver Section ...............................................................169 13.4 Proteus Simulation Model .............................................................170 13.5 LabVIEW GUI ..................................................................................171 Contents ix 14. DC Motor Control System with LabVIEW GUI ...................................173 14.1 Introduction .....................................................................................173 14.2 Circuit Diagram ..............................................................................175 14.2.1 Transmitter Section .........................................................175 14.2.2 Receiver Section ...............................................................175 14.3 Program ............................................................................................178 14.3.1 Transmitter Section .........................................................178 14.3.2 Receiver Program ............................................................180 14.4 Proteus Simulation Model .............................................................181 14.5 LabVIEW GUI ..................................................................................183 15. Stepper Motor Control System with LabVIEW GUI ...........................185 15.1 Introduction .....................................................................................185 15.2 Circuit Diagram ..............................................................................187 15.2.1 Transmitter Section .........................................................187 15.2.2 Receiver Section ...............................................................187 15.3 Program ............................................................................................190 15.3.1 Transmitter Section .........................................................190 15.3.2 Receiver Program ............................................................191 15.4 Proteus Simulation Model .............................................................193 15.5 LabVIEW GUI ..................................................................................195 16. Accelerometer-Based Laboratory Automation System .......................197 16.1 Introduction .....................................................................................197 16.2 Circuit Diagram ..............................................................................199 16.2.1 Transmitter Section .........................................................199 16.2.2 Receiver Section ...............................................................199 16.3 Program ............................................................................................202 16.3.1 Transmitter Section .........................................................202 16.3.2 Receiver Section ...............................................................203 16.4 Proteus Simulation Model .............................................................205 17. Temperature Monitoring System Using RF Modem ..........................207 17.1 Introduction .....................................................................................207 17.2 Circuit Diagram ..............................................................................208 17.2.1 Transmitter Section .........................................................208 17.2.2 Receiver Section ...............................................................209 17.3 Program ............................................................................................211 17.3.1 Transmitter Section .........................................................211 17.3.2 Receiver Section ...............................................................211 17.4 Proteus Simulation Model .............................................................212 17.5 LabVIEW GUI ..................................................................................213

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.