Infrared receiver modules

Infrared receiver modules are commonly used in remote control systems, and sometimes for line-of-sight wireless data transmission.

For the IR receiver module pictured here, which is based on a VS1838B sensor receiving a 38 kHz carrier, we will use a library called IRremote, which includes support for several different modules and protocols.

The module has three pins, labeled `G`, `R`, and `Y`. These letters may (or may not) stand for green, red, and yellow, which happen to be sensible colors to use for the wires connecting ground, voltage, and signal pins, respectively.

Communication between devices

Communications come in three forms:

  1. Communicating between two embedded devices.
  2. Communicating between an embedded device and a computer.
  3. Communicating between arbitrary devices through a common hub or bus.

USB Serial to computer

Using serial communications via the Arduino Serial class is very useful for debugging or to send data to a computer for heavier analysis.

Convert a servo to continuous rotation

Some inexpensive servo motors can be easily converted to continuous rotation motors with just a few minutes of work. What this means is that the PWM signal will control the speed and direction of your freely rotating motor instead of setting its position within an 180-degree arc. In other words, it becomes a simple DC motor with a control circuit conveniently built in.

Buttons and switches

Many projects include physical buttons or switches of some kind. The basic principle is simple: Two wires are disconnected until the switch connects them, closing the circuit. (Sometimes the principle is inverted, where the circuit is closed by default and pushing a button opens the circuit until it's released.)

On the software side, you just check whether the signal pin is in a LOW or HIGH state, and branch accordingly.

Analog and PWM signals

Here we will explore encoding data with analog signals or with digital signals that serve a purpose similar to analog signals.

Reading analog voltages

Each Arduino board has a row of pins capable of reading analog input. By "analog" we mean that the input data is determined by the voltage applied to the pin. Although in theory there are infinitely many levels between any two voltages, the actual number of distinct values is limited by noise and the type of hardware reading the voltages.

Subscribe to electronics