Types of ArduSensors
I will cover the ArduSensor Pot and the QBar Graph in this Instructable. I have 12 ArduSensors available now and more coming soon. The ArduSensors currently available include: ArduSensor Arcade, Button, Fart, Flex, Force, Knock, Light, Magnet, Phototransistor, Pot, Switch, and Temperature. I carry a shield for Arduino that can read up to 4 different ArduSensors at once and have 3 different output options. Also, if you would like output, there is the QBar Graph, QColor, and QBuzz. The QBar Graph is an LED Bar Graph that goes into the digital pins on the Arduino, the QColor is an RGB LED that goes into the digital PWM pins on the Arduino, and the QBuzz is a buzzer add-on that can make many different noises!
Below are the Eagle files (the schematic and the PCB design), since ArduSensors are all open source.
Step 1: Parts
Arduino UNO, Arduino Leonardo, or later
A computer running Arduino IDE 1.0.1 (free)
USB-B Cable (for programming the Arduino UNO only)
USB micro-B Cable (for programming the Arduino Leonardo only)
The ArduSensor Fun Pack includes the ArduSensor Pot and QBar Graph.
ArduSensor Pot Kit from my website, Qtechknow.com includes:
Qtechknow ArduSensor Pot PCB (not yet available)
Male Headers (5)
QBar Graph Kit from my website, Qtechknow.com includes:
Qtechknow QBar Graph PCB (not yet available)
10 Segment LED Bar Graph
Resistor Network - 330 Ohm (2)
Male Headers (14)
Step 2: ArduSensor Pot Assembly
Step 1: Take out all of the parts.
Step 2: Put the potentiometer on the front of the PCB, in the 3 holes in the middle and the two big holes on the lower corners.
Step 3: Flip the PCB over and solder the potentiometer in place. Solder all 5 of the holes that your potentiometer is placed in, even the two big holes.
Step 4: Get your Arduino out (this step doesn’t depend on which Arduino you use). Cut the male headers so that you have a 1 pin male header separate from the other 4 pins. Put the long side of the 1 pin male header into A0 on the Arduino. Put the long side of the 4 pin male headers into VIN, GND, GND, and +5V, which should be all together. Now, put the ArduSensor PCB (with the potentiometer already soldered) onto the 1 and 4 pin male headers. Solder the holes for the headers in place. I have found this tip to be very helpful in keeping the PCB perpendicular to the male header pins.
You are now finished assembling your ArduSensor Pot, and ready to program (or if you like, copy my programs)!
Step 3: ArduSensor Pot Coding
Download the example code for ArduSensors here. Press "Download as Zip" and unzip the folder. Double click on the ArduSensor-LED.ino sketch and run it on your Arduino by clicking on the right arrow key in the Arduino IDE. Plug your ArduSensor Pot into the Arduino (the 4 pin male header goes into VIN, GND, GND, and +5V, and the 1 pin male header goes into A0). ArduSensor-LED.ino is a program to make the built-in LED on D13 to blink at a rate specified by the value (in this case, how much you twist the knob) of the ArduSensor (in this case, the ArduSensor Pot).
Now double-click on the SimpleRead.ino sketch which is in your ArduSensor example code downloads folder and press upload. Plug your ArduSensor Pot into the correct pins (see prior paragraph). Open up the serial monitor (a monitor that you can see on your computer that spits out data) by pressing the magnifying glass in the upper right hand corner. A box that has numbers on the screen should pop up. If you look at the numbers (which are called analog values in Arduino), they will change when you twist the knob.
The Arduino analog values can range from 0 to 1023. So when the potentiometer is all the way one direction, it will read 0 in the serial monitor, while when it is twisted all the way the other direction, it will read 1023. Any position other than that will read 1 to 1022, depending on the direction and degree of twist of the potentiometer.
Below are the schematic and PCB design files, since this is all open source.
Step 4: QBar Graph Assembly
Step 1: Take out all of the parts.
Step 2: Find the LED Bar Graph and find the side that says “YS” on the side. These are the anodes of the LEDs in the bar graph. Put the side that says “YS” into the side on the bar graph on the PCB that says “Anodes”. Put the unmarked side into the “Cathodes” side of the bar graph on the PCB. Solder the bar graph into place.
Step 3: Find the 2 resistor networks and find the small black dot on them (on only one side). The pin that has the small black dot above it will go into the square hole, while the 5 other pins will go into the circle holes. As you will notice, the two resistor networks will not be oriented the same way. Solder the resistor networks in place.
Step 4: Get out your Arduino UNO or Arduino Leonardo and place it in front of you. Take the 14 pin male header and with your diagonal cutters, cut the the 14 pin male header into a 10 pin male header and a separate 4 pin male header. Plug the 10 pin male header into Arduino pins: SCL, SDA, AREF, GND, D13-D8. Plug the 4 pin male header into Arduino pins D7-D4. Put the QBar Graph PCB onto the 10 and 4 pin male headers. Solder the pins at the holes. Use the soldering pointer described in the ArduSensor Potentiometer assembly, try to keep the male headers perpendicular to the PCB.
You’re now finished soldering the QBar Graph, and ready to use the kit.
Step 5: QBar Graph Coding
Below are the schematic and the PCB layout, since these are open source.