What Will I Learn?
At the end of this tutorial:
♦ The readers will be able to create a touch sensitive switch using the darlington pair of transistor and arduino uno.
♦ The readers will be able to know how the circuit works.
♦ Learn to apply the circuit in the future electronic projects
Introduction
In this tutorial, we will create a simple touch switch using the darlington pair of transistor. This circuit is a touch sensitive due to the fact that it can respond to the current passed by skin contact even at safe voltages. The circuit has a high current gain that can drive the connected external device.
You can read more about Darlington Pair here
Requirements
Electronic Components
♦ Arduino Uno
♦ Transistor
♦ LED
♦ Resistor
♦ Generic female header
♦ Breadboard
♦ Connecting wires
Software
♦ Fritzing application
Difficulty
♦ Intermediate
Tutorial Contents
Using the fritzing software, we will create our circuit diagram, arduino codes and prototype using the breadboard
Part I. Schematic Diagram
So first let us construct our circuit diagram.
Select the electronic components needed for the circuit in the fritzing library. We need 1 arduino uno, 3 transistors, 8 resistors, 2 Generic female header and 3 LED.
Arrange the components before constructing the circuit.
In arranging the components, place all the components for the input side (left side) of the arduino and the components for the output side (right side).
At the input side of our circuit is the touch sensitive switch using the darlington pair. We need two transistors, 3 resistors and 2 generic female header. While at the output side of our circuit, we need 5 resistors, 1 transistor, and 3 LED for our load circuit to be turned on and off using the touch switch.
Now let us construct our circuit diagram.
First we will connect the darlington pair, the two generic female header will serve as the touching component that will be connected to the base terminal of the first transistor and the other one for the source voltage as you can see in the figure below.
Then we will connect the collector terminal of the first transistor to the base terminal of the second transistor.
At the output side of our circuit, we have the amplifier circuit and the load circuit consisting of the three LED.
Our external circuit is composed of three LED connected in parallel as you can see in the figure below.
The output of our amplifier circuit at the collector terminal is then fed to the external circuit that will be served as the input signal.
Now this is our final circuit diagram.
When you touch the generic female header, there will be a small input signal that will flow through the base resistor of the first transistor. This signal is then amplified at the collector terminal then it is fed to the base terminal of the second transistor.
Then this amplified signal is then fed to the input pin of our microcontroller, which is the pin A0. Upon receiving this signal, our arduino will trigger and will give output signal at pin 13.
This output signal at this pin is connected to the base resistor of the transistor to be amplified as you can see in the figure below.
Then the amplified output at the collector terminal is then connected to the external load circuit. This amplified signal will drive the load circuit allowing the three leds to switch on. The three leds were connected in parallel so that same voltage across each led.
Part II. Code
Now let us do programming of our Arduino uno.
Click on code to start.
The input pin for our microcontroller from the output of the darlington pair is the analog pin 0 and the output pin is 13.
int emitPin = 0; //emitter input pin
int resPin = 13; //output pin for our amplifier circuit
int emitValue = 0; //initial value store in the emitter terminal at the second transistor
void setup() {
pinMode (emitPin, INPUT); //emitter output terminal as input value
pinMode(resPin, OUTPUT); //digital output signal to the amplifier circuit for the external load
}
void loop(){
emitValue = analogRead(emitPin); //read analog value from the emitter output
if (emitValue >=threshold){
digitalWrite(resPin, HIGH); //give output at pin 13 to be amplified at the amplifier circuit
else if
digitalWrite(resPin, LOW); //no output signal at pin 13
}
}
Here are our arduino codes.
int emitPin = 0; //emitter input pin
int resPin = 13; //output pin for our amplifier circuit
int emitValue = 0; //initial value store in the emitter terminal at the second transistor
void setup() {
pinMode (emitPin, INPUT); //emitter output terminal as input value
pinMode(resPin, OUTPUT); //digital output signal to the amplifier circuit for the external load
}
void loop(){
emitValue = analogRead(emitPin); //read analog value from the emitter output
if (emitValue >=threshold){
digitalWrite(resPin, HIGH); //give output at pin 13 to be amplified at the amplifier circuit
else if
digitalWrite(resPin, LOW); //no output signal at pin 13
}
}
Part III. Breadboard
Click on the breadboard.
Arrange each component in the breadboard before connecting.
Now connect each component if you don’t know how to connect using breadboard just read my previous tutorial about how to construct a circuit in the breadboard
Application
The readers can create their own touch sensitive switch using the darlington pair like the example below.
Curriculum
Here are my other tutorials for electronic projects.
ELECTRONIC PROJECTS
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Hey @flauwy, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
Hey @rfece143 I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
i want to learn but is not so easy