Introduction: Arduino Handheld Fan With Capacitive Touch Switch.
In this tutorial we will learn how to Turn Hendheld battery fan ON and OFF using capacitive touch sensor, reley module and Visuino.
Watch a demonstration video.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: What You Will Need
- Arduino UNO (or any other Arduino)
- Jumper wires
- Capacitive touch sensor
- Wires with aligator clips
- Battery fan (or some other battery powered device)
- Visuino program: Download Visuino
Step 2: The Circuit
- Connect Capacitive touch sensor "Signal" pin to Arduino Digital pin
- Connect Capacitive touch sensor "VCC" pin to pin [5V]
- Connect Capacitive touch sensor "GND" pin to pin [GND]
- Connect Relay "Signal" pin to Arduino Digital pin
- Connect Relay "VCC" pin to pin[5V]
- Connect Relay "GND" pin to pin[GND]
- Connect Hendheld "Positive" pin to pin[5V]
- Connect Hendheld "Negative" pin to Relay pin[NC]
- Connect Relay pin[C] to pin[GND]
Step 3: Start Visuino, and Select the Arduino UNO Board Type
To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
Step 4: In Visuino Add Components
- Add "Detect Edge" component and set under properties window "Rising" to "True"
- Add "(T) Flip-Flop" component
- Connect Arduino Digital Out pin  to "DetectEdge1" component pin[In]
- Connect "DetectEdge1" component pin[Out] to "TFlipFlop1" component pin[Clock]
- Connect "TFlipFlop1" component pin[Out] to Arduino Digital IN pin
Step 5: Generate, Compile, and Upload the Arduino Code
In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)
Step 6: Play
If you power the Arduino UNO module, the fan should spin if you touch the "capacitive touch" sensor or turn the fan OFF.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.eu