By touching the "capacitive touch" sensor the LED will slowly turn ON or OFF.
Step 1: What You Will Need- Arduino UNO (or any other Arduino)
- Jumper wires
- Capacitive touch sensor
- LED
- 1K ohm resistor
- Breadboard
- Visuino program: Download Visuino
Thank you PCBWay for supporting this tutorial and helping users learn more about electronics.
What I like about the PCBWay is that you can get 10 boards for approximately $5 which is really cost effective for professional made boards, not to mention how much time you save!
Go check them out here. They also offer a lot of other stuff in case you might need it like assembly,3D printing,CNC machining and a lot more.
Step 3: The Circuit- Connect Capacitive touch sensor "Signal" pin to Arduino Digital pin[2]
- Connect Capacitive touch sensor "VCC" pin to pin [5V]
- Connect Capacitive touch sensor "GND" pin to pin [GND]
- Connect Arduino board pin [GND] to LED negative pin [-]
- Connect Arduino board digital pin [6] to 1k ohm resistor
- Connect 1k ohm resistor second pin to LED positive pin [+]
The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.
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 5: In Visuino Add Components- Add "Debounce Button" component
- Add "Toggle(T) Flip-Flop" component
- Add "Detect Edge" component
- Add "Analog Value" component
- Add "Ramp To Analog Value" component
- Double click on "AnalogValue1" and in the "Elements" window drag "Set Value" to the left side and in the Properties window set "Value" to 1
- Drag another "Set Value" to the left side and in the Properties window set "Value" to 0
- Close the Elements window
- Select "RampToValue1" and in the properties window set "Slope (S)" to 0.5
- Connect Arduino Digital Out pin [2] to "Button1" component pin[In]
- Connect "Button1" component pin[Out] to "TFlipFlop1" component pin[Clock]
- Connect "TFlipFlop1" pin [Out] to "AnalogValue1">"Set Value1" component pin[In]
- Connect "TFlipFlop1" pin [Inverted] to "DetectEdge1" pin[In]
- Connect "DetectEdge1" pin [Out] to "AnalogValue1">"Set Value2" component pin[In]
- Connect "AnalogValue1" pin[Out] to "RampToValue1" pin[In]
- Connect "RampToValue1" pin[Out] to Arduino Digital > Analog PWM pin [6]
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
Step 9: PlayIf you power the Arduino UNO module, and touch the "capacitive touch" sensor the LED will slowly turn ON or 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
Comments