Book Image

Learning BeagleBone

By : Hunyue Yau
Book Image

Learning BeagleBone

By: Hunyue Yau

Overview of this book

Table of Contents (18 chapters)
Learning BeagleBone
About the Author
About the Reviewers
Terms and Definitions

Controlling relay with a BeagleBone

While a transistor can be used to interface with devices that require more current or a higher voltage, a transistor is still electrically connected to the BeagleBone. A relay is a mechanical switch that is activated or deactivated by an electromagnet and can provide electrical isolation. There are a few potential hazards with controlling a relay. This applies to anything that has a coil such as a solenoid, motor, or even an electromagnet. As a group, they are known as inductive loads. Without going into the physics, switching an inductive load can result in voltage spikes, known as an inductive kickback, which can damage the transistors. The following are the points to consider when connecting to a relay:

  • Consider the current required by the relay. Compared to LEDs, relays can require more power. Check the relay specifications. Sometimes, relay specifies a coil resistance. You can use Ohm's law to figure out the current needed to drive it.

  • Relays come in...