Book Image

Internet of Things Programming with JavaScript

Book Image

Internet of Things Programming with JavaScript

Overview of this book

The Internet of Things is taking the tech world by storm, and JavaScript is at its helm. This book will get you to grips with this exciting new technology. Where do Node.js, HTML5 and Windows 10 IoT Core come in with JavaScript and IoT? Why Raspberry Pi Zero rather than Arduino? How do you configure and build an IoT network from scratch? All your IoT JavaScript questions are answered in this book.
Table of Contents (15 chapters)
Internet of Things Programming with JavaScript
Credits
About the Author
www.packtpub.com
Customer Feedback
Preface

How to set up the power supplies


For our system, it is very important to set up the power supply that will be used in the system. First we need to ensure that the voltage for the Arduino is about 5V. In the following diagram, we have shown how to configure the voltage to about 5 volts:

Power supply for AC loads

If we need to connect AC loads to the Arduino or Raspberry Pi Zero and make an industrial control system, we need to use a voltage of 24 V of DC, as you can see in the following circuit diagram:

Connecting a relay of 24 DC volts to the Arduino board

In the following diagram, we have the circuit to control an AC load using a relay of 24 volts of DC:

We have the final circuit, which represents the interface to control an AC load, connected to the output digital pin to the Raspberry Pi Zero or the Arduino board: this is not very common to see, but it's necessary to learn how to connect a relay that can be energized with 24 volts of DC to the Arduino board:

Finally we have the final circuit...