Style Switcher

Choose Color:

HARDWARE SETUPBOIDS

There are two circuits that we need for this project: a potentiometer circuit and a button circuit. We reused the circuit from lab3 to take in the potentiometer readings. The potentiometer we use is 10KΩ. The output of the potentiometer goes through an anti-aliasing low pass filter that has a corner frequency of about 1kHz. Since the resistor value of the low pass filter is 100kΩ, to achieve a corner frequency of 1kHz, the capacitor value should be 1.6nF. We use a 1nF capacitor in our circuit to construct the low pass filter. The low pass signal is then fed into a unity gain buffer, and the output of the unity gain buffer is sent to the MCU ADC. The unity gain buffer here isolates the potentiometer circuit from the development board. The high input impedance of the op-amp also draws very little current from the Vdd supply.



The button circuit is very simple. The button we use in lab has four terminals, and each pair of terminals are connected internally as shown in the figure below. One of the button terminals is connected to RB7 or RB8 on the development board as the input. When the button is not pressed, it will register a LOW; when the button is pressed, it will register a HIGH.