Basic Tilt Sensor Tutorial

Hardware Design
           In this hardware section we will actual get to building the circuit up piece by piece and section by section. The circuit isn't really that bad to connect together but if you're new to electronics it might take a good 30 minutes. Follow the schematic closely and double check all your breadboard wire connections.

Building The Complex Circuit
          First, gather together all of the parts needed to build the circuit.

·First the power circuit is connected as seen below.

·Second, the PIC circuit is assembled. The 20 MHz Crystal and 10kΩ resistor are added.

·Third, the LED output bar is carefully connected to the PIC for output.

·Lastly, the tilt sensor and pull-up resistor are added and connected to PIN2 of the PIC.

·The circuit is complete! Let's take a look at the firmware/software needed to take input and display output on the LED bar.