by

## Using A Mechanical Relay to Switch Large AC or DC Currents with a Small DC Current

Let’s say you are working on a project that requires you to turn on an appliance plugged into a household main (115-ish V AC) using an Arduino (3.3-5 V DC). What would you use as a switch. For some applications you can use a bipolar junction transistor as a switch (see this post). However, such

by

## Using Bytes and Bitmasks to Control Multiple Arduino Digital Outputs

A fine way to compactly control multiple Arduino digital output pins is to use a byte in conjunction with a bitmap. The byte provides the structure (eight bits) to compactly specify which digital pins are turned on and which are turned off. Let’s consider an example. Suppose you have eight digital output pins to control,

by

## Mapping Arduino Analog-to-Digital Converter (ADC) Output to Voltage

The Arduino Uno is a digital device, but it has an analog-to-digital converter (ADC) to allow us to probe the analog signals that permeating our analog world. The ADC is a 10-bit device that can map an analog signal consisting of a voltage ranging from 0 to 5 volts to a decimal value between 0

by

## Finding Standard Error of Slope and Y-Intercept using LINEST in Excel (Linear Regression in Physics Lab)

In Excel, you can apply a line-of-best fit to any scatterplot. The equation for the fit can be displayed but the standard error of the slope and y-intercept are not give. To find these statistics, use the LINEST function instead. The LINEST function performs linear regression calculations and is an array function, which means that

by

## Making a Movie in MATLAB

Although it creates bulky AVI files, MATLAB can relatively easily make movies of animated figures. The code below prototypes how this is done. % define the number of frames in your movie numberOfFrames = 1200; % use a loop to generate frames of the movie for ii = 1:numberOfFrames % insert code to update data