electronics

Transistors

Submitted by james on

Transistors are just about everywhere in electronics. They are used in digital switches, amplifiers, voltage regulators, and many other simple components that work together in complex digital circuits. Two types you're likely to use are the bipolar junction transistor (BJT) and the field effect transistor (FET).

Both types of transistor have three pins. The pins on the bipolar junction transistor are called the emitter, collector, and base. On the field effect transistor, the pins are called the source, drain, and gate.

Stepper motors

Submitted by james on

Stepper motors can move back and forth and lock into fixed positions, or steps, around the axis.

Stepper motors are common in machines that require precise and stable movement, like 3D printers and CNC machines.

Usually you will connect a stepper motor to your microcontroller by means of a stepper motor driver board, which has all the circuitry for controlling the motor. Then for you to control the motor, you just need to provide power and a signal to trigger the motor's intended position.

Shift registers

Submitted by james on

A shift register is a simple memory device that allows data to be "shifted" bit-by-bit into or out of the register.

What are shift registers used for?

One place you might use a shift register is to control up to eight components, such as LEDs, using only three Arduino pins instead of a separate pin for each LED. Moreover, some shift registers can be chained together to expose a huge number of inputs or outputs while using only a few pins on the microcontroller. Shift registers are also used for controlling 7-segment LCD displays and various other components.

Servo motors

Submitted by james on

Servo motors are an important part of many robotics projects. A servo can move to arbitrary positions within some range of motion, usually 180 degrees. You might think of them like mechanical elbows.

Most Arduino boards can only supply enough power to move very tiny servos (like the 9g variety for steering small RC vehicles) – and no more than one unless you are careful to move them one at a time. This is helpful for prototyping and debugging isolated parts of a larger robot before moving them off to a different circuit with external power.

Using rotary encoders

Submitted by james on

At first glance, some rotary encoders look a lot like the potentiometers used as knobs on radios and other control boards. They both can serve a similar purpose in providing rotational information to a circuit. However, these components are fundamentally very different:

Using an RFID module

Submitted by james on

Passive RFID tags are basically just little antennas with an extremely low power integrated circuit. When the IC is activated by power induced by the antenna, it generates a signal to transmit a small amount of data, such as an ID number.

This RC522 RFID module can read RFID tags and write to RFID tags that support writing. The RFID tag has a 4-byte (or 32-bit) UID, which means there are about 4.3 billion unique possibilities. Although that sounds like a lot, there are some situations where it's not considered enough to prevent collisions or brute-force guessing.

Passive infrared (PIR) motion sensors

Submitted by james on

A passive infrared (PIR) motion sensor can detect changes in infrared radiation, most often in order to detect the motion or presence of people or animals.

The sensor can be thought of as a two-pixel infrared camera. It has two internal infrared sensors and circuitry to detect changes between them. The internal sensors are covered by a Fresnel lens that determines the PIR device's field of view.

The following relates specifically to the HC-SR501 model, but it should also apply to similar PIR motion sensors for hobbyists.

Using an LED matrix module

Submitted by james on

The MAX7219 LED matrix module used in this example has 64 distinct LEDs that can be individually turned on or off in the Arduino code.

It uses SPI to control 64 individual LEDs while consuming just three GPIO pins on the microcontroller, plus the VCC and GND pins for powering the LED module. The module also has output pins that can be chained together with up to eight (or more) modules.

We will use a library called LEDMatrixDriver, which purports to be faster than another library called LedControl.

Blinking an LED

Submitted by james on

Many impressive projects involve LED light effects of some sort. At the heart of it all is the concept of turning an LED on and off in a regular pattern. Doing this is very easy!

To light an LED, all you need is a power source and a resister. We will use the Arduino itself to provide power from one of the pins. Turning this pin on and off (changing the voltage state from from HIGH to LOW) will cause the LED to blink.